summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /oox
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/AllLangMoTarget_oox.mk14
-rw-r--r--oox/CppunitTest_oox_crypto.mk89
-rw-r--r--oox/CppunitTest_oox_drawingml.mk57
-rw-r--r--oox/CppunitTest_oox_export.mk50
-rw-r--r--oox/CppunitTest_oox_mathml.mk44
-rw-r--r--oox/CppunitTest_oox_shape.mk48
-rw-r--r--oox/CppunitTest_oox_tokenmap.mk63
-rw-r--r--oox/CppunitTest_oox_vba_compression.mk46
-rw-r--r--oox/CppunitTest_oox_vba_encryption.mk46
-rw-r--r--oox/CppunitTest_oox_vml.mk45
-rw-r--r--oox/CustomTarget_generated.mk43
-rw-r--r--oox/IwyuFilter_oox.yaml190
-rw-r--r--oox/Library_oox.mk339
-rw-r--r--oox/Makefile14
-rw-r--r--oox/Module_oox.mk35
-rw-r--r--oox/Package_customshapes.mk16
-rw-r--r--oox/Package_generated.mk17
-rw-r--r--oox/README.md193
-rw-r--r--oox/README.vars5
-rw-r--r--oox/documentation/predefined-styles-map.odsbin0 -> 14409 bytes
-rw-r--r--oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx38
-rw-r--r--oox/inc/drawingml/chart/axiscontext.hxx109
-rw-r--r--oox/inc/drawingml/chart/axisconverter.hxx71
-rw-r--r--oox/inc/drawingml/chart/axismodel.hxx95
-rw-r--r--oox/inc/drawingml/chart/chartcontextbase.hxx79
-rw-r--r--oox/inc/drawingml/chart/chartdrawingfragment.hxx103
-rw-r--r--oox/inc/drawingml/chart/chartspaceconverter.hxx51
-rw-r--r--oox/inc/drawingml/chart/chartspacefragment.hxx49
-rw-r--r--oox/inc/drawingml/chart/chartspacemodel.hxx67
-rw-r--r--oox/inc/drawingml/chart/converterbase.hxx148
-rw-r--r--oox/inc/drawingml/chart/datasourcecontext.hxx94
-rw-r--r--oox/inc/drawingml/chart/datasourceconverter.hxx64
-rw-r--r--oox/inc/drawingml/chart/datatablecontext.hxx42
-rw-r--r--oox/inc/drawingml/chart/datatableconverter.hxx45
-rw-r--r--oox/inc/drawingml/chart/datatablemodel.hxx41
-rw-r--r--oox/inc/drawingml/chart/objectformatter.hxx153
-rw-r--r--oox/inc/drawingml/chart/plotareacontext.hxx74
-rw-r--r--oox/inc/drawingml/chart/plotareaconverter.hxx92
-rw-r--r--oox/inc/drawingml/chart/plotareamodel.hxx77
-rw-r--r--oox/inc/drawingml/chart/seriescontext.hxx245
-rw-r--r--oox/inc/drawingml/chart/seriesconverter.hxx147
-rw-r--r--oox/inc/drawingml/chart/seriesmodel.hxx223
-rw-r--r--oox/inc/drawingml/chart/titlecontext.hxx87
-rw-r--r--oox/inc/drawingml/chart/titleconverter.hxx101
-rw-r--r--oox/inc/drawingml/chart/titlemodel.hxx88
-rw-r--r--oox/inc/drawingml/chart/typegroupcontext.hxx149
-rw-r--r--oox/inc/drawingml/chart/typegroupconverter.hxx177
-rw-r--r--oox/inc/drawingml/chart/typegroupmodel.hxx86
-rw-r--r--oox/inc/drawingml/clrschemecontext.hxx62
-rw-r--r--oox/inc/drawingml/colorchoicecontext.hxx87
-rw-r--r--oox/inc/drawingml/customshapegeometry.hxx68
-rw-r--r--oox/inc/drawingml/customshapeproperties.hxx163
-rw-r--r--oox/inc/drawingml/effectpropertiescontext.hxx37
-rw-r--r--oox/inc/drawingml/embeddedwavaudiofile.hxx39
-rw-r--r--oox/inc/drawingml/fillproperties.hxx160
-rw-r--r--oox/inc/drawingml/graphicproperties.hxx55
-rw-r--r--oox/inc/drawingml/guidcontext.hxx41
-rw-r--r--oox/inc/drawingml/hatchmap.hxx298
-rw-r--r--oox/inc/drawingml/lineproperties.hxx88
-rw-r--r--oox/inc/drawingml/linepropertiescontext.hxx49
-rw-r--r--oox/inc/drawingml/misccontexts.hxx244
-rw-r--r--oox/inc/drawingml/objectdefaultcontext.hxx43
-rw-r--r--oox/inc/drawingml/presetgeometrynames.hxx23
-rw-r--r--oox/inc/drawingml/scene3dcontext.hxx76
-rw-r--r--oox/inc/drawingml/shape3dproperties.hxx92
-rw-r--r--oox/inc/drawingml/shapepropertiescontext.hxx43
-rw-r--r--oox/inc/drawingml/shapestylecontext.hxx44
-rw-r--r--oox/inc/drawingml/spdefcontext.hxx42
-rw-r--r--oox/inc/drawingml/table/tablebackgroundstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablecell.hxx111
-rw-r--r--oox/inc/drawingml/table/tablecellcontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablepartstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tableproperties.hxx83
-rw-r--r--oox/inc/drawingml/table/tablerow.hxx45
-rw-r--r--oox/inc/drawingml/table/tablerowcontext.hxx46
-rw-r--r--oox/inc/drawingml/table/tablestyle.hxx84
-rw-r--r--oox/inc/drawingml/table/tablestylecellstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablestylecontext.hxx46
-rw-r--r--oox/inc/drawingml/table/tablestylelist.hxx54
-rw-r--r--oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx48
-rw-r--r--oox/inc/drawingml/table/tablestylepart.hxx70
-rw-r--r--oox/inc/drawingml/table/tablestyletextstylecontext.hxx46
-rw-r--r--oox/inc/drawingml/textbody.hxx104
-rw-r--r--oox/inc/drawingml/textbodycontext.hxx61
-rw-r--r--oox/inc/drawingml/textbodyproperties.hxx68
-rw-r--r--oox/inc/drawingml/textbodypropertiescontext.hxx51
-rw-r--r--oox/inc/drawingml/textcharacterproperties.hxx95
-rw-r--r--oox/inc/drawingml/textcharacterpropertiescontext.hxx47
-rw-r--r--oox/inc/drawingml/texteffectscontext.hxx49
-rw-r--r--oox/inc/drawingml/textfield.hxx74
-rw-r--r--oox/inc/drawingml/textfieldcontext.hxx50
-rw-r--r--oox/inc/drawingml/textfont.hxx72
-rw-r--r--oox/inc/drawingml/textliststyle.hxx74
-rw-r--r--oox/inc/drawingml/textliststylecontext.hxx44
-rw-r--r--oox/inc/drawingml/textparagraph.hxx108
-rw-r--r--oox/inc/drawingml/textparagraphproperties.hxx136
-rw-r--r--oox/inc/drawingml/textparagraphpropertiescontext.hxx52
-rw-r--r--oox/inc/drawingml/textrun.hxx71
-rw-r--r--oox/inc/drawingml/textspacing.hxx72
-rw-r--r--oox/inc/drawingml/themeelementscontext.hxx44
-rw-r--r--oox/inc/drawingml/transform2dcontext.hxx46
-rw-r--r--oox/inc/ooxresid.hxx20
-rw-r--r--oox/inc/pch/precompiled_oox.cxx12
-rw-r--r--oox/inc/pch/precompiled_oox.hxx285
-rw-r--r--oox/inc/strings.hrc19
-rw-r--r--oox/qa/token/tokenmap-test.cxx53
-rw-r--r--oox/qa/unit/CryptoTest.cxx439
-rw-r--r--oox/qa/unit/data/FaultyPathStart.odpbin0 -> 14582 bytes
-rw-r--r--oox/qa/unit/data/camera-rotation-revolution-nonwps.pptxbin0 -> 31425 bytes
-rw-r--r--oox/qa/unit/data/camera-rotation-revolution.docxbin0 -> 23748 bytes
-rw-r--r--oox/qa/unit/data/chart-data-label-char-color.docxbin0 -> 26014 bytes
-rw-r--r--oox/qa/unit/data/chart-theme-override.pptxbin0 -> 37016 bytes
-rw-r--r--oox/qa/unit/data/customshape-position.docxbin0 -> 42054 bytes
-rw-r--r--oox/qa/unit/data/dml-groupshape-polygon.docxbin0 -> 24492 bytes
-rw-r--r--oox/qa/unit/data/endParaRPr-newline-textsize.pptxbin0 -> 13349 bytes
-rw-r--r--oox/qa/unit/data/gradient-multistep-transparency.pptxbin0 -> 34042 bytes
-rw-r--r--oox/qa/unit/data/graphic-stroke.pptxbin0 -> 29396 bytes
-rw-r--r--oox/qa/unit/data/group-spt202.docxbin0 -> 28238 bytes
-rw-r--r--oox/qa/unit/data/import-characters.pptxbin0 -> 33620 bytes
-rw-r--r--oox/qa/unit/data/import-mce.pptxbin0 -> 33763 bytes
-rw-r--r--oox/qa/unit/data/multiple-group-shapes.docxbin0 -> 29653 bytes
-rw-r--r--oox/qa/unit/data/preset-adjust-value.pptxbin0 -> 33233 bytes
-rw-r--r--oox/qa/unit/data/refer-to-theme-shape-fill.odpbin0 -> 14638 bytes
-rw-r--r--oox/qa/unit/data/refer-to-theme.pptxbin0 -> 33853 bytes
-rw-r--r--oox/qa/unit/data/shape-non-autosize-with-text.docxbin0 -> 35448 bytes
-rw-r--r--oox/qa/unit/data/shape-text-adjust-left.pptxbin0 -> 59199 bytes
-rw-r--r--oox/qa/unit/data/shape-text-alignment.pptxbin0 -> 30844 bytes
-rw-r--r--oox/qa/unit/data/smartart-groupshape.pptxbin0 -> 40995 bytes
-rw-r--r--oox/qa/unit/data/table-shadow.pptxbin0 -> 16837 bytes
-rw-r--r--oox/qa/unit/data/tdf100391_TextAreaRect.odpbin0 -> 13624 bytes
-rw-r--r--oox/qa/unit/data/tdf109169_OctagonBevel.odtbin0 -> 11122 bytes
-rw-r--r--oox/qa/unit/data/tdf112450_vml_polyline.docxbin0 -> 18114 bytes
-rw-r--r--oox/qa/unit/data/tdf113187_arcTo_withoutReferences.pptxbin0 -> 14733 bytes
-rw-r--r--oox/qa/unit/data/tdf125582_TextOnCircle.pptxbin0 -> 15956 bytes
-rw-r--r--oox/qa/unit/data/tdf131082.pptxbin0 -> 25881 bytes
-rw-r--r--oox/qa/unit/data/tdf137314_vml_rotation_unit_fd.docxbin0 -> 18070 bytes
-rw-r--r--oox/qa/unit/data/tdf141463_GroupTransform.pptxbin0 -> 16921 bytes
-rw-r--r--oox/qa/unit/data/tdf141786_PolylineConnectorInGroup.odtbin0 -> 10127 bytes
-rw-r--r--oox/qa/unit/data/tdf141786_RotatedShapeInGroup.odtbin0 -> 15507 bytes
-rw-r--r--oox/qa/unit/data/tdf142602_CustomShapeArrows.odtbin0 -> 11637 bytes
-rw-r--r--oox/qa/unit/data/tdf142605_CurveSize.odpbin0 -> 11220 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_endsubpath.odpbin0 -> 14505 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_enhancedPath_commandA.odpbin0 -> 12755 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odpbin0 -> 14922 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_enhancedPath_commandT.odpbin0 -> 12869 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odpbin0 -> 13166 bytes
-rw-r--r--oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptxbin0 -> 15040 bytes
-rw-r--r--oox/qa/unit/data/tdf148784_StretchCommandQ.odpbin0 -> 15311 bytes
-rw-r--r--oox/qa/unit/data/tdf148784_StretchCommandVW.odpbin0 -> 15218 bytes
-rw-r--r--oox/qa/unit/data/tdf148784_StretchXY.odpbin0 -> 11512 bytes
-rw-r--r--oox/qa/unit/data/testTdf132557_footerCustomShapes.pptxbin0 -> 20137 bytes
-rw-r--r--oox/qa/unit/data/theme-tint.pptxbin0 -> 16742 bytes
-rw-r--r--oox/qa/unit/data/theme.pptxbin0 -> 33063 bytes
-rw-r--r--oox/qa/unit/data/transparent-text.pptxbin0 -> 32797 bytes
-rw-r--r--oox/qa/unit/data/vba/complex1.binbin0 -> 1086 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/complex1.binbin0 -> 579 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/simple1.binbin0 -> 18 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/simple2.binbin0 -> 13 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/simple3.bin1
-rw-r--r--oox/qa/unit/data/vba/reference/spec321.binbin0 -> 29 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/spec322.binbin0 -> 51 bytes
-rw-r--r--oox/qa/unit/data/vba/reference/spec323.binbin0 -> 7 bytes
-rw-r--r--oox/qa/unit/data/vba/simple1.binbin0 -> 13 bytes
-rw-r--r--oox/qa/unit/data/vba/simple2.binbin0 -> 11 bytes
-rw-r--r--oox/qa/unit/data/vba/simple3.bin1
-rw-r--r--oox/qa/unit/data/vba/spec321.bin1
-rw-r--r--oox/qa/unit/data/vba/spec322.bin1
-rw-r--r--oox/qa/unit/data/vba/spec323.bin1
-rw-r--r--oox/qa/unit/data/watermark.docxbin0 -> 21621 bytes
-rw-r--r--oox/qa/unit/drawingml.cxx566
-rw-r--r--oox/qa/unit/export.cxx777
-rw-r--r--oox/qa/unit/mathml.cxx71
-rw-r--r--oox/qa/unit/shape.cxx180
-rw-r--r--oox/qa/unit/vba_compression.cxx255
-rw-r--r--oox/qa/unit/vba_encryption.cxx82
-rw-r--r--oox/qa/unit/vml.cxx236
-rw-r--r--oox/source/core/binarycodec.cxx41
-rw-r--r--oox/source/core/contexthandler.cxx134
-rw-r--r--oox/source/core/contexthandler2.cxx340
-rw-r--r--oox/source/core/fastparser.cxx139
-rw-r--r--oox/source/core/fasttokenhandler.cxx82
-rw-r--r--oox/source/core/filterbase.cxx596
-rw-r--r--oox/source/core/filterdetect.cxx479
-rw-r--r--oox/source/core/fragmenthandler.cxx119
-rw-r--r--oox/source/core/fragmenthandler2.cxx155
-rw-r--r--oox/source/core/recordparser.cxx326
-rw-r--r--oox/source/core/relations.cxx158
-rw-r--r--oox/source/core/relationshandler.cxx95
-rw-r--r--oox/source/core/xmlfilterbase.cxx1235
-rw-r--r--oox/source/crypto/AgileEngine.cxx843
-rw-r--r--oox/source/crypto/CryptTools.cxx507
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx223
-rw-r--r--oox/source/crypto/DocumentEncryption.cxx103
-rw-r--r--oox/source/crypto/Standard2007Engine.cxx333
-rw-r--r--oox/source/crypto/StrongEncryptionDataSpace.cxx203
-rw-r--r--oox/source/docprop/docprophandler.cxx716
-rw-r--r--oox/source/docprop/docprophandler.hxx88
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx229
-rw-r--r--oox/source/docprop/ooxmldocpropimport.hxx63
-rw-r--r--oox/source/drawingml/ThemeOverrideFragmentHandler.cxx47
-rw-r--r--oox/source/drawingml/chart/axiscontext.cxx298
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx437
-rw-r--r--oox/source/drawingml/chart/axismodel.cxx63
-rw-r--r--oox/source/drawingml/chart/chartcontextbase.cxx107
-rw-r--r--oox/source/drawingml/chart/chartconverter.cxx157
-rw-r--r--oox/source/drawingml/chart/chartdrawingfragment.cxx244
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx308
-rw-r--r--oox/source/drawingml/chart/chartspacefragment.cxx124
-rw-r--r--oox/source/drawingml/chart/chartspacemodel.cxx41
-rw-r--r--oox/source/drawingml/chart/converterbase.cxx446
-rw-r--r--oox/source/drawingml/chart/datasourcecontext.cxx335
-rw-r--r--oox/source/drawingml/chart/datasourceconverter.cxx106
-rw-r--r--oox/source/drawingml/chart/datasourcemodel.cxx46
-rw-r--r--oox/source/drawingml/chart/datatablecontext.cxx68
-rw-r--r--oox/source/drawingml/chart/datatableconverter.cxx50
-rw-r--r--oox/source/drawingml/chart/modelbase.cxx54
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx1151
-rw-r--r--oox/source/drawingml/chart/plotareacontext.cxx175
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx481
-rw-r--r--oox/source/drawingml/chart/plotareamodel.cxx52
-rw-r--r--oox/source/drawingml/chart/seriescontext.cxx749
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx920
-rw-r--r--oox/source/drawingml/chart/seriesmodel.cxx127
-rw-r--r--oox/source/drawingml/chart/titlecontext.cxx176
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx363
-rw-r--r--oox/source/drawingml/chart/titlemodel.cxx61
-rw-r--r--oox/source/drawingml/chart/typegroupcontext.cxx371
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx605
-rw-r--r--oox/source/drawingml/chart/typegroupmodel.cxx67
-rw-r--r--oox/source/drawingml/clrscheme.cxx125
-rw-r--r--oox/source/drawingml/clrschemecontext.cxx102
-rw-r--r--oox/source/drawingml/color.cxx873
-rw-r--r--oox/source/drawingml/colorchoicecontext.cxx178
-rw-r--r--oox/source/drawingml/connectorshapecontext.cxx128
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx1296
-rw-r--r--oox/source/drawingml/customshapepresetdata.cxx974
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx364
-rw-r--r--oox/source/drawingml/customshapes/README.md19
-rw-r--r--oox/source/drawingml/customshapes/cshape.pptxbin0 -> 48204 bytes
-rwxr-xr-xoox/source/drawingml/customshapes/generate.sh38
-rwxr-xr-xoox/source/drawingml/customshapes/generatePresetsData.pl74
-rwxr-xr-xoox/source/drawingml/customshapes/generatePresetsPPTXs.pl193
-rw-r--r--oox/source/drawingml/customshapes/oox-drawingml-cs-presets3179
-rw-r--r--oox/source/drawingml/customshapes/presetShapeDefinitions.xml19898
-rw-r--r--oox/source/drawingml/diagram/constraintlistcontext.cxx78
-rw-r--r--oox/source/drawingml/diagram/constraintlistcontext.hxx43
-rw-r--r--oox/source/drawingml/diagram/datamodel.cxx468
-rw-r--r--oox/source/drawingml/diagram/datamodel.hxx80
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx385
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.hxx45
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx444
-rw-r--r--oox/source/drawingml/diagram/diagram.hxx171
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx99
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.hxx44
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.cxx234
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.hxx103
-rw-r--r--oox/source/drawingml/diagram/diagramhelper.cxx269
-rw-r--r--oox/source/drawingml/diagram/diagramhelper.hxx94
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx2047
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.hxx372
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitorbase.cxx176
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitorbase.hxx98
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitors.cxx269
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitors.hxx96
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx309
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.hxx43
-rw-r--r--oox/source/drawingml/diagram/rulelistcontext.cxx58
-rw-r--r--oox/source/drawingml/diagram/rulelistcontext.hxx42
-rw-r--r--oox/source/drawingml/drawingmltypes.cxx419
-rw-r--r--oox/source/drawingml/effectproperties.cxx132
-rw-r--r--oox/source/drawingml/effectproperties.hxx88
-rw-r--r--oox/source/drawingml/effectpropertiescontext.cxx133
-rw-r--r--oox/source/drawingml/embeddedwavaudiofile.cxx37
-rw-r--r--oox/source/drawingml/fillproperties.cxx1257
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx341
-rw-r--r--oox/source/drawingml/guidcontext.cxx40
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx166
-rw-r--r--oox/source/drawingml/hyperlinkcontext.hxx48
-rw-r--r--oox/source/drawingml/lineproperties.cxx538
-rw-r--r--oox/source/drawingml/linepropertiescontext.cxx137
-rw-r--r--oox/source/drawingml/misccontexts.cxx386
-rw-r--r--oox/source/drawingml/objectdefaultcontext.cxx53
-rw-r--r--oox/source/drawingml/presetgeometrynames.cxx114
-rw-r--r--oox/source/drawingml/scene3dcontext.cxx189
-rw-r--r--oox/source/drawingml/shape.cxx2368
-rw-r--r--oox/source/drawingml/shape3dproperties.cxx392
-rw-r--r--oox/source/drawingml/shapecontext.cxx134
-rw-r--r--oox/source/drawingml/shapegroupcontext.cxx117
-rw-r--r--oox/source/drawingml/shapepropertiescontext.cxx103
-rw-r--r--oox/source/drawingml/shapepropertymap.cxx238
-rw-r--r--oox/source/drawingml/shapestylecontext.cxx70
-rw-r--r--oox/source/drawingml/spdefcontext.cxx62
-rw-r--r--oox/source/drawingml/table/predefined-table-styles.cxx975
-rw-r--r--oox/source/drawingml/table/tablebackgroundstylecontext.cxx74
-rw-r--r--oox/source/drawingml/table/tablecell.cxx578
-rw-r--r--oox/source/drawingml/table/tablecellcontext.cxx103
-rw-r--r--oox/source/drawingml/table/tablecontext.cxx98
-rw-r--r--oox/source/drawingml/table/tablepartstylecontext.cxx60
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx216
-rw-r--r--oox/source/drawingml/table/tablerow.cxx35
-rw-r--r--oox/source/drawingml/table/tablerowcontext.cxx65
-rw-r--r--oox/source/drawingml/table/tablestyle.cxx27
-rw-r--r--oox/source/drawingml/table/tablestylecellstylecontext.cxx110
-rw-r--r--oox/source/drawingml/table/tablestylecontext.cxx89
-rw-r--r--oox/source/drawingml/table/tablestylelist.cxx30
-rw-r--r--oox/source/drawingml/table/tablestylelistfragmenthandler.cxx63
-rw-r--r--oox/source/drawingml/table/tablestylepart.cxx33
-rw-r--r--oox/source/drawingml/table/tablestyletextstylecontext.cxx98
-rw-r--r--oox/source/drawingml/textbody.cxx158
-rw-r--r--oox/source/drawingml/textbodycontext.cxx221
-rw-r--r--oox/source/drawingml/textbodyproperties.cxx190
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx220
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx248
-rw-r--r--oox/source/drawingml/textcharacterpropertiescontext.cxx334
-rw-r--r--oox/source/drawingml/texteffectscontext.cxx318
-rw-r--r--oox/source/drawingml/textfield.cxx274
-rw-r--r--oox/source/drawingml/textfieldcontext.cxx78
-rw-r--r--oox/source/drawingml/textfont.cxx96
-rw-r--r--oox/source/drawingml/textliststyle.cxx81
-rw-r--r--oox/source/drawingml/textliststylecontext.cxx78
-rw-r--r--oox/source/drawingml/textparagraph.cxx220
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx553
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx375
-rw-r--r--oox/source/drawingml/textrun.cxx190
-rw-r--r--oox/source/drawingml/textspacingcontext.cxx63
-rw-r--r--oox/source/drawingml/textspacingcontext.hxx44
-rw-r--r--oox/source/drawingml/texttabstoplistcontext.cxx73
-rw-r--r--oox/source/drawingml/texttabstoplistcontext.hxx48
-rw-r--r--oox/source/drawingml/theme.cxx122
-rw-r--r--oox/source/drawingml/themeelementscontext.cxx243
-rw-r--r--oox/source/drawingml/themefragmenthandler.cxx78
-rw-r--r--oox/source/drawingml/transform2dcontext.cxx129
-rw-r--r--oox/source/dump/biffdumper.ini2397
-rw-r--r--oox/source/dump/dffdumper.cxx227
-rw-r--r--oox/source/dump/dffdumper.ini676
-rw-r--r--oox/source/dump/dumperbase.cxx2580
-rw-r--r--oox/source/dump/dumperbase.ini412
-rw-r--r--oox/source/dump/oledumper.cxx2085
-rw-r--r--oox/source/dump/oledumper.ini904
-rw-r--r--oox/source/dump/pptxdumper.cxx131
-rw-r--r--oox/source/dump/pptxdumper.ini35
-rw-r--r--oox/source/dump/xlsbdumper.ini1204
-rw-r--r--oox/source/export/ColorPropertySet.cxx178
-rw-r--r--oox/source/export/ColorPropertySet.hxx87
-rw-r--r--oox/source/export/DMLPresetShapeExport.cxx1658
-rw-r--r--oox/source/export/README2
-rw-r--r--oox/source/export/chartexport.cxx4685
-rw-r--r--oox/source/export/drawingml.cxx6125
-rw-r--r--oox/source/export/ooxml-export-notes.txt235
-rw-r--r--oox/source/export/preset-definitions-to-shape-types.pl1237
-rw-r--r--oox/source/export/presetTextWarpDefinitions.xml1885
-rw-r--r--oox/source/export/shapes.cxx2728
-rw-r--r--oox/source/export/vmlexport.cxx1529
-rw-r--r--oox/source/helper/attributelist.cxx361
-rw-r--r--oox/source/helper/binaryinputstream.cxx322
-rw-r--r--oox/source/helper/binaryoutputstream.cxx184
-rw-r--r--oox/source/helper/binarystreambase.cxx146
-rw-r--r--oox/source/helper/containerhelper.cxx126
-rw-r--r--oox/source/helper/grabbagstack.cxx82
-rw-r--r--oox/source/helper/graphichelper.cxx323
-rw-r--r--oox/source/helper/modelobjecthelper.cxx159
-rw-r--r--oox/source/helper/ooxresid.cxx17
-rw-r--r--oox/source/helper/progressbar.cxx167
-rw-r--r--oox/source/helper/propertymap.cxx956
-rw-r--r--oox/source/helper/propertyset.cxx150
-rw-r--r--oox/source/helper/storagebase.cxx255
-rw-r--r--oox/source/helper/textinputstream.cxx208
-rw-r--r--oox/source/helper/zipstorage.cxx203
-rw-r--r--oox/source/mathml/export.cxx18
-rw-r--r--oox/source/mathml/import.cxx114
-rw-r--r--oox/source/mathml/importutils.cxx337
-rw-r--r--oox/source/ole/axbinaryreader.cxx291
-rw-r--r--oox/source/ole/axbinarywriter.cxx201
-rw-r--r--oox/source/ole/axcontrol.cxx2786
-rw-r--r--oox/source/ole/axcontrolfragment.cxx167
-rw-r--r--oox/source/ole/axfontdata.cxx117
-rw-r--r--oox/source/ole/olehelper.cxx571
-rw-r--r--oox/source/ole/oleobjecthelper.cxx176
-rw-r--r--oox/source/ole/olestorage.cxx376
-rw-r--r--oox/source/ole/vbacontrol.cxx874
-rw-r--r--oox/source/ole/vbaexport.cxx1193
-rw-r--r--oox/source/ole/vbahelper.cxx59
-rw-r--r--oox/source/ole/vbainputstream.cxx208
-rw-r--r--oox/source/ole/vbamodule.cxx347
-rw-r--r--oox/source/ole/vbaproject.cxx564
-rw-r--r--oox/source/ppt/animationspersist.cxx220
-rw-r--r--oox/source/ppt/animationtypes.cxx63
-rw-r--r--oox/source/ppt/animationtypes.hxx35
-rw-r--r--oox/source/ppt/animvariantcontext.cxx95
-rw-r--r--oox/source/ppt/animvariantcontext.hxx50
-rw-r--r--oox/source/ppt/backgroundproperties.cxx50
-rw-r--r--oox/source/ppt/buildlistcontext.cxx84
-rw-r--r--oox/source/ppt/buildlistcontext.hxx48
-rw-r--r--oox/source/ppt/comments.cxx89
-rw-r--r--oox/source/ppt/commonbehaviorcontext.cxx145
-rw-r--r--oox/source/ppt/commonbehaviorcontext.hxx65
-rw-r--r--oox/source/ppt/commontimenodecontext.cxx666
-rw-r--r--oox/source/ppt/commontimenodecontext.hxx48
-rw-r--r--oox/source/ppt/conditioncontext.cxx182
-rw-r--r--oox/source/ppt/conditioncontext.hxx67
-rw-r--r--oox/source/ppt/customshowlistcontext.cxx105
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.cxx64
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.hxx41
-rw-r--r--oox/source/ppt/headerfootercontext.cxx58
-rw-r--r--oox/source/ppt/headerfootercontext.hxx42
-rw-r--r--oox/source/ppt/layoutfragmenthandler.cxx72
-rw-r--r--oox/source/ppt/pptfilterhelpers.cxx422
-rw-r--r--oox/source/ppt/pptgraphicshapecontext.cxx189
-rw-r--r--oox/source/ppt/pptimport.cxx309
-rw-r--r--oox/source/ppt/pptshape.cxx809
-rw-r--r--oox/source/ppt/pptshapecontext.cxx195
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx158
-rw-r--r--oox/source/ppt/pptshapepropertiescontext.cxx56
-rw-r--r--oox/source/ppt/presPropsfragmenthandler.cxx89
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx792
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx265
-rw-r--r--oox/source/ppt/slidemastertextstylescontext.cxx79
-rw-r--r--oox/source/ppt/slidepersist.cxx555
-rw-r--r--oox/source/ppt/slidetimingcontext.cxx70
-rw-r--r--oox/source/ppt/slidetransition.cxx467
-rw-r--r--oox/source/ppt/slidetransitioncontext.cxx200
-rw-r--r--oox/source/ppt/soundactioncontext.cxx109
-rw-r--r--oox/source/ppt/timeanimvaluecontext.cxx84
-rw-r--r--oox/source/ppt/timeanimvaluecontext.hxx51
-rw-r--r--oox/source/ppt/timenode.cxx668
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx1048
-rw-r--r--oox/source/ppt/timetargetelementcontext.cxx168
-rw-r--r--oox/source/ppt/timetargetelementcontext.hxx45
-rw-r--r--oox/source/shape/LockedCanvasContext.cxx97
-rw-r--r--oox/source/shape/LockedCanvasContext.hxx37
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx584
-rw-r--r--oox/source/shape/ShapeDrawingFragmentHandler.cxx48
-rw-r--r--oox/source/shape/ShapeDrawingFragmentHandler.hxx35
-rw-r--r--oox/source/shape/ShapeFilterBase.cxx137
-rw-r--r--oox/source/shape/WpgContext.cxx99
-rw-r--r--oox/source/shape/WpgContext.hxx43
-rw-r--r--oox/source/shape/WpsContext.cxx338
-rw-r--r--oox/source/shape/WpsContext.hxx45
-rw-r--r--oox/source/token/namespacemap.cxx43
-rw-r--r--oox/source/token/namespaces-strict.txt99
-rw-r--r--oox/source/token/namespaces.hxx.head25
-rw-r--r--oox/source/token/namespaces.hxx.tail71
-rw-r--r--oox/source/token/namespaces.py85
-rw-r--r--oox/source/token/namespaces.txt99
-rw-r--r--oox/source/token/parsexsd.pl66
-rw-r--r--oox/source/token/properties.hxx.head24
-rw-r--r--oox/source/token/properties.hxx.tail6
-rw-r--r--oox/source/token/properties.py50
-rw-r--r--oox/source/token/properties.txt611
-rw-r--r--oox/source/token/propertynames.cxx35
-rw-r--r--oox/source/token/relationship.cxx34
-rw-r--r--oox/source/token/relationship.inc48
-rw-r--r--oox/source/token/tokenmap.cxx98
-rw-r--r--oox/source/token/tokens.hxx.head24
-rw-r--r--oox/source/token/tokens.hxx.tail8
-rw-r--r--oox/source/token/tokens.txt5890
-rw-r--r--oox/source/vml/vmldrawing.cxx346
-rw-r--r--oox/source/vml/vmldrawingfragment.cxx82
-rw-r--r--oox/source/vml/vmlformatting.cxx1001
-rw-r--r--oox/source/vml/vmlinputstream.cxx393
-rw-r--r--oox/source/vml/vmlshape.cxx1574
-rw-r--r--oox/source/vml/vmlshapecontainer.cxx138
-rw-r--r--oox/source/vml/vmlshapecontext.cxx731
-rw-r--r--oox/source/vml/vmltextbox.cxx204
-rw-r--r--oox/source/vml/vmltextboxcontext.cxx287
-rw-r--r--oox/util/oox.component43
467 files changed, 140426 insertions, 0 deletions
diff --git a/oox/AllLangMoTarget_oox.mk b/oox/AllLangMoTarget_oox.mk
new file mode 100644
index 000000000..c2a733faf
--- /dev/null
+++ b/oox/AllLangMoTarget_oox.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,oox))
+
+$(eval $(call gb_AllLangMoTarget_set_polocation,oox,oox))
+
+# vim: set noet sw=4 ts=4: \ No newline at end of file
diff --git a/oox/CppunitTest_oox_crypto.mk b/oox/CppunitTest_oox_crypto.mk
new file mode 100644
index 000000000..f4a641283
--- /dev/null
+++ b/oox/CppunitTest_oox_crypto.mk
@@ -0,0 +1,89 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_crypto))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_crypto,\
+ oox/qa/unit/CryptoTest \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_crypto))
+
+ifeq ($(TLS),OPENSSL)
+$(eval $(call gb_CppunitTest_externals,oox_crypto,\
+ openssl \
+ openssl_headers \
+))
+else
+ifeq ($(TLS),NSS)
+$(eval $(call gb_CppunitTest_use_externals,oox_crypto,\
+ plc4 \
+ nss3 \
+))
+endif
+endif
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_crypto,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ drawinglayer \
+ msfilter \
+ sal \
+ oox \
+ sax \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sot \
+ tl \
+ unotest \
+ utl \
+ vcl \
+ xo \
+ xmlscript \
+))
+
+$(eval $(call gb_CppunitTest_use_api,oox_crypto,\
+ offapi \
+ udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_crypto))
+$(eval $(call gb_CppunitTest_use_vcl,oox_crypto))
+$(eval $(call gb_CppunitTest_use_configuration,oox_crypto))
+
+$(eval $(call gb_CppunitTest_use_components,oox_crypto,\
+ comphelper/util/comphelp \
+ configmgr/source/configmgr \
+ filter/source/config/cache/filterconfig1 \
+ filter/source/storagefilterdetect/storagefd \
+ i18npool/util/i18npool \
+ package/source/xstor/xstor \
+ package/util/package2 \
+ sfx2/util/sfx \
+ sot/util/sot \
+ svl/source/fsstor/fsstorage \
+ svtools/util/svt \
+ ucb/source/core/ucb1 \
+ ucb/source/ucp/file/ucpfile1 \
+ ucb/source/ucp/tdoc/ucptdoc1 \
+ unotools/util/utl \
+ uui/util/uui \
+ vcl/vcl.common \
+ sax/source/expatwrap/expwrap \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_drawingml.mk b/oox/CppunitTest_oox_drawingml.mk
new file mode 100644
index 000000000..83152e091
--- /dev/null
+++ b/oox/CppunitTest_oox_drawingml.mk
@@ -0,0 +1,57 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_drawingml))
+
+$(eval $(call gb_CppunitTest_use_externals,oox_drawingml,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_drawingml, \
+ oox/qa/unit/drawingml \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
+ comphelper \
+ cppu \
+ oox \
+ sal \
+ test \
+ unotest \
+ utl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_drawingml))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_drawingml))
+$(eval $(call gb_CppunitTest_use_vcl,oox_drawingml))
+
+$(eval $(call gb_CppunitTest_use_rdb,oox_drawingml,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_drawingml,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,oox_drawingml))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,oox_drawingml, \
+ modules/simpress \
+ sfx \
+ svt \
+))
+
+$(eval $(call gb_CppunitTest_add_arguments,oox_drawingml, \
+ -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
+))
+
+$(call gb_CppunitTest_get_target,oox_drawingml): $(call gb_Package_get_target,oox_customshapes)
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_export.mk b/oox/CppunitTest_oox_export.mk
new file mode 100644
index 000000000..4fe22bd09
--- /dev/null
+++ b/oox/CppunitTest_oox_export.mk
@@ -0,0 +1,50 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_export))
+
+$(eval $(call gb_CppunitTest_use_externals,oox_export,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_export, \
+ oox/qa/unit/export \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_export, \
+ comphelper \
+ cppu \
+ oox \
+ sal \
+ test \
+ unotest \
+ utl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_export))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_export))
+$(eval $(call gb_CppunitTest_use_vcl,oox_export))
+
+$(eval $(call gb_CppunitTest_use_rdb,oox_export,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_export,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,oox_export))
+
+$(eval $(call gb_CppunitTest_add_arguments,oox_export, \
+ -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_mathml.mk b/oox/CppunitTest_oox_mathml.mk
new file mode 100644
index 000000000..e358a9666
--- /dev/null
+++ b/oox/CppunitTest_oox_mathml.mk
@@ -0,0 +1,44 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_mathml))
+
+$(eval $(call gb_CppunitTest_use_externals,oox_mathml,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_mathml, \
+ oox/qa/unit/mathml \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_mathml, \
+ comphelper \
+ cppu \
+ oox \
+ sal \
+ test \
+ unotest \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_mathml))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_mathml))
+$(eval $(call gb_CppunitTest_use_vcl,oox_mathml))
+
+$(eval $(call gb_CppunitTest_use_rdb,oox_mathml,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_mathml,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,oox_mathml))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_shape.mk b/oox/CppunitTest_oox_shape.mk
new file mode 100644
index 000000000..9b910f249
--- /dev/null
+++ b/oox/CppunitTest_oox_shape.mk
@@ -0,0 +1,48 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_shape))
+
+$(eval $(call gb_CppunitTest_use_externals,oox_shape,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_shape, \
+ oox/qa/unit/shape \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_shape, \
+ comphelper \
+ cppu \
+ oox \
+ sal \
+ svx \
+ svxcore \
+ tl \
+ test \
+ unotest \
+ utl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_shape))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_shape))
+$(eval $(call gb_CppunitTest_use_vcl,oox_shape))
+
+$(eval $(call gb_CppunitTest_use_rdb,oox_shape,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_shape,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,oox_shape))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_tokenmap.mk b/oox/CppunitTest_oox_tokenmap.mk
new file mode 100644
index 000000000..46294ecab
--- /dev/null
+++ b/oox/CppunitTest_oox_tokenmap.mk
@@ -0,0 +1,63 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_tokenmap))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_tokenmap,\
+ oox/qa/token/tokenmap-test \
+))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_tokenmap,oox/generated))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_tokenmap))
+
+$(eval $(call gb_CppunitTest_use_library_objects,oox_tokenmap,oox))
+
+ifeq ($(TLS),OPENSSL)
+$(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\
+ openssl \
+ openssl_headers \
+))
+else
+ifeq ($(TLS),NSS)
+$(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\
+ plc4 \
+ nss3 \
+))
+endif
+endif
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_tokenmap,\
+ $(call gb_Helper_optional,AVMEDIA,avmedia) \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ expwrap \
+ drawinglayer \
+ msfilter \
+ sal \
+ i18nlangtag \
+ sax \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sot \
+ tl \
+ utl \
+ vcl \
+ xo \
+ xmlscript \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_vba_compression.mk b/oox/CppunitTest_oox_vba_compression.mk
new file mode 100644
index 000000000..14b6b8618
--- /dev/null
+++ b/oox/CppunitTest_oox_vba_compression.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_vba_compression))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_vba_compression,\
+ oox/qa/unit/vba_compression \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_vba_compression))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_vba_compression,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ expwrap \
+ drawinglayer \
+ msfilter \
+ sal \
+ i18nlangtag \
+ oox \
+ sax \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sot \
+ tl \
+ unotest \
+ utl \
+ vcl \
+ xo \
+ xmlscript \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_vba_encryption.mk b/oox/CppunitTest_oox_vba_encryption.mk
new file mode 100644
index 000000000..ed625f2cc
--- /dev/null
+++ b/oox/CppunitTest_oox_vba_encryption.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_vba_encryption))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_vba_encryption,\
+ oox/qa/unit/vba_encryption \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_vba_encryption))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_vba_encryption,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ expwrap \
+ drawinglayer \
+ msfilter \
+ sal \
+ i18nlangtag \
+ oox \
+ sax \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sot \
+ tl \
+ unotest \
+ utl \
+ vcl \
+ xo \
+ xmlscript \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CppunitTest_oox_vml.mk b/oox/CppunitTest_oox_vml.mk
new file mode 100644
index 000000000..aa12fa423
--- /dev/null
+++ b/oox/CppunitTest_oox_vml.mk
@@ -0,0 +1,45 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,oox_vml))
+
+$(eval $(call gb_CppunitTest_use_externals,oox_vml,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,oox_vml, \
+ oox/qa/unit/vml \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,oox_vml, \
+ comphelper \
+ cppu \
+ oox \
+ sal \
+ test \
+ unotest \
+ utl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,oox_vml))
+
+$(eval $(call gb_CppunitTest_use_ure,oox_vml))
+$(eval $(call gb_CppunitTest_use_vcl,oox_vml))
+
+$(eval $(call gb_CppunitTest_use_rdb,oox_vml,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,oox_vml,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,oox_vml))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
new file mode 100644
index 000000000..860ae447a
--- /dev/null
+++ b/oox/CustomTarget_generated.mk
@@ -0,0 +1,43 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,oox/generated))
+
+oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
+
+$(oox_MISC)/vml-shape-types : \
+ $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
+ $(SRCDIR)/oox/source/drawingml/customshapes/presetShapeDefinitions.xml \
+ $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml \
+ $(SRCDIR)/oox/CustomTarget_generated.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PRL,1)
+ mkdir -p $(dir $@)
+ perl $< --vml-shape-types-data $(filter-out $<,$^) > $@.in_progress 2> $@.log && mv $@.in_progress $@
+
+$(oox_MISC)/oox-drawingml-adj-names : \
+ $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
+ $(SRCDIR)/oox/source/drawingml/customshapes/presetShapeDefinitions.xml \
+ $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml \
+ $(SRCDIR)/oox/CustomTarget_generated.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PRL,1)
+ mkdir -p $(dir $@)
+ perl $< --drawingml-adj-names-data $(filter-out $<,$^) > $@.in_progress 2> $@.log && mv $@.in_progress $@
+
+# Generate tokens for oox
+$(eval $(call gb_CustomTarget_token_hash,oox/generated,tokenhash.inc,tokenhash.gperf))
+
+$(eval $(call gb_CustomTarget_generate_tokens,oox/generated,oox,oox/source/token,namespaces,namespace,namespaces.txt,namespaces-strict,namespaces.py))
+$(eval $(call gb_CustomTarget_generate_tokens,oox/generated,oox,oox/source/token,properties,property,,,properties.py))
+$(eval $(call gb_CustomTarget_generate_tokens,oox/generated,oox,oox/source/token,tokens,token,tokenhash.gperf))
+
+$(call gb_CustomTarget_get_target,oox/generated) : \
+ $(oox_MISC)/oox-drawingml-adj-names \
+ $(oox_MISC)/vml-shape-types \
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/IwyuFilter_oox.yaml b/oox/IwyuFilter_oox.yaml
new file mode 100644
index 000000000..73ee5e144
--- /dev/null
+++ b/oox/IwyuFilter_oox.yaml
@@ -0,0 +1,190 @@
+---
+assumeFilename: oox/source/export/drawingml.cxx
+excludelist:
+ oox/source/docprop/docprophandler.hxx:
+ # Needed for macro defines
+ - oox/token/namespaces.hxx
+ oox/source/core/filterbase.cxx:
+ # Actually used
+ - comphelper/scopeguard.hxx
+ oox/source/core/contexthandler2.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ oox/source/core/fragmenthandler2.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ oox/source/core/xmlfilterbase.cxx:
+ # Actually used
+ - com/sun/star/xml/sax/XFastSAXSerializable.hpp
+ oox/source/crypto/DocumentEncryption.cxx:
+ # Actually used
+ - com/sun/star/io/XStream.hpp
+ oox/source/crypto/DocumentDecryption.cxx:
+ # Actually used
+ - com/sun/star/beans/NamedValue.hpp
+ - com/sun/star/io/XStream.hpp
+ oox/source/docprop/ooxmldocpropimport.cxx:
+ # Actually used
+ - com/sun/star/embed/XStorage.hpp
+ oox/source/docprop/docprophandler.cxx:
+ # Actually used
+ - boost/algorithm/string.hpp
+ oox/source/drawingml/drawingmltypes.cxx:
+ # Actually used
+ - com/sun/star/drawing/Hatch.hpp
+ - com/sun/star/xml/sax/XFastAttributeList.hpp
+ oox/source/drawingml/customshapeproperties.cxx:
+ # Actually used
+ - com/sun/star/awt/Size.hpp
+ - com/sun/star/beans/XPropertySet.hpp
+ - com/sun/star/drawing/XShape.hpp
+ oox/source/drawingml/lineproperties.cxx:
+ # Actually used
+ - com/sun/star/drawing/LineCap.hpp
+ - com/sun/star/drawing/LineJoint.hpp
+ - com/sun/star/drawing/LineStyle.hpp
+ oox/source/drawingml/shape.cxx:
+ # Actually used
+ - diagram/datamodel.hxx
+ # Needed for direct member access
+ - com/sun/star/xml/dom/XDocument.hpp
+ oox/source/drawingml/textparagraph.cxx:
+ # Actually used
+ - com/sun/star/text/XText.hpp
+ - com/sun/star/text/XTextCursor.hpp
+ oox/source/drawingml/textparagraphproperties.cxx:
+ # Actually used
+ - com/sun/star/graphic/XGraphic.hpp
+ - com/sun/star/style/ParagraphAdjust.hpp
+ oox/source/drawingml/textrun.cxx:
+ # Actually used
+ - com/sun/star/frame/XModel.hpp
+ oox/source/drawingml/chart/axisconverter.cxx:
+ # Actually used
+ - com/sun/star/chart2/XCoordinateSystem.hpp
+ oox/source/drawingml/chart/chartconverter.cxx:
+ # Actually used
+ - com/sun/star/chart2/XChartDocument.hpp
+ oox/source/drawingml/chart/converterbase.cxx:
+ # Actually used
+ - com/sun/star/chart2/XChartDocument.hpp
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/drawingml/chart/titleconverter.cxx:
+ # Actually used
+ - com/sun/star/chart2/XDiagram.hpp
+ - com/sun/star/chart2/XTitled.hpp
+ oox/source/drawingml/chart/typegroupconverter.cxx:
+ # Actually used
+ - com/sun/star/chart2/XCoordinateSystem.hpp
+ oox/source/drawingml/diagram/diagram.cxx:
+ # Actually used
+ - com/sun/star/xml/dom/XDocument.hpp
+ oox/source/export/drawingml.cxx:
+ # Needed for template
+ - com/sun/star/text/XTextFrame.hpp
+ oox/source/export/vmlexport.cxx:
+ # Needed for template
+ - com/sun/star/text/XTextFrame.hpp
+ oox/source/helper/binarystreambase.cxx:
+ # Actually used
+ - com/sun/star/io/XSeekable.hpp
+ oox/source/helper/binaryinputstream.cxx:
+ # Actually used
+ - com/sun/star/io/XInputStream.hpp
+ - vector
+ oox/source/helper/binaryoutputstream.cxx:
+ # Actually used
+ - com/sun/star/io/XOutputStream.hpp
+ oox/source/helper/progressbar.cxx:
+ # Actually used
+ - com/sun/star/task/XStatusIndicator.hpp
+ oox/source/helper/modelobjecthelper.cxx:
+ # Actually used
+ - com/sun/star/awt/Gradient.hpp
+ - com/sun/star/drawing/LineDash.hpp
+ - com/sun/star/drawing/Hatch.hpp
+ - com/sun/star/drawing/PolyPolygonBezierCoords.hpp
+ - com/sun/star/lang/XMultiServiceFactory.hpp
+ - com/sun/star/graphic/XGraphic.hpp
+ oox/source/helper/propertyset.cxx:
+ # Actually used
+ - com/sun/star/beans/XPropertySet.hpp
+ oox/source/helper/storagebase.cxx:
+ # Actually used
+ - com/sun/star/io/XStream.hpp
+ oox/source/helper/zipstorage.cxx:
+ # Actually used
+ - com/sun/star/embed/XStorage.hpp
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/helper/propertymap.cxx:
+ # Actually used
+ - com/sun/star/beans/PropertyValue.hpp
+ oox/source/mathml/importutils.cxx:
+ # Actually used
+ - com/sun/star/xml/sax/XFastAttributeList.hpp
+ oox/source/ole/oleobjecthelper.cxx:
+ # Actually used
+ - com/sun/star/awt/Size.hpp
+ - com/sun/star/lang/XMultiServiceFactory.hpp
+ oox/source/ole/vbamodule.cxx:
+ # Actually used
+ - com/sun/star/container/XNameContainer.hpp
+ oox/source/ole/olestorage.cxx:
+ # Actually used
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/ole/olehelper.cxx:
+ # Actually used
+ - com/sun/star/frame/XModel.hpp
+ - com/sun/star/awt/Size.hpp
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/ole/vbaproject.cxx:
+ # Actually used
+ - com/sun/star/frame/XModel.hpp
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/ole/vbacontrol.cxx:
+ # Actually used
+ - com/sun/star/uno/XComponentContext.hpp
+ oox/source/ppt/comments.cxx:
+ # Needed for rtl::math::round
+ - rtl/math.hxx
+ oox/source/ppt/pptimport.cxx:
+ # Actually used
+ - comphelper/scopeguard.hxx
+ oox/source/ppt/pptshape.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ - com/sun/star/drawing/XDrawPage.hpp
+ oox/source/ppt/presPropsfragmenthandler.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ oox/source/ppt/slidepersist.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ oox/source/ppt/slidetransition.cxx:
+ # Actually used
+ - com/sun/star/animations/XTransitionFilter.hpp
+ oox/source/shape/ShapeFilterBase.cxx:
+ # Needed for template
+ - com/sun/star/frame/XModel.hpp
+ oox/qa/unit/shape.cxx:
+ # Needed for rtl::math::round
+ - rtl/math.hxx
+ oox/source/shape/ShapeContextHandler.cxx:
+ # Actually used
+ - com/sun/star/xml/dom/XDocument.hpp
+ oox/source/token/propertynames.cxx:
+ # Auto-generated C array of property names
+ - propertynames.inc
+ oox/source/token/relationship.cxx:
+ # Auto-generated C array of relationship names
+ - relationship.inc
+ oox/source/token/namespacemap.cxx:
+ # Auto-generated C array of transitional and strict namespace names
+ - namespacenames.inc
+ - namespaces-strictnames.inc
+ oox/source/token/tokenmap.cxx:
+ # Auto-generated C array of token names
+ - tokennames.inc
+ oox/source/vml/vmlinputstream.cxx:
+ # Needed for direct member access
+ - com/sun/star/io/XTextInputStream2.hpp
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
new file mode 100644
index 000000000..88da558a3
--- /dev/null
+++ b/oox/Library_oox.mk
@@ -0,0 +1,339 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,oox))
+
+$(eval $(call gb_Library_set_precompiled_header,oox,oox/inc/pch/precompiled_oox))
+
+$(eval $(call gb_Library_use_custom_headers,oox,oox/generated))
+
+$(eval $(call gb_Library_set_include,oox,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/oox/inc \
+))
+
+ifeq ($(COM)-$(OS)-$(CPUNAME),GCC-LINUX-IA64)
+# at least Debian Linux ia64 fails at compile time on
+# link libooxlo.so which is apparently too large
+# for the toolchain to handle with default optimization
+$(eval $(call gb_Library_add_cxxflags,oox,\
+ -Os \
+))
+endif
+
+$(eval $(call gb_Library_add_defs,oox,\
+ -DOOX_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_use_sdk_api,oox))
+
+$(eval $(call gb_Library_use_api,oox,\
+ oovbaapi \
+))
+
+$(eval $(call gb_Library_use_libraries,oox,\
+ $(call gb_Helper_optional,AVMEDIA,avmedia) \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ expwrap \
+ drawinglayer \
+ msfilter \
+ sal \
+ i18nlangtag \
+ sax \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sot \
+ tl \
+ utl \
+ vcl \
+ xo \
+ xmlscript \
+))
+
+$(eval $(call gb_Library_use_externals,oox,\
+ boost_headers \
+))
+
+ifeq ($(TLS),OPENSSL)
+$(eval $(call gb_Library_use_externals,oox,\
+ openssl \
+ openssl_headers \
+))
+else
+ifeq ($(TLS),NSS)
+$(eval $(call gb_Library_use_externals,oox,\
+ plc4 \
+ nss3 \
+))
+endif
+endif
+
+$(eval $(call gb_Library_set_componentfile,oox,oox/util/oox,services))
+
+# WASM_CHART change
+ifeq (,$(ENABLE_WASM_STRIP_CHART))
+$(eval $(call gb_Library_add_exception_objects,oox,\
+ oox/source/export/chartexport \
+ oox/source/drawingml/chart/axiscontext \
+ oox/source/drawingml/chart/axisconverter \
+ oox/source/drawingml/chart/axismodel \
+ oox/source/drawingml/chart/chartcontextbase \
+ oox/source/drawingml/chart/chartconverter \
+ oox/source/drawingml/chart/chartdrawingfragment \
+ oox/source/drawingml/chart/chartspaceconverter \
+ oox/source/drawingml/chart/chartspacefragment \
+ oox/source/drawingml/chart/chartspacemodel \
+ oox/source/drawingml/chart/converterbase \
+ oox/source/drawingml/chart/datasourcecontext \
+ oox/source/drawingml/chart/datasourceconverter \
+ oox/source/drawingml/chart/datasourcemodel \
+ oox/source/drawingml/chart/datatablecontext \
+ oox/source/drawingml/chart/datatableconverter \
+ oox/source/drawingml/chart/modelbase \
+ oox/source/drawingml/chart/objectformatter \
+ oox/source/drawingml/chart/plotareacontext \
+ oox/source/drawingml/chart/plotareaconverter \
+ oox/source/drawingml/chart/plotareamodel \
+ oox/source/drawingml/chart/seriescontext \
+ oox/source/drawingml/chart/seriesconverter \
+ oox/source/drawingml/chart/seriesmodel \
+ oox/source/drawingml/chart/titlecontext \
+ oox/source/drawingml/chart/titleconverter \
+ oox/source/drawingml/chart/titlemodel \
+ oox/source/drawingml/chart/typegroupcontext \
+ oox/source/drawingml/chart/typegroupconverter \
+ oox/source/drawingml/chart/typegroupmodel \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,oox,\
+ oox/source/core/binarycodec \
+ oox/source/core/contexthandler2 \
+ oox/source/core/contexthandler \
+ oox/source/core/fastparser \
+ oox/source/core/fasttokenhandler \
+ oox/source/core/filterbase \
+ oox/source/core/filterdetect \
+ oox/source/core/fragmenthandler2 \
+ oox/source/core/fragmenthandler \
+ oox/source/core/recordparser \
+ oox/source/core/relations \
+ oox/source/core/relationshandler \
+ oox/source/core/xmlfilterbase \
+ oox/source/crypto/AgileEngine \
+ oox/source/crypto/CryptTools \
+ oox/source/crypto/DocumentEncryption \
+ oox/source/crypto/DocumentDecryption \
+ oox/source/crypto/Standard2007Engine \
+ oox/source/crypto/StrongEncryptionDataSpace \
+ oox/source/docprop/docprophandler \
+ oox/source/docprop/ooxmldocpropimport \
+ oox/source/drawingml/clrschemecontext \
+ oox/source/drawingml/clrscheme \
+ oox/source/drawingml/colorchoicecontext \
+ oox/source/drawingml/connectorshapecontext \
+ oox/source/drawingml/customshapegeometry \
+ oox/source/drawingml/customshapepresetdata \
+ oox/source/drawingml/customshapeproperties \
+ oox/source/drawingml/diagram/constraintlistcontext \
+ oox/source/drawingml/diagram/datamodel \
+ oox/source/drawingml/diagram/datamodelcontext \
+ oox/source/drawingml/diagram/diagram \
+ oox/source/drawingml/diagram/diagramhelper \
+ oox/source/drawingml/diagram/diagramdefinitioncontext \
+ oox/source/drawingml/diagram/diagramfragmenthandler \
+ oox/source/drawingml/diagram/diagramlayoutatoms \
+ oox/source/drawingml/diagram/layoutatomvisitorbase \
+ oox/source/drawingml/diagram/layoutatomvisitors \
+ oox/source/drawingml/diagram/layoutnodecontext \
+ oox/source/drawingml/diagram/rulelistcontext \
+ oox/source/drawingml/drawingmltypes \
+ oox/source/drawingml/effectproperties \
+ oox/source/drawingml/effectpropertiescontext \
+ oox/source/drawingml/embeddedwavaudiofile \
+ oox/source/drawingml/fillproperties \
+ oox/source/drawingml/misccontexts \
+ oox/source/drawingml/graphicshapecontext \
+ oox/source/drawingml/guidcontext \
+ oox/source/drawingml/hyperlinkcontext \
+ oox/source/drawingml/linepropertiescontext \
+ oox/source/drawingml/lineproperties \
+ oox/source/drawingml/objectdefaultcontext \
+ oox/source/drawingml/presetgeometrynames \
+ oox/source/drawingml/scene3dcontext \
+ oox/source/drawingml/shapecontext \
+ oox/source/drawingml/shape \
+ oox/source/drawingml/shape3dproperties \
+ oox/source/drawingml/shapegroupcontext \
+ oox/source/drawingml/shapepropertiescontext \
+ oox/source/drawingml/shapepropertymap \
+ oox/source/drawingml/shapestylecontext \
+ oox/source/drawingml/spdefcontext \
+ oox/source/drawingml/table/tablebackgroundstylecontext \
+ oox/source/drawingml/table/tablecellcontext \
+ oox/source/drawingml/table/tablecell \
+ oox/source/drawingml/table/tablecontext \
+ oox/source/drawingml/table/tablepartstylecontext \
+ oox/source/drawingml/table/tableproperties \
+ oox/source/drawingml/table/tablerowcontext \
+ oox/source/drawingml/table/tablerow \
+ oox/source/drawingml/table/tablestylecellstylecontext \
+ oox/source/drawingml/table/tablestylecontext \
+ oox/source/drawingml/table/tablestyle \
+ oox/source/drawingml/table/tablestylelist \
+ oox/source/drawingml/table/tablestylelistfragmenthandler \
+ oox/source/drawingml/table/tablestylepart \
+ oox/source/drawingml/table/tablestyletextstylecontext \
+ oox/source/drawingml/textbodycontext \
+ oox/source/drawingml/textbody \
+ oox/source/drawingml/textbodypropertiescontext \
+ oox/source/drawingml/textbodyproperties \
+ oox/source/drawingml/textcharacterpropertiescontext \
+ oox/source/drawingml/textcharacterproperties \
+ oox/source/drawingml/texteffectscontext \
+ oox/source/drawingml/textfieldcontext \
+ oox/source/drawingml/textfield \
+ oox/source/drawingml/textfont \
+ oox/source/drawingml/textliststylecontext \
+ oox/source/drawingml/textliststyle \
+ oox/source/drawingml/textparagraph \
+ oox/source/drawingml/textparagraphpropertiescontext \
+ oox/source/drawingml/textparagraphproperties \
+ oox/source/drawingml/textrun \
+ oox/source/drawingml/textspacingcontext \
+ oox/source/drawingml/texttabstoplistcontext \
+ oox/source/drawingml/theme \
+ oox/source/drawingml/themeelementscontext \
+ oox/source/drawingml/themefragmenthandler \
+ oox/source/drawingml/ThemeOverrideFragmentHandler \
+ oox/source/drawingml/transform2dcontext \
+ oox/source/dump/dffdumper \
+ oox/source/dump/dumperbase \
+ oox/source/dump/oledumper \
+ oox/source/dump/pptxdumper \
+ oox/source/export/ColorPropertySet \
+ oox/source/export/drawingml \
+ oox/source/export/DMLPresetShapeExport \
+ oox/source/export/shapes \
+ oox/source/export/vmlexport \
+ oox/source/helper/attributelist \
+ oox/source/helper/binaryinputstream \
+ oox/source/helper/binaryoutputstream \
+ oox/source/helper/binarystreambase \
+ oox/source/helper/containerhelper \
+ oox/source/helper/graphichelper \
+ oox/source/helper/grabbagstack \
+ oox/source/helper/modelobjecthelper \
+ oox/source/helper/ooxresid \
+ oox/source/helper/progressbar \
+ oox/source/helper/propertymap \
+ oox/source/helper/propertyset \
+ oox/source/helper/storagebase \
+ oox/source/helper/textinputstream \
+ oox/source/helper/zipstorage \
+ oox/source/mathml/export \
+ oox/source/mathml/import \
+ oox/source/mathml/importutils \
+ oox/source/ole/axbinaryreader \
+ oox/source/ole/axbinarywriter \
+ oox/source/ole/axfontdata \
+ oox/source/ole/axcontrol \
+ oox/source/ole/axcontrolfragment \
+ oox/source/ole/olehelper \
+ oox/source/ole/oleobjecthelper \
+ oox/source/ole/olestorage \
+ oox/source/ole/vbacontrol \
+ oox/source/ole/vbaexport \
+ oox/source/ole/vbahelper \
+ oox/source/ole/vbainputstream \
+ oox/source/ole/vbamodule \
+ oox/source/ole/vbaproject \
+ oox/source/ppt/animationspersist \
+ oox/source/ppt/animationtypes \
+ oox/source/ppt/animvariantcontext \
+ oox/source/ppt/backgroundproperties \
+ oox/source/ppt/buildlistcontext \
+ oox/source/ppt/comments \
+ oox/source/ppt/commonbehaviorcontext \
+ oox/source/ppt/commontimenodecontext \
+ oox/source/ppt/conditioncontext \
+ oox/source/ppt/customshowlistcontext \
+ oox/source/ppt/headerfootercontext \
+ oox/source/ppt/layoutfragmenthandler \
+ oox/source/ppt/pptfilterhelpers \
+ oox/source/ppt/pptgraphicshapecontext \
+ oox/source/ppt/pptimport \
+ oox/source/ppt/pptshapecontext \
+ oox/source/ppt/pptshape \
+ oox/source/ppt/pptshapegroupcontext \
+ oox/source/ppt/pptshapepropertiescontext \
+ oox/source/ppt/presentationfragmenthandler \
+ oox/source/ppt/presPropsfragmenthandler \
+ oox/source/ppt/slidefragmenthandler \
+ oox/source/ppt/slidemastertextstylescontext \
+ oox/source/ppt/slidepersist \
+ oox/source/ppt/slidetimingcontext \
+ oox/source/ppt/slidetransitioncontext \
+ oox/source/ppt/slidetransition \
+ oox/source/ppt/soundactioncontext \
+ oox/source/ppt/timeanimvaluecontext \
+ oox/source/ppt/timenode \
+ oox/source/ppt/timenodelistcontext \
+ oox/source/ppt/timetargetelementcontext \
+ oox/source/ppt/extdrawingfragmenthandler \
+ oox/source/shape/LockedCanvasContext \
+ oox/source/shape/ShapeContextHandler \
+ oox/source/shape/ShapeDrawingFragmentHandler \
+ oox/source/shape/ShapeFilterBase \
+ oox/source/shape/WpgContext \
+ oox/source/shape/WpsContext \
+ oox/source/token/namespacemap \
+ oox/source/token/propertynames \
+ oox/source/token/tokenmap \
+ oox/source/token/relationship \
+ oox/source/vml/vmldrawing \
+ oox/source/vml/vmldrawingfragment \
+ oox/source/vml/vmlformatting \
+ oox/source/vml/vmlinputstream \
+ oox/source/vml/vmlshapecontainer \
+ oox/source/vml/vmlshapecontext \
+ oox/source/vml/vmlshape \
+ oox/source/vml/vmltextboxcontext \
+ oox/source/vml/vmltextbox \
+))
+
+ifeq ($(OS),iOS)
+# Either a compiler bug in Xcode 5.1.1 or some hard-to-spot undefined
+# behaviour in the source code... Compiling this source file with
+# optimization causes some Smart Art images to end up with completely
+# wrong colour, some even totally black.
+$(eval $(call gb_Library_add_exception_objects,oox,\
+ oox/source/drawingml/color \
+ , $(gb_COMPILERNOOPTFLAGS) \
+))
+else
+$(eval $(call gb_Library_add_exception_objects,oox,\
+ oox/source/drawingml/color \
+))
+endif
+
+ifeq ($(CPUNAME),M68K)
+$(eval $(call gb_Library_add_cxxflags,oox,\
+ -mlong-jump-table-offsets \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/Makefile b/oox/Makefile
new file mode 100644
index 000000000..0997e6284
--- /dev/null
+++ b/oox/Makefile
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/Module_oox.mk b/oox/Module_oox.mk
new file mode 100644
index 000000000..75ef85051
--- /dev/null
+++ b/oox/Module_oox.mk
@@ -0,0 +1,35 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,oox))
+
+$(eval $(call gb_Module_add_targets,oox,\
+ CustomTarget_generated \
+ Library_oox \
+ Package_customshapes \
+ Package_generated \
+))
+
+$(eval $(call gb_Module_add_l10n_targets,oox,\
+ AllLangMoTarget_oox \
+))
+
+$(eval $(call gb_Module_add_check_targets,oox,\
+ CppunitTest_oox_tokenmap \
+ CppunitTest_oox_vba_compression \
+ CppunitTest_oox_vba_encryption \
+ CppunitTest_oox_crypto \
+ CppunitTest_oox_mathml \
+ CppunitTest_oox_drawingml \
+ CppunitTest_oox_vml \
+ CppunitTest_oox_shape \
+ CppunitTest_oox_export \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/Package_customshapes.mk b/oox/Package_customshapes.mk
new file mode 100644
index 000000000..c9058c3f5
--- /dev/null
+++ b/oox/Package_customshapes.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,oox_customshapes,$(SRCDIR)/oox))
+
+$(eval $(call gb_Package_add_files,oox_customshapes,$(LIBO_SHARE_FOLDER)/filter,\
+ source/drawingml/customshapes/oox-drawingml-cs-presets \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/Package_generated.mk b/oox/Package_generated.mk
new file mode 100644
index 000000000..6ed8f83e2
--- /dev/null
+++ b/oox/Package_generated.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,oox_generated,$(call gb_CustomTarget_get_workdir,oox/generated)))
+
+$(eval $(call gb_Package_add_files,oox_generated,$(LIBO_SHARE_FOLDER)/filter,\
+ misc/oox-drawingml-adj-names \
+ misc/vml-shape-types \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/oox/README.md b/oox/README.md
new file mode 100644
index 000000000..73e7449e5
--- /dev/null
+++ b/oox/README.md
@@ -0,0 +1,193 @@
+# Office Open XML (ooxml) Support
+
+Support for Office Open XML, the office XML-format designed by Microsoft.
+
+## DrawingML Custom shapes and presets
+
+Custom shapes are part of DrawingML and are different to binary ppt
+and VML in older formats.
+The import happens in `oox/source/drawingml`, where they are
+imported as LO's enhanced custom shape's. see
+`offapi/com/sun/star/drawing/CustomShape.idl` and
+`offapi/com/sun/star/drawing/EnhancedCustomShape*.idl`
+Check `CustomShapeProperties::pushToPropSet()` and see
+how custom shape properties are converted.
+
+Preset shapes are custom shapes whose guides and handles
+have been defined in OOXML specification. By specifying
+preset type and the adjustment values, the reset can
+be taken from the shape definition.
+
+example of drawingml preset:
+```xml
+ <a:prstGeom prst="star5">
+ <a:avLst/>
+ </a:prstGeom>
+```
+
+example of drawingml custom shape (equal to star5 preset):
+```xml
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 19098" />
+ <gd name="hf" fmla="val 105146" />
+ <gd name="vf" fmla="val 110557" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="svc" fmla="*/ vc vf 100000" />
+ <gd name="dx1" fmla="cos swd2 1080000" />
+ <gd name="dx2" fmla="cos swd2 18360000" />
+ <gd name="dy1" fmla="sin shd2 1080000" />
+ <gd name="dy2" fmla="sin shd2 18360000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- svc 0 dy1" />
+ <gd name="y2" fmla="+- svc 0 dy2" />
+ <gd name="iwd2" fmla="*/ swd2 a 50000" />
+ <gd name="ihd2" fmla="*/ shd2 a 50000" />
+ <gd name="sdx1" fmla="cos iwd2 20520000" />
+ <gd name="sdx2" fmla="cos iwd2 3240000" />
+ <gd name="sdy1" fmla="sin ihd2 3240000" />
+ <gd name="sdy2" fmla="sin ihd2 20520000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc sdx2 0" />
+ <gd name="sx4" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- svc 0 sdy1" />
+ <gd name="sy2" fmla="+- svc 0 sdy2" />
+ <gd name="sy3" fmla="+- svc ihd2 0" />
+ <gd name="yAdj" fmla="+- svc 0 ihd2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y1" />
+ </cxn>
+ </cxnLst>
+ <rect l="sx1" t="sy1" r="sx4" b="sy3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx2" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+```
+
+we needed to extend our custom shapes for missing features and so 5
+new segment commands were added. `G` command for arcto drawingml record
+and `H` `I` `J` `K` commands for darken, darkenless, lighten, lightenless
+records. the commands are save into ODF in special namespace drawooo,
+which is extension not yet in the standard. Thorsten suggested to put
+it in such a namespace and keep original (incomplete) geometry for
+backward compatibility, before we can extend the ODF. that's why you
+will see 2 of them in cases where some of the new commands was
+needed.
+
+In order to convert preset shapes to LO's enhanced custom shape,
+we need to load shape definition of preset shapes. The procedure
+to convert the definition from OOXML spec for LO is documented
+in `oox/source/drawingml/customshapes/README.md`.
+The `oox/source/drawingml/customshapes/generate.sh` script generate pptx
+files for single presets and also for all presets
+`cshape-all.pptx`. The `cshape-all.pptx` file is then loaded into Impress
+build with debug enabled in `oox` and the command line output contains
+information. The generated definition is `oox-drawingml-cs-presets`.
+
+Check `CustomShapeProperties::initializePresetDataMap()` to see how
+generated presets data are loaded into LO.
+While importing presets, we prefix the name with "ooxml-" so
+that we can detect it on export as save it again as preset.
+
+The generated pptx files
+can be used when debugging bugs in custom shapes import/export. also
+the cshape-all.pptx can be used to test the round trips. there's small
+problem with these pptx as they cannot be imported into powerpoint,
+but that can be fixed quickly. when fixed, we can use it to
+test powerpoint odp export and see how complete it is regarding
+custom shapes. OpenXML SDK might help when fixing `cshape-all.pptx`
+
+<https://github.com/OfficeDev/Open-XML-SDK>
+
+Also, "OOXML Viewer VSCode Extension" is a useful tool for debugging
+OOXML documents.
+
+<https://github.com/yuenm18/ooxml-viewer-vscode>
+
+## Export
+Here is how LO's enhanced custom shapes are exported:
+
+* Shape name is `ooxml-*` - they are imported from ooxml, export as is.
+* Denylist - ODF presets that has OOXML equivalent.
+ We convert adjustment values case by case. Microsoft Office
+ is rather strict about adjustment values, either none of them
+ are provided so that default values are taken, or the exact set
+ of handles have to be provided. In some cases we are converting
+ from the preset with less handles to the one with more handles
+ so that default values suitable for the odf one need to be
+ provided.
+* Allowlist - ODF presets that has OOXML equivalent but looks a bit
+different, export them as `PolyPolygon`.
+
+Check Andras Timar's presentation[1] and `ShapeExport::WriteCustomShape()`
+for further detail.
+
+## Future Works
+Because we have to make sure that all the roundtrips
+like PPTX --> ODP --> PPTX work correctly and doesn't lose data.
+the only problematic part is probably saving custom shapes (ie. not
+presets) to PPTX. that part of code predates work on custom shapes
+and is unable to export general custom shapes yet. It will need a bit
+of work as LO has more complex equations than `DrawingML`. other parts
+should work OK, PPTX --> ODP should work and don't lose any
+data. presets should already survive PPTX --> ODP --> PPTX roundtrip
+
+[1] <https://archive.fosdem.org/2016/schedule/event/drawingml/attachments/slides/1184/export/events/attachments/drawingml/slides/1184/andras_timar_fosdem_2016.pdf>
diff --git a/oox/README.vars b/oox/README.vars
new file mode 100644
index 000000000..a2aba2023
--- /dev/null
+++ b/oox/README.vars
@@ -0,0 +1,5 @@
+Environment variables in oox:
+
+- ppt:
+
+ - OOX_NO_SMARTART_WARNING - don't warn on SmartArts missing their DrawingML fallback
diff --git a/oox/documentation/predefined-styles-map.ods b/oox/documentation/predefined-styles-map.ods
new file mode 100644
index 000000000..697c2b0bb
--- /dev/null
+++ b/oox/documentation/predefined-styles-map.ods
Binary files differ
diff --git a/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
new file mode 100644
index 000000000..1582ea819
--- /dev/null
+++ b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_THEMEOVERRICEFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_DRAWINGML_THEMEOVERRICEFRAGMENTHANDLER_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::drawingml {
+
+class Theme;
+
+class ThemeOverrideFragmentHandler final : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit ThemeOverrideFragmentHandler(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ Theme& rTheme );
+ virtual ~ThemeOverrideFragmentHandler() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+private:
+ Theme& mrTheme;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/axiscontext.hxx b/oox/inc/drawingml/chart/axiscontext.hxx
new file mode 100644
index 000000000..ad240a4a7
--- /dev/null
+++ b/oox/inc/drawingml/chart/axiscontext.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct AxisDispUnitsModel;
+
+/** Handler for a value axis display units context (c:dispUnits element).
+ */
+class AxisDispUnitsContext final : public ContextBase< AxisDispUnitsModel >
+{
+public:
+ explicit AxisDispUnitsContext( ::oox::core::ContextHandler2Helper& rParent, AxisDispUnitsModel& rModel );
+ virtual ~AxisDispUnitsContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct AxisModel;
+
+/** Base class for axis context handlers (c:catAx, c:dateAx, c:serAx, c:valAx
+ elements).
+ */
+class AxisContextBase : public ContextBase< AxisModel >
+{
+public:
+ explicit AxisContextBase( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
+ virtual ~AxisContextBase() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a category axis context (c:catAx element).
+ */
+class CatAxisContext final : public AxisContextBase
+{
+public:
+ explicit CatAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
+ virtual ~CatAxisContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a date axis context (c:dateAx element).
+ */
+class DateAxisContext final : public AxisContextBase
+{
+public:
+ explicit DateAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
+ virtual ~DateAxisContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a series axis context (c:serAx element).
+ */
+class SerAxisContext final : public AxisContextBase
+{
+public:
+ explicit SerAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
+ virtual ~SerAxisContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a value axis context (c:valAx element).
+ */
+class ValAxisContext final : public AxisContextBase
+{
+public:
+ explicit ValAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
+ virtual ~ValAxisContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/axisconverter.hxx b/oox/inc/drawingml/chart/axisconverter.hxx
new file mode 100644
index 000000000..6efa3af62
--- /dev/null
+++ b/oox/inc/drawingml/chart/axisconverter.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISCONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_AXISCONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XAxis; }
+ namespace chart2 { class XCoordinateSystem; }
+}
+
+namespace oox::drawingml::chart {
+
+
+struct AxisDispUnitsModel;
+
+class AxisDispUnitsConverter final : public ConverterBase< AxisDispUnitsModel >
+{
+public:
+ explicit AxisDispUnitsConverter(
+ const ConverterRoot& rParent,
+ AxisDispUnitsModel& rModel );
+ virtual ~AxisDispUnitsConverter() override;
+
+ /** Creates a chart2 axis and inserts it into the passed coordinate system. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XAxis >& rxAxis);
+};
+
+struct AxisModel;
+class TypeGroupConverter;
+
+class AxisConverter final : public ConverterBase< AxisModel >
+{
+public:
+ explicit AxisConverter(
+ const ConverterRoot& rParent,
+ AxisModel& rModel );
+ virtual ~AxisConverter() override;
+
+ /** Creates a chart2 axis and inserts it into the passed coordinate system. */
+ void convertFromModel(
+ const css::uno::Reference<css::chart2::XCoordinateSystem>& rxCoordSystem,
+ RefVector<TypeGroupConverter>& rTypeGroups, const AxisModel* pCrossingAxis,
+ sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx, bool bUseFixedInnerSize );
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/axismodel.hxx b/oox/inc/drawingml/chart/axismodel.hxx
new file mode 100644
index 000000000..6ecd411e1
--- /dev/null
+++ b/oox/inc/drawingml/chart/axismodel.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_AXISMODEL_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+
+namespace oox::drawingml::chart {
+
+struct AxisDispUnitsModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< LayoutModel > LayoutRef;
+ typedef ModelRef< TextModel > TextRef;
+
+ ShapeRef mxShapeProp; /// Label frame formatting.
+ TextBodyRef mxTextProp; /// Label text formatting.
+ LayoutRef mxLayout; /// Layout/position of the axis units label.
+ TextRef mxText; /// Text source of the axis units label.
+ double mfCustomUnit; /// Custom unit size on value axis.
+ OUString mnBuiltInUnit; /// Built-in unit on value axis.
+
+ explicit AxisDispUnitsModel();
+ ~AxisDispUnitsModel();
+};
+
+struct AxisModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< TitleModel > TitleRef;
+ typedef ModelRef< AxisDispUnitsModel > AxisDispUnitsRef;
+
+ ShapeRef mxShapeProp; /// Axis line formatting.
+ TextBodyRef mxTextProp; /// Axis label text formatting.
+ TitleRef mxTitle; /// Axis title.
+ AxisDispUnitsRef mxDispUnits; /// Axis units label.
+ ShapeRef mxMajorGridLines; /// Major grid lines formatting.
+ ShapeRef mxMinorGridLines; /// Minor grid lines formatting.
+ NumberFormat maNumberFormat; /// Number format for axis tick labels.
+ OptValue< double > mofCrossesAt; /// Position on this axis where another axis crosses.
+ OptValue< double > mofMajorUnit; /// Unit for major tick marks on date/value axis.
+ OptValue< double > mofMinorUnit; /// Unit for minor tick marks on date/value axis.
+ OptValue< double > mofLogBase; /// Logarithmic base for logarithmic axes.
+ OptValue< double > mofMax; /// Maximum axis value.
+ OptValue< double > mofMin; /// Minimum axis value.
+ OptValue< sal_Int32 > monBaseTimeUnit; /// Base time unit shown on a date axis.
+ sal_Int32 mnAxisId; /// Unique axis identifier.
+ sal_Int32 mnAxisPos; /// Position of the axis (top/bottom/left/right).
+ sal_Int32 mnCrossAxisId; /// Identifier of a crossing axis.
+ sal_Int32 mnCrossBetween; /// This value axis crosses between or inside category.
+ sal_Int32 mnCrossMode; /// Mode this axis crosses another axis (min, max, auto).
+ sal_Int32 mnLabelAlign; /// Tick mark label alignment.
+ sal_Int32 mnLabelOffset; /// Tick mark label distance from axis.
+ sal_Int32 mnMajorTickMark; /// Major tick mark style.
+ sal_Int32 mnMajorTimeUnit; /// Time unit for major tick marks on date axis.
+ sal_Int32 mnMinorTickMark; /// Minor tick mark style.
+ sal_Int32 mnMinorTimeUnit; /// Time unit for minor tick marks on date axis.
+ sal_Int32 mnOrientation; /// Axis orientation (value order min to max, or max to min).
+ sal_Int32 mnTickLabelPos; /// Position of tick mark labels relative to the axis.
+ sal_Int32 mnTickLabelSkip; /// Number of tick mark labels to skip.
+ sal_Int32 mnTickMarkSkip; /// Number of tick marks to skip.
+ sal_Int32 mnTypeId; /// Type identifier of this axis.
+ bool mbAuto; /// True = automatic selection of text/date axis type.
+ bool mbDeleted; /// True = axis has been deleted manually.
+ bool mbNoMultiLevel; /// True = no multi-level categories supported.
+
+ explicit AxisModel( sal_Int32 nTypeId, bool bMSO2007Doc );
+ ~AxisModel();
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/chartcontextbase.hxx b/oox/inc/drawingml/chart/chartcontextbase.hxx
new file mode 100644
index 000000000..b91692f9b
--- /dev/null
+++ b/oox/inc/drawingml/chart/chartcontextbase.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTCONTEXTBASE_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CHARTCONTEXTBASE_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::drawingml { class Shape; }
+
+namespace oox::drawingml::chart {
+
+template< typename ModelType >
+class ContextBase : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ContextBase( ::oox::core::ContextHandler2Helper& rParent, ModelType& rModel ) :
+ ::oox::core::ContextHandler2( rParent ), mrModel( rModel ) {}
+
+protected:
+ ModelType& mrModel;
+};
+
+template< typename ModelType >
+class FragmentBase : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit FragmentBase( ::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, ModelType& rModel ) :
+ ::oox::core::FragmentHandler2( rFilter, rFragmentPath, false ), mrModel( rModel ) {}
+
+protected:
+ ModelType& mrModel;
+};
+
+/** Help class for all contexts that have only the c:spPr child element.
+ */
+class ShapePrWrapperContext final : public ContextBase< Shape >
+{
+public:
+ explicit ShapePrWrapperContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rModel );
+ virtual ~ShapePrWrapperContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+struct LayoutModel;
+
+/** Handler for a chart layout context (c:layout element).
+ */
+class LayoutContext final : public ContextBase< LayoutModel >
+{
+public:
+ explicit LayoutContext( ::oox::core::ContextHandler2Helper& rParent, LayoutModel& rModel );
+ virtual ~LayoutContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/chartdrawingfragment.hxx b/oox/inc/drawingml/chart/chartdrawingfragment.hxx
new file mode 100644
index 000000000..af5b16145
--- /dev/null
+++ b/oox/inc/drawingml/chart/chartdrawingfragment.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox::drawingml::chart {
+
+
+/** Relative shape position in a chart object. */
+struct AnchorPosModel
+{
+ double mfX; /// X coordinate relative to chart object (0.0 to 1.0).
+ double mfY; /// Y coordinate relative to chart object (0.0 to 1.0).
+
+ AnchorPosModel() : mfX( -1.0 ), mfY( -1.0 ) {}
+ bool isValid() const { return (0.0 <= mfX) && (mfX <= 1.0) && (0.0 <= mfY) && (mfY <= 1.0); }
+};
+
+
+/** Absolute shape size in a chart object (in EMUs). */
+struct AnchorSizeModel : public EmuSize
+{
+ AnchorSizeModel() : EmuSize( -1, -1 ) {}
+ bool isValid() const { return (Width >= 0) && (Height >= 0); }
+};
+
+
+/** Contains the position of a shape in the chart object. Supports different
+ shape anchor modes (absolute, relative).
+ */
+class ShapeAnchor
+{
+public:
+ explicit ShapeAnchor( bool bRelSize );
+
+ /** Imports the absolute anchor size from the cdr:ext element. */
+ void importExt( const AttributeList& rAttribs );
+ /** Sets the relative anchor position from the cdr:from or cdr:to element. */
+ void setPos( sal_Int32 nElement, sal_Int32 nParentContext, std::u16string_view rValue );
+
+ /** Calculates the resulting shape anchor in EMUs. */
+ EmuRectangle calcAnchorRectEmu( const EmuRectangle& rChartRect ) const;
+
+private:
+ AnchorPosModel maFrom; /// Top-left position relative to chart object.
+ AnchorPosModel maTo; /// Bottom-right position relative to chart object.
+ AnchorSizeModel maSize; /// Shape size, if anchor has absolute size.
+ bool mbRelSize; /// True = relative size, false = absolute size.
+};
+
+/** Handler for a chart drawing fragment (c:userShapes root element).
+ */
+class ChartDrawingFragment final : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit ChartDrawingFragment(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ const css::uno::Reference< css::drawing::XShapes >& rxDrawPage,
+ const css::awt::Size& rChartSize,
+ const css::awt::Point& rShapesOffset,
+ bool bOleSupport );
+ virtual ~ChartDrawingFragment() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+ virtual void onEndElement() override;
+
+private:
+ css::uno::Reference< css::drawing::XShapes >
+ mxDrawPage; /// Drawing page of this sheet.
+ ::oox::drawingml::ShapePtr mxShape; /// Current top-level shape.
+ std::shared_ptr< ShapeAnchor > mxAnchor; /// Current anchor of top-level shape.
+ EmuRectangle maChartRectEmu; /// Position and size of the chart object for embedded shapes (in EMUs).
+ bool mbOleSupport; /// True = allow to insert OLE objects into the drawing page.
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/chartspaceconverter.hxx b/oox/inc/drawingml/chart/chartspaceconverter.hxx
new file mode 100644
index 000000000..32f13bb0e
--- /dev/null
+++ b/oox/inc/drawingml/chart/chartspaceconverter.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACECONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACECONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace drawing { class XShapes; }
+}
+
+namespace oox::drawingml::chart {
+
+
+struct ChartSpaceModel;
+
+class ChartSpaceConverter final : public ConverterBase< ChartSpaceModel >
+{
+public:
+ explicit ChartSpaceConverter( const ConverterRoot& rParent, ChartSpaceModel& rModel );
+ virtual ~ChartSpaceConverter() override;
+
+ /** Converts the contained OOXML chart model to a chart2 document. */
+ void convertFromModel(
+ const css::uno::Reference< css::drawing::XShapes >& rxExternalPage,
+ const css::awt::Point& rChartPos );
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/chartspacefragment.hxx b/oox/inc/drawingml/chart/chartspacefragment.hxx
new file mode 100644
index 000000000..8d29fecb5
--- /dev/null
+++ b/oox/inc/drawingml/chart/chartspacefragment.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEFRAGMENT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEFRAGMENT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct ChartSpaceModel;
+
+/** Handler for a chart fragment (c:chartSpace root element).
+ */
+class ChartSpaceFragment final : public FragmentBase< ChartSpaceModel >
+{
+public:
+ explicit ChartSpaceFragment(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ ChartSpaceModel& rModel );
+ virtual ~ChartSpaceFragment() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/chartspacemodel.hxx b/oox/inc/drawingml/chart/chartspacemodel.hxx
new file mode 100644
index 000000000..0aa564fef
--- /dev/null
+++ b/oox/inc/drawingml/chart/chartspacemodel.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEMODEL_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <drawingml/chart/plotareamodel.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct ChartSpaceModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< PlotAreaModel > PlotAreaRef;
+ typedef ModelRef< WallFloorModel > WallFloorRef;
+ typedef ModelRef< View3DModel > View3DRef;
+ typedef ModelRef< TitleModel > TitleRef;
+ typedef ModelRef< LegendModel > LegendRef;
+
+ ShapeRef mxShapeProp; /// Chart frame formatting.
+ TextBodyRef mxTextProp; /// Global chart text formatting.
+ PlotAreaRef mxPlotArea; /// Plot area of the chart.
+ WallFloorRef mxFloor; /// Floor formatting in 3D charts.
+ WallFloorRef mxBackWall; /// Back wall formatting in 3D charts.
+ WallFloorRef mxSideWall; /// Side wall formatting in 3D charts.
+ View3DRef mxView3D; /// 3D settings.
+ TitleRef mxTitle; /// Chart main title.
+ LegendRef mxLegend; /// Chart legend.
+ OUString maDrawingPath; /// Path to drawing fragment with embedded shapes.
+ OUString maSheetPath; /// Path to embedded charts.
+ sal_Int32 mnDispBlanksAs; /// Mode how to display blank values.
+ sal_Int32 mnStyle; /// Index to default formatting.
+ bool mbAutoTitleDel; /// True = automatic title deleted manually.
+ bool mbPlotVisOnly; /// True = plot visible cells in a sheet only.
+ bool mbShowLabelsOverMax;/// True = show labels over chart maximum.
+ bool mbPivotChart; /// True = pivot chart.
+
+ explicit ChartSpaceModel(bool bMSO2007Doc);
+ ~ChartSpaceModel();
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/converterbase.hxx b/oox/inc/drawingml/chart/converterbase.hxx
new file mode 100644
index 000000000..8fe637d95
--- /dev/null
+++ b/oox/inc/drawingml/chart/converterbase.hxx
@@ -0,0 +1,148 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_CONVERTERBASE_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_CONVERTERBASE_HXX
+
+#include <drawingml/chart/objectformatter.hxx>
+
+namespace com::sun::star {
+ namespace awt { struct Rectangle; }
+ namespace awt { struct Size; }
+ namespace chart2 { class XChartDocument; }
+ namespace chart2 { class XTitle; }
+ namespace drawing { class XShape; }
+ namespace uno { class XComponentContext; }
+}
+namespace oox::core { class XmlFilterBase; }
+
+namespace oox::drawingml::chart {
+
+class ChartConverter;
+struct ChartSpaceModel;
+struct ConverterData;
+
+
+const sal_Int32 API_PRIM_AXESSET = 0;
+const sal_Int32 API_SECN_AXESSET = 1;
+
+const sal_Int32 API_X_AXIS = 0;
+const sal_Int32 API_Y_AXIS = 1;
+const sal_Int32 API_Z_AXIS = 2;
+
+
+class ConverterRoot
+{
+public:
+ explicit ConverterRoot(
+ ::oox::core::XmlFilterBase& rFilter,
+ ChartConverter& rChartConverter,
+ const ChartSpaceModel& rChartModel,
+ const css::uno::Reference< css::chart2::XChartDocument >& rxChartDoc,
+ const css::awt::Size& rChartSize );
+ virtual ~ConverterRoot();
+
+ ConverterRoot(ConverterRoot const &) = default;
+ ConverterRoot(ConverterRoot &&) = default;
+ ConverterRoot & operator =(ConverterRoot const &) = default;
+ ConverterRoot & operator =(ConverterRoot &&) = default;
+
+ /** Creates an instance for the passed service name, using the process service factory. */
+ css::uno::Reference< css::uno::XInterface >
+ createInstance( const OUString& rServiceName ) const;
+ css::uno::Reference< css::uno::XComponentContext > const &
+ getComponentContext() const;
+
+protected:
+ /** Returns the filter object of the imported/exported document. */
+ ::oox::core::XmlFilterBase& getFilter() const;
+ /** Returns the chart converter. */
+ ChartConverter& getChartConverter() const;
+ /** Returns the API chart document model. */
+ css::uno::Reference< css::chart2::XChartDocument > const &
+ getChartDocument() const;
+ /** Returns the position and size of the chart shape in 1/100 mm. */
+ const css::awt::Size& getChartSize() const;
+ /** Returns the default position and size of the chart shape in 1/100 mm. */
+ static css::awt::Size getDefaultPageSize() { return css::awt::Size(16000, 9000); }
+ /** Returns the object formatter. */
+ ObjectFormatter& getFormatter() const;
+
+ /** Registers a title object and its layout data, needed for conversion of
+ the title position using the old Chart1 API. */
+ void registerTitleLayout(
+ const css::uno::Reference< css::chart2::XTitle >& rxTitle,
+ const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType,
+ sal_Int32 nMainIdx, sal_Int32 nSubIdx );
+ /** Converts the positions of the main title and all axis titles. */
+ void convertTitlePositions();
+
+private:
+ std::shared_ptr< ConverterData > mxData;
+};
+
+
+/** Base class of all converter classes. Holds a reference to a model structure
+ of the specified type.
+ */
+template< typename ModelType >
+class ConverterBase : public ConverterRoot
+{
+public:
+ const ModelType& getModel() const { return mrModel; }
+
+protected:
+ explicit ConverterBase( const ConverterRoot& rParent, ModelType& rModel ) :
+ ConverterRoot( rParent ), mrModel( rModel ) {}
+ virtual ~ConverterBase() override {}
+
+protected:
+ ModelType& mrModel;
+};
+
+
+/** A layout converter calculates positions and sizes for various chart objects.
+ */
+class LayoutConverter final : public ConverterBase< LayoutModel >
+{
+public:
+ explicit LayoutConverter( const ConverterRoot& rParent, LayoutModel& rModel );
+ virtual ~LayoutConverter() override;
+
+ /** Tries to calculate the absolute position and size from the contained
+ OOXML layout model. Returns true, if returned rectangle is valid. */
+ bool calcAbsRectangle( css::awt::Rectangle& orRect ) const;
+
+ /** Tries to set the position and size from the contained OOXML layout model.
+ Returns true, if a manual position and size could be calculated. */
+ bool convertFromModel( PropertySet& rPropSet );
+
+ /** Tries to set the position from the contained OOXML layout model. */
+ void convertFromModel(
+ const css::uno::Reference< css::drawing::XShape >& rxShape,
+ double fRotationAngle );
+ bool getAutoLayout() const {return mrModel.mbAutoLayout;}
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datasourcecontext.hxx b/oox/inc/drawingml/chart/datasourcecontext.hxx
new file mode 100644
index 000000000..7edb029eb
--- /dev/null
+++ b/oox/inc/drawingml/chart/datasourcecontext.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX
+
+#include <memory>
+#include <drawingml/chart/chartcontextbase.hxx>
+
+class SvNumberFormatter;
+
+namespace oox::drawingml::chart {
+
+
+struct DataSequenceModel;
+
+typedef ContextBase< DataSequenceModel > DataSequenceContextBase;
+
+
+/** Handler for a double sequence context (c:numLit, c:numRef elements).
+ */
+class DoubleSequenceContext final : public DataSequenceContextBase
+{
+public:
+ explicit DoubleSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel );
+ virtual ~DoubleSequenceContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+
+private:
+ SvNumberFormatter* getNumberFormatter();
+
+private:
+ sal_Int32 mnPtIndex; /// Current data point index.
+ std::unique_ptr<SvNumberFormatter>
+ mpNumberFormatter;
+};
+
+
+/** Handler for a string sequence context (c:multiLvlStrRef, c:strLit,
+ c:strRef elements).
+ */
+class StringSequenceContext final : public DataSequenceContextBase
+{
+public:
+ explicit StringSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel );
+ virtual ~StringSequenceContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+
+private:
+ sal_Int32 mnPtIndex; /// Current data point index.
+ bool mbReadC15; /// Allow reading extension tags data under c15 namespace.
+};
+
+
+struct DataSourceModel;
+
+/** Handler for a data source context (c:bubbleSize, c:cat, c:minus, c:plus,
+ c:val, c:xVal, c:yVal elements).
+ */
+class DataSourceContext final : public ContextBase< DataSourceModel >
+{
+public:
+ explicit DataSourceContext( ::oox::core::ContextHandler2Helper& rParent, DataSourceModel& rModel );
+ virtual ~DataSourceContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datasourceconverter.hxx b/oox/inc/drawingml/chart/datasourceconverter.hxx
new file mode 100644
index 000000000..eb404e046
--- /dev/null
+++ b/oox/inc/drawingml/chart/datasourceconverter.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2::data { class XDataSequence; }
+}
+
+namespace oox::drawingml::chart {
+
+
+struct DataSequenceModel;
+
+class DataSequenceConverter final : public ConverterBase< DataSequenceModel >
+{
+public:
+ explicit DataSequenceConverter( const ConverterRoot& rParent, DataSequenceModel& rModel );
+ virtual ~DataSequenceConverter() override;
+
+ /** Creates a data sequence object from the contained formula link. */
+ css::uno::Reference< css::chart2::data::XDataSequence >
+ createDataSequence( const OUString& rRole );
+};
+
+
+struct DataSourceModel;
+
+class DataSourceConverter final : public ConverterBase< DataSourceModel >
+{
+public:
+ explicit DataSourceConverter( const ConverterRoot& rParent, DataSourceModel& rModel );
+ virtual ~DataSourceConverter() override;
+
+ /** Creates a data sequence object from the contained series data. */
+ css::uno::Reference< css::chart2::data::XDataSequence >
+ createDataSequence( const OUString& rRole );
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datatablecontext.hxx b/oox/inc/drawingml/chart/datatablecontext.hxx
new file mode 100644
index 000000000..01a75c6e6
--- /dev/null
+++ b/oox/inc/drawingml/chart/datatablecontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart
+{
+struct DataTableModel;
+
+/** Handler for a data table context (c:dTable element).
+ */
+class DataTableContext final : public ContextBase<DataTableModel>
+{
+public:
+ explicit DataTableContext(::oox::core::ContextHandler2Helper& rParent, DataTableModel& rModel);
+ virtual ~DataTableContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement,
+ const AttributeList& rAttribs) override;
+};
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datatableconverter.hxx b/oox/inc/drawingml/chart/datatableconverter.hxx
new file mode 100644
index 000000000..f49d908f4
--- /dev/null
+++ b/oox/inc/drawingml/chart/datatableconverter.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star::chart2
+{
+class XDiagram;
+}
+
+namespace oox::drawingml::chart
+{
+struct DataTableModel;
+
+class DataTableConverter final : public ConverterBase<DataTableModel>
+{
+public:
+ explicit DataTableConverter(const ConverterRoot& rParent, DataTableModel& rModel);
+ virtual ~DataTableConverter() override;
+
+ /** Converts the OOXML data table model to a chart2 diagram. */
+ void convertFromModel(css::uno::Reference<css::chart2::XDiagram> const& rxDiagram);
+};
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datatablemodel.hxx b/oox/inc/drawingml/chart/datatablemodel.hxx
new file mode 100644
index 000000000..5c7fe7901
--- /dev/null
+++ b/oox/inc/drawingml/chart/datatablemodel.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+namespace oox::drawingml::chart
+{
+struct DataTableModel
+{
+ bool mbShowHBorder : 1; /// Show Horizontal Border
+ bool mbShowVBorder : 1; /// Show Vertical Border
+ bool mbShowOutline : 1; /// Show outline
+ bool mbShowKeys : 1;
+
+ DataTableModel()
+ : mbShowHBorder(false)
+ , mbShowVBorder(false)
+ , mbShowOutline(false)
+ , mbShowKeys(false)
+ {
+ }
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/objectformatter.hxx b/oox/inc/drawingml/chart/objectformatter.hxx
new file mode 100644
index 000000000..9498f0484
--- /dev/null
+++ b/oox/inc/drawingml/chart/objectformatter.hxx
@@ -0,0 +1,153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_OBJECTFORMATTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_OBJECTFORMATTER_HXX
+
+#include <oox/helper/propertyset.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/chart/modelbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XChartDocument; }
+}
+
+namespace oox::core { class XmlFilterBase; }
+
+namespace oox::drawingml::chart {
+
+/** Enumerates different object types for specific automatic formatting behaviour. */
+enum ObjectType
+{
+ OBJECTTYPE_CHARTSPACE, /// Chart background.
+ OBJECTTYPE_CHARTTITLE, /// Chart title.
+ OBJECTTYPE_LEGEND, /// Legend.
+ OBJECTTYPE_PLOTAREA2D, /// Plot area containing axes and data series in 2D charts.
+ OBJECTTYPE_PLOTAREA3D, /// Plot area containing axes and data series in 3D charts.
+ OBJECTTYPE_WALL, /// Background and side wall in 3D charts.
+ OBJECTTYPE_FLOOR, /// Floor in 3D charts.
+ OBJECTTYPE_AXIS, /// Axis line, labels, tick marks.
+ OBJECTTYPE_AXISTITLE, /// Axis title.
+ OBJECTTYPE_AXISUNIT, /// Axis unit label.
+ OBJECTTYPE_MAJORGRIDLINE, /// Axis major grid line.
+ OBJECTTYPE_MINORGRIDLINE, /// Axis minor grid line.
+ OBJECTTYPE_LINEARSERIES2D, /// Linear series in 2D line/radarline/scatter charts.
+ OBJECTTYPE_FILLEDSERIES2D, /// Filled series in 2D bar/area/radararea/bubble/pie/surface charts.
+ OBJECTTYPE_FILLEDSERIES3D, /// Filled series in 3D charts.
+ OBJECTTYPE_DATALABEL, /// Labels for data points.
+ OBJECTTYPE_TRENDLINE, /// Data series trend line.
+ OBJECTTYPE_TRENDLINELABEL, /// Trend line label.
+ OBJECTTYPE_ERRORBAR, /// Data series error indicator line.
+ OBJECTTYPE_SERLINE, /// Data point connector lines.
+ OBJECTTYPE_LEADERLINE, /// Leader lines between pie slice and data label.
+ OBJECTTYPE_DROPLINE, /// Drop lines between data points and X axis.
+ OBJECTTYPE_HILOLINE, /// High/low lines in line/stock charts.
+ OBJECTTYPE_UPBAR, /// Up-bar in line/stock charts.
+ OBJECTTYPE_DOWNBAR, /// Down-bar in line/stock charts.
+ OBJECTTYPE_DATATABLE /// Data table.
+};
+
+struct ChartSpaceModel;
+struct ObjectFormatterData;
+struct PictureOptionsModel;
+
+class ObjectFormatter
+{
+public:
+ explicit ObjectFormatter(
+ const ::oox::core::XmlFilterBase& rFilter,
+ const css::uno::Reference< css::chart2::XChartDocument >& rxChartDoc,
+ const ChartSpaceModel& rChartSpace );
+ ~ObjectFormatter();
+
+ /** Sets the maximum series index used for color cycling/fading. */
+ void setMaxSeriesIndex( sal_Int32 nMaxSeriesIdx );
+ /** Returns the current maximum series index used for color cycling/fading. */
+ sal_Int32 getMaxSeriesIndex() const;
+
+ /** Sets frame formatting properties to the passed property set. */
+ void convertFrameFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< Shape >& rxShapeProp,
+ ObjectType eObjType,
+ sal_Int32 nSeriesIdx = -1 );
+
+ /** Sets frame formatting properties to the passed property set. */
+ void convertFrameFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< Shape >& rxShapeProp,
+ const PictureOptionsModel& rPicOptions,
+ ObjectType eObjType,
+ sal_Int32 nSeriesIdx = -1 );
+
+ /** Sets text formatting properties to the passed property set. */
+ void convertTextFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< TextBody >& rxTextProp,
+ ObjectType eObjType );
+
+ /** Sets frame/text formatting properties to the passed property set. */
+ void convertFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< Shape >& rxShapeProp,
+ const ModelRef< TextBody >& rxTextProp,
+ ObjectType eObjType );
+
+ /** Sets text formatting properties to the passed property set. */
+ void convertTextFormatting(
+ PropertySet& rPropSet,
+ const TextCharacterProperties& rTextProps,
+ ObjectType eObjType );
+
+ /** Sets text rotation properties to the passed property set. */
+ static void convertTextRotation(
+ PropertySet& rPropSet,
+ const ModelRef< TextBody >& rxTextProp,
+ bool bSupportsStacked, sal_Int32 nDefaultRotation = 0);
+
+ /** Sets text wrap properties to the passed property set. */
+ static void convertTextWrap(
+ PropertySet& rPropSet,
+ const ModelRef< TextBody >& rxTextProp);
+
+ /** Sets number format properties to the passed property set. */
+ void convertNumberFormat(
+ PropertySet& rPropSet,
+ const NumberFormat& rNumberFormat,
+ bool bAxis,
+ bool bShowPercent = false );
+
+ /** Sets automatic fill properties to the passed property set. */
+ void convertAutomaticFill(
+ PropertySet& rPropSet,
+ ObjectType eObjType,
+ sal_Int32 nSeriesIdx );
+
+ /** Returns true, if the passed shape properties have automatic fill mode. */
+ static bool isAutomaticFill( const ModelRef< Shape >& rxShapeProp );
+
+private:
+ std::shared_ptr< ObjectFormatterData > mxData;
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/plotareacontext.hxx b/oox/inc/drawingml/chart/plotareacontext.hxx
new file mode 100644
index 000000000..2b3fae932
--- /dev/null
+++ b/oox/inc/drawingml/chart/plotareacontext.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONTEXT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct View3DModel;
+
+/** Handler for a chart plot area context (c:plotArea element).
+ */
+class View3DContext final : public ContextBase< View3DModel >
+{
+public:
+ explicit View3DContext( ::oox::core::ContextHandler2Helper& rParent, View3DModel& rModel );
+ virtual ~View3DContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct WallFloorModel;
+
+/** Handler for a chart wall/floor context (c:backWall, c:floor, c:sideWall
+ elements).
+ */
+class WallFloorContext final : public ContextBase< WallFloorModel >
+{
+public:
+ explicit WallFloorContext( ::oox::core::ContextHandler2Helper& rParent, WallFloorModel& rModel );
+ virtual ~WallFloorContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+struct PlotAreaModel;
+
+/** Handler for a chart plot area context (c:plotArea element).
+ */
+class PlotAreaContext final : public ContextBase< PlotAreaModel >
+{
+public:
+ explicit PlotAreaContext( ::oox::core::ContextHandler2Helper& rParent, PlotAreaModel& rModel );
+ virtual ~PlotAreaContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/plotareaconverter.hxx b/oox/inc/drawingml/chart/plotareaconverter.hxx
new file mode 100644
index 000000000..b520c6b48
--- /dev/null
+++ b/oox/inc/drawingml/chart/plotareaconverter.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XDiagram; }
+}
+
+namespace oox::drawingml::chart {
+
+
+struct View3DModel;
+class TypeGroupConverter;
+
+class View3DConverter final : public ConverterBase< View3DModel >
+{
+public:
+ explicit View3DConverter( const ConverterRoot& rParent, View3DModel& rModel );
+ virtual ~View3DConverter() override;
+
+ /** Converts the OOXML plot area model to a chart2 diagram. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDiagram >& rxDiagram,
+ TypeGroupConverter const & rTypeGroup );
+};
+
+
+struct WallFloorModel;
+
+class WallFloorConverter final : public ConverterBase< WallFloorModel >
+{
+public:
+ explicit WallFloorConverter( const ConverterRoot& rParent, WallFloorModel& rModel );
+ virtual ~WallFloorConverter() override;
+
+ /** Converts the OOXML wall/floor model to a chart2 diagram. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDiagram >& rxDiagram,
+ ObjectType eObjType );
+};
+
+struct PlotAreaModel;
+
+class PlotAreaConverter final : public ConverterBase< PlotAreaModel >
+{
+public:
+ explicit PlotAreaConverter( const ConverterRoot& rParent, PlotAreaModel& rModel );
+ virtual ~PlotAreaConverter() override;
+
+ /** Converts the OOXML plot area model to a chart2 diagram. */
+ void convertFromModel( View3DModel& rView3DModel );
+ /** Converts the manual plot area position and size, if set. */
+ void convertPositionFromModel();
+
+ /** Returns the automatic chart title if the chart contains only one series. */
+ const OUString& getAutomaticTitle() const { return maAutoTitle; }
+ /** Returns true, if chart type supports wall and floor format in 3D mode. */
+ bool isWall3dChart() const { return mbWall3dChart; }
+
+private:
+ OUString maAutoTitle;
+ bool mb3dChart;
+ bool mbWall3dChart;
+ bool mbPieChart;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/plotareamodel.hxx b/oox/inc/drawingml/chart/plotareamodel.hxx
new file mode 100644
index 000000000..119900953
--- /dev/null
+++ b/oox/inc/drawingml/chart/plotareamodel.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREAMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREAMODEL_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <drawingml/chart/axismodel.hxx>
+#include <drawingml/chart/seriesmodel.hxx>
+#include <drawingml/chart/typegroupmodel.hxx>
+#include <drawingml/chart/datatablemodel.hxx>
+
+namespace oox::drawingml::chart {
+
+struct View3DModel
+{
+ OptValue< sal_Int32 > monHeightPercent; /// Height of the 3D view, relative to chart width.
+ OptValue< sal_Int32 > monRotationX; /// Horizontal rotation in degrees.
+ OptValue< sal_Int32 > monRotationY; /// Vertical rotation in degrees.
+ sal_Int32 mnDepthPercent; /// Depth of the 3D view, relative to chart width.
+ sal_Int32 mnPerspective; /// Eye distance to the 3D objects.
+ bool mbRightAngled; /// True = right-angled axes in 3D view.
+
+ explicit View3DModel(bool bMSO2007Doc);
+};
+
+struct WallFloorModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
+
+ ShapeRef mxShapeProp; /// Wall/floor frame formatting.
+ PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
+
+ explicit WallFloorModel();
+ ~WallFloorModel();
+};
+
+struct PlotAreaModel
+{
+ typedef ModelVector< TypeGroupModel > TypeGroupVector;
+ typedef ModelVector< AxisModel > AxisVector;
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< LayoutModel > LayoutRef;
+ typedef ModelRef< DataTableModel > DataTableRef;
+
+ TypeGroupVector maTypeGroups; /// All chart type groups contained in the chart.
+ AxisVector maAxes; /// All axes contained in the chart.
+ ShapeRef mxShapeProp; /// Plot area frame formatting.
+ LayoutRef mxLayout; /// Layout/position of the plot area.
+ DataTableRef mxDataTable; /// Data table of the plot area.
+
+ explicit PlotAreaModel();
+ ~PlotAreaModel();
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/seriescontext.hxx b/oox/inc/drawingml/chart/seriescontext.hxx
new file mode 100644
index 000000000..d3fe3bb05
--- /dev/null
+++ b/oox/inc/drawingml/chart/seriescontext.hxx
@@ -0,0 +1,245 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct DataLabelModel;
+
+/** Handler for a chart data point label context (c:dLbl element).
+ */
+class DataLabelContext final : public ContextBase< DataLabelModel >
+{
+public:
+ explicit DataLabelContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelModel& rModel );
+ virtual ~DataLabelContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+};
+
+
+struct DataLabelsModel;
+
+/** Handler for a chart data point label context (c:dLbls element).
+ */
+class DataLabelsContext final : public ContextBase< DataLabelsModel >
+{
+public:
+ explicit DataLabelsContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelsModel& rModel );
+ virtual ~DataLabelsContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+};
+
+
+struct PictureOptionsModel;
+
+/** Handler for fill bitmap settings (c:pictureOptions element).
+ */
+class PictureOptionsContext final : public ContextBase< PictureOptionsModel >
+{
+public:
+ explicit PictureOptionsContext( ::oox::core::ContextHandler2Helper& rParent, PictureOptionsModel& rModel );
+ virtual ~PictureOptionsContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct ErrorBarModel;
+
+/** Handler for a series error bar context (c:errBars element).
+ */
+class ErrorBarContext final : public ContextBase< ErrorBarModel >
+{
+public:
+ explicit ErrorBarContext( ::oox::core::ContextHandler2Helper& rParent, ErrorBarModel& rModel );
+ virtual ~ErrorBarContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct TrendlineLabelModel;
+
+/** Handler for a series trendline label context (c:trendlineLbl element).
+ */
+class TrendlineLabelContext final : public ContextBase< TrendlineLabelModel >
+{
+public:
+ explicit TrendlineLabelContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineLabelModel& rModel );
+ virtual ~TrendlineLabelContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct TrendlineModel;
+
+/** Handler for a series trendline context (c:trendline element).
+ */
+class TrendlineContext final : public ContextBase< TrendlineModel >
+{
+public:
+ explicit TrendlineContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineModel& rModel );
+ virtual ~TrendlineContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+};
+
+
+struct DataPointModel;
+
+/** Handler for a chart data point context (c:dPt element).
+ */
+class DataPointContext final : public ContextBase< DataPointModel >
+{
+public:
+ explicit DataPointContext( ::oox::core::ContextHandler2Helper& rParent, DataPointModel& rModel );
+ virtual ~DataPointContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct SeriesModel;
+
+/** Handler base class for chart data series contexts (c:ser element).
+ */
+class SeriesContextBase : public ContextBase< SeriesModel >
+{
+public:
+ explicit SeriesContextBase( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~SeriesContextBase() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for area chart types (c:ser element).
+ */
+class AreaSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit AreaSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~AreaSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for bar chart types (c:ser element).
+ */
+class BarSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit BarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~BarSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for bubble chart types (c:ser element).
+ */
+class BubbleSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit BubbleSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~BubbleSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for line and stock chart types (c:ser
+ element).
+ */
+class LineSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit LineSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~LineSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for pie and doughnut chart types (c:ser
+ element).
+ */
+class PieSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit PieSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~PieSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for radar chart types (c:ser element).
+ */
+class RadarSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit RadarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~RadarSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for scatter chart types (c:ser element).
+ */
+class ScatterSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit ScatterSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~ScatterSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for a data series context for scatter chart types (c:ser element).
+ */
+class SurfaceSeriesContext final : public SeriesContextBase
+{
+public:
+ explicit SurfaceSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
+ virtual ~SurfaceSeriesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/seriesconverter.hxx b/oox/inc/drawingml/chart/seriesconverter.hxx
new file mode 100644
index 000000000..c8cca31d5
--- /dev/null
+++ b/oox/inc/drawingml/chart/seriesconverter.hxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESCONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+#include <drawingml/chart/seriesmodel.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XDataSeries; }
+ namespace chart2::data { class XLabeledDataSequence; }
+}
+
+namespace oox::drawingml::chart {
+
+class TypeGroupConverter;
+
+// #i66858# enable this when Chart2 supports smoothed lines per data series
+#define OOX_CHART_SMOOTHED_PER_SERIES 0
+
+
+class DataLabelConverter final : public ConverterBase< DataLabelModel >
+{
+public:
+ explicit DataLabelConverter( const ConverterRoot& rParent, DataLabelModel& rModel );
+ virtual ~DataLabelConverter() override;
+
+ /** Converts OOXML data label settings for the passed data point. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
+ const TypeGroupConverter& rTypeGroup );
+};
+
+
+class DataLabelsConverter final : public ConverterBase< DataLabelsModel >
+{
+public:
+ explicit DataLabelsConverter( const ConverterRoot& rParent, DataLabelsModel& rModel );
+ virtual ~DataLabelsConverter() override;
+
+ /** Converts OOXML data label settings for the passed data series. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
+ const TypeGroupConverter& rTypeGroup );
+};
+
+
+class ErrorBarConverter final : public ConverterBase< ErrorBarModel >
+{
+public:
+ explicit ErrorBarConverter( const ConverterRoot& rParent, ErrorBarModel& rModel );
+ virtual ~ErrorBarConverter() override;
+
+ /** Converts an OOXML errorbar and inserts it into the passed data series. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries );
+
+private:
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ createLabeledDataSequence( ErrorBarModel::SourceType eSourceType );
+};
+
+
+class TrendlineLabelConverter final : public ConverterBase< TrendlineLabelModel >
+{
+public:
+ explicit TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel );
+ virtual ~TrendlineLabelConverter() override;
+
+ /** Converts the OOXML trendline label. */
+ void convertFromModel( PropertySet& rPropSet );
+};
+
+
+class TrendlineConverter final : public ConverterBase< TrendlineModel >
+{
+public:
+ explicit TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel );
+ virtual ~TrendlineConverter() override;
+
+ /** Converts an OOXML trendline and inserts it into the passed data series. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries );
+};
+
+
+class DataPointConverter final : public ConverterBase< DataPointModel >
+{
+public:
+ explicit DataPointConverter( const ConverterRoot& rParent, DataPointModel& rModel );
+ virtual ~DataPointConverter() override;
+
+ /** Converts settings for a data point in the passed series. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
+ const TypeGroupConverter& rTypeGroup,
+ const SeriesModel& rSeries );
+};
+
+
+class SeriesConverter final : public ConverterBase< SeriesModel >
+{
+public:
+ explicit SeriesConverter( const ConverterRoot& rParent, SeriesModel& rModel );
+ virtual ~SeriesConverter() override;
+
+ /** Creates a labeled data sequence object from category data link. */
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ createCategorySequence( const OUString& rRole );
+ /** Creates a labeled data sequence object from value data link. */
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ createValueSequence( const OUString& rRole );
+ /** Creates a data series object with initialized source links. */
+ css::uno::Reference< css::chart2::XDataSeries >
+ createDataSeries( const TypeGroupConverter& rTypeGroup, bool bVaryColorsByPoint );
+
+private:
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ createLabeledDataSequence(
+ SeriesModel::SourceType eSourceType,
+ const OUString& rRole,
+ bool bUseTextLabel );
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/seriesmodel.hxx b/oox/inc/drawingml/chart/seriesmodel.hxx
new file mode 100644
index 000000000..34656a6da
--- /dev/null
+++ b/oox/inc/drawingml/chart/seriesmodel.hxx
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX
+
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+
+namespace oox::drawingml::chart {
+
+struct DataLabelModelBase
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+
+ ShapeRef mxShapeProp; /// Data label frame formatting.
+ TextBodyRef mxTextProp; /// Data label text formatting.
+ NumberFormat maNumberFormat; /// Number format for numeric data labels.
+ OptValue< OUString > moaSeparator;/// Separator between label components.
+ OptValue< sal_Int32 > monLabelPos; /// Data label position.
+ OptValue< bool > mobShowBubbleSize; /// True = show size of bubbles in bubble charts.
+ OptValue< bool > mobShowCatName; /// True = show category name of data points.
+ OptValue< bool > mobShowLegendKey; /// True = show legend key of data series.
+ OptValue< bool > mobShowPercent; /// True = show percentual value in pie/doughnut charts.
+ OptValue< bool > mobShowSerName; /// True = show series name.
+ OptValue< bool > mobShowVal; /// True = show data point value.
+
+ /// True = the value from the <c15:datalabelsRange> corresponding to the
+ /// index of this label is used as the label text.
+ OptValue< bool > mobShowDataLabelsRange;
+ bool mbDeleted; /// True = data label(s) deleted.
+
+ explicit DataLabelModelBase(bool bMSO2007Doc);
+ ~DataLabelModelBase();
+};
+
+struct DataLabelsModel;
+
+struct DataLabelModel : public DataLabelModelBase
+{
+ typedef ModelRef< LayoutModel > LayoutRef;
+ typedef ModelRef< TextModel > TextRef;
+
+ LayoutRef mxLayout; /// Layout/position of the data point label frame.
+ TextRef mxText; /// Manual or linked text for this data point label.
+ const DataLabelsModel& mrParent; /// Reference to the labels container.
+ sal_Int32 mnIndex; /// Data point index for this data label.
+
+ explicit DataLabelModel(const DataLabelsModel& rParent, bool bMSO2007Doc);
+ ~DataLabelModel();
+};
+
+struct DataLabelsModel : public DataLabelModelBase
+{
+ typedef ModelVector< DataLabelModel > DataLabelVector;
+ typedef ModelRef< Shape > ShapeRef;
+
+ DataLabelVector maPointLabels; /// Settings for individual data point labels.
+ ShapeRef mxLeaderLines; /// Formatting of connector lines between data points and labels.
+
+ /// Labels source (owned by SeriesModel's DataSourceMap)
+ const DataSourceModel* mpLabelsSource;
+ bool mbShowLeaderLines; /// True = show connector lines between data points and labels.
+
+ explicit DataLabelsModel(bool bMSO2007Doc);
+ ~DataLabelsModel();
+};
+
+struct PictureOptionsModel
+{
+ double mfStackUnit; /// Bitmap stacking unit.
+ sal_Int32 mnPictureFormat; /// Bitmap mode (stretch/tile).
+ bool mbApplyToFront; /// True = draw picture at front/back side of 3D data points.
+ bool mbApplyToSides; /// True = draw picture at left/right side of 3D data points.
+ bool mbApplyToEnd; /// True = draw picture at top/bottom side of 3D data points.
+
+ explicit PictureOptionsModel(bool bMSO2007Doc);
+};
+
+struct ErrorBarModel
+{
+ enum SourceType
+ {
+ PLUS, /// Plus error bar values.
+ MINUS /// Minus error bar values.
+ };
+
+ typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
+ typedef ModelRef< Shape > ShapeRef;
+
+ DataSourceMap maSources; /// Source ranges for manual error bar values.
+ ShapeRef mxShapeProp; /// Error line formatting.
+ double mfValue; /// Fixed value for several error bar types.
+ sal_Int32 mnDirection; /// Direction of the error bars (x/y).
+ sal_Int32 mnTypeId; /// Type of the error bars (plus/minus/both).
+ sal_Int32 mnValueType; /// Type of the values.
+ bool mbNoEndCap; /// True = no end cap at error bar lines.
+
+ explicit ErrorBarModel(bool bMSO2007Doc);
+ ~ErrorBarModel();
+};
+
+struct TrendlineLabelModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< LayoutModel > LayoutRef;
+ typedef ModelRef< TextModel > TextRef;
+
+ ShapeRef mxShapeProp; /// Label frame formatting.
+ TextBodyRef mxTextProp; /// Label text formatting.
+ LayoutRef mxLayout; /// Layout/position of the frame.
+ TextRef mxText; /// Text source of the label.
+ NumberFormat maNumberFormat; /// Number format for coefficients.
+
+ explicit TrendlineLabelModel();
+ ~TrendlineLabelModel();
+};
+
+struct TrendlineModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TrendlineLabelModel > TrendlineLabelRef;
+
+ ShapeRef mxShapeProp; /// Trendline formatting.
+ TrendlineLabelRef mxLabel; /// Trendline label text object.
+ OUString maName; /// User-defined name of the trendline.
+ OptValue< double > mfBackward; /// Size of trendline before first data point.
+ OptValue< double > mfForward; /// Size of trendline behind last data point.
+ OptValue< double > mfIntercept; /// Crossing point with Y axis.
+ sal_Int32 mnOrder; /// Polynomial order in range [2, 6].
+ sal_Int32 mnPeriod; /// Moving average period in range [2, 255].
+ sal_Int32 mnTypeId; /// Type of the trendline.
+ bool mbDispEquation; /// True = show equation of the trendline.
+ bool mbDispRSquared; /// True = show R-squared of the trendline.
+
+ explicit TrendlineModel(bool bMSO2007Doc);
+ ~TrendlineModel();
+};
+
+struct DataPointModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
+
+ ShapeRef mxShapeProp; /// Data point formatting.
+ PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
+ ShapeRef mxMarkerProp; /// Data point marker formatting.
+ OptValue< sal_Int32 > monExplosion; /// Pie slice moved from pie center.
+ OptValue< sal_Int32 > monMarkerSize; /// Size of the series line marker (2...72).
+ OptValue< sal_Int32 > monMarkerSymbol; /// Series line marker symbol.
+ OptValue< bool > mobBubble3d; /// True = show bubbles with 3D shade.
+ sal_Int32 mnIndex; /// Unique data point index.
+ bool mbInvertNeg; /// True = invert negative data points (not derived from series!).
+
+ explicit DataPointModel(bool bMSO2007Doc);
+ ~DataPointModel();
+};
+
+struct SeriesModel
+{
+ enum SourceType
+ {
+ CATEGORIES, /// Data point categories.
+ VALUES, /// Data point values.
+ POINTS, /// Data point size (e.g. bubble size in bubble charts).
+ DATALABELS, /// Data point labels.
+ };
+
+ typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
+ typedef ModelVector< ErrorBarModel > ErrorBarVector;
+ typedef ModelVector< TrendlineModel > TrendlineVector;
+ typedef ModelVector< DataPointModel > DataPointVector;
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
+ typedef ModelRef< TextModel > TextRef;
+ typedef ModelRef< DataLabelsModel > DataLabelsRef;
+
+ DataSourceMap maSources; /// Series source ranges.
+ ErrorBarVector maErrorBars; /// All error bars of this series.
+ TrendlineVector maTrendlines; /// All trendlines of this series.
+ DataPointVector maPoints; /// Explicit formatted data points.
+ ShapeRef mxShapeProp; /// Series formatting.
+ PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
+ ShapeRef mxMarkerProp; /// Data point marker formatting.
+ TextRef mxText; /// Series title source.
+ DataLabelsRef mxLabels; /// Data point label settings for all points.
+ OptValue< sal_Int32 > monShape; /// 3D bar shape type.
+ sal_Int32 mnExplosion; /// Pie slice moved from pie center.
+ sal_Int32 mnIndex; /// Series index used for automatic formatting.
+ sal_Int32 mnMarkerSize; /// Size of the series line marker (2...72).
+ sal_Int32 mnMarkerSymbol; /// Series line marker symbol.
+ sal_Int32 mnOrder; /// Series order.
+ bool mbBubble3d; /// True = show bubbles with 3D shade.
+ bool mbInvertNeg; /// True = invert negative data points.
+ bool mbSmooth; /// True = smooth series line.
+
+ explicit SeriesModel(bool bMSO2007Doc);
+ ~SeriesModel();
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/titlecontext.hxx b/oox/inc/drawingml/chart/titlecontext.hxx
new file mode 100644
index 000000000..cb7383a7e
--- /dev/null
+++ b/oox/inc/drawingml/chart/titlecontext.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TITLECONTEXT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct TextModel;
+
+/** Handler for a chart text context (c:tx element).
+ */
+class TextContext final : public ContextBase< TextModel >
+{
+public:
+ explicit TextContext( ::oox::core::ContextHandler2Helper& rParent, TextModel& rModel );
+ virtual ~TextContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& rChars ) override;
+};
+
+
+struct TitleModel;
+
+/** Handler for a chart title context (c:title element).
+ */
+class TitleContext final : public ContextBase< TitleModel >
+{
+public:
+ explicit TitleContext( ::oox::core::ContextHandler2Helper& rParent, TitleModel& rModel );
+ virtual ~TitleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+struct LegendEntryModel;
+
+/** Handler for a chart legend entry context (c:legendEntry element).
+ */
+class LegendEntryContext final : public ContextBase< LegendEntryModel >
+{
+public:
+ explicit LegendEntryContext( ::oox::core::ContextHandler2Helper& rParent, LegendEntryModel& rModel );
+ virtual ~LegendEntryContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+struct LegendModel;
+
+/** Handler for a chart legend context (c:legend element).
+ */
+class LegendContext final : public ContextBase< LegendModel >
+{
+public:
+ explicit LegendContext( ::oox::core::ContextHandler2Helper& rParent, LegendModel& rModel );
+ virtual ~LegendContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/titleconverter.hxx b/oox/inc/drawingml/chart/titleconverter.hxx
new file mode 100644
index 000000000..d25aec653
--- /dev/null
+++ b/oox/inc/drawingml/chart/titleconverter.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XDiagram; }
+ namespace chart2 { class XFormattedString; }
+ namespace chart2 { class XTitled; }
+ namespace chart2::data { class XDataSequence; }
+}
+
+namespace oox::drawingml { struct TextCharacterProperties; }
+
+namespace oox::drawingml::chart {
+
+
+struct TextModel;
+
+class TextConverter final : public ConverterBase< TextModel >
+{
+public:
+ explicit TextConverter( const ConverterRoot& rParent, TextModel& rModel );
+ virtual ~TextConverter() override;
+
+ /** Creates a data sequence object from the contained text data. */
+ css::uno::Reference< css::chart2::data::XDataSequence >
+ createDataSequence( const OUString& rRole );
+ /** Creates a sequence of formatted string objects. */
+ css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >
+ createStringSequence(
+ const OUString& rDefaultText,
+ const ModelRef< TextBody >& rxTextProp,
+ ObjectType eObjType );
+
+private:
+ css::uno::Reference< css::chart2::XFormattedString >
+ appendFormattedString(
+ ::std::vector< css::uno::Reference< css::chart2::XFormattedString > >& orStringVec,
+ const OUString& rString,
+ bool bAddNewLine ) const;
+};
+
+
+struct TitleModel;
+
+class TitleConverter final : public ConverterBase< TitleModel >
+{
+public:
+ explicit TitleConverter( const ConverterRoot& rParent, TitleModel& rModel );
+ virtual ~TitleConverter() override;
+
+ /** Creates a title text object and attaches it at the passed interface. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XTitled >& rxTitled,
+ const OUString& rAutoTitle, ObjectType eObjType,
+ sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 );
+};
+
+
+struct LegendModel;
+
+class LegendConverter final : public ConverterBase< LegendModel >
+{
+public:
+ explicit LegendConverter( const ConverterRoot& rParent, LegendModel& rModel );
+ virtual ~LegendConverter() override;
+
+ /** Creates a legend object and attaches it at the passed diagram. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDiagram >& rxDiagram );
+
+private:
+ void legendEntriesFormatting(const css::uno::Reference<css::chart2::XDiagram>& rxDiagram);
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/titlemodel.hxx b/oox/inc/drawingml/chart/titlemodel.hxx
new file mode 100644
index 000000000..3aea5b445
--- /dev/null
+++ b/oox/inc/drawingml/chart/titlemodel.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLEMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TITLEMODEL_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+
+namespace oox::drawingml::chart {
+
+struct TextModel
+{
+ typedef ModelRef< DataSequenceModel > DataSequenceRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+
+ DataSequenceRef mxDataSeq; /// The string data or formula link of this text.
+ TextBodyRef mxTextBody; /// Rich-formatted literal text (for title objects only).
+
+ explicit TextModel();
+ ~TextModel();
+};
+
+struct TitleModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< LayoutModel > LayoutRef;
+ typedef ModelRef< TextModel > TextRef;
+
+ ShapeRef mxShapeProp; /// Title shape formatting.
+ TextBodyRef mxTextProp; /// Title text formatting.
+ LayoutRef mxLayout; /// Layout/position of the frame.
+ TextRef mxText; /// Text source of the title.
+ bool mbOverlay; /// True = title may overlay other objects.
+ sal_Int32 mnDefaultRotation;
+
+ explicit TitleModel(sal_Int32 nDefaultRotation = 0);
+ ~TitleModel();
+};
+
+struct LegendEntryModel
+{
+ sal_Int32 mnLegendEntryIdx; /// Legend entry index.
+ bool mbLabelDeleted; /// True = legend label deleted.
+
+ LegendEntryModel();
+};
+
+struct LegendModel
+{
+ typedef ModelVector< LegendEntryModel > LegendEntryVector;
+ typedef ModelRef< Shape > ShapeRef;
+ typedef ModelRef< TextBody > TextBodyRef;
+ typedef ModelRef< LayoutModel > LayoutRef;
+
+ LegendEntryVector maLegendEntries; /// Legend entries formatting.
+ ShapeRef mxShapeProp; /// Legend shape formatting.
+ TextBodyRef mxTextProp; /// Legend text formatting.
+ LayoutRef mxLayout; /// Layout/position of the legend.
+ sal_Int32 mnPosition; /// Legend position.
+ bool mbOverlay; /// True = legend may overlay other objects.
+
+ explicit LegendModel();
+ ~LegendModel();
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/typegroupcontext.hxx b/oox/inc/drawingml/chart/typegroupcontext.hxx
new file mode 100644
index 000000000..5d5306d31
--- /dev/null
+++ b/oox/inc/drawingml/chart/typegroupcontext.hxx
@@ -0,0 +1,149 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONTEXT_HXX
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart {
+
+
+struct UpDownBarsModel;
+
+/** Handler for an up/down bars context (c:upDownBars element).
+ */
+class UpDownBarsContext final : public ContextBase< UpDownBarsModel >
+{
+public:
+ explicit UpDownBarsContext( ::oox::core::ContextHandler2Helper& rParent, UpDownBarsModel& rModel );
+ virtual ~UpDownBarsContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+struct TypeGroupModel;
+typedef ContextBase< TypeGroupModel > TypeGroupContextBase;
+
+
+/** Handler for area type group contexts (c:area3DChart, c:areaChart elements).
+ */
+class AreaTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit AreaTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~AreaTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for bar type group contexts (c:bar3DChart, c:barChart elements).
+ */
+class BarTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit BarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~BarTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for bubble type group context (c:bubbleChart element).
+ */
+class BubbleTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit BubbleTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~BubbleTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for line type group contexts (c:line3DChart, c:lineChart,
+ c:stockChart elements).
+ */
+class LineTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit LineTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~LineTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for pie type group contexts (c:doughnutChart, c:ofPieChart,
+ c:pie3DChart, c:pieChart elements).
+ */
+class PieTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit PieTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~PieTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for radar type group context (c:radarChart element).
+ */
+class RadarTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit RadarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~RadarTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for scatter type group context (c:scatterChart element).
+ */
+class ScatterTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit ScatterTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~ScatterTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+/** Handler for surface type group contexts (c:surface3DChart, c:surfaceChart
+ elements).
+ */
+class SurfaceTypeGroupContext final : public TypeGroupContextBase
+{
+public:
+ explicit SurfaceTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
+ virtual ~SurfaceTypeGroupContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+};
+
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/typegroupconverter.hxx b/oox/inc/drawingml/chart/typegroupconverter.hxx
new file mode 100644
index 000000000..2e3aae5a2
--- /dev/null
+++ b/oox/inc/drawingml/chart/typegroupconverter.hxx
@@ -0,0 +1,177 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX
+
+#include <drawingml/chart/converterbase.hxx>
+
+namespace com::sun::star {
+ namespace chart2 { class XChartType; }
+ namespace chart2 { class XCoordinateSystem; }
+ namespace chart2 { class XDataSeries; }
+ namespace chart2 { class XDiagram; }
+ namespace chart2::data { class XLabeledDataSequence; }
+}
+
+namespace oox::drawingml::chart {
+
+/** Enumerates different chart types. */
+enum TypeId
+{
+ TYPEID_BAR, /// Vertical bar chart.
+ TYPEID_HORBAR, /// Horizontal bar chart.
+ TYPEID_LINE, /// Line chart.
+ TYPEID_AREA, /// Area chart.
+ TYPEID_STOCK, /// Stock chart.
+ TYPEID_RADARLINE, /// Linear radar chart.
+ TYPEID_RADARAREA, /// Filled radar chart.
+ TYPEID_PIE, /// Pie chart.
+ TYPEID_DOUGHNUT, /// Doughnut (ring) chart.
+ TYPEID_OFPIE, /// Pie-to-pie or pie-to-bar chart.
+ TYPEID_SCATTER, /// Scatter (XY) chart.
+ TYPEID_BUBBLE, /// Bubble chart.
+ TYPEID_SURFACE, /// Surface chart.
+ TYPEID_UNKNOWN /// Default for unknown chart types.
+};
+
+/** Enumerates different categories of similar chart types. */
+enum TypeCategory
+{
+ TYPECATEGORY_BAR, /// Bar charts (horizontal or vertical).
+ TYPECATEGORY_LINE, /// Line charts (line, area, stock charts).
+ TYPECATEGORY_RADAR, /// Radar charts (linear or filled).
+ TYPECATEGORY_PIE, /// Pie and donut charts.
+ TYPECATEGORY_SCATTER, /// Scatter and bubble charts.
+ TYPECATEGORY_SURFACE /// Surface charts.
+};
+
+/** Enumerates modes for varying point colors in a series. */
+enum VarPointMode
+{
+ VARPOINTMODE_NONE, /// No varied colors supported.
+ VARPOINTMODE_SINGLE, /// Only supported, if type group contains only one series.
+ VARPOINTMODE_MULTI /// Supported for multiple series in a chart type group.
+};
+
+/** Contains info for a chart type related to the OpenOffice.org chart module. */
+struct TypeGroupInfo
+{
+ TypeId meTypeId; /// Unique chart type identifier.
+ TypeCategory meTypeCategory; /// Category this chart type belongs to.
+ const char* mpcServiceName; /// Service name of the type.
+ VarPointMode meVarPointMode; /// Mode for varying point colors.
+ sal_Int32 mnDefLabelPos; /// Default data label position (API constant).
+ bool mbPolarCoordSystem; /// True = polar, false = cartesian.
+ bool mbSeriesIsFrame2d; /// True = 2D type series with area formatting.
+ bool mbSingleSeriesVis; /// True = only first series visible (e.g. pie charts).
+ bool mbCategoryAxis; /// True = X axis contains categories.
+ bool mbSwappedAxesSet; /// True = X axis and Y axis are swapped.
+ bool mbSupportsStacking; /// True = data points can be stacked on each other.
+ bool mbPictureOptions; /// True = bitmaps support options from c:pictureOptions.
+};
+
+const TypeGroupInfo& GetTypeGroupInfo( TypeId eType );
+
+struct UpDownBarsModel;
+
+class UpDownBarsConverter final : public ConverterBase< UpDownBarsModel >
+{
+public:
+ explicit UpDownBarsConverter( const ConverterRoot& rParent, UpDownBarsModel& rModel );
+ virtual ~UpDownBarsConverter() override;
+
+ /** Converts the OOXML up/down bars. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XChartType >& rxChartType );
+};
+
+struct TypeGroupModel;
+struct View3DModel;
+
+class TypeGroupConverter final : public ConverterBase< TypeGroupModel >
+{
+public:
+ explicit TypeGroupConverter( const ConverterRoot& rParent, TypeGroupModel& rModel );
+ virtual ~TypeGroupConverter() override;
+
+ /** Returns the type info struct that describes this chart type group. */
+ const TypeGroupInfo& getTypeInfo() const { return maTypeInfo; }
+
+ /** Returns true, if the series in this chart type group are stacked on each other (no percentage). */
+ bool isStacked() const;
+ /** Returns true, if the series in this chart type group are stacked on each other as percentage. */
+ bool isPercent() const;
+ /** Returns true, if the chart is three-dimensional. */
+ bool is3dChart() const { return mb3dChart;}
+ /** Returns true, if chart type supports wall and floor format in 3D mode. */
+ bool isWall3dChart() const;
+ /** Returns true, if the series in this chart type group are ordered on the Z axis. */
+ bool isDeep3dChart() const;
+
+ /** Returns true, if this chart type supports area formatting for its series. */
+ bool isSeriesFrameFormat() const;
+ /** Returns the object type for a series depending on the chart type. */
+ ObjectType getSeriesObjectType() const;
+
+ /** Returns series title, if the chart type group contains only one single series. */
+ OUString getSingleSeriesTitle() const;
+
+ /** Creates a coordinate system according to the contained chart type. */
+ css::uno::Reference< css::chart2::XCoordinateSystem >
+ createCoordinateSystem();
+ /** Creates a labeled data sequence object for axis categories. */
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ createCategorySequence();
+
+ /** Converts the OOXML type group model into a chart2 coordinate system. */
+ void convertFromModel(
+ const css::uno::Reference< css::chart2::XDiagram >& rxDiagram,
+ const css::uno::Reference< css::chart2::XCoordinateSystem >& rxCoordSystem,
+ sal_Int32 nAxesSetIdx, bool bSupportsVaryColorsByPoint );
+
+ /** Sets the passed OOXML marker style at the passed property set. */
+ void convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize,
+ const ModelRef< Shape >& xShapeProps ) const;
+ /** Sets the passed OOXML line smoothing at the passed property set. */
+ void convertLineSmooth( PropertySet& rPropSet, bool bOoxSmooth ) const;
+ /** Sets the passed OOXML bar 3D geometry at the passed property set. */
+ void convertBarGeometry( PropertySet& rPropSet, sal_Int32 nOoxShape ) const;
+ /** Sets the passed OOXML pie rotation at the passed property set. */
+ void convertPieRotation( PropertySet& rPropSet, sal_Int32 nOoxAngle ) const;
+ /** Sets the passed OOXML pie explosion at the passed property set. */
+ void convertPieExplosion( PropertySet& rPropSet, sal_Int32 nOoxExplosion ) const;
+
+private:
+ /** Inserts the passed series into the chart type. Adds additional properties to the series. */
+ void insertDataSeries(
+ const css::uno::Reference< css::chart2::XChartType >& rxChartType,
+ const css::uno::Reference< css::chart2::XDataSeries >& rxSeries,
+ sal_Int32 nAxesSetIdx );
+
+private:
+ TypeGroupInfo maTypeInfo; /// Extended type info for contained chart type model.
+ bool mb3dChart; /// True = type is a 3D chart type.
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/typegroupmodel.hxx b/oox/inc/drawingml/chart/typegroupmodel.hxx
new file mode 100644
index 000000000..5a37797e1
--- /dev/null
+++ b/oox/inc/drawingml/chart/typegroupmodel.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPMODEL_HXX
+#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPMODEL_HXX
+
+#include <drawingml/chart/seriesmodel.hxx>
+
+namespace oox::drawingml::chart {
+
+struct UpDownBarsModel
+{
+ typedef ModelRef< Shape > ShapeRef;
+
+ ShapeRef mxDownBars; /// Formatting of down bars.
+ ShapeRef mxUpBars; /// Formatting of up bars.
+ sal_Int32 mnGapWidth; /// Space between up/down bars.
+
+ explicit UpDownBarsModel();
+ ~UpDownBarsModel();
+};
+
+struct TypeGroupModel
+{
+ typedef ModelVector< SeriesModel > SeriesVector;
+ typedef ModelRef< DataLabelsModel > DataLabelsRef;
+ typedef ModelRef< UpDownBarsModel > UpDownBarsRef;
+ typedef ModelRef< Shape > ShapeRef;
+
+ SeriesVector maSeries; /// Series attached to this chart type group.
+ std::vector<sal_Int32>
+ maAxisIds; /// List of axis identifiers used by this chart type.
+ DataLabelsRef mxLabels; /// Data point label settings for all series.
+ UpDownBarsRef mxUpDownBars; /// Up/down bars in stock charts.
+ ShapeRef mxSerLines; /// Connector lines in stacked bar charts.
+ ShapeRef mxDropLines; /// Drop lines connecting data points with X axis.
+ ShapeRef mxHiLowLines; /// High/low lines connecting lowest and highest data points.
+ double mfSplitPos; /// Threshold value in pie-to charts.
+ sal_Int32 mnBarDir; /// Bar direction in bar charts (vertical/horizontal).
+ sal_Int32 mnBubbleScale; /// Relative scaling of bubble size (percent).
+ sal_Int32 mnFirstAngle; /// Rotation angle of first slice in pie charts.
+ sal_Int32 mnGapDepth; /// Space between series in deep 3D charts.
+ sal_Int32 mnGapWidth; /// Space between bars in bar charts, or space in pie-to charts.
+ sal_Int32 mnGrouping; /// Series grouping mode.
+ sal_Int32 mnHoleSize; /// Hole size in doughnut charts.
+ sal_Int32 mnOfPieType; /// Pie-to-pie or pie-to-bar chart.
+ sal_Int32 mnOverlap; /// Bar overlap per category (2D bar charts only).
+ sal_Int32 mnRadarStyle; /// Type of radar chart (lines, markers, filled).
+ sal_Int32 mnScatterStyle; /// Type of scatter chart (lines, markers, smooth).
+ sal_Int32 mnSecondPieSize; /// relative size of second pie/bar in pie-to charts (percent).
+ sal_Int32 mnShape; /// 3D bar shape type.
+ sal_Int32 mnSizeRepresents; /// Bubble size represents area or width.
+ sal_Int32 mnSplitType; /// Split type in pie-to charts.
+ sal_Int32 mnTypeId; /// Chart type identifier.
+ bool mbBubble3d; /// True = show bubbles with 3D shade.
+ bool mbShowMarker; /// True = show point markers in line charts.
+ bool mbShowNegBubbles; /// True = show absolute value of negative bubbles.
+ bool mbSmooth; /// True = smooth lines in line charts.
+ bool mbVaryColors; /// True = different automatic colors for each point.
+ bool mbWireframe; /// True = wireframe surface chart, false = filled surface chart.
+
+ explicit TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc );
+ ~TypeGroupModel();
+};
+
+} // namespace oox::drawingml::chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/clrschemecontext.hxx b/oox/inc/drawingml/clrschemecontext.hxx
new file mode 100644
index 000000000..5e7cddfb8
--- /dev/null
+++ b/oox/inc/drawingml/clrschemecontext.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/clrscheme.hxx>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+
+namespace oox::drawingml {
+
+class clrMapContext final : public oox::core::ContextHandler2
+{
+public:
+ clrMapContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes, ClrMap& rClrMap );
+};
+
+class clrSchemeColorContext final : private Color, public ColorContext
+{
+public:
+ clrSchemeColorContext( ::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken );
+ virtual ~clrSchemeColorContext() override;
+
+private:
+ ClrScheme& mrClrScheme;
+ sal_Int32 mnColorToken;
+};
+
+class clrSchemeContext final : public oox::core::ContextHandler2
+{
+public:
+ clrSchemeContext( ::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ ClrScheme& mrClrScheme;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/colorchoicecontext.hxx b/oox/inc/drawingml/colorchoicecontext.hxx
new file mode 100644
index 000000000..6e82ee322
--- /dev/null
+++ b/oox/inc/drawingml/colorchoicecontext.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+#include <vector>
+
+namespace oox::drawingml {
+
+class Color;
+
+
+/** Context handler for the different color value elements (a:scrgbClr,
+ a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
+class ColorValueContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorValueContext( ::oox::core::ContextHandler2Helper const & rParent, Color& rColor );
+
+
+ virtual void onStartElement(
+ const ::oox::AttributeList& rAttribs ) override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Color& mrColor;
+};
+
+
+/** Context handler for elements that *contain* a color value element
+ (a:scrgbClr, a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
+class ColorContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorContext( ::oox::core::ContextHandler2Helper const & rParent, Color& rColor );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Color& mrColor;
+};
+
+/// Same as ColorContext, but handles multiple colors.
+class ColorsContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorsContext(::oox::core::ContextHandler2Helper const& rParent,
+ std::vector<Color>& rColors);
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ std::vector<Color>& mrColors;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/customshapegeometry.hxx b/oox/inc/drawingml/customshapegeometry.hxx
new file mode 100644
index 000000000..e02a693b4
--- /dev/null
+++ b/oox/inc/drawingml/customshapegeometry.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+#define INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox::drawingml {
+
+
+// CT_CustomGeometry2D
+class CustomShapeGeometryContext final : public ::oox::core::ContextHandler2
+{
+public:
+ CustomShapeGeometryContext( ::oox::core::ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+
+// CT_PresetGeometry2D
+class PresetShapeGeometryContext final : public ::oox::core::ContextHandler2
+{
+public:
+ PresetShapeGeometryContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+
+// CT_PresetTextShape
+class PresetTextShapeContext final : public ::oox::core::ContextHandler2
+{
+public:
+ PresetTextShapeContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx
new file mode 100644
index 000000000..10251de24
--- /dev/null
+++ b/oox/inc/drawingml/customshapeproperties.hxx
@@ -0,0 +1,163 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+
+#include <memory>
+#include <unordered_map>
+#include <vector>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml {
+
+class CustomShapeProperties;
+
+typedef std::shared_ptr< CustomShapeProperties > CustomShapePropertiesPtr;
+
+struct CustomShapeGuide
+{
+ OUString maName;
+ OUString maFormula;
+};
+
+struct AdjustHandle
+{
+ bool polar;
+ css::drawing::EnhancedCustomShapeParameterPair
+ pos;
+
+ // depending to the type (polar or not):
+ OptValue< OUString > gdRef1; // gdRefX or gdRefR
+ OptValue< css::drawing::EnhancedCustomShapeParameter >
+ min1; // minX or minR
+ OptValue< css::drawing::EnhancedCustomShapeParameter >
+ max1; // maxX or maxR
+ OptValue< OUString > gdRef2; // gdRefY or gdRefAng
+ OptValue< css::drawing::EnhancedCustomShapeParameter >
+ min2; // minX or minAng
+ OptValue< css::drawing::EnhancedCustomShapeParameter >
+ max2; // maxY or maxAng
+
+ AdjustHandle( bool bPolar ) : polar( bPolar ) {};
+};
+
+struct ConnectionSite
+{
+ css::drawing::EnhancedCustomShapeParameterPair
+ pos;
+ css::drawing::EnhancedCustomShapeParameter
+ ang;
+};
+
+struct GeomRect
+{
+ css::drawing::EnhancedCustomShapeParameter l;
+ css::drawing::EnhancedCustomShapeParameter t;
+ css::drawing::EnhancedCustomShapeParameter r;
+ css::drawing::EnhancedCustomShapeParameter b;
+};
+
+struct Path2D
+{
+ sal_Int64 w;
+ sal_Int64 h;
+ sal_Int32 fill;
+ bool stroke;
+ bool extrusionOk;
+ std::vector< css::drawing::EnhancedCustomShapeParameterPair > parameter;
+
+ Path2D() : w( 0 ), h( 0 ), fill( XML_norm ), stroke( true ), extrusionOk( true ) {};
+};
+
+
+class CustomShapeProperties final
+{
+public:
+ CustomShapeProperties();
+
+ void pushToPropSet( const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
+ const css::awt::Size &aSize );
+
+ sal_Int32 getShapePresetType() const { return mnShapePresetType; }
+ css::uno::Sequence< sal_Int8 > const & getShapePresetTypeName() const;
+ void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; };
+ bool getShapeTypeOverride() const { return mbShapeTypeOverride; };
+ void setShapeTypeOverride( bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; };
+
+ std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; };
+ std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; };
+ std::vector< AdjustHandle >& getAdjustHandleList(){ return maAdjustHandleList; };
+ std::vector< ConnectionSite >& getConnectionSiteList(){ return maConnectionSiteList; };
+ OptValue< GeomRect >& getTextRect(){ return maTextRect; };
+ std::vector< Path2D >& getPath2DList(){ return maPath2DList; };
+ std::vector< css::drawing::EnhancedCustomShapeSegment >& getSegments(){ return maSegments; };
+ void setMirroredX( bool bMirroredX ) { mbMirroredX = bMirroredX; };
+ void setMirroredY( bool bMirroredY ) { mbMirroredY = bMirroredY; };
+ void setTextRotateAngle( sal_Int32 nAngle ) { mnTextRotateAngle = nAngle; };
+ void setTextCameraZRotateAngle( sal_Int32 nAngle ) { mnTextCameraZRotateAngle = nAngle; };
+
+ static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide );
+ static sal_Int32 GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, std::u16string_view rFormulaName );
+
+ sal_Int32 getArcNum() { return mnArcNum++; }
+ sal_Int32 countArcTo() { return mnArcNum; }
+
+ /**
+ Returns whether or not the current CustomShapeProperties
+ represent a default shape preset that is rectangular.
+ */
+ bool representsDefaultShape() const;
+
+private:
+
+ sal_Int32 mnShapePresetType;
+ bool mbShapeTypeOverride;
+ std::vector< CustomShapeGuide > maAdjustmentGuideList;
+ std::vector< CustomShapeGuide > maGuideList;
+ std::vector< AdjustHandle > maAdjustHandleList;
+ std::vector< ConnectionSite > maConnectionSiteList;
+ OptValue< GeomRect > maTextRect;
+ std::vector< Path2D > maPath2DList;
+
+ std::vector< css::drawing::EnhancedCustomShapeSegment >
+ maSegments;
+ bool mbMirroredX;
+ bool mbMirroredY;
+ sal_Int32 mnTextRotateAngle;
+ sal_Int32 mnTextCameraZRotateAngle;
+
+ typedef std::unordered_map< sal_Int32, PropertyMap > PresetDataMap;
+
+ static PresetDataMap maPresetDataMap;
+ static void initializePresetDataMap();
+
+ sal_Int32 mnArcNum;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/effectpropertiescontext.hxx b/oox/inc/drawingml/effectpropertiescontext.hxx
new file mode 100644
index 000000000..d6a931043
--- /dev/null
+++ b/oox/inc/drawingml/effectpropertiescontext.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+struct EffectProperties;
+struct Effect;
+
+class EffectPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ EffectPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
+ EffectProperties& rEffectProperties ) noexcept;
+ virtual ~EffectPropertiesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ static void saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs );
+
+ EffectProperties& mrEffectProperties;
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/embeddedwavaudiofile.hxx b/oox/inc/drawingml/embeddedwavaudiofile.hxx
new file mode 100644
index 000000000..cea644666
--- /dev/null
+++ b/oox/inc/drawingml/embeddedwavaudiofile.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_EMBEDDEDWAVAUDIOFILE_HXX
+#define INCLUDED_OOX_DRAWINGML_EMBEDDEDWAVAUDIOFILE_HXX
+
+#include <rtl/ustring.hxx>
+
+#include <oox/core/relations.hxx>
+#include <oox/helper/attributelist.hxx>
+
+namespace oox::drawingml {
+
+ OUString getEmbeddedWAVAudioFile(
+ const ::oox::core::Relations& rRelations,
+ const AttributeList& rAttribs );
+
+}
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/fillproperties.hxx b/oox/inc/drawingml/fillproperties.hxx
new file mode 100644
index 000000000..cae4235cd
--- /dev/null
+++ b/oox/inc/drawingml/fillproperties.hxx
@@ -0,0 +1,160 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_INC_DRAWINGML_FILLPROPERTIES_HXX
+#define INCLUDED_OOX_INC_DRAWINGML_FILLPROPERTIES_HXX
+
+#include <map>
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <oox/drawingml/color.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/ole/oleobjecthelper.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+
+namespace com::sun::star {
+ namespace graphic { class XGraphic; }
+}
+
+namespace oox {
+ class GraphicHelper;
+}
+
+namespace oox::drawingml {
+
+class ShapePropertyMap;
+
+struct GradientFillProperties
+{
+ typedef ::std::multimap< double, Color > GradientStopMap;
+
+ GradientStopMap maGradientStops; /// Gradient stops (colors/transparence).
+ OptValue< css::geometry::IntegerRectangle2D > moFillToRect;
+ OptValue< css::geometry::IntegerRectangle2D > moTileRect;
+ OptValue< sal_Int32 > moGradientPath; /// If set, gradient follows rectangle, circle, or shape.
+ OptValue< sal_Int32 > moShadeAngle; /// Rotation angle of linear gradients.
+ OptValue< sal_Int32 > moShadeFlip; /// Flip mode of gradient, if not stretched to shape.
+ OptValue< bool > moShadeScaled; /// True = scale gradient into shape.
+ OptValue< bool > moRotateWithShape; /// True = rotate gradient with shape.
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const GradientFillProperties& rSourceProps );
+};
+
+struct PatternFillProperties
+{
+ Color maPattFgColor; /// Pattern foreground color.
+ Color maPattBgColor; /// Pattern background color.
+ OptValue< sal_Int32 > moPattPreset; /// Preset pattern type.
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const PatternFillProperties& rSourceProps );
+};
+
+struct ArtisticEffectProperties
+{
+ OUString msName;
+ std::map< OUString, css::uno::Any >
+ maAttribs;
+ ::oox::ole::OleObjectInfo mrOleObjectInfo; /// The original graphic as embedded object.
+
+ bool isEmpty() const;
+
+ /** Returns the struct as a PropertyValue with Name = msName and
+ * Value = maAttribs as a Sequence< PropertyValue >. */
+ css::beans::PropertyValue getEffect();
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const ArtisticEffectProperties& rSourceProps );
+
+ /** Translate effect tokens to strings. */
+ static OUString getEffectString( sal_Int32 nToken );
+
+ /** Translate effect strings to tokens. */
+ static sal_Int32 getEffectToken( const OUString& sName );
+};
+
+struct BlipFillProperties
+{
+ css::uno::Reference<css::graphic::XGraphic> mxFillGraphic; /// The fill graphic.
+ OptValue< sal_Int32 > moBitmapMode; /// Bitmap tile or stretch.
+ OptValue< css::geometry::IntegerRectangle2D >
+ moFillRect; /// Stretch fill offsets.
+ OptValue< css::geometry::IntegerRectangle2D >
+ moClipRect;
+ OptValue< sal_Int32 > moTileOffsetX; /// Width of bitmap tiles (EMUs).
+ OptValue< sal_Int32 > moTileOffsetY; /// Height of bitmap tiles (EMUs).
+ OptValue< sal_Int32 > moTileScaleX; /// Horizontal scaling of bitmap tiles (1/1000 percent).
+ OptValue< sal_Int32 > moTileScaleY; /// Vertical scaling of bitmap tiles (1/1000 percent).
+ OptValue< sal_Int32 > moTileAlign; /// Anchor point inside bitmap.
+ OptValue< sal_Int32 > moTileFlip; /// Flip mode of bitmap tiles.
+ OptValue< bool > moRotateWithShape; /// True = rotate bitmap with shape.
+ // effects
+ OptValue< sal_Int32 > moColorEffect; /// XML token for a color effect.
+ OptValue< sal_Int32 > moBrightness; /// Brightness in the range [-100000,100000].
+ OptValue< sal_Int32 > moContrast; /// Contrast in the range [-100000,100000].
+ OptValue< sal_Int32 > moBiLevelThreshold; /// Bi-Level (Black/White) effect threshold (1/1000 percent)
+ Color maColorChangeFrom; /// Start color of color transformation.
+ Color maColorChangeTo; /// Destination color of color transformation.
+ Color maDuotoneColors[2]; /// Duotone Colors
+
+ ArtisticEffectProperties maEffect; /// Artistic effect, not supported by core.
+ OptValue<sal_Int32> moAlphaModFix; ///< Alpha Modulate Fixed Effect.
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const BlipFillProperties& rSourceProps );
+};
+
+struct FillProperties
+{
+ OptValue< sal_Int32 > moFillType; /// Fill type (OOXML token).
+ Color maFillColor; /// Solid fill color and transparence.
+ OptValue< bool > moUseBgFill; /// Whether the background is used as fill type
+ GradientFillProperties maGradientProps; /// Properties for gradient fills.
+ PatternFillProperties maPatternProps; /// Properties for pattern fills.
+ BlipFillProperties maBlipProps; /// Properties for bitmap fills.
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const FillProperties& rSourceProps );
+
+ /** Tries to resolve current settings to a solid color, e.g. returns the
+ start color of a gradient. */
+ Color getBestSolidColor() const;
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ ShapePropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper,
+ sal_Int32 nShapeRotation = 0,
+ ::Color nPhClr = API_RGB_TRANSPARENT,
+ sal_Int16 nPhClrTheme = -1,
+ bool bFlipH = false,
+ bool bFlipV = false,
+ bool bIsCustomShape = false ) const;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx
new file mode 100644
index 000000000..48d1acf61
--- /dev/null
+++ b/oox/inc/drawingml/graphicproperties.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_GRAPHICPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_GRAPHICPROPERTIES_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/io/XInputStream.hpp>
+
+#include <drawingml/fillproperties.hxx>
+
+namespace oox {
+ class GraphicHelper;
+ class PropertyMap;
+}
+
+namespace oox::drawingml {
+
+struct GraphicProperties
+{
+ BlipFillProperties maBlipProps; ///< Properties for the graphic.
+ OUString m_sMediaPackageURL; ///< Audio/Video URL.
+ bool mbIsCustomShape = false;
+ css::uno::Reference<css::io::XInputStream> m_xMediaStream; ///< Audio/Video input stream.
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ PropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper,
+ bool bFlipH = false,
+ bool bFlipV = false) const;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/guidcontext.hxx b/oox/inc/drawingml/guidcontext.hxx
new file mode 100644
index 000000000..c60ad75e7
--- /dev/null
+++ b/oox/inc/drawingml/guidcontext.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_GUIDCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_GUIDCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+ class GuidContext final : public ::oox::core::ContextHandler2
+ {
+
+ public:
+ GuidContext( ::oox::core::ContextHandler2Helper const & rParent, OUString& rGuidId );
+ virtual void onCharacters( const OUString& aChars ) override;
+
+ private:
+ OUString& mrGuidId;
+ };
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/hatchmap.hxx b/oox/inc/drawingml/hatchmap.hxx
new file mode 100644
index 000000000..64e2722fe
--- /dev/null
+++ b/oox/inc/drawingml/hatchmap.hxx
@@ -0,0 +1,298 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <oox/token/tokens.hxx>
+
+#include <tools/color.hxx>
+
+using namespace com::sun::star;
+using namespace oox;
+
+static drawing::Hatch createHatch(sal_Int32 nHatchToken, ::Color nColor)
+{
+ drawing::Hatch aHatch;
+ aHatch.Color = sal_Int32(nColor);
+ // best-effort mapping; we do not support all the styles in core
+ switch (nHatchToken)
+ {
+ case XML_pct5:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 250;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct10:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 200;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct20:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct25:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 200;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct30:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 175;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct40:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct50:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 125;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct60:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct70:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 125;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct75:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct80:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 75;
+ aHatch.Angle = 450;
+ break;
+ case XML_pct90:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 450;
+ break;
+ case XML_horz:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 0;
+ break;
+ case XML_vert:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 900;
+ break;
+ case XML_ltHorz:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 0;
+ break;
+ case XML_ltVert:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 900;
+ break;
+ case XML_dkHorz:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 25;
+ aHatch.Angle = 0;
+ break;
+ case XML_dkVert:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 25;
+ aHatch.Angle = 900;
+ break;
+ case XML_narHorz:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 0;
+ break;
+ case XML_narVert:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 900;
+ break;
+ case XML_dashHorz:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 0;
+ break;
+ case XML_dashVert:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 900;
+ break;
+ case XML_cross:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 0;
+ break;
+ case XML_dnDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 1350;
+ break;
+ case XML_upDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_ltDnDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 1350;
+ break;
+ case XML_ltUpDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 450;
+ break;
+ case XML_dkDnDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 1350;
+ break;
+ case XML_dkUpDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 450;
+ break;
+ case XML_wdDnDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 1350;
+ break;
+ case XML_wdUpDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_dashDnDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 1350;
+ break;
+ case XML_dashUpDiag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 450;
+ break;
+ case XML_diagCross:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_smCheck:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 450;
+ break;
+ case XML_lgCheck:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_smGrid:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 50;
+ aHatch.Angle = 0;
+ break;
+ case XML_lgGrid:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 0;
+ break;
+ case XML_dotGrid:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 400;
+ aHatch.Angle = 0;
+ break;
+ case XML_smConfetti:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 200;
+ aHatch.Angle = 600;
+ break;
+ case XML_lgConfetti:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 600;
+ break;
+ case XML_horzBrick:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 300;
+ aHatch.Angle = 0;
+ break;
+ case XML_diagBrick:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 300;
+ aHatch.Angle = 450;
+ break;
+ case XML_solidDmnd:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_openDmnd:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 450;
+ break;
+ case XML_dotDmnd:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 300;
+ aHatch.Angle = 450;
+ break;
+ case XML_plaid:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 200;
+ aHatch.Angle = 900;
+ break;
+ case XML_sphere:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 0;
+ break;
+ case XML_weave:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 150;
+ aHatch.Angle = 450;
+ break;
+ case XML_divot:
+ aHatch.Style = drawing::HatchStyle_TRIPLE;
+ aHatch.Distance = 400;
+ aHatch.Angle = 450;
+ break;
+ case XML_shingle:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 200;
+ aHatch.Angle = 1350;
+ break;
+ case XML_wave:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 100;
+ aHatch.Angle = 0;
+ break;
+ case XML_trellis:
+ aHatch.Style = drawing::HatchStyle_DOUBLE;
+ aHatch.Distance = 75;
+ aHatch.Angle = 450;
+ break;
+ case XML_zigZag:
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Distance = 75;
+ aHatch.Angle = 0;
+ break;
+ }
+
+ return aHatch;
+}
diff --git a/oox/inc/drawingml/lineproperties.hxx b/oox/inc/drawingml/lineproperties.hxx
new file mode 100644
index 000000000..214aadba1
--- /dev/null
+++ b/oox/inc/drawingml/lineproperties.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_INC_DRAWINGML_LINEPROPERTIES_HXX
+#define INCLUDED_OOX_INC_DRAWINGML_LINEPROPERTIES_HXX
+
+#include <utility>
+#include <vector>
+
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <oox/helper/helper.hxx>
+#include <sal/types.h>
+
+#include <drawingml/fillproperties.hxx>
+
+namespace oox { class GraphicHelper; }
+
+namespace oox::drawingml {
+
+class ShapePropertyMap;
+
+struct LineArrowProperties
+{
+ OptValue< sal_Int32 > moArrowType;
+ OptValue< sal_Int32 > moArrowWidth;
+ OptValue< sal_Int32 > moArrowLength;
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const LineArrowProperties& rSourceProps );
+};
+
+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).
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const LineProperties& rSourceProps );
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ ShapePropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper,
+ ::Color nPhClr = API_RGB_TRANSPARENT ) const;
+
+ /** Calculates the line style attribute from the internal state of the object */
+ css::drawing::LineStyle getLineStyle() const;
+ /** Calculates the line cap attribute from the internal state of the object */
+ css::drawing::LineCap getLineCap() const;
+ /** Calculates the line joint attribute from the internal state of the object */
+ css::drawing::LineJoint getLineJoint() const;
+ /** Calculates the line width attribute from the internal state of the object */
+ sal_Int32 getLineWidth() const;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/linepropertiescontext.hxx b/oox/inc/drawingml/linepropertiescontext.hxx
new file mode 100644
index 000000000..470a38c68
--- /dev/null
+++ b/oox/inc/drawingml/linepropertiescontext.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+
+struct LineProperties;
+
+class LinePropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ LinePropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes,
+ LineProperties& rLineProperties ) noexcept;
+ virtual ~LinePropertiesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ LineProperties& mrLineProperties;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/misccontexts.hxx b/oox/inc/drawingml/misccontexts.hxx
new file mode 100644
index 000000000..495b3bce9
--- /dev/null
+++ b/oox/inc/drawingml/misccontexts.hxx
@@ -0,0 +1,244 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_MISCCONTEXTS_HXX
+#define INCLUDED_OOX_DRAWINGML_MISCCONTEXTS_HXX
+
+#include <drawingml/colorchoicecontext.hxx>
+
+#include <drawingml/fillproperties.hxx>
+
+namespace oox::drawingml {
+
+
+/** Context handler that imports the a:solidFill element. */
+class SolidFillContext final : public ColorContext
+{
+public:
+ explicit SolidFillContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ FillProperties& rFillProps );
+};
+
+
+/** Context handler that imports the a:gradFill element. */
+class GradientFillContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit GradientFillContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ GradientFillProperties& rGradientProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ GradientFillProperties& mrGradientProps;
+};
+
+/** Context handler that imports the a:pattFill element. */
+class PatternFillContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit PatternFillContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ PatternFillProperties& rPatternProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ PatternFillProperties& mrPatternProps;
+};
+
+
+/** Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers
+ and the a14:artistic* effect tags defined in the MS-ODRAWXML extension. */
+class ArtisticEffectContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ArtisticEffectContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ ArtisticEffectProperties& rEffect );
+ virtual ~ArtisticEffectContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ ArtisticEffectProperties& maEffect;
+};
+
+
+/** Context handler that imports the a:extLst element inside a:blip and its
+ children a:ext, which can contain transformations to the bitmap. */
+class BlipExtensionContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipExtensionContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ BlipFillProperties& rBlipProps );
+ virtual ~BlipExtensionContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+
+/** Context handler that imports the a:duotone element containing the colors
+ of a bitmap duotone transformation. */
+class DuotoneContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit DuotoneContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ BlipFillProperties& rBlipProps );
+ virtual ~DuotoneContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ BlipFillProperties& mrBlipProps;
+ int mnColorIndex;
+};
+
+
+/** Context handler that imports the a:clrChange element containing the colors
+ of a bitmap color change transformation. */
+class ColorChangeContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorChangeContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+ virtual ~ColorChangeContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ BlipFillProperties& mrBlipProps;
+ bool mbUseAlpha;
+};
+
+/** Context handler that imports the a:blip element containing the fill bitmap
+ and bitmap color transformation settings. */
+class BlipContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+/** Context handler that imports the a:blipFill element. */
+class BlipFillContext final : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipFillContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+/** Context handler for elements that contain a fill property element
+ (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill). */
+class FillPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit FillPropertiesContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ FillProperties& rFillProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) override;
+
+ static ::oox::core::ContextHandlerRef
+ createFillContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs,
+ FillProperties& rFillProps );
+
+private:
+ FillProperties& mrFillProps;
+};
+
+/** Context handler for elements that contain a fill property element
+ (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill).
+
+ This context handler takes a simple color instead of a fill properties
+ struct. The imported fill properties are converted automatically to the
+ best fitting solid color.
+ */
+class SimpleFillPropertiesContext final : private FillProperties, public FillPropertiesContext
+{
+public:
+ explicit SimpleFillPropertiesContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ Color& rColor );
+ virtual ~SimpleFillPropertiesContext() override;
+
+private:
+ Color& mrColor;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/objectdefaultcontext.hxx b/oox/inc/drawingml/objectdefaultcontext.hxx
new file mode 100644
index 000000000..45873c825
--- /dev/null
+++ b/oox/inc/drawingml/objectdefaultcontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml
+{
+class Theme;
+
+class objectDefaultContext final : public oox::core::ContextHandler2
+{
+public:
+ objectDefaultContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rTheme);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ Theme& mrTheme;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/presetgeometrynames.hxx b/oox/inc/drawingml/presetgeometrynames.hxx
new file mode 100644
index 000000000..1dc46b86f
--- /dev/null
+++ b/oox/inc/drawingml/presetgeometrynames.hxx
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_PRESETGEOMETRYNAMES_HXX
+#define INCLUDED_OOX_DRAWINGML_PRESETGEOMETRYNAMES_HXX
+
+#include <rtl/ustring.hxx>
+
+namespace PresetGeometryTypeNames
+{
+OUString GetFontworkType(const OUString& rMsoType);
+OUString GetMsoName(const OUString& rFontworkType);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/inc/drawingml/scene3dcontext.hxx b/oox/inc/drawingml/scene3dcontext.hxx
new file mode 100644
index 000000000..30e392f94
--- /dev/null
+++ b/oox/inc/drawingml/scene3dcontext.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/shape3dproperties.hxx>
+
+namespace oox::drawingml {
+
+struct Shape3DProperties;
+
+class Scene3DRotationPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ Scene3DRotationPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, RotationProperties& rRotationProperties ) noexcept;
+
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ RotationProperties& mrRotationProperties;
+};
+
+class Scene3DPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ Scene3DPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, Shape3DProperties& rShape3DProperties ) noexcept;
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Shape3DProperties& mr3DProperties;
+};
+
+class SceneText3DPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ SceneText3DPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, Text3DProperties& rText3DProperties ) noexcept;
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Text3DProperties& mr3DProperties;
+};
+
+class Shape3DPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ Shape3DPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttribs, Shape3DProperties& r3DProperties ) noexcept;
+
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Shape3DProperties& mr3DProperties;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shape3dproperties.hxx b/oox/inc/drawingml/shape3dproperties.hxx
new file mode 100644
index 000000000..c43e643aa
--- /dev/null
+++ b/oox/inc/drawingml/shape3dproperties.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPE3DPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_SHAPE3DPROPERTIES_HXX
+
+#include <oox/drawingml/color.hxx>
+#include <oox/helper/helper.hxx>
+
+namespace oox { class PropertyMap; }
+namespace oox { class PropertySet; }
+namespace oox::core { class ModelObjectContainer; }
+
+namespace oox::drawingml {
+
+
+struct RotationProperties
+{
+ OptValue< sal_Int32 > mnLatitude;
+ OptValue< sal_Int32 > mnLongitude;
+ OptValue< sal_Int32 > mnRevolution;
+};
+
+struct BevelProperties
+{
+ OptValue< sal_Int32 > mnPreset;
+ OptValue< sal_Int32 > mnWidth;
+ OptValue< sal_Int32 > mnHeight;
+};
+
+struct Generic3DProperties
+{
+ OptValue< sal_Int32 > mnPreset;
+ OptValue< float > mfFieldOfVision;
+ OptValue< float > mfZoom;
+ OptValue< sal_Int32 > mnLightRigDirection;
+ OptValue< sal_Int32 > mnLightRigType;
+ RotationProperties maCameraRotation;
+ RotationProperties maLightRigRotation;
+
+ OptValue< sal_Int32 > mnExtrusionH;
+ OptValue< sal_Int32 > mnContourW;
+ OptValue< sal_Int32 > mnShapeZ;
+ OptValue< sal_Int32 > mnMaterial;
+ Color maExtrusionColor;
+ Color maContourColor;
+
+ OptValue< BevelProperties > maTopBevelProperties;
+ OptValue< BevelProperties > maBottomBevelProperties;
+
+ static OUString getCameraPrstName( sal_Int32 nElement );
+ static OUString getLightRigName( sal_Int32 nElement );
+ static OUString getLightRigDirName( sal_Int32 nElement );
+ static OUString getBevelPresetTypeString( sal_Int32 nType );
+ static OUString getPresetMaterialTypeString( sal_Int32 nType );
+
+ css::uno::Sequence< css::beans::PropertyValue > getCameraAttributes();
+ css::uno::Sequence< css::beans::PropertyValue > getLightRigAttributes();
+ css::uno::Sequence< css::beans::PropertyValue > getShape3DAttributes(
+ const GraphicHelper& rGraphicHelper, ::Color rPhClr );
+ static css::uno::Sequence< css::beans::PropertyValue > getBevelAttributes( BevelProperties rProps );
+ static css::uno::Sequence< css::beans::PropertyValue > getColorAttributes(
+ const Color& rColor, const GraphicHelper& rGraphicHelper, ::Color rPhClr );
+};
+
+struct Shape3DProperties : Generic3DProperties
+{};
+
+struct Text3DProperties : Generic3DProperties
+{};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shapepropertiescontext.hxx b/oox/inc/drawingml/shapepropertiescontext.hxx
new file mode 100644
index 000000000..9d047c15c
--- /dev/null
+++ b/oox/inc/drawingml/shapepropertiescontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox::drawingml
+{
+class ShapePropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ ShapePropertiesContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rShape);
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+protected:
+ Shape& mrShape;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shapestylecontext.hxx b/oox/inc/drawingml/shapestylecontext.hxx
new file mode 100644
index 000000000..02faa22a7
--- /dev/null
+++ b/oox/inc/drawingml/shapestylecontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml
+{
+class ShapeStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ ShapeStyleContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rShape);
+ virtual ~ShapeStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ Shape& mrShape;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/spdefcontext.hxx b/oox/inc/drawingml/spdefcontext.hxx
new file mode 100644
index 000000000..6e9206d4a
--- /dev/null
+++ b/oox/inc/drawingml/spdefcontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml
+{
+class spDefContext final : public oox::core::ContextHandler2
+{
+public:
+ spDefContext(::oox::core::ContextHandler2Helper const& rParent, Shape& rDefaultObject);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ Shape& mrDefaultObject;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx
new file mode 100644
index 000000000..d90597497
--- /dev/null
+++ b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table {
+
+class TableBackgroundStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableBackgroundStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStyle& rTableStyle );
+ virtual ~TableBackgroundStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ TableStyle& mrTableStyle;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx
new file mode 100644
index 000000000..988b0d057
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecell.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textfont.hxx>
+#include <com/sun/star/table/XCell.hpp>
+
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+
+namespace oox::drawingml::table {
+
+class TableCellContext;
+class TableProperties;
+class TableStyle;
+
+class TableCell
+{
+ friend class TableCellContext;
+
+public:
+
+ TableCell();
+
+ sal_Int32 getRowSpan() const { return mnRowSpan; };
+ void setRowSpan( sal_Int32 nRowSpan ){ mnRowSpan = nRowSpan; };
+ sal_Int32 getGridSpan() const { return mnGridSpan; };
+ void setGridSpan( sal_Int32 nGridSpan ){ mnGridSpan = nGridSpan; };
+ bool gethMerge() const { return mbhMerge; };
+ void sethMerge( bool bhMerge ){ mbhMerge = bhMerge; };
+ bool getvMerge() const { return mbvMerge; };
+ void setvMerge( bool bvMerge ){ mbvMerge = bvMerge; };
+ sal_Int32 getLeftMargin() const { return mnMarL; };
+ void setLeftMargin( sal_Int32 nMargin ){ mnMarL = nMargin; };
+ sal_Int32 getRightMargin() const { return mnMarR; };
+ void setRightMargin( sal_Int32 nMargin ){ mnMarR = nMargin; };
+ sal_Int32 getTopMargin() const { return mnMarT; };
+ void setTopMargin( sal_Int32 nMargin ){ mnMarT = nMargin; };
+ sal_Int32 getBottomMargin() const { return mnMarB; };
+ void setBottomMargin( sal_Int32 nMargin ){ mnMarB = nMargin; };
+ sal_Int32 getVertToken() const { return mnVertToken; };
+ void setVertToken( sal_Int32 nToken ){ mnVertToken = nToken; };
+ sal_Int32 getAnchorToken() const { return mnAnchorToken; };
+ void setAnchorToken( sal_Int32 nToken ){ mnAnchorToken = nToken; };
+ void setAnchorCtr( bool bAnchorCtr ){ mbAnchorCtr = bAnchorCtr; };
+ void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; };
+
+ void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; };
+ const oox::drawingml::TextBodyPtr& getTextBody() const { return mpTextBody; };
+
+ void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
+ const css::uno::Reference < css::table::XCell >& rxCell,
+ const TableProperties& rTableProperties,
+ const TableStyle& rTable,
+ sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow );
+
+private:
+
+ oox::drawingml::TextBodyPtr mpTextBody;
+
+ oox::drawingml::LineProperties maLinePropertiesLeft;
+ oox::drawingml::LineProperties maLinePropertiesRight;
+ oox::drawingml::LineProperties maLinePropertiesTop;
+ oox::drawingml::LineProperties maLinePropertiesBottom;
+ oox::drawingml::LineProperties maLinePropertiesInsideH;
+ oox::drawingml::LineProperties maLinePropertiesInsideV;
+ oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight;
+ oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight;
+
+ oox::drawingml::FillProperties maFillProperties;
+
+ sal_Int32 mnRowSpan;
+ sal_Int32 mnGridSpan;
+ bool mbhMerge;
+ bool mbvMerge;
+
+ sal_Int32 mnMarL;
+ sal_Int32 mnMarR;
+ sal_Int32 mnMarT;
+ sal_Int32 mnMarB;
+ sal_Int32 mnVertToken;
+ sal_Int32 mnAnchorToken;
+ bool mbAnchorCtr;
+ sal_Int32 mnHorzOverflowToken;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecellcontext.hxx b/oox/inc/drawingml/table/tablecellcontext.hxx
new file mode 100644
index 000000000..24a8a2830
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecellcontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablecell.hxx>
+
+namespace oox::drawingml::table
+{
+class TableCellContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableCellContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableCell& rTableCell);
+ virtual ~TableCellContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableCell& mrTableCell;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecontext.hxx b/oox/inc/drawingml/table/tablecontext.hxx
new file mode 100644
index 000000000..3004333d2
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX
+
+#include <oox/drawingml/shapecontext.hxx>
+
+namespace oox::drawingml::table
+{
+class TableProperties;
+
+class TableContext final : public ShapeContext
+{
+public:
+ TableContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr);
+ virtual ~TableContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableProperties& mrTableProperties;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablepartstylecontext.hxx b/oox/inc/drawingml/table/tablepartstylecontext.hxx
new file mode 100644
index 000000000..c2f5baada
--- /dev/null
+++ b/oox/inc/drawingml/table/tablepartstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TablePartStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TablePartStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart );
+ virtual ~TablePartStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ TableStylePart& mrTableStylePart;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tableproperties.hxx b/oox/inc/drawingml/table/tableproperties.hxx
new file mode 100644
index 000000000..34e361b18
--- /dev/null
+++ b/oox/inc/drawingml/table/tableproperties.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+
+#include <drawingml/table/tablerow.hxx>
+#include <drawingml/table/tablestyle.hxx>
+#include <oox/drawingml/color.hxx>
+
+#include <memory>
+#include <vector>
+
+namespace oox::drawingml::table {
+
+class TableProperties
+{
+public:
+
+ TableProperties();
+
+ std::vector< sal_Int32 >& getTableGrid() { return mvTableGrid; };
+ std::vector< TableRow >& getTableRows() { return mvTableRows; };
+
+ OUString& getStyleId() { return maStyleId; };
+ std::shared_ptr< TableStyle >& getTableStyle() { return mpTableStyle; };
+ bool isFirstRow() const { return mbFirstRow; };
+ void setFirstRow(bool b) { mbFirstRow = b; };
+ bool isFirstCol() const { return mbFirstCol; };
+ void setFirstCol(bool b) { mbFirstCol = b; };
+ bool isLastRow() const { return mbLastRow; };
+ void setLastRow(bool b) { mbLastRow = b; };
+ bool isLastCol() const { return mbLastCol; };
+ void setLastCol(bool b) { mbLastCol = b; };
+ bool isBandRow() const { return mbBandRow; };
+ void setBandRow(bool b) { mbBandRow = b; };
+ bool isBandCol() const { return mbBandCol; };
+ void setBandCol(bool b) { mbBandCol = b; };
+ Color& getBgColor(){ return maBgColor; };
+
+ void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle );
+
+private:
+
+ const TableStyle& getUsedTableStyle(const ::oox::core::XmlFilterBase& rFilterBase, std::unique_ptr<TableStyle>& rTableStyleToDelete);
+
+ OUString maStyleId; // either StyleId is available
+ std::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle
+ std::vector< sal_Int32 > mvTableGrid;
+ std::vector< TableRow > mvTableRows;
+ Color maBgColor;
+
+ bool mbFirstRow;
+ bool mbFirstCol;
+ bool mbLastRow;
+ bool mbLastCol;
+ bool mbBandRow;
+ bool mbBandCol;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablerow.hxx b/oox/inc/drawingml/table/tablerow.hxx
new file mode 100644
index 000000000..7f8d212c1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablerow.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+
+#include <drawingml/table/tablecell.hxx>
+#include <vector>
+
+namespace oox::drawingml::table
+{
+class TableRow
+{
+public:
+ TableRow();
+
+ void setHeight(sal_Int32 nHeight) { mnHeight = nHeight; };
+ sal_Int32 getHeight() const { return mnHeight; };
+ std::vector<TableCell>& getTableCells() { return mvTableCells; };
+
+private:
+ sal_Int32 mnHeight;
+ std::vector<TableCell> mvTableCells;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablerowcontext.hxx b/oox/inc/drawingml/table/tablerowcontext.hxx
new file mode 100644
index 000000000..1b18e45d1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablerowcontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml::table
+{
+class TableRow;
+
+class TableRowContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableRowContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableRow& rTableRow);
+ virtual ~TableRowContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableRow& mrTableRow;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestyle.hxx b/oox/inc/drawingml/table/tablestyle.hxx
new file mode 100644
index 000000000..26c4216a7
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestyle.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+
+#include <drawingml/table/tablestylepart.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyle
+{
+public:
+
+ TableStyle();
+
+ OUString& getStyleId(){ return maStyleId; }
+ OUString& getStyleName() { return maStyleName; }
+
+ ::oox::drawingml::ShapeStyleRef& getBackgroundFillStyleRef(){ return maFillStyleRef; }
+
+ ::oox::drawingml::FillPropertiesPtr& getBackgroundFillProperties(){ return mpFillProperties; }
+
+ TableStylePart& getWholeTbl() { return maWholeTbl; }
+ TableStylePart& getBand1H() { return maBand1H; }
+ TableStylePart& getBand2H() { return maBand2H; }
+ TableStylePart& getBand1V() { return maBand1V; }
+ TableStylePart& getBand2V() { return maBand2V; }
+ TableStylePart& getLastCol() { return maLastCol; }
+ TableStylePart& getFirstCol() { return maFirstCol; }
+ TableStylePart& getLastRow() { return maLastRow; }
+ TableStylePart& getSeCell() { return maSeCell; }
+ TableStylePart& getSwCell() { return maSwCell; }
+ TableStylePart& getFirstRow() { return maFirstRow; }
+ TableStylePart& getNeCell() { return maNeCell; }
+ TableStylePart& getNwCell() { return maNwCell; }
+
+private:
+
+ OUString maStyleId;
+ OUString maStyleName;
+
+ ::oox::drawingml::ShapeStyleRef maFillStyleRef;
+
+ ::oox::drawingml::FillPropertiesPtr mpFillProperties;
+
+ TableStylePart maWholeTbl;
+ TableStylePart maBand1H;
+ TableStylePart maBand2H;
+ TableStylePart maBand1V;
+ TableStylePart maBand2V;
+ TableStylePart maLastCol;
+ TableStylePart maFirstCol;
+ TableStylePart maLastRow;
+ TableStylePart maSeCell;
+ TableStylePart maSwCell;
+ TableStylePart maFirstRow;
+ TableStylePart maNeCell;
+ TableStylePart maNwCell;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylecellstylecontext.hxx b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx
new file mode 100644
index 000000000..404e86a49
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleCellStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleCellStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart );
+ virtual ~TableStyleCellStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStylePart& mrTableStylePart;
+ sal_Int32 mnLineType;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylecontext.hxx b/oox/inc/drawingml/table/tablestylecontext.hxx
new file mode 100644
index 000000000..1ab003496
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylecontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ TableStyle& rTableStyle );
+ virtual ~TableStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStyle& mrTableStyle;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylelist.hxx b/oox/inc/drawingml/table/tablestylelist.hxx
new file mode 100644
index 000000000..7c0d1e2b1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylelist.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+
+#include <rtl/ustring.hxx>
+#include <memory>
+#include <vector>
+
+namespace oox::drawingml::table {
+
+class TableStyle;
+
+class TableStyleList
+{
+public:
+
+ TableStyleList();
+ ~TableStyleList();
+
+ OUString& getDefaultStyleId() { return maDefaultStyleId; };
+ std::vector< TableStyle >& getTableStyles(){ return maTableStyles; };
+
+private:
+
+ OUString maDefaultStyleId;
+ std::vector< TableStyle > maTableStyles;
+
+};
+
+typedef std::shared_ptr< TableStyleList > TableStyleListPtr;
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx
new file mode 100644
index 000000000..456877cbb
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX
+
+#include <drawingml/table/tablestylelist.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleListFragmentHandler final : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit TableStyleListFragmentHandler(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ TableStyleList& rTableStyleList );
+ virtual ~TableStyleListFragmentHandler() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override;
+
+private:
+
+ TableStyleList& mrTableStyleList;
+};
+
+} // namespace oox::drawingml::table
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylepart.hxx b/oox/inc/drawingml/table/tablestylepart.hxx
new file mode 100644
index 000000000..3d1251731
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylepart.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+
+#include <optional>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/textfont.hxx>
+#include <oox/drawingml/shape.hxx>
+
+#include <map>
+
+namespace oox::drawingml::table {
+
+class TableStylePart
+{
+public:
+
+ TableStylePart();
+
+ ::oox::drawingml::Color& getTextColor(){ return maTextColor; }
+ ::std::optional< bool >& getTextBoldStyle(){ return maTextBoldStyle; }
+ ::std::optional< bool >& getTextItalicStyle(){ return maTextItalicStyle; }
+ ::oox::drawingml::TextFont& getAsianFont(){ return maAsianFont; }
+ ::oox::drawingml::TextFont& getComplexFont(){ return maComplexFont; }
+ ::oox::drawingml::TextFont& getSymbolFont(){ return maSymbolFont; }
+ ::oox::drawingml::TextFont& getLatinFont(){ return maLatinFont; }
+
+ ::oox::drawingml::FillPropertiesPtr& getFillProperties(){ return mpFillProperties; }
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& getLineBorders(){ return maLineBorders; }
+
+ ::oox::drawingml::ShapeStyleRefMap& getStyleRefs(){ return maStyleRefs; }
+
+private:
+
+ ::oox::drawingml::Color maTextColor;
+ ::std::optional< bool > maTextBoldStyle;
+ ::std::optional< bool > maTextItalicStyle;
+ ::oox::drawingml::TextFont maAsianFont;
+ ::oox::drawingml::TextFont maComplexFont;
+ ::oox::drawingml::TextFont maSymbolFont;
+ ::oox::drawingml::TextFont maLatinFont;
+
+ ::oox::drawingml::FillPropertiesPtr mpFillProperties;
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr > maLineBorders;
+ ::oox::drawingml::ShapeStyleRefMap maStyleRefs;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestyletextstylecontext.hxx b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
new file mode 100644
index 000000000..7edeef1e8
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleTextStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleTextStyleContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ TableStylePart& rTableStylePart );
+ virtual ~TableStyleTextStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStylePart& mrTableStylePart;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx
new file mode 100644
index 000000000..245589e86
--- /dev/null
+++ b/oox/inc/drawingml/textbody.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbodyproperties.hxx>
+#include <drawingml/textliststyle.hxx>
+#include <drawingml/shape3dproperties.hxx>
+#include <oox/helper/refvector.hxx>
+
+namespace com::sun::star::text {
+ class XText;
+ class XTextCursor;
+}
+
+namespace oox::core { class XmlFilterBase; }
+
+namespace oox::drawingml {
+
+class TextParagraph;
+typedef RefVector< TextParagraph > TextParagraphVector;
+
+class TextBody
+{
+public:
+ TextBody();
+ TextBody( const TextBodyPtr& pBody );
+
+ const TextParagraphVector& getParagraphs() const { return maParagraphs; }
+ TextParagraph& addParagraph();
+
+ const TextListStyle& getTextListStyle() const { return maTextListStyle; }
+ TextListStyle& getTextListStyle() { return maTextListStyle; }
+
+ const TextBodyProperties& getTextProperties() const { return maTextProperties; }
+ TextBodyProperties& getTextProperties() { return maTextProperties; }
+
+ Text3DProperties& get3DProperties() { return ma3DProperties; }
+ const Text3DProperties& get3DProperties() const { return ma3DProperties; }
+
+ /** insert the text body at the text cursor */
+ void insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::text::XText > & xText,
+ const css::uno::Reference < css::text::XTextCursor > & xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStylePtr& pMasterTextListStyle ) const;
+ bool isEmpty() const;
+ OUString toString() const;
+
+ /** Returns whether the textbody had a rPr tag in it that alters it visually
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const;
+
+ /// Returns whether the textbody had a pPr tag in it
+ bool hasParagraphProperties() const;
+
+ /// Returns whether the textbody had a non-empty bodyPr tag in it
+ bool hasNoninheritedBodyProperties() const { return mbHasNoninheritedBodyProperties; }
+ /// Flags textbody as having a non-empty bodyPr tag
+ void setHasNoninheritedBodyProperties() { mbHasNoninheritedBodyProperties = true; }
+
+ /// Returns whether the textbody had a non-empty lstStyle tag in it
+ bool hasListStyleOnImport() const { return maTextListStyle.hasListStyleOnImport(); }
+
+ void ApplyStyleEmpty(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::text::XText > & xText,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStylePtr& pMasterTextListStylePtr) const;
+private:
+ TextParagraphVector maParagraphs;
+ TextBodyProperties maTextProperties;
+ /// Set if bodyPr tag in this textbody is non-empty during import
+ bool mbHasNoninheritedBodyProperties;
+ TextListStyle maTextListStyle;
+ Text3DProperties ma3DProperties;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx
new file mode 100644
index 000000000..e164e3520
--- /dev/null
+++ b/oox/inc/drawingml/textbodycontext.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+
+#include <drawingml/textbody.hxx>
+#include <drawingml/textrun.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class TextBodyContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, TextBody& rTextBody );
+ TextBodyContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr);
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TextBody& mrTextBody;
+ ShapePtr mpShapePtr;
+};
+
+// CT_RegularTextRun
+class RegularTextRunContext final : public ::oox::core::ContextHandler2
+{
+public:
+ RegularTextRunContext( ::oox::core::ContextHandler2Helper const & rParent, TextRunPtr const & pRunPtr );
+
+ virtual void onEndElement() override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual void onCharacters( const OUString& aChars ) override;
+
+private:
+ TextRunPtr mpRunPtr;
+ bool mbIsInText;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx
new file mode 100644
index 000000000..7cc1b9d80
--- /dev/null
+++ b/oox/inc/drawingml/textbodyproperties.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIES_HXX
+
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <optional>
+#include <array>
+
+class Size;
+
+namespace oox::drawingml {
+
+struct TextBodyProperties
+{
+ PropertyMap maPropertyMap;
+ OptValue< sal_Int32 > moRotation;
+ bool mbAnchorCtr;
+ OptValue< sal_Int32 > moVert;
+ bool moUpright = false;
+ std::array<std::optional<sal_Int32>, 4> moInsets;
+ std::optional< sal_Int32 > moTextOffUpper;
+ std::optional< sal_Int32 > moTextOffLeft;
+ std::optional< sal_Int32 > moTextOffLower;
+ std::optional< sal_Int32 > moTextOffRight;
+ css::drawing::TextVerticalAdjust meVA;
+ OUString msPrst;
+ /// Normal autofit: font scale (default: 100%).
+ sal_Int32 mnFontScale = 100000;
+ OUString msHorzOverflow;
+ OUString msVertOverflow;
+
+ std::array<std::optional<sal_Int32>, 4> maTextDistanceValues;
+
+ explicit TextBodyProperties();
+
+ void pushTextDistances(Size const& rShapeSize);
+ void readjustTextDistances(css::uno::Reference<css::drawing::XShape> const& xShape);
+ void pushVertSimulation();
+
+};
+
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodypropertiescontext.hxx b/oox/inc/drawingml/textbodypropertiescontext.hxx
new file mode 100644
index 000000000..d10d60d41
--- /dev/null
+++ b/oox/inc/drawingml/textbodypropertiescontext.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox::drawingml {
+
+struct TextBodyProperties;
+
+class TextBodyPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextBodyProperties& rTextBodyProp );
+
+ TextBodyPropertiesContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttributes, const ShapePtr& pShapePtr);
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TextBodyProperties& mrTextBodyProp;
+ ShapePtr mpShapePtr;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
new file mode 100644
index 000000000..49d412569
--- /dev/null
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
+
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/textfont.hxx>
+
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+
+namespace oox { class PropertySet; }
+
+namespace oox::drawingml {
+
+
+struct TextCharacterProperties
+{
+ PropertyMap maHyperlinkPropertyMap;
+ TextFont maLatinFont;
+ TextFont maLatinThemeFont;
+ TextFont maAsianFont;
+ TextFont maAsianThemeFont;
+ TextFont maComplexFont;
+ TextFont maComplexThemeFont;
+ TextFont maSymbolFont;
+ Color maUnderlineColor;
+ Color maHighlightColor;
+ OptValue< OUString > moLang;
+ OptValue< sal_Int32 > moHeight;
+ /// If a font scale has to be applied manually to moHeight.
+ OptValue< double > moFontScale;
+ OptValue< sal_Int32 > moSpacing;
+ OptValue< sal_Int32 > moUnderline;
+ OptValue< sal_Int32 > moBaseline;
+ OptValue< sal_Int32 > moStrikeout;
+ OptValue< sal_Int32 > moCaseMap;
+ OptValue< bool > moBold;
+ OptValue< bool > moItalic;
+ OptValue< bool > moUnderlineLineFollowText;
+ OptValue< bool > moUnderlineFillFollowText;
+ OptValue<LineProperties> moTextOutlineProperties;
+
+ FillProperties maFillProperties;
+ /// Set if there was a property set that alters run visually during import
+ bool mbHasVisualRunProperties;
+
+ std::vector<css::beans::PropertyValue> maTextEffectsProperties;
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const TextCharacterProperties& rSourceProps );
+
+ /** Returns the current character size. If possible the masterstyle should
+ have been applied before, otherwise the character size can be zero and
+ the default value is returned. */
+ float getCharHeightPoints( float fDefault ) const;
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ PropertyMap& rPropMap,
+ const ::oox::core::XmlFilterBase& rFilter ) const;
+
+ /** Writes the properties to the passed property set. */
+ void pushToPropSet(
+ PropertySet& rPropSet,
+ const ::oox::core::XmlFilterBase& rFilter ) const;
+
+ TextCharacterProperties() : mbHasVisualRunProperties(false) {}
+};
+
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textcharacterpropertiescontext.hxx b/oox/inc/drawingml/textcharacterpropertiescontext.hxx
new file mode 100644
index 000000000..b2df1b926
--- /dev/null
+++ b/oox/inc/drawingml/textcharacterpropertiescontext.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+struct TextCharacterProperties;
+
+class TextCharacterPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextCharacterPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ TextCharacterProperties& rTextCharacterProperties );
+ virtual ~TextCharacterPropertiesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TextCharacterProperties& mrTextCharacterProperties;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/texteffectscontext.hxx b/oox/inc/drawingml/texteffectscontext.hxx
new file mode 100644
index 000000000..9305bccce
--- /dev/null
+++ b/oox/inc/drawingml/texteffectscontext.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+#include <oox/helper/grabbagstack.hxx>
+#include <oox/core/contexthandler2.hxx>
+#include <memory>
+#include <vector>
+
+namespace oox::drawingml {
+
+class TextEffectsContext final : public oox::core::ContextHandler2
+{
+public:
+ TextEffectsContext(oox::core::ContextHandler2Helper const & rParent,
+ sal_Int32 aElementToken,
+ std::vector<css::beans::PropertyValue>& rTextEffectsProperties);
+ virtual ~TextEffectsContext() override;
+
+ virtual void onStartElement(const oox::AttributeList& rAttribs) override;
+ virtual void onEndElement() override;
+
+ virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const oox::AttributeList& rAttribs) override;
+
+private:
+ void processAttributes(const AttributeList& rAttribs);
+ void pushAttributeToGrabBag (sal_Int32 aAttributeId, const OUString& rElementName, const AttributeList& rAttribs);
+
+ std::vector<css::beans::PropertyValue>& mrTextEffectsProperties;
+ std::unique_ptr<oox::GrabBagStack> mpGrabBagStack;
+ sal_Int32 mnCurrentElement;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfield.hxx b/oox/inc/drawingml/textfield.hxx
new file mode 100644
index 000000000..c26a8518c
--- /dev/null
+++ b/oox/inc/drawingml/textfield.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFIELD_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFIELD_HXX
+
+#include <drawingml/textrun.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+
+enum class SvxTimeFormat;
+enum class SvxDateFormat;
+
+namespace oox::drawingml {
+
+struct TextCharacterProperties;
+
+class TextField final
+ : public TextRun
+{
+public:
+ TextField();
+
+ TextParagraphProperties& getTextParagraphProperties() { return maTextParagraphProperties; }
+ const TextParagraphProperties& getTextParagraphProperties() const { return maTextParagraphProperties; }
+
+ void setType( const OUString& sType ) { msType = sType; }
+ const OUString& getType() const { return msType; }
+ void setUuid( const OUString & sUuid ) { msUuid = sUuid; }
+ const OUString& getUuid() const { return msUuid; }
+
+ virtual sal_Int32 insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::text::XText > & xText,
+ const css::uno::Reference < css::text::XTextCursor > &xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float nDefaultCharHeight) const override;
+
+ /** Gets the corresponding LO Date format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxDateFormat getLODateFormat( std::u16string_view rDateTimeType );
+ /** Gets the corresponding LO Time format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxTimeFormat getLOTimeFormat( std::u16string_view rDateTimeType );
+private:
+ TextParagraphProperties maTextParagraphProperties;
+ OUString msType;
+ OUString msUuid;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfieldcontext.hxx b/oox/inc/drawingml/textfieldcontext.hxx
new file mode 100644
index 000000000..3bb8a3ccd
--- /dev/null
+++ b/oox/inc/drawingml/textfieldcontext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class TextField;
+
+class TextFieldContext final
+ : public ::oox::core::ContextHandler2
+{
+public:
+ TextFieldContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextField& rTextField);
+ virtual void onEndElement( ) override;
+ virtual void onCharacters( const OUString& aChars ) override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext(
+ sal_Int32 aElementToken, const ::oox::AttributeList& rAttributes ) override;
+
+private:
+ TextField& mrTextField;
+ bool mbIsInText;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfont.hxx b/oox/inc/drawingml/textfont.hxx
new file mode 100644
index 000000000..6bdf13ab8
--- /dev/null
+++ b/oox/inc/drawingml/textfont.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFONT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFONT_HXX
+
+#include <rtl/ustring.hxx>
+
+namespace oox { class AttributeList; }
+namespace oox::core { class XmlFilterBase; }
+
+namespace oox::drawingml {
+
+
+/** carries a CT_TextFont*/
+class TextFont
+{
+public:
+ explicit TextFont();
+
+ /** Sets attributes from the passed attribute list. */
+ void setAttributes( const AttributeList& rAttribs );
+
+ /** Sets font name and init other attributes. */
+ void setAttributes( const OUString& rFontName );
+
+ /** Overwrites this text font with the passed text font, if it is used. */
+ void assignIfUsed( const TextFont& rTextFont );
+
+ /** Returns the font name, pitch, and family; tries to resolve theme
+ placeholder names, e.g. '+mj-lt' for the major latin theme font. */
+ bool getFontData(
+ OUString& rFontName,
+ sal_Int16& rnFontPitch,
+ sal_Int16& rnFontFamily,
+ const ::oox::core::XmlFilterBase& rFilter ) const;
+
+private:
+ bool implGetFontData(
+ OUString& rFontName,
+ sal_Int16& rnFontPitch,
+ sal_Int16& rnFontFamily ) const;
+
+private:
+ OUString maTypeface;
+ OUString maPanose;
+ sal_Int32 mnPitch;
+ sal_Int32 mnCharset;
+};
+
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx
new file mode 100644
index 000000000..464e48756
--- /dev/null
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+
+#include <drawingml/textparagraphproperties.hxx>
+#include <array>
+
+namespace oox::drawingml
+{
+constexpr int NUM_TEXT_LIST_STYLE_ENTRIES = 9;
+typedef std::array<TextParagraphProperties, NUM_TEXT_LIST_STYLE_ENTRIES>
+ TextParagraphPropertiesArray;
+
+class TextListStyle
+{
+public:
+ TextListStyle();
+ ~TextListStyle();
+
+ TextListStyle(const TextListStyle& rStyle);
+ TextListStyle& operator=(const TextListStyle& rStyle);
+
+ void apply(const TextListStyle& rTextListStyle);
+
+ const TextParagraphPropertiesArray& getListStyle() const { return maListStyle; };
+ TextParagraphPropertiesArray& getListStyle() { return maListStyle; };
+
+ const TextParagraphPropertiesArray& getAggregationListStyle() const
+ {
+ return maAggregationListStyle;
+ };
+ TextParagraphPropertiesArray& getAggregationListStyle() { return maAggregationListStyle; };
+
+ /// Flags ListStyle as having a non-empty lstStyle tag on import
+ void setHasListStyleOnImport() { mbHasListStyleOnImport = true; }
+ /** Returns whether the lstStyle tag was non-empty on import
+ *
+ * @return true if list style has its own noninherited properties.
+ */
+ bool hasListStyleOnImport() const { return mbHasListStyleOnImport; }
+
+#ifdef DBG_UTIL
+ void dump() const;
+#endif
+
+private:
+ TextParagraphPropertiesArray maListStyle;
+ TextParagraphPropertiesArray maAggregationListStyle;
+ /// Set if ListStyle has a non-empty lstStyle tag on import
+ bool mbHasListStyleOnImport;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textliststylecontext.hxx b/oox/inc/drawingml/textliststylecontext.hxx
new file mode 100644
index 000000000..52b2a08cb
--- /dev/null
+++ b/oox/inc/drawingml/textliststylecontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+
+#include <drawingml/textliststyle.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class TextListStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextListStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TextListStyle& rTextListStyle );
+ virtual ~TextListStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TextListStyle& mrTextListStyle;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraph.hxx b/oox/inc/drawingml/textparagraph.hxx
new file mode 100644
index 000000000..4920c99da
--- /dev/null
+++ b/oox/inc/drawingml/textparagraph.hxx
@@ -0,0 +1,108 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+
+#include <memory>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/refvector.hxx>
+#include <drawingml/textrun.hxx>
+#include <drawingml/textliststyle.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+
+// The height the bullet is relative to is different in OOXML
+#define OOX_BULLET_LIST_SCALE_FACTOR 0.7f
+
+namespace oox::formulaimport {
+ class XmlStreamBuilder;
+}
+
+namespace oox::drawingml {
+
+typedef RefVector< TextRun > TextRunVector;
+
+class TextParagraph
+{
+public:
+ TextParagraph();
+ ~TextParagraph();
+
+ TextRunVector& getRuns() { return maRuns; }
+ const TextRunVector& getRuns() const { return maRuns; }
+ void addRun( const TextRunPtr & pRun ) { maRuns.push_back( pRun ); }
+
+ TextParagraphProperties& getProperties() { return maProperties; }
+ const TextParagraphProperties& getProperties() const { return maProperties; }
+ /// Flags the textparagraph as having a pPr tag in it
+ void setHasProperties() { mbHasProperties = true; }
+ /// Returns whether the textparagraph had an pPr tag in it during import
+ bool hasProperties() const { return mbHasProperties; }
+
+ TextCharacterProperties& getEndProperties() { return maEndProperties; }
+ const TextCharacterProperties& getEndProperties() const { return maEndProperties; }
+
+ TextCharacterProperties getCharacterStyle(
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rMasterTextListStyle,
+ const TextListStyle& rTextListStyle) const;
+
+ TextParagraphProperties* getParagraphStyle(
+ const TextListStyle& rTextListStyle) const;
+
+ void insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::text::XText > & xText,
+ const css::uno::Reference < css::text::XTextCursor > &xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rMasterTextListStyle,
+ const TextListStyle& rTextListStyle,
+ bool bFirst,
+ float nDefaultCharHeight,
+ sal_Int32 nAutofitFontScale) const;
+
+ bool HasMathXml() const
+ {
+ return m_pMathXml != nullptr;
+ }
+ formulaimport::XmlStreamBuilder & GetMathXml();
+
+ /** Returns whether textparagraph had a rPr tag in it that alters it visually
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const;
+
+private:
+ TextParagraphProperties maProperties;
+ bool mbHasProperties;
+ TextCharacterProperties maEndProperties;
+ TextRunVector maRuns;
+ // temporarily store this here
+ std::unique_ptr<formulaimport::XmlStreamBuilder> m_pMathXml;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx
new file mode 100644
index 000000000..083b61e37
--- /dev/null
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <drawingml/textcharacterproperties.hxx>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <drawingml/textfont.hxx>
+#include <drawingml/textspacing.hxx>
+#include <optional>
+
+namespace com::sun::star {
+ namespace graphic { class XGraphic; }
+}
+
+namespace oox::drawingml {
+
+class BulletList
+{
+public:
+ BulletList( );
+ bool is() const;
+ void apply( const BulletList& );
+ void pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, PropertyMap& xPropMap ) const;
+ void setBulletChar( const OUString & sChar );
+ void setStartAt( sal_Int32 nStartAt ){ mnStartAt <<= static_cast< sal_Int16 >( nStartAt ); }
+ void setType( sal_Int32 nType );
+ void setNone( );
+ void setSuffixParenBoth();
+ void setSuffixParenRight();
+ void setSuffixPeriod();
+ void setSuffixNone();
+ void setSuffixMinusRight();
+ void setBulletSize(sal_Int16 nSize);
+ void setBulletAspectRatio(double nAspectRatio);
+ void setFontSize(sal_Int16 nSize);
+ void setStyleName( const OUString& rStyleName ) { maStyleName <<= rStyleName; }
+ void setGraphic( css::uno::Reference< css::graphic::XGraphic > const & rXGraphic );
+
+ std::shared_ptr< ::oox::drawingml::Color > maBulletColorPtr;
+ css::uno::Any mbBulletColorFollowText;
+ css::uno::Any mbBulletFontFollowText;
+ css::uno::Any mbBulletSizeFollowText;
+ ::oox::drawingml::TextFont maBulletFont;
+ css::uno::Any msBulletChar;
+ css::uno::Any mnStartAt;
+ css::uno::Any mnNumberingType;
+ css::uno::Any msNumberingPrefix;
+ css::uno::Any msNumberingSuffix;
+ css::uno::Any mnSize;
+ css::uno::Any mnAspectRatio; // Width/Height
+ css::uno::Any mnFontSize;
+ css::uno::Any maStyleName;
+ css::uno::Any maGraphic;
+};
+
+class TextParagraphProperties
+{
+public:
+
+ TextParagraphProperties();
+
+ void setLevel( sal_Int16 nLevel ) { mnLevel = nLevel; }
+ sal_Int16 getLevel( ) const { return mnLevel; }
+ PropertyMap& getTextParagraphPropertyMap() { return maTextParagraphPropertyMap; }
+ BulletList& getBulletList() { return maBulletList; }
+ TextCharacterProperties& getTextCharacterProperties() { return maTextCharacterProperties; }
+ const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; }
+
+ TextSpacing& getParaTopMargin() { return maParaTopMargin; }
+ TextSpacing& getParaBottomMargin() { return maParaBottomMargin; }
+ std::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; }
+ std::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; }
+
+ std::optional< css::style::ParagraphAdjust >& getParaAdjust() { return moParaAdjust; }
+ void setParaAdjust( css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; }
+
+ TextSpacing& getLineSpacing() { return maLineSpacing; }
+ void setLineSpacing( const TextSpacing& rLineSpacing ) { maLineSpacing = rLineSpacing; }
+
+ void apply( const TextParagraphProperties& rSourceProps );
+ void pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase,
+ const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
+ PropertyMap& rioBulletList,
+ const BulletList* pMasterBuList,
+ bool bApplyBulletList,
+ float fFontSize,
+ sal_Int32 nAutofitFontScale = 100000,
+ bool bPushDefaultValues = false ) const;
+
+ /** Returns the largest character size of this paragraph. If possible the
+ masterstyle should have been applied before, otherwise the character
+ size can be zero and the default value is returned. */
+ float getCharHeightPoints( float fDefault ) const;
+
+#ifdef DBG_UTIL
+ void dump() const;
+#endif
+
+private:
+
+ TextCharacterProperties maTextCharacterProperties;
+ PropertyMap maTextParagraphPropertyMap;
+ BulletList maBulletList;
+ TextSpacing maParaTopMargin;
+ TextSpacing maParaBottomMargin;
+ std::optional< sal_Int32 > moParaLeftMargin;
+ std::optional< sal_Int32 > moFirstLineIndentation;
+ std::optional< css::style::ParagraphAdjust > moParaAdjust;
+ sal_Int16 mnLevel;
+ TextSpacing maLineSpacing;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
new file mode 100644
index 000000000..33b8493aa
--- /dev/null
+++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+
+#include <vector>
+
+#include <com/sun/star/style/TabStop.hpp>
+#include <drawingml/textparagraphproperties.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class TextParagraphPropertiesContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextParagraphPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextParagraphProperties& rTextParagraphProperties );
+ virtual ~TextParagraphPropertiesContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TextParagraphProperties& mrTextParagraphProperties;
+ BulletList& mrBulletList;
+ std::vector< css::style::TabStop > maTabList;
+ std::shared_ptr< BlipFillProperties > mxBlipProps;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textrun.hxx b/oox/inc/drawingml/textrun.hxx
new file mode 100644
index 000000000..b3d1fe041
--- /dev/null
+++ b/oox/inc/drawingml/textrun.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+
+#include <memory>
+
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <drawingml/textcharacterproperties.hxx>
+
+namespace oox::drawingml {
+
+class TextRun
+{
+public:
+ TextRun();
+ virtual ~TextRun();
+
+ OUString& getText() { return msText; }
+ const OUString& getText() const { return msText; }
+
+ TextCharacterProperties& getTextCharacterProperties() { return maTextCharacterProperties; }
+ const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; }
+
+ void setLineBreak() { mbIsLineBreak = true; }
+ bool isLineBreak() const { return mbIsLineBreak; }
+
+ /** Returns whether the textrun had properties that alter it visually in its rPr tag
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const { return maTextCharacterProperties.mbHasVisualRunProperties; }
+
+ virtual sal_Int32 insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::text::XText >& xText,
+ const css::uno::Reference < css::text::XTextCursor >& xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float nDefaultCharHeight) const;
+
+private:
+ OUString msText;
+ TextCharacterProperties maTextCharacterProperties;
+ bool mbIsLineBreak;
+};
+
+typedef std::shared_ptr< TextRun > TextRunPtr;
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textspacing.hxx b/oox/inc/drawingml/textspacing.hxx
new file mode 100644
index 000000000..c40e53fcf
--- /dev/null
+++ b/oox/inc/drawingml/textspacing.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTSPACING_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTSPACING_HXX
+
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox::drawingml {
+
+
+ /** carries a CT_TextSpacing */
+ class TextSpacing
+ {
+ public:
+ enum class Unit {
+ Points = 0,
+ Percent
+ };
+ TextSpacing()
+ : nUnit( Unit::Points ), nValue( 0 ), bHasValue( false ), bExactValue( false )
+ {
+ }
+ TextSpacing( sal_Int32 nPoints ) : nUnit( Unit::Points ), nValue( nPoints ), bHasValue( true ), bExactValue ( false ){};
+ css::style::LineSpacing toLineSpacing() const
+ {
+ css::style::LineSpacing aSpacing;
+ if (nUnit == Unit::Percent)
+ aSpacing.Mode = css::style::LineSpacingMode::PROP;
+ else if (bExactValue)
+ aSpacing.Mode = css::style::LineSpacingMode::FIX;
+ else
+ aSpacing.Mode = css::style::LineSpacingMode::MINIMUM;
+ aSpacing.Height = static_cast< sal_Int16 >( nUnit == Unit::Percent ? nValue / 1000 : nValue );
+ return aSpacing;
+ }
+ sal_Int32 toMargin( float fFontSize ) const
+ {
+ if ( nUnit == Unit::Percent )
+ return GetTextSpacingPoint(static_cast<sal_Int32>((fFontSize*nValue)/1000));
+ else
+ return nValue;
+ }
+ Unit nUnit;
+ sal_Int32 nValue;
+ bool bHasValue;
+ bool bExactValue;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/themeelementscontext.hxx b/oox/inc/drawingml/themeelementscontext.hxx
new file mode 100644
index 000000000..4c113762e
--- /dev/null
+++ b/oox/inc/drawingml/themeelementscontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml
+{
+class Theme;
+
+class ThemeElementsContext final : public oox::core::ContextHandler2
+{
+public:
+ ThemeElementsContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rTheme);
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ Theme& mrTheme;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/transform2dcontext.hxx b/oox/inc/drawingml/transform2dcontext.hxx
new file mode 100644
index 000000000..f54b02493
--- /dev/null
+++ b/oox/inc/drawingml/transform2dcontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class Shape;
+
+/** context to import a CT_Transform2D */
+class Transform2DContext final : public ::oox::core::ContextHandler2
+{
+public:
+ Transform2DContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes, Shape& rShape, bool btxXfrm = false ) noexcept;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ Shape& mrShape;
+ bool mbtxXfrm;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/ooxresid.hxx b/oox/inc/ooxresid.hxx
new file mode 100644
index 000000000..c374b6645
--- /dev/null
+++ b/oox/inc/ooxresid.hxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_INC_RESID_HXX
+#define INCLUDED_OOX_INC_RESID_HXX
+
+#include <rtl/ustring.hxx>
+#include <unotools/resmgr.hxx>
+
+OUString OoxResId(TranslateId aId);
+OUString URLResId(TranslateId aId);
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/inc/pch/precompiled_oox.cxx b/oox/inc/pch/precompiled_oox.cxx
new file mode 100644
index 000000000..52dbf23b5
--- /dev/null
+++ b/oox/inc/pch/precompiled_oox.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_oox.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx
new file mode 100644
index 000000000..691c0fc5c
--- /dev/null
+++ b/oox/inc/pch/precompiled_oox.hxx
@@ -0,0 +1,285 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2021-09-28 05:37:38 using:
+ ./bin/update_pch oox oox --cutoff=6 --exclude:system --exclude:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./oox/inc/pch/precompiled_oox.hxx "make oox.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <array>
+#include <cassert>
+#include <cmath>
+#include <cstddef>
+#include <cstdlib>
+#include <functional>
+#include <iomanip>
+#include <limits.h>
+#include <limits>
+#include <map>
+#include <math.h>
+#include <memory>
+#include <new>
+#include <optional>
+#include <ostream>
+#include <set>
+#include <string.h>
+#include <string_view>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#include <utility>
+#include <vector>
+#include <boost/algorithm/string.hpp>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/doublecheckedlocking.h>
+#include <osl/endian.h>
+#include <osl/file.hxx>
+#include <osl/getglobalmutex.hxx>
+#include <osl/interlck.h>
+#include <osl/mutex.hxx>
+#include <osl/thread.h>
+#include <rtl/bootstrap.hxx>
+#include <rtl/character.hxx>
+#include <rtl/cipher.h>
+#include <rtl/digest.h>
+#include <rtl/instance.hxx>
+#include <rtl/locale.h>
+#include <rtl/math.h>
+#include <rtl/math.hxx>
+#include <rtl/random.h>
+#include <rtl/ref.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/string.hxx>
+#include <rtl/stringconcat.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/tencinfo.h>
+#include <rtl/textenc.h>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <vcl/bitmap.hxx>
+#include <vcl/cairo.hxx>
+#include <vcl/devicecoordinate.hxx>
+#include <vcl/dllapi.h>
+#include <vcl/fntstyle.hxx>
+#include <vcl/font.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/metaactiontypes.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/region.hxx>
+#include <vcl/rendercontext/AddFontSubstituteFlags.hxx>
+#include <vcl/rendercontext/AntialiasingFlags.hxx>
+#include <vcl/rendercontext/DrawGridFlags.hxx>
+#include <vcl/rendercontext/DrawImageFlags.hxx>
+#include <vcl/rendercontext/DrawModeFlags.hxx>
+#include <vcl/rendercontext/DrawTextFlags.hxx>
+#include <vcl/rendercontext/GetDefaultFontFlags.hxx>
+#include <vcl/rendercontext/ImplMapRes.hxx>
+#include <vcl/rendercontext/InvertFlags.hxx>
+#include <vcl/rendercontext/RasterOp.hxx>
+#include <vcl/rendercontext/SalLayoutFlags.hxx>
+#include <vcl/rendercontext/State.hxx>
+#include <vcl/rendercontext/SystemTextColorFlags.hxx>
+#include <vcl/salnativewidgets.hxx>
+#include <vcl/vclreferencebase.hxx>
+#include <vcl/wall.hxx>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/color/bcolor.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2enums.hxx>
+#include <com/sun/star/awt/DeviceInfo.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/xml/sax/FastToken.hpp>
+#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+#include <com/sun/star/xml/sax/XFastContextHandler.hpp>
+#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <drawingml/chart/chartcontextbase.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <drawingml/chart/converterbase.hxx>
+#include <drawingml/chart/objectformatter.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <drawingml/textfont.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textspacing.hxx>
+#include <filter/msfilter/msfilterdllapi.h>
+#include <i18nlangtag/lang.h>
+#include <o3tl/cow_wrapper.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <sax/fastattribs.hxx>
+#include <sax/fshelper.hxx>
+#include <sax/saxdllapi.h>
+#include <svl/poolitem.hxx>
+#include <svl/svldllapi.h>
+#include <svl/typedwhich.hxx>
+#include <svx/msdffdef.hxx>
+#include <svx/svdobjkind.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/color.hxx>
+#include <tools/degree.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/fldunit.hxx>
+#include <tools/fontenum.hxx>
+#include <tools/fract.hxx>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <tools/long.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/poly.hxx>
+#include <tools/ref.hxx>
+#include <tools/solar.h>
+#include <tools/stream.hxx>
+#include <tools/toolsdllapi.h>
+#include <typelib/typedescription.h>
+#include <uno/data.h>
+#include <uno/sequence2.h>
+#include <unotools/fontdefs.hxx>
+#include <unotools/resmgr.hxx>
+#include <unotools/syslocale.hxx>
+#include <unotools/unotoolsdllapi.h>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <oox/core/contexthandler.hxx>
+#include <oox/core/contexthandler2.hxx>
+#include <oox/core/fragmenthandler.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/core/relations.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/dllapi.h>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+#include <oox/drawingml/chart/modelbase.hxx>
+#include <oox/drawingml/clrscheme.hxx>
+#include <oox/drawingml/color.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/export/utils.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/binarystreambase.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/helper/refmap.hxx>
+#include <oox/helper/refvector.hxx>
+#include <oox/helper/storagebase.hxx>
+#include <oox/helper/textinputstream.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/ppt/comments.hxx>
+#include <oox/ppt/headerfooter.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokenmap.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/strings.hrc b/oox/inc/strings.hrc
new file mode 100644
index 000000000..cd107aa36
--- /dev/null
+++ b/oox/inc/strings.hrc
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef OOX_STRINGS_HRC
+#define OOX_STRINGS_HRC
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+#define STR_DIAGRAM_TITLE NC_("STR_DIAGRAM_TITLE", "Chart Title")
+#define STR_DIAGRAM_AXISTITLE NC_("STR_DIAGRAM_AXISTITLE", "Axis Title")
+#define STR_SLIDE_NAME NC_("STR_SLIDE_NAME", "Slide" )
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/qa/token/tokenmap-test.cxx b/oox/qa/token/tokenmap-test.cxx
new file mode 100644
index 000000000..058f7c16e
--- /dev/null
+++ b/oox/qa/token/tokenmap-test.cxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+
+#include <oox/token/tokenmap.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace com::sun::star::uno;
+
+namespace oox {
+
+class TokenmapTest: public CppUnit::TestFixture
+{
+public:
+ void test_roundTrip();
+
+ CPPUNIT_TEST_SUITE(TokenmapTest);
+
+ CPPUNIT_TEST(test_roundTrip);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ TokenMap tokenMap;
+};
+
+void TokenmapTest::test_roundTrip()
+{
+ for ( sal_Int32 nToken = 0; nToken < XML_TOKEN_COUNT; ++nToken )
+ {
+ // check that the getIdentifier <-> getToken roundtrip works
+ Sequence< sal_Int8 > rUtf8Name = tokenMap.getUtf8TokenName(nToken);
+ sal_Int32 ret = tokenMap.getTokenFromUTF8(
+ reinterpret_cast< const char * >(rUtf8Name.getConstArray()),
+ rUtf8Name.getLength() );
+ CPPUNIT_ASSERT_EQUAL(ret, nToken);
+ }
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TokenmapTest);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx
new file mode 100644
index 000000000..cbdf99b65
--- /dev/null
+++ b/oox/qa/unit/CryptoTest.cxx
@@ -0,0 +1,439 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <config_oox.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestFixture.h>
+
+#include <algorithm>
+#include <tools/stream.hxx>
+#include <unotools/streamwrap.hxx>
+
+#include <oox/crypto/Standard2007Engine.hxx>
+#include <oox/crypto/AgileEngine.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+
+#if USE_TLS_NSS
+#include <nss.h>
+#endif
+
+using namespace css;
+
+class CryptoTest : public CppUnit::TestFixture
+{
+public:
+ virtual ~CryptoTest() override;
+ void testCryptoHash();
+ void testRoundUp();
+ void testStandard2007();
+ void testAgileEncryptionVerifier();
+ void testAgileEncryptionInfoWritingAndParsing();
+ void testAgileDataIntegrityHmacKey();
+ void testAgileEncryptingAndDecrypting();
+
+ CPPUNIT_TEST_SUITE(CryptoTest);
+ CPPUNIT_TEST(testCryptoHash);
+ CPPUNIT_TEST(testRoundUp);
+ CPPUNIT_TEST(testStandard2007);
+ CPPUNIT_TEST(testAgileEncryptionVerifier);
+ CPPUNIT_TEST(testAgileEncryptionInfoWritingAndParsing);
+ CPPUNIT_TEST(testAgileDataIntegrityHmacKey);
+ CPPUNIT_TEST(testAgileEncryptingAndDecrypting);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+namespace
+{
+std::string toString(std::vector<sal_uInt8> const& aInput)
+{
+ std::stringstream aStream;
+ for (auto const& aValue : aInput)
+ {
+ aStream << std::setw(2) << std::setfill('0') << std::hex << static_cast<int>(aValue);
+ }
+
+ return aStream.str();
+}
+}
+
+CryptoTest::~CryptoTest()
+{
+#if USE_TLS_NSS
+ NSS_Shutdown();
+#endif
+}
+
+void CryptoTest::testCryptoHash()
+{
+ // Check examples from Wikipedia (https://en.wikipedia.org/wiki/HMAC)
+ OString aContentString("The quick brown fox jumps over the lazy dog");
+ std::vector<sal_uInt8> aContent(aContentString.getStr(),
+ aContentString.getStr() + aContentString.getLength());
+ std::vector<sal_uInt8> aKey = { 'k', 'e', 'y' };
+ {
+ oox::crypto::CryptoHash aCryptoHash(aKey, oox::crypto::CryptoHashType::SHA1);
+ aCryptoHash.update(aContent);
+ std::vector<sal_uInt8> aHash = aCryptoHash.finalize();
+ CPPUNIT_ASSERT_EQUAL(std::string("de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"),
+ toString(aHash));
+ }
+
+ {
+ oox::crypto::CryptoHash aCryptoHash(aKey, oox::crypto::CryptoHashType::SHA256);
+ aCryptoHash.update(aContent);
+ std::vector<sal_uInt8> aHash = aCryptoHash.finalize();
+ CPPUNIT_ASSERT_EQUAL(
+ std::string("f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"),
+ toString(aHash));
+ }
+
+ {
+ oox::crypto::CryptoHash aCryptoHash(aKey, oox::crypto::CryptoHashType::SHA512);
+ aCryptoHash.update(aContent);
+ std::vector<sal_uInt8> aHash = aCryptoHash.finalize();
+ CPPUNIT_ASSERT_EQUAL(
+ std::string("b42af09057bac1e2d41708e48a902e09b5ff7f12ab428a4fe86653c73dd248fb82f948a549"
+ "f7b791a5b41915ee4d1ec3935357e4e2317250d0372afa2ebeeb3a"),
+ toString(aHash));
+ }
+}
+
+void CryptoTest::testRoundUp()
+{
+ CPPUNIT_ASSERT_EQUAL(16, oox::crypto::roundUp(16, 16));
+ CPPUNIT_ASSERT_EQUAL(32, oox::crypto::roundUp(32, 16));
+ CPPUNIT_ASSERT_EQUAL(64, oox::crypto::roundUp(64, 16));
+
+ CPPUNIT_ASSERT_EQUAL(16, oox::crypto::roundUp(01, 16));
+ CPPUNIT_ASSERT_EQUAL(32, oox::crypto::roundUp(17, 16));
+ CPPUNIT_ASSERT_EQUAL(32, oox::crypto::roundUp(31, 16));
+}
+
+void CryptoTest::testStandard2007()
+{
+ oox::crypto::Standard2007Engine aEngine;
+ {
+ aEngine.setupEncryption("Password");
+
+ SvMemoryStream aEncryptionInfo;
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), false);
+
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(224), aEncryptionInfo.GetSize());
+ }
+
+ SvMemoryStream aUnencryptedInput;
+ SvMemoryStream aEncryptedStream;
+
+ OString aTestString = "1234567890ABCDEFG";
+
+ aUnencryptedInput.WriteBytes(aTestString.getStr(), aTestString.getLength() + 1);
+ aUnencryptedInput.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aUnencryptedInput));
+ uno::Reference<io::XOutputStream> xOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptedStream));
+
+ aEngine.encrypt(xInputStream, xOutputStream, aUnencryptedInput.GetSize());
+
+ xOutputStream->flush();
+
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>(aEncryptedStream.GetData());
+ sal_uInt64 nSize = aEncryptedStream.GetSize();
+
+ std::vector<sal_uInt8> aData(nSize);
+ std::copy(pData, pData + nSize, aData.data());
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(40), nSize);
+ }
+
+ aEncryptedStream.Seek(STREAM_SEEK_TO_BEGIN);
+ SvMemoryStream aUnencryptedOutput;
+
+ {
+ oox::BinaryXInputStream aBinaryInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptedStream), true);
+ oox::BinaryXOutputStream aBinaryOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aUnencryptedOutput), true);
+
+ aEngine.decrypt(aBinaryInputStream, aBinaryOutputStream);
+ aBinaryOutputStream.close();
+ aBinaryInputStream.close();
+
+ const char* pData = static_cast<const char*>(aUnencryptedOutput.GetData());
+ sal_uInt64 nSize = aUnencryptedOutput.GetSize();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(18), nSize);
+
+ OString aString(pData);
+
+ CPPUNIT_ASSERT_EQUAL(aTestString, aString);
+ }
+}
+
+void CryptoTest::testAgileEncryptionVerifier()
+{
+ oox::crypto::AgileEngine aEngine;
+
+ OUString aPassword("Password");
+
+ aEngine.setupEncryptionParameters({ 100000, 16, 128, 20, 16, OUString("AES"),
+ OUString("ChainingModeCBC"), OUString("SHA1") });
+
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+
+ aEngine.setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"),
+ OUString("ChainingModeCBC"), OUString("SHA512") });
+
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+}
+
+void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
+{
+ OUString aPassword("Password");
+ std::vector<sal_uInt8> aKeyDataSalt;
+
+ { // Preset AES128 - SHA1
+ SvMemoryStream aEncryptionInfo;
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ aEngine.setPreset(oox::crypto::AgileEncryptionPreset::AES_128_SHA1);
+ aEngine.setupEncryption(aPassword);
+ aKeyDataSalt = aEngine.getInfo().keyDataSalt;
+
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), true);
+
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(996), aEncryptionInfo.GetSize());
+ }
+
+ aEncryptionInfo.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptionInfo));
+
+ xInputStream->skipBytes(4); // Encryption type -> Agile
+
+ CPPUNIT_ASSERT(aEngine.readEncryptionInfo(xInputStream));
+
+ oox::crypto::AgileEncryptionInfo& rInfo = aEngine.getInfo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100000), rInfo.spinCount);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.saltSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(128), rInfo.keyBits);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(20), rInfo.hashSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
+ CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(OUString("SHA1"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
+
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+ }
+ }
+
+ { // Preset AES256 - SHA512
+ SvMemoryStream aEncryptionInfo;
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ aEngine.setPreset(oox::crypto::AgileEncryptionPreset::AES_256_SHA512);
+ aEngine.setupEncryption(aPassword);
+ aKeyDataSalt = aEngine.getInfo().keyDataSalt;
+
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), true);
+
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(1112), aEncryptionInfo.GetSize());
+ }
+
+ aEncryptionInfo.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptionInfo));
+
+ xInputStream->skipBytes(4); // Encryption type -> Agile
+
+ CPPUNIT_ASSERT(aEngine.readEncryptionInfo(xInputStream));
+
+ oox::crypto::AgileEncryptionInfo& rInfo = aEngine.getInfo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100000), rInfo.spinCount);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.saltSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(256), rInfo.keyBits);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(64), rInfo.hashSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
+ CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(OUString("SHA512"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
+
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+ }
+ }
+}
+
+void CryptoTest::testAgileDataIntegrityHmacKey()
+{
+ OUString aPassword("Password");
+
+ std::vector<sal_uInt8> aKeyDataSalt;
+
+ std::vector<sal_uInt8> aHmacKey;
+ std::vector<sal_uInt8> aHmacEncryptedKey;
+
+ SvMemoryStream aEncryptionInfo;
+ {
+ oox::crypto::AgileEngine aEngine;
+ aEngine.setupEncryption(aPassword);
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), true);
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+
+ aHmacKey = aEngine.getInfo().hmacKey;
+ aKeyDataSalt = aEngine.getInfo().keyDataSalt;
+ aHmacEncryptedKey = aEngine.getInfo().hmacEncryptedKey;
+ }
+
+ aEncryptionInfo.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptionInfo));
+
+ xInputStream->skipBytes(4); // Encryption type -> Agile
+
+ CPPUNIT_ASSERT(aEngine.readEncryptionInfo(xInputStream));
+ CPPUNIT_ASSERT(aEngine.generateEncryptionKey(aPassword));
+
+ CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(aEngine.getInfo().keyDataSalt));
+
+ CPPUNIT_ASSERT_EQUAL(toString(aHmacEncryptedKey),
+ toString(aEngine.getInfo().hmacEncryptedKey));
+
+ CPPUNIT_ASSERT_EQUAL(size_t(64), aHmacKey.size());
+ CPPUNIT_ASSERT_EQUAL(toString(aHmacKey), toString(aEngine.getInfo().hmacKey));
+ }
+}
+
+void CryptoTest::testAgileEncryptingAndDecrypting()
+{
+ OUString aPassword("Password");
+
+ SvMemoryStream aEncryptionInfo;
+ SvMemoryStream aEncryptedStream;
+
+ OString aTestString = "1234567890ABCDEFGH";
+
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ // Setup input
+ SvMemoryStream aUnencryptedInput;
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aUnencryptedInput));
+
+ aUnencryptedInput.WriteBytes(aTestString.getStr(), aTestString.getLength() + 1);
+ aUnencryptedInput.Seek(STREAM_SEEK_TO_BEGIN);
+
+ // Setup output
+ uno::Reference<io::XOutputStream> xOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptedStream));
+
+ // Write content
+ aEngine.setupEncryption(aPassword);
+ aEngine.encrypt(xInputStream, xOutputStream, aUnencryptedInput.GetSize());
+ xOutputStream->flush();
+
+ // Check content
+ sal_uInt64 nSize = aEncryptedStream.GetSize();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(40), nSize);
+
+ // Setup and write encryption info
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), true);
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+ }
+
+ aEncryptedStream.Seek(STREAM_SEEK_TO_BEGIN);
+ aEncryptionInfo.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ oox::crypto::AgileEngine aEngine;
+
+ // Read encryption info
+ uno::Reference<io::XInputStream> xEncryptionInfo(
+ new utl::OSeekableInputStreamWrapper(aEncryptionInfo));
+
+ xEncryptionInfo->skipBytes(4); // Encryption type -> Agile
+
+ CPPUNIT_ASSERT(aEngine.readEncryptionInfo(xEncryptionInfo));
+
+ // Setup password
+ CPPUNIT_ASSERT(aEngine.generateEncryptionKey(aPassword));
+
+ // Setup encrypted input stream
+ oox::BinaryXInputStream aBinaryInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptedStream), true);
+
+ // Setup output stream
+ SvMemoryStream aUnencryptedOutput;
+ oox::BinaryXOutputStream aBinaryOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aUnencryptedOutput), true);
+
+ // Decrypt
+ aEngine.decrypt(aBinaryInputStream, aBinaryOutputStream);
+ aBinaryOutputStream.close();
+ aBinaryInputStream.close();
+
+ // Check decrypted output
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(19), aUnencryptedOutput.GetSize());
+
+ OString aString(static_cast<const char*>(aUnencryptedOutput.GetData()));
+ CPPUNIT_ASSERT_EQUAL(aTestString, aString);
+
+ // Check data integrity
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.checkDataIntegrity());
+ }
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(CryptoTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/data/FaultyPathStart.odp b/oox/qa/unit/data/FaultyPathStart.odp
new file mode 100644
index 000000000..219795ffa
--- /dev/null
+++ b/oox/qa/unit/data/FaultyPathStart.odp
Binary files differ
diff --git a/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx
new file mode 100644
index 000000000..db26dc032
--- /dev/null
+++ b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx
Binary files differ
diff --git a/oox/qa/unit/data/camera-rotation-revolution.docx b/oox/qa/unit/data/camera-rotation-revolution.docx
new file mode 100644
index 000000000..74054aa82
--- /dev/null
+++ b/oox/qa/unit/data/camera-rotation-revolution.docx
Binary files differ
diff --git a/oox/qa/unit/data/chart-data-label-char-color.docx b/oox/qa/unit/data/chart-data-label-char-color.docx
new file mode 100644
index 000000000..0e389f923
--- /dev/null
+++ b/oox/qa/unit/data/chart-data-label-char-color.docx
Binary files differ
diff --git a/oox/qa/unit/data/chart-theme-override.pptx b/oox/qa/unit/data/chart-theme-override.pptx
new file mode 100644
index 000000000..85243b678
--- /dev/null
+++ b/oox/qa/unit/data/chart-theme-override.pptx
Binary files differ
diff --git a/oox/qa/unit/data/customshape-position.docx b/oox/qa/unit/data/customshape-position.docx
new file mode 100644
index 000000000..227928f20
--- /dev/null
+++ b/oox/qa/unit/data/customshape-position.docx
Binary files differ
diff --git a/oox/qa/unit/data/dml-groupshape-polygon.docx b/oox/qa/unit/data/dml-groupshape-polygon.docx
new file mode 100644
index 000000000..6d20b0342
--- /dev/null
+++ b/oox/qa/unit/data/dml-groupshape-polygon.docx
Binary files differ
diff --git a/oox/qa/unit/data/endParaRPr-newline-textsize.pptx b/oox/qa/unit/data/endParaRPr-newline-textsize.pptx
new file mode 100644
index 000000000..109f818ec
--- /dev/null
+++ b/oox/qa/unit/data/endParaRPr-newline-textsize.pptx
Binary files differ
diff --git a/oox/qa/unit/data/gradient-multistep-transparency.pptx b/oox/qa/unit/data/gradient-multistep-transparency.pptx
new file mode 100644
index 000000000..83946c71b
--- /dev/null
+++ b/oox/qa/unit/data/gradient-multistep-transparency.pptx
Binary files differ
diff --git a/oox/qa/unit/data/graphic-stroke.pptx b/oox/qa/unit/data/graphic-stroke.pptx
new file mode 100644
index 000000000..f4465476f
--- /dev/null
+++ b/oox/qa/unit/data/graphic-stroke.pptx
Binary files differ
diff --git a/oox/qa/unit/data/group-spt202.docx b/oox/qa/unit/data/group-spt202.docx
new file mode 100644
index 000000000..14bf00b50
--- /dev/null
+++ b/oox/qa/unit/data/group-spt202.docx
Binary files differ
diff --git a/oox/qa/unit/data/import-characters.pptx b/oox/qa/unit/data/import-characters.pptx
new file mode 100644
index 000000000..293380236
--- /dev/null
+++ b/oox/qa/unit/data/import-characters.pptx
Binary files differ
diff --git a/oox/qa/unit/data/import-mce.pptx b/oox/qa/unit/data/import-mce.pptx
new file mode 100644
index 000000000..65cf1cbab
--- /dev/null
+++ b/oox/qa/unit/data/import-mce.pptx
Binary files differ
diff --git a/oox/qa/unit/data/multiple-group-shapes.docx b/oox/qa/unit/data/multiple-group-shapes.docx
new file mode 100644
index 000000000..c751bcdf6
--- /dev/null
+++ b/oox/qa/unit/data/multiple-group-shapes.docx
Binary files differ
diff --git a/oox/qa/unit/data/preset-adjust-value.pptx b/oox/qa/unit/data/preset-adjust-value.pptx
new file mode 100644
index 000000000..d1d570a19
--- /dev/null
+++ b/oox/qa/unit/data/preset-adjust-value.pptx
Binary files differ
diff --git a/oox/qa/unit/data/refer-to-theme-shape-fill.odp b/oox/qa/unit/data/refer-to-theme-shape-fill.odp
new file mode 100644
index 000000000..3a32aa716
--- /dev/null
+++ b/oox/qa/unit/data/refer-to-theme-shape-fill.odp
Binary files differ
diff --git a/oox/qa/unit/data/refer-to-theme.pptx b/oox/qa/unit/data/refer-to-theme.pptx
new file mode 100644
index 000000000..9f05bf7b0
--- /dev/null
+++ b/oox/qa/unit/data/refer-to-theme.pptx
Binary files differ
diff --git a/oox/qa/unit/data/shape-non-autosize-with-text.docx b/oox/qa/unit/data/shape-non-autosize-with-text.docx
new file mode 100644
index 000000000..b9ae501f4
--- /dev/null
+++ b/oox/qa/unit/data/shape-non-autosize-with-text.docx
Binary files differ
diff --git a/oox/qa/unit/data/shape-text-adjust-left.pptx b/oox/qa/unit/data/shape-text-adjust-left.pptx
new file mode 100644
index 000000000..d197425b9
--- /dev/null
+++ b/oox/qa/unit/data/shape-text-adjust-left.pptx
Binary files differ
diff --git a/oox/qa/unit/data/shape-text-alignment.pptx b/oox/qa/unit/data/shape-text-alignment.pptx
new file mode 100644
index 000000000..ff4ff06f2
--- /dev/null
+++ b/oox/qa/unit/data/shape-text-alignment.pptx
Binary files differ
diff --git a/oox/qa/unit/data/smartart-groupshape.pptx b/oox/qa/unit/data/smartart-groupshape.pptx
new file mode 100644
index 000000000..81dcee1e5
--- /dev/null
+++ b/oox/qa/unit/data/smartart-groupshape.pptx
Binary files differ
diff --git a/oox/qa/unit/data/table-shadow.pptx b/oox/qa/unit/data/table-shadow.pptx
new file mode 100644
index 000000000..3247404cb
--- /dev/null
+++ b/oox/qa/unit/data/table-shadow.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf100391_TextAreaRect.odp b/oox/qa/unit/data/tdf100391_TextAreaRect.odp
new file mode 100644
index 000000000..b9b9e5b39
--- /dev/null
+++ b/oox/qa/unit/data/tdf100391_TextAreaRect.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf109169_OctagonBevel.odt b/oox/qa/unit/data/tdf109169_OctagonBevel.odt
new file mode 100644
index 000000000..2ba39b102
--- /dev/null
+++ b/oox/qa/unit/data/tdf109169_OctagonBevel.odt
Binary files differ
diff --git a/oox/qa/unit/data/tdf112450_vml_polyline.docx b/oox/qa/unit/data/tdf112450_vml_polyline.docx
new file mode 100644
index 000000000..a31124ee7
--- /dev/null
+++ b/oox/qa/unit/data/tdf112450_vml_polyline.docx
Binary files differ
diff --git a/oox/qa/unit/data/tdf113187_arcTo_withoutReferences.pptx b/oox/qa/unit/data/tdf113187_arcTo_withoutReferences.pptx
new file mode 100644
index 000000000..1862c0257
--- /dev/null
+++ b/oox/qa/unit/data/tdf113187_arcTo_withoutReferences.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf125582_TextOnCircle.pptx b/oox/qa/unit/data/tdf125582_TextOnCircle.pptx
new file mode 100644
index 000000000..b2c09e515
--- /dev/null
+++ b/oox/qa/unit/data/tdf125582_TextOnCircle.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf131082.pptx b/oox/qa/unit/data/tdf131082.pptx
new file mode 100644
index 000000000..dbe88126f
--- /dev/null
+++ b/oox/qa/unit/data/tdf131082.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf137314_vml_rotation_unit_fd.docx b/oox/qa/unit/data/tdf137314_vml_rotation_unit_fd.docx
new file mode 100644
index 000000000..17c8cabc0
--- /dev/null
+++ b/oox/qa/unit/data/tdf137314_vml_rotation_unit_fd.docx
Binary files differ
diff --git a/oox/qa/unit/data/tdf141463_GroupTransform.pptx b/oox/qa/unit/data/tdf141463_GroupTransform.pptx
new file mode 100644
index 000000000..36c506262
--- /dev/null
+++ b/oox/qa/unit/data/tdf141463_GroupTransform.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf141786_PolylineConnectorInGroup.odt b/oox/qa/unit/data/tdf141786_PolylineConnectorInGroup.odt
new file mode 100644
index 000000000..d40dccac8
--- /dev/null
+++ b/oox/qa/unit/data/tdf141786_PolylineConnectorInGroup.odt
Binary files differ
diff --git a/oox/qa/unit/data/tdf141786_RotatedShapeInGroup.odt b/oox/qa/unit/data/tdf141786_RotatedShapeInGroup.odt
new file mode 100644
index 000000000..e932cf47b
--- /dev/null
+++ b/oox/qa/unit/data/tdf141786_RotatedShapeInGroup.odt
Binary files differ
diff --git a/oox/qa/unit/data/tdf142602_CustomShapeArrows.odt b/oox/qa/unit/data/tdf142602_CustomShapeArrows.odt
new file mode 100644
index 000000000..bc0357a1a
--- /dev/null
+++ b/oox/qa/unit/data/tdf142602_CustomShapeArrows.odt
Binary files differ
diff --git a/oox/qa/unit/data/tdf142605_CurveSize.odp b/oox/qa/unit/data/tdf142605_CurveSize.odp
new file mode 100644
index 000000000..c797d378f
--- /dev/null
+++ b/oox/qa/unit/data/tdf142605_CurveSize.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_endsubpath.odp b/oox/qa/unit/data/tdf147978_endsubpath.odp
new file mode 100644
index 000000000..2dfd55de1
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_endsubpath.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_enhancedPath_commandA.odp b/oox/qa/unit/data/tdf147978_enhancedPath_commandA.odp
new file mode 100644
index 000000000..99ddda7c1
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_enhancedPath_commandA.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odp b/oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odp
new file mode 100644
index 000000000..49e01bc09
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_enhancedPath_commandT.odp b/oox/qa/unit/data/tdf147978_enhancedPath_commandT.odp
new file mode 100644
index 000000000..3dcd0d567
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_enhancedPath_commandT.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odp b/oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odp
new file mode 100644
index 000000000..611225178
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptx b/oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptx
new file mode 100644
index 000000000..bbedc7ab9
--- /dev/null
+++ b/oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptx
Binary files differ
diff --git a/oox/qa/unit/data/tdf148784_StretchCommandQ.odp b/oox/qa/unit/data/tdf148784_StretchCommandQ.odp
new file mode 100644
index 000000000..3da092b2c
--- /dev/null
+++ b/oox/qa/unit/data/tdf148784_StretchCommandQ.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf148784_StretchCommandVW.odp b/oox/qa/unit/data/tdf148784_StretchCommandVW.odp
new file mode 100644
index 000000000..bf1054a20
--- /dev/null
+++ b/oox/qa/unit/data/tdf148784_StretchCommandVW.odp
Binary files differ
diff --git a/oox/qa/unit/data/tdf148784_StretchXY.odp b/oox/qa/unit/data/tdf148784_StretchXY.odp
new file mode 100644
index 000000000..f9df40570
--- /dev/null
+++ b/oox/qa/unit/data/tdf148784_StretchXY.odp
Binary files differ
diff --git a/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx b/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx
new file mode 100644
index 000000000..4dbf3717d
--- /dev/null
+++ b/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx
Binary files differ
diff --git a/oox/qa/unit/data/theme-tint.pptx b/oox/qa/unit/data/theme-tint.pptx
new file mode 100644
index 000000000..23ab7589d
--- /dev/null
+++ b/oox/qa/unit/data/theme-tint.pptx
Binary files differ
diff --git a/oox/qa/unit/data/theme.pptx b/oox/qa/unit/data/theme.pptx
new file mode 100644
index 000000000..5268e4041
--- /dev/null
+++ b/oox/qa/unit/data/theme.pptx
Binary files differ
diff --git a/oox/qa/unit/data/transparent-text.pptx b/oox/qa/unit/data/transparent-text.pptx
new file mode 100644
index 000000000..b7b3ede4d
--- /dev/null
+++ b/oox/qa/unit/data/transparent-text.pptx
Binary files differ
diff --git a/oox/qa/unit/data/vba/complex1.bin b/oox/qa/unit/data/vba/complex1.bin
new file mode 100644
index 000000000..390208290
--- /dev/null
+++ b/oox/qa/unit/data/vba/complex1.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/complex1.bin b/oox/qa/unit/data/vba/reference/complex1.bin
new file mode 100644
index 000000000..335b8e808
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/complex1.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/simple1.bin b/oox/qa/unit/data/vba/reference/simple1.bin
new file mode 100644
index 000000000..a4644fbb7
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/simple1.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/simple2.bin b/oox/qa/unit/data/vba/reference/simple2.bin
new file mode 100644
index 000000000..5de3f5ae0
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/simple2.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/simple3.bin b/oox/qa/unit/data/vba/reference/simple3.bin
new file mode 100644
index 000000000..a38e8a868
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/simple3.bin
@@ -0,0 +1 @@
+°
diff --git a/oox/qa/unit/data/vba/reference/spec321.bin b/oox/qa/unit/data/vba/reference/spec321.bin
new file mode 100644
index 000000000..3120c7f50
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/spec321.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/spec322.bin b/oox/qa/unit/data/vba/reference/spec322.bin
new file mode 100644
index 000000000..7724b62a4
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/spec322.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/reference/spec323.bin b/oox/qa/unit/data/vba/reference/spec323.bin
new file mode 100644
index 000000000..51104ee0b
--- /dev/null
+++ b/oox/qa/unit/data/vba/reference/spec323.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/simple1.bin b/oox/qa/unit/data/vba/simple1.bin
new file mode 100644
index 000000000..d59c1d5ef
--- /dev/null
+++ b/oox/qa/unit/data/vba/simple1.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/simple2.bin b/oox/qa/unit/data/vba/simple2.bin
new file mode 100644
index 000000000..1b9b88b16
--- /dev/null
+++ b/oox/qa/unit/data/vba/simple2.bin
Binary files differ
diff --git a/oox/qa/unit/data/vba/simple3.bin b/oox/qa/unit/data/vba/simple3.bin
new file mode 100644
index 000000000..72060e8a2
--- /dev/null
+++ b/oox/qa/unit/data/vba/simple3.bin
@@ -0,0 +1 @@
+
diff --git a/oox/qa/unit/data/vba/spec321.bin b/oox/qa/unit/data/vba/spec321.bin
new file mode 100644
index 000000000..c5d48c9fc
--- /dev/null
+++ b/oox/qa/unit/data/vba/spec321.bin
@@ -0,0 +1 @@
+abcdefghijklmnopqrstuv. \ No newline at end of file
diff --git a/oox/qa/unit/data/vba/spec322.bin b/oox/qa/unit/data/vba/spec322.bin
new file mode 100644
index 000000000..781c426c0
--- /dev/null
+++ b/oox/qa/unit/data/vba/spec322.bin
@@ -0,0 +1 @@
+#aaabcdefaaaaghijaaaaaklaaamnopqaaaaaaaaaaaarstuvwxyzaaa \ No newline at end of file
diff --git a/oox/qa/unit/data/vba/spec323.bin b/oox/qa/unit/data/vba/spec323.bin
new file mode 100644
index 000000000..9ca58b98a
--- /dev/null
+++ b/oox/qa/unit/data/vba/spec323.bin
@@ -0,0 +1 @@
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ No newline at end of file
diff --git a/oox/qa/unit/data/watermark.docx b/oox/qa/unit/data/watermark.docx
new file mode 100644
index 000000000..c9eacff9a
--- /dev/null
+++ b/oox/qa/unit/data/watermark.docx
Binary files differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
new file mode 100644
index 000000000..dedea55b9
--- /dev/null
+++ b/oox/qa/unit/drawingml.cxx
@@ -0,0 +1,566 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/XMasterPageTarget.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+
+#include <unotools/mediadescriptor.hxx>
+#include <unotools/tempfile.hxx>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Gets one child of xShape, which one is specified by nIndex.
+uno::Reference<drawing::XShape> getChildShape(const uno::Reference<drawing::XShape>& xShape,
+ sal_Int32 nIndex)
+{
+ uno::Reference<container::XIndexAccess> xGroup(xShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xGroup.is());
+
+ CPPUNIT_ASSERT(xGroup->getCount() > nIndex);
+
+ uno::Reference<drawing::XShape> xRet(xGroup->getByIndex(nIndex), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xRet.is());
+
+ return xRet;
+}
+}
+
+/// oox drawingml tests.
+class OoxDrawingmlTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+ uno::Reference<lang::XComponent> mxComponent;
+
+public:
+ void setUp() override;
+ void tearDown() override;
+ uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
+ void load(const OUString& rURL);
+ void loadAndReload(const OUString& rURL, const OUString& rFilterName);
+};
+
+void OoxDrawingmlTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void OoxDrawingmlTest::tearDown()
+{
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ test::BootstrapFixture::tearDown();
+}
+
+void OoxDrawingmlTest::load(const OUString& rURL) { mxComponent = loadFromDesktop(rURL); }
+
+void OoxDrawingmlTest::loadAndReload(const OUString& rURL, const OUString& rFilterName)
+{
+ load(rURL);
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= rFilterName;
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+ mxComponent->dispose();
+ validate(aTempFile.GetFileName(), test::OOXML);
+ mxComponent = loadFromDesktop(aTempFile.GetURL());
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "transparent-text.pptx";
+ loadAndReload(aURL, "Impress Office Open XML");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParagraph(
+ xShape->createEnumeration()->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPortion(xParagraph->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+
+ sal_Int16 nTransparency = 0;
+ xPortion->getPropertyValue("CharTransparence") >>= nTransparency;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 75
+ // - Actual : 0
+ // i.e. the transparency of the character color was lost on import/export.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(75), nTransparency);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf131082.pptx";
+ loadAndReload(aURL, "Impress Office Open XML");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> XPropSet(getChildShape(getChildShape(xShape, 0), 0),
+ uno::UNO_QUERY);
+
+ drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
+ XPropSet->getPropertyValue("FillStyle") >>= eFillStyle;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // with drawing::FillStyle_NONE - 0
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, eFillStyle);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "preset-adjust-value.pptx";
+
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGeoPropSeq;
+ xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
+ uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq;
+ aGeoPropMap.getValue("AdjustmentValues") >>= aAdjustmentSeq;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aAdjustmentSeq.getLength());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 11587
+ // - Actual : 10813
+ // i.e. the adjust value was set from the placeholder, not from the shape.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11587), aAdjustmentSeq[0].Value.get<sal_Int32>());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor)
+{
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "chart-data-label-char-color.docx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<chart2::XChartDocument> xModel(xShape->getPropertyValue("Model"),
+ uno::UNO_QUERY);
+ uno::Reference<chart2::XCoordinateSystemContainer> xDiagram(xModel->getFirstDiagram(),
+ uno::UNO_QUERY);
+
+ uno::Reference<chart2::XChartTypeContainer> xCoordinateSystem(
+ xDiagram->getCoordinateSystems()[0], uno::UNO_QUERY);
+
+ uno::Reference<chart2::XDataSeriesContainer> xChartType(xCoordinateSystem->getChartTypes()[0],
+ uno::UNO_QUERY);
+
+ uno::Reference<chart2::XDataSeries> xDataSeries = xChartType->getDataSeries()[0];
+
+ uno::Reference<beans::XPropertySet> xDataPoint = xDataSeries->getDataPointByIndex(0);
+
+ uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aLabels;
+ xDataPoint->getPropertyValue("CustomLabelFields") >>= aLabels;
+ uno::Reference<beans::XPropertySet> xLabel = aLabels[0];
+
+ sal_Int32 nCharColor = 0;
+ xLabel->getPropertyValue("CharColor") >>= nCharColor;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 16777215
+ // - Actual : -1
+ // i.e. the data label had no explicit (white) color.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), nCharColor);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
+{
+ // Load a document with a multi-step gradient.
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "gradient-multistep-transparency.pptx";
+ load(aURL);
+
+ // Check the end transparency of the gradient.
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Rectangle 4"), xShape->getName());
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ awt::Gradient aTransparence;
+ xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 16777215 (0xffffff)
+ // - Actual : 3487029 (0x353535)
+ // i.e. the end transparency was not 100%, but was 21%, leading to an unexpected visible line on
+ // the right of this shape.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), aTransparence.EndColor);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "shape-text-alignment.pptx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ sal_Int16 nParaAdjust = -1;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("ParaAdjust") >>= nParaAdjust);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 3
+ // i.e. text which is meant to be left-aligned was centered at a paragraph level.
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_LEFT,
+ static_cast<style::ParagraphAdjust>(nParaAdjust));
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "shape-text-adjust-left.pptx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ drawing::TextHorizontalAdjust eAdjust;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3 (center)
+ // - Actual : 1 (block)
+ // i.e. text was center-adjusted, not default-adjusted (~left).
+ CPPUNIT_ASSERT(xShape->getPropertyValue("TextHorizontalAdjust") >>= eAdjust);
+ CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust_BLOCK, eAdjust);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "camera-rotation-revolution.docx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape0(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape1(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps0(xShape0, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps1(xShape1, uno::UNO_QUERY);
+ sal_Int32 nRotateAngle0;
+ sal_Int32 nRotateAngle1;
+ xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
+ xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 8000
+ // - Actual : 0
+ // so the camera rotation would not have been factored into how the shape is displayed
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8000), nRotateAngle0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(27000), nRotateAngle1);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf146534_CameraRotationRevolutionNonWpsShapes)
+{
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "camera-rotation-revolution-nonwps.pptx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape0(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape1(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps0(xShape0, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps1(xShape1, uno::UNO_QUERY);
+ sal_Int32 nRotateAngle0;
+ sal_Int32 nRotateAngle1;
+ xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
+ xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 9000
+ // - Actual : 0
+ // so the camera rotation would not have been factored into how the shape is displayed
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(9000), nRotateAngle0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(30500), nRotateAngle1);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
+{
+ auto verify = [](const uno::Reference<lang::XComponent>& xComponent) {
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(
+ xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ bool bShadow = false;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bShadow);
+
+ CPPUNIT_ASSERT(bShadow);
+ sal_Int32 nColor = 0;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xff0000), nColor);
+ };
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "table-shadow.pptx";
+ load(aURL);
+ // Without the accompanying fix in place, this test would have failed, because shadow on a table
+ // was lost on import.
+ verify(getComponent());
+
+ uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("Impress Office Open XML");
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+ getComponent()->dispose();
+ validate(aTempFile.GetFileName(), test::OOXML);
+ getComponent() = loadFromDesktop(aTempFile.GetURL());
+ // Without the accompanying fix in place, this test would have failed, because shadow on a table
+ // was lost on export.
+ verify(getComponent());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGroupShapeSmartArt)
+{
+ // Given a file with a smartart inside a group shape:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "smartart-groupshape.pptx";
+
+ // When loading that file:
+ load(aURL);
+
+ // Then make sure that the smartart is not just an empty group shape:
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes> xSmartArt(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed, because we lost all
+ // children of the group shape representing the smartart.
+ CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(0), xSmartArt->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize)
+{
+ // The document contains a Bezier curve, where the control points are outside the bounding
+ // rectangle of the shape. Error was, that the export uses a path size which included the
+ // control points.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf142605_CurveSize.odp";
+ loadAndReload(aURL, "Impress Office Open XML");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ css::awt::Rectangle aBoundRect;
+ xShapeProps->getPropertyValue("BoundRect") >>= aBoundRect;
+ // Without fix, size was 6262 x 3509, and position was 10037|6790.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(8601), aBoundRect.Width, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(4601), aBoundRect.Height, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(7699), aBoundRect.X, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(5699), aBoundRect.Y, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
+{
+ // Given a document with 2 slides, slide1 has a chart with a theme override and slide2 has a
+ // shape:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "chart-theme-override.pptx";
+
+ // When loading that document:
+ load(aURL);
+
+ // Then make sure that the slide 2 shape's text color is blue, not red:
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xText(xShape->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xPara(xText->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+ sal_Int32 nActual{ 0 };
+ xPortion->getPropertyValue("CharColor") >>= nActual;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4485828 (0x4472c4)
+ // - Actual : 16711680 (0xff0000)
+ // i.e. the text color was red, not blue.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x4472C4), nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
+{
+ // Given a PPTX file with a slide -> master slide -> theme:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "theme.pptx";
+
+ // When importing the document:
+ load(aURL);
+
+ // Then make sure the theme + referring to that theme is imported:
+ // Check the imported theme of the master page:
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XMasterPageTarget> xDrawPage(
+ xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xMasterpage(xDrawPage->getMasterPage(), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aMap(xMasterpage->getPropertyValue("Theme"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Office Theme"), aMap["Name"].get<OUString>());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Cannot extract an Any(void) to string!
+ // i.e. the name of the color scheme was lost on import.
+ CPPUNIT_ASSERT_EQUAL(OUString("Office"), aMap["ColorSchemeName"].get<OUString>());
+
+ // Check the last color in the color set, value is from ppt/theme/theme1.xml.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Cannot extract an Any(void) to []long!
+ auto aColorScheme = aMap["ColorScheme"].get<uno::Sequence<util::Color>>();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(12), aColorScheme.getLength());
+ CPPUNIT_ASSERT_EQUAL(static_cast<util::Color>(0x954F72), aColorScheme[11]);
+
+ // Check the reference to that theme:
+ uno::Reference<drawing::XShapes> xDrawPageShapes(xDrawPage, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xDrawPageShapes->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xText(xShape->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xPara(xText->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+ // 4 is accent1, see oox::drawingml::Color::getSchemeColorIndex().
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4),
+ xPortion->getPropertyValue("CharColorTheme").get<sal_Int32>());
+ // 60000 in the file, just 100th vs 1000th percents.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 6000
+ // - Actual : 10000
+ // i.e. we had the default 100% value, not the value from the file.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6000),
+ xPortion->getPropertyValue("CharColorLumMod").get<sal_Int32>());
+
+ // 40000 in the file, just 100th vs 1000th percents.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4000
+ // - Actual : 0
+ // i.e. we had the default 0% value, not the value from the file.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4000),
+ xPortion->getPropertyValue("CharColorLumOff").get<sal_Int32>());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes)
+{
+ // slide with date, footer, slide number with custom shapes
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "testTdf132557_footerCustomShapes.pptx";
+ // When importing the document:
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ // Test if we were able to import the footer shapes with CustomShape service.
+ uno::Reference<drawing::XShape> xShapeDateTime(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeDateTime->getShapeType());
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.lang.IndexOutOfBoundsException
+ // i.e. the shape wasn't on the slide there since it was imported as a property, not a shape.
+
+ uno::Reference<drawing::XShape> xShapeFooter(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeFooter->getShapeType());
+
+ uno::Reference<drawing::XShape> xShapeSlideNum(xDrawPage->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeSlideNum->getShapeType());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeTint)
+{
+ // Given a document with a table style, using theme color with tinting in the A2 cell:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "theme-tint.pptx";
+
+ // When loading that document:
+ load(aURL);
+
+ // Then make sure that we only import theming info to the doc model if the effects are limited
+ // to lum mod / off that we can handle (i.e. no tint/shade):
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCellRange> xTable;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("Model") >>= xTable);
+ uno::Reference<beans::XPropertySet> xA1(xTable->getCellByPosition(0, 0), uno::UNO_QUERY);
+ sal_Int16 nFillColorTheme{};
+ CPPUNIT_ASSERT(xA1->getPropertyValue("FillColorTheme") >>= nFillColorTheme);
+ // This is OK, no problematic effects:
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(4), nFillColorTheme);
+ uno::Reference<beans::XPropertySet> xA2(xTable->getCellByPosition(0, 1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xA2->getPropertyValue("FillColorTheme") >>= nFillColorTheme);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: -1
+ // - Actual : 4
+ // i.e. we remembered the theme index, without being able to remember the tint effect, leading
+ // to a bad background color.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(-1), nFillColorTheme);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo)
+{
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf113187_arcTo_withoutReferences.pptx";
+ load(aURL);
+ // Get ViewBox of shape
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGeoPropSeq;
+ xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
+ // Without the fix width and height of the ViewBox were 0 and thus the shape was not shown.
+ auto aViewBox = aGeoPropMap["ViewBox"].get<css::awt::Rectangle>();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3600000), aViewBox.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3600000), aViewBox.Height);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
new file mode 100644
index 000000000..90089a994
--- /dev/null
+++ b/oox/qa/unit/export.cxx
@@ -0,0 +1,777 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+#include <test/xmltesttools.hxx>
+
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+
+#include <unotools/mediadescriptor.hxx>
+#include <unotools/tempfile.hxx>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Covers ooox/source/export/ fixes.
+class Test : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
+{
+private:
+ uno::Reference<lang::XComponent> mxComponent;
+ utl::TempFile maTempFile;
+
+public:
+ void setUp() override;
+ void tearDown() override;
+ void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
+ utl::TempFile& getTempFile() { return maTempFile; }
+ void loadAndSave(const OUString& rURL, const OUString& rFilterName);
+};
+
+void Test::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void Test::tearDown()
+{
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ test::BootstrapFixture::tearDown();
+}
+
+void Test::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
+{
+ XmlTestTools::registerOOXMLNamespaces(pXmlXpathCtx);
+}
+
+void Test::loadAndSave(const OUString& rURL, const OUString& rFilterName)
+{
+ mxComponent = loadFromDesktop(rURL);
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= rFilterName;
+ maTempFile.EnableKillingFile();
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+ mxComponent->dispose();
+ mxComponent.clear();
+ // too many DOCX validation errors right now
+ if (rFilterName != "Office Open XML Text")
+ {
+ validate(maTempFile.GetFileName(), test::OOXML);
+ }
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
+
+CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
+{
+ // Given a document with a group shape and therein a polyline and a connector.
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf141786_PolylineConnectorInGroup.odt";
+ // When saving that to DOCX:
+ loadAndSave(aURL, "Office Open XML Text");
+
+ // Then make sure polyline and connector have the correct position.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // For child elements of groups in Writer the position has to be adapted to be relative
+ // to group instead of being relative to anchor. That was missing for polyline and
+ // connector.
+ // Polyline: Without fix it would have failed with expected: 0, actual: 1800360
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off", "x", "0");
+ // ... failed with expected: 509400, actual: 1229400
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off", "y", "509400");
+
+ // Connector: Without fix it would have failed with expected: 763200, actual: 2563560
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off", "x", "763200");
+ // ... failed with expected: 0, actual: 720000
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off", "y", "0");
+ // Polyline and connector were shifted 1800360EMU right, 720000EMU down.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
+{
+ // Given a document with a group shape and therein a rotated custom shape.
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf141786_RotatedShapeInGroup.odt";
+ // When saving that to DOCX:
+ loadAndSave(aURL, "Office Open XML Text");
+
+ // Then make sure the rotated child shape has the correct position.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // For a group itself and for shapes outside of groups, the position calculation is done in
+ // DocxSdrExport. For child elements of groups it has to be done in
+ // DrawingML::WriteShapeTransformation(), but was missing.
+ // Without fix it would have failed with expected: 469440, actual: 92160
+ // The shape was about 1cm shifted up and partly outside its group.
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off", "y", "469440");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
+{
+ // Given a document with a group shape, containing a single polygon child shape:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "dml-groupshape-polygon.docx";
+
+ // When saving that to DOCX:
+ loadAndSave(aURL, "Office Open XML Text");
+
+ // Then make sure that the group shape, the group shape's child size and the child shape's size
+ // match:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:ext", "cx", "5328360");
+ // Without the accompanying fix in place, this test would have failed, the <a:chExt> element was
+ // not written.
+ assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:chExt", "cx", "5328360");
+ assertXPath(pXmlDoc, "//wps:spPr/a:xfrm/a:ext", "cx", "5328360");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
+{
+ // Given a document with a few different kinds of arrow shapes in it:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf142602_CustomShapeArrows.odt";
+ // When saving that to DOCX:
+ loadAndSave(aURL, "Office Open XML Text");
+
+ // Then the shapes should retain their correct control values.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // Without the fix the output OOXML would have no <a:prstGeom> tags in it.
+
+ // Right arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "rightArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 46321");
+
+ // Left arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "leftArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 52939");
+
+ // Down arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "downArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 59399");
+
+ // Up arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "upArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 63885");
+
+ // Left-right arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "leftRightArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 53522");
+
+ // Up-down arrow
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "upDownArrow");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 50000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 62743");
+
+ // Right arrow callout
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "rightArrowCallout");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 25002");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 25000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]",
+ "fmla", "val 25052");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]",
+ "fmla", "val 66667");
+
+ // Left arrow callout
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "leftArrowCallout");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 25002");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 25000");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]",
+ "fmla", "val 25057");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]",
+ "fmla", "val 66673");
+
+ // Down arrow callout
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "downArrowCallout");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 29415");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 29413");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]",
+ "fmla", "val 16667");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]",
+ "fmla", "val 66667");
+
+ // Up arrow callout
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "upArrowCallout");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]",
+ "fmla", "val 31033");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]",
+ "fmla", "val 31030");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]",
+ "fmla", "val 16667");
+ assertXPath(pXmlDoc,
+ "//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]",
+ "fmla", "val 66660");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
+{
+ // Given a PPTX file that contains camera revolution (rotation around z axis) applied shapes
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "camera-rotation-revolution-nonwps.pptx";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // Then make sure the revolution is exported without a problem:
+ // First shape textbox:
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:scene3d/a:camera/a:rot", "rev", "5400000");
+
+ // Second shape rectangle:
+ assertXPath(pXmlDoc, "//p:sp[2]/p:spPr/a:scene3d/a:camera/a:rot", "rev", "18300000");
+
+ // Make sure Shape3DProperties don't leak under txBody
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // - In <>, XPath '//p:sp[1]/p:txBody/a:bodyPr/a:scene3d/a:camera/a:rot' number of nodes is incorrect
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:bodyPr/a:scene3d/a:camera/a:rot", 0);
+ assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:bodyPr/a:scene3d/a:camera/a:rot", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
+{
+ // Given a PPTX file that contains references to a theme:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "refer-to-theme.pptx";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // Then make sure the shape text color is a scheme color:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect
+ // i.e. the <a:schemeClr> element was not written.
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val",
+ "accent1");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", 0);
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", 0);
+
+ // Second shape: lighter color:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect
+ // i.e. the effects case did not write scheme colors.
+ assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val",
+ "accent1");
+ assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", "val",
+ "40000");
+ assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", "val",
+ "60000");
+
+ // Third shape, darker color:
+ assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val",
+ "accent1");
+ assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", "val",
+ "75000");
+ assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testReferToThemeShapeFill)
+{
+ // Given an ODP file that contains references to a theme for shape fill:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "refer-to-theme-shape-fill.odp";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Then make sure the shape fill color is a scheme color:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the <a:schemeClr> element was not written. Note that this was already working from PPTX
+ // files via grab-bags, so this test intentionally uses an ODP file as input.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr", "val", "accent1");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - XPath '//p:sp[1]/p:spPr/a:solidFill/a:schemeClr/a:lumMod' number of nodes is incorrect
+ // i.e. the effects of the themed color were lost.
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr/a:lumMod", "val", "40000");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr/a:lumOff", "val", "60000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSize)
+{
+ // Given a PPTX file that contains references to a theme:
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "endParaRPr-newline-textsize.pptx";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // Make sure the text size is exported correctly:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 500
+ // - Actual : 1800
+ // i.e. the endParaRPr 'size' wasn't exported correctly
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[1]/a:endParaRPr", "sz", "500");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[2]/a:endParaRPr", "sz", "500");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[3]/a:endParaRPr", "sz", "500");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
+{
+ // Given an odp file that contains a non-primitive custom shape with command N
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_endsubpath.odp";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // Then make sure the pathLst has two child elements,
+ // Without the accompanying fix in place, only one element a:path was exported.
+ assertXPathChildren(pXmlDoc, "//a:pathLst", 2);
+ // and make sure first path with no stroke, second with no fill
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "stroke", "0");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "fill", "none");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
+{
+ // Given an odp file that contains a non-primitive custom shape with command N
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_enhancedPath_commandA.odp";
+
+ // When saving that document:
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // Then make sure the path has a child element arcTo. Prior to the fix that part of the curve was
+ // not exported at all. In odp it is a command A. Such does not exist in OOXML and is therefore
+ // exported as a:lnTo followed by a:arcTo
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo", 2);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", 1);
+ // And assert its attribute values
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "wR", "7200");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "hR", "5400");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "stAng", "7719588");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "swAng", "-5799266");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
+{
+ // The odp file contains a non-primitive custom shape with commands MTZ
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_enhancedPath_commandT.odp";
+
+ // Export to pptx had only exported the command M and has used a wrong path size
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // File has draw:viewBox="0 0 216 216"
+ assertXPath(pXmlDoc, "//a:pathLst/a:path", "w", "216");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path", "h", "216");
+ // Command T is exported as lnTo followed by arcTo.
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo", 1);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo", 1);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", 1);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:close", 1);
+ // And assert its values
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt", "x", "108");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt", "y", "162");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt", "x", "138");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt", "y", "110");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "wR", "108");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "hR", "54");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "stAng", "18000000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo", "swAng", "18000000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
+{
+ // The odp file contains a non-primitive custom shapes with commands XY
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_enhancedPath_commandXY.odp";
+
+ // Export to pptx had dropped commands X and Y.
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // File has draw:viewBox="0 0 10 10"
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "10");
+ // Shape has M 0 5 Y 5 0 10 5 5 10 F Y 0 5 N M 10 10 X 0 0
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt", "x", "0");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt", "y", "5");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]", "wR", "5");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]", "hR", "5");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]", "stAng", "10800000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]", "swAng", "5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]", "stAng", "16200000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]", "swAng", "5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]", "stAng", "0");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]", "swAng", "5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]", "stAng", "0");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]", "swAng", "-5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt", "x", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt", "y", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo", "wR", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo", "hR", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo", "stAng", "5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo", "swAng", "5400000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
+{
+ // The odp file contains a non-primitive custom shapes with commands H,I,J,K
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_enhancedPath_commandHIJK.odp";
+
+ // Export to pptx had dropped commands X and Y.
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // File has draw:viewBox="0 0 80 80"
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "80");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "80");
+ // File uses from back to front J (lighten), I (lightenLess), normal fill, K (darkenLess),
+ // H (darken). New feature, old versions did not export these at all.
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "fill", "lighten");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "fill", "lightenLess");
+ assertXPathNoAttribute(pXmlDoc, "//a:pathLst/a:path[3]", "fill");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "fill", "darkenLess");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[5]", "fill", "darken");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
+{
+ // The odp file contains a non-primitive custom shapes with commands H,I,J,K
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf147978_enhancedPath_subpath.pptx";
+
+ // Export to pptx had dropped the subpaths.
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // File should have four subpaths with increasing path size
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "w", "20");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "h", "20");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]", "w", "40");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]", "h", "40");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "w", "80");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "h", "80");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
+{
+ // The document has a custom shape of type "non-primitive" to trigger the custGeom export
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf100391_TextAreaRect.odp";
+ // When saving to PPTX the textarea rect was set to default instead of using the actual area
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup. Without fix the values were l="l", t="t", r="r", b="b"
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect", "l", "textAreaLeft");
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect", "t", "textAreaTop");
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect", "r", "textAreaRight");
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect", "b", "textAreaBottom");
+ // The values are calculated in guides, for example
+ assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "name", "textAreaLeft");
+ assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "fmla", "*/ 1440000 w 2880000");
+ // The test reflects the state of Apr 2022. It needs to be adapted when export of handles and
+ // guides is implemented.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel)
+{
+ // The odp file contains an "Octagon Bevel" shape. Such has shading not in commands H,I,J,K
+ // but shading is generated in ctor of EnhancedCustomShape2d from the Type value.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf109169_OctagonBevel.odt";
+
+ // Export to docx had not written a:fill or a:stroke attributes at all.
+ loadAndSave(aURL, "Office Open XML Text");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // File should have six subpaths, one with stroke and five with fill
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "stroke", "0");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "fill", "darkenLess");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]", "fill", "darken");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "fill", "darken");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[5]", "fill", "lightenLess");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[6]", "fill", "lighten");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
+{
+ // The odp file contains shapes whose path starts with command A, W, T or L. That is a faulty
+ // path. LO is tolerant and renders it so that is makes a moveTo to the start point of the arc or
+ // the end of the line respectively. Export to OOXML does the same now and writes a moveTo
+ // instead of the normally used lnTo. If a lnTo is written, MS Office shows nothing of the shape.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "FaultyPathStart.odp";
+
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup:
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ // First child of a:path should be a moveTo in all four shapes.
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[3]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[4]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY)
+{
+ // The document has a custom shapes of type "non-primitive" to trigger the custGeom export.
+ // They use formulas with 'right' and 'bottom'.
+ // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. The
+ // line at right and bottom edge were positioned inside as if the shape had a square size.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf148784_StretchXY.odp";
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // x-position of last segment should be same as path width. It was 21600 without fix.
+ sal_Int32 nWidth
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/@w")
+ .toInt32();
+ sal_Int32 nPosX
+ = getXPathContent(
+ pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo[4]/a:pt/@x")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchX", nWidth, nPosX);
+
+ // y-position of last segment should be same as path height. It was 21600 without fix.
+ sal_Int32 nHeight
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/@h")
+ .toInt32();
+ sal_Int32 nPosY
+ = getXPathContent(
+ pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo[4]/a:pt/@y")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchY", nHeight, nPosY);
+
+ // The test reflects the state of Apr 2022. It needs to be adapted when export of handles and
+ // guides is implemented.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ)
+{
+ // The document has a custom shapes of type "non-primitive" to trigger the custGeom export.
+ // They use formulas with 'right' and 'bottom'.
+ // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
+ // That results in wrong arcs on the right or bottom side of the shape.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf148784_StretchCommandQ.odp";
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // x-position of second quadBezTo control should be same as path width. It was 21600 without fix.
+ sal_Int32 nWidth
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/@w")
+ .toInt32();
+ sal_Int32 nPosX
+ = getXPathContent(
+ pXmlDoc,
+ "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:quadBezTo[2]/a:pt/@x")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchX", nWidth, nPosX);
+
+ // y-position of third quadBezTo control should be same as path height. It was 21600 without fix.
+ sal_Int32 nHeight
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/@h")
+ .toInt32();
+ sal_Int32 nPosY
+ = getXPathContent(
+ pXmlDoc,
+ "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:quadBezTo[3]/a:pt/@y")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchY", nHeight, nPosY);
+
+ // The test reflects the state of Apr 2022. It needs to be adapted when export of handles and
+ // guides is implemented.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW)
+{
+ // The document has a custom shapes of type "non-primitive" to trigger the custGeom export.
+ // It should not need adaption when export of handles and guides is implemented because it
+ // has only fixed values in the path.
+ // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
+ // That results in circles instead of ellipses.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf148784_StretchCommandVW.odp";
+ loadAndSave(aURL, "Impress Office Open XML");
+
+ // Verify the markup.
+ std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+
+ // wR of first ArcTo in first shape should be same as path width/2. It was 10800 without fix.
+ sal_Int32 nHalfWidth
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/@w")
+ .toInt32()
+ / 2;
+ sal_Int32 nWR
+ = getXPathContent(pXmlDoc,
+ "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:arcTo[1]/@wR")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchX", nHalfWidth, nWR);
+
+ // hR of first ArcTo in second shape should be same as path height /2. It was 10800 without fix.
+ sal_Int32 nHalfHeight
+ = getXPathContent(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/@h")
+ .toInt32()
+ / 2;
+ sal_Int32 nHR
+ = getXPathContent(pXmlDoc,
+ "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:arcTo[1]/@hR")
+ .toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("StretchY", nHalfHeight, nHR);
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx
new file mode 100644
index 000000000..3ab87fcbc
--- /dev/null
+++ b/oox/qa/unit/mathml.cxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+
+using namespace ::com::sun::star;
+
+/// oox mathml tests.
+class OoxMathmlTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+ uno::Reference<lang::XComponent> mxComponent;
+
+public:
+ void setUp() override;
+ void tearDown() override;
+ uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
+};
+
+void OoxMathmlTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void OoxMathmlTest::tearDown()
+{
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ test::BootstrapFixture::tearDown();
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
+
+CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "import-characters.pptx";
+ // Without the accompanying fix in place, this failed with an assertion failure on import.
+ getComponent() = loadFromDesktop(aURL);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportMce)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "import-mce.pptx";
+ getComponent() = loadFromDesktop(aURL);
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ // Without the accompanying fix in place, this failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both the math object and its replacement image was imported, as two separate objects.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
new file mode 100644
index 000000000..345ebb215
--- /dev/null
+++ b/oox/qa/unit/shape.cxx
@@ -0,0 +1,180 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <rtl/math.hxx>
+#include <svx/svdoashp.hxx>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Gets one child of xShape, which one is specified by nIndex.
+uno::Reference<drawing::XShape> getChildShape(const uno::Reference<drawing::XShape>& xShape,
+ sal_Int32 nIndex)
+{
+ uno::Reference<container::XIndexAccess> xGroup(xShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xGroup.is());
+
+ CPPUNIT_ASSERT(xGroup->getCount() > nIndex);
+
+ uno::Reference<drawing::XShape> xRet(xGroup->getByIndex(nIndex), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xRet.is());
+
+ return xRet;
+}
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
+
+/// oox shape tests.
+class OoxShapeTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+ uno::Reference<lang::XComponent> mxComponent;
+
+public:
+ void setUp() override;
+ void tearDown() override;
+ uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
+ void load(std::u16string_view rURL);
+};
+
+void OoxShapeTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void OoxShapeTest::tearDown()
+{
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ test::BootstrapFixture::tearDown();
+}
+
+void OoxShapeTest::load(std::u16string_view rFileName)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
+ mxComponent = loadFromDesktop(aURL);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform)
+{
+ load(u"tdf141463_GroupTransform.pptx");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(getChildShape(xGroup, 0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed in several properties.
+
+ sal_Int32 nAngle;
+ xPropSet->getPropertyValue("ShearAngle") >>= nAngle;
+ // Failed with - Expected: 0
+ // - Actual : -810
+ // i.e. the shape was sheared although shearing does not exist in oox
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAngle);
+
+ xPropSet->getPropertyValue("RotateAngle") >>= nAngle;
+ // Failed with - Expected: 26000 (is in 1/100deg)
+ // - Actual : 26481 (is in 1/100deg)
+ // 100deg in PowerPoint UI = 360deg - 100deg in LO.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(26000), nAngle);
+
+ sal_Int32 nActual = xShape->getSize().Width;
+ // The group has ext.cy=2880000 and chExt.cy=4320000 resulting in Y-scale=2/3.
+ // The child has ext 2880000 x 1440000. Because of rotation angle 80deg, the Y-scale has to be
+ // applied to the width, resulting in 2880000 * 2/3 = 1920000EMU = 5333Hmm
+ // ToDo: Expected value currently 1 off.
+ // Failed with - Expected: 5332
+ // - Actual : 5432
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5332), nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
+{
+ load(u"multiple-group-shapes.docx");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the 2 group shapes from the document were imported as a single one.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xDrawPage->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
+{
+ load(u"customshape-position.docx");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+
+ sal_Int32 nY{};
+ xShape->getPropertyValue("VertOrientPosition") >>= nY;
+ // <wp:posOffset>581025</wp:posOffset> in the document.
+ sal_Int32 nExpected = rtl::math::round(581025.0 / 360);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1614
+ // - Actual : 0
+ // i.e. the position of the shape was lost on import due to the rounded corners.
+ CPPUNIT_ASSERT_EQUAL(nExpected, nY);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf125582_TextOnCircle)
+{
+ // The document contains a shape with a:prstTxWarp="textCircle" with two paragraphs.
+ // PowerPoint aligns the bottom of the text with the path, LO had aligned the middle of the
+ // text with the path, which resulted in smaller text.
+ load(u"tdf125582_TextOnCircle.pptx");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
+
+ // BoundRect of Fontwork shape depends on dpi.
+ if (IsDefaultDPI())
+ {
+ SdrObjCustomShape& rSdrCustomShape(
+ static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape)));
+ // Without the fix in place width was 3639, but should be 4824 for 96dpi.
+ tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(4824), aBoundRect.GetWidth(), 5);
+ }
+
+ drawing::TextVerticalAdjust eAdjust;
+ xPropSet->getPropertyValue("TextVerticalAdjust") >>= eAdjust;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextVerticalAdjust", drawing::TextVerticalAdjust_BOTTOM, eAdjust);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
new file mode 100644
index 000000000..906e30bfc
--- /dev/null
+++ b/oox/qa/unit/vba_compression.cxx
@@ -0,0 +1,255 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestFixture.h>
+#include <osl/file.hxx>
+#include <oox/ole/vbaexport.hxx>
+#include <rtl/bootstrap.hxx>
+#include <tools/stream.hxx>
+#include <unotest/directories.hxx>
+#include <algorithm>
+
+class TestVbaCompression : public CppUnit::TestFixture
+{
+public:
+ // just a sequence of bytes that should not be compressed at all
+ void testSimple1();
+
+ // a sequence containing one subsequence that can be compressed
+ void testSimple2();
+
+ void testSimple3();
+
+ // real stream from a document
+ void testComplex1();
+
+ // tests taken from the VBA specification
+ // section 3.2
+
+ // section 3.2.1
+ void testSpec321();
+ // section 3.2.2
+ void testSpec322();
+ // section 3.2.3
+ void testSpec323();
+
+ CPPUNIT_TEST_SUITE(TestVbaCompression);
+ CPPUNIT_TEST(testSimple1);
+ CPPUNIT_TEST(testSimple2);
+ CPPUNIT_TEST(testSimple3);
+ CPPUNIT_TEST(testComplex1);
+ CPPUNIT_TEST(testSpec321);
+ CPPUNIT_TEST(testSpec322);
+ CPPUNIT_TEST(testSpec323);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ static OUString const & getDebugDirUrl() {
+ struct DebugDirUrl {
+ DebugDirUrl() : url("$UserInstallation/debug/") {
+ rtl::Bootstrap::expandMacros(url);
+ //TODO: provide an OUString -> OUString expansion function, and which throws on
+ // failure
+ auto e = osl::Directory::create(url);
+ CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e);
+ }
+ OUString url;
+ };
+ static DebugDirUrl url;
+ return url.url;
+ }
+
+ test::Directories m_directories;
+};
+
+namespace {
+
+void ReadFiles(const OUString& rTestFile, const OUString& rReference,
+ SvMemoryStream& rOutputMemoryStream, SvMemoryStream& rReferenceMemoryStream,
+ const OUString& rDebugPath)
+{
+ SvFileStream aInputStream(rTestFile, StreamMode::READ);
+ SvMemoryStream aInputMemoryStream(4096, 4096);
+ aInputMemoryStream.WriteStream(aInputStream);
+
+ VBACompression aCompression(rOutputMemoryStream, aInputMemoryStream);
+ aCompression.write();
+
+ SvFileStream aReferenceStream(rReference, StreamMode::READ);
+ rReferenceMemoryStream.WriteStream(aReferenceStream);
+
+ rOutputMemoryStream.Seek(0);
+ SvFileStream aDebugStream(rDebugPath, StreamMode::WRITE);
+ aDebugStream.WriteStream(rOutputMemoryStream);
+}
+
+}
+
+void TestVbaCompression::testSimple1()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple1.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream,
+ aReferenceMemoryStream, getDebugDirUrl() + "vba_debug.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testSimple2()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple2.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple2.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug2.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testSimple3()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple3.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple3.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug3.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testComplex1()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/complex1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/complex1.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_complex1.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testSpec321()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec321.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec321.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_spec321.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testSpec322()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec322.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec322.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_spec322.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+void TestVbaCompression::testSpec323()
+{
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec323.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec323.bin");
+
+ SvMemoryStream aOutputMemoryStream(4096, 4096);
+ SvMemoryStream aReferenceMemoryStream(4096, 4096);
+ ReadFiles(aTestFile, aReference, aOutputMemoryStream, aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_spec323.bin");
+
+ CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), aOutputMemoryStream.GetSize());
+
+ const sal_uInt8* pReferenceData = static_cast<const sal_uInt8*>( aReferenceMemoryStream.GetData() );
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>( aOutputMemoryStream.GetData() );
+
+ const sal_uInt64 nSize = std::min(aReferenceMemoryStream.GetSize(),
+ aOutputMemoryStream.GetSize());
+ for (sal_uInt64 i = 0; i < nSize; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(pReferenceData[i]), static_cast<int>(pData[i]));
+ }
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TestVbaCompression);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx
new file mode 100644
index 000000000..023cc197b
--- /dev/null
+++ b/oox/qa/unit/vba_encryption.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestFixture.h>
+
+#include <oox/ole/vbaexport.hxx>
+
+class TestVbaEncryption : public CppUnit::TestFixture
+{
+public:
+#if 0
+ // an initial test for the encryption taken from the spec
+ void testSimple1();
+
+ void testSimple2();
+#endif
+
+ void testProjKey1();
+
+ CPPUNIT_TEST_SUITE(TestVbaEncryption);
+ // CPPUNIT_TEST(testSimple1);
+ // CPPUNIT_TEST(testSimple2);
+ CPPUNIT_TEST(testProjKey1);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+#if 0
+void TestVbaEncryption::testSimple1()
+{
+ sal_uInt8 nSeed = 0x07;
+ sal_uInt8 nProjKey = 0xDF;
+ sal_uInt16 nLength = 0x04;
+ sal_uInt8 pData[] = { 0x00, 0x00, 0x00, 0x00 };
+
+ SvMemoryStream aEncryptedStream(4096, 4096);
+ VBAEncryption aEncryption(pData, nLength, aEncryptedStream,
+ &nSeed, nProjKey);
+ aEncryption.write();
+}
+
+void TestVbaEncryption::testSimple2()
+{
+ sal_uInt8 nSeed = 0x15;
+ sal_uInt8 nProjKey = 0xDF;
+ sal_uInt16 nLength = 0x01;
+ sal_uInt8 pData[] = { 0xFF };
+
+ SvMemoryStream aEncryptedStream(4096, 4096);
+ VBAEncryption aEncryption(pData, nLength, aEncryptedStream,
+ &nSeed, nProjKey);
+ aEncryption.write();
+ sal_uInt8 pExpectedData[] = "1517CAF1D6F9D7F9D706";
+ size_t length = sizeof(pExpectedData);
+ aEncryptedStream.Seek(0);
+ for (size_t i = 0; i < length; ++i)
+ {
+ unsigned char val = 0;
+ aEncryptedStream.ReadUChar(val);
+ CPPUNIT_ASSERT_EQUAL((int)pExpectedData[i], (int)sal_uInt8(val));
+ }
+}
+#endif
+
+void TestVbaEncryption::testProjKey1()
+{
+ sal_uInt8 nProjKey = VBAEncryption::calculateProjKey("{917DED54-440B-4FD1-A5C1-74ACF261E600}");
+ CPPUNIT_ASSERT_EQUAL(int(0xdf), static_cast<int>(nProjKey));
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TestVbaEncryption);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
new file mode 100644
index 000000000..61730c744
--- /dev/null
+++ b/oox/qa/unit/vml.cxx
@@ -0,0 +1,236 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/PointSequence.hpp>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/drawing/PolygonKind.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
+
+using namespace ::com::sun::star;
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/oox/qa/unit/data/";
+
+/// oox vml tests.
+class OoxVmlTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+ uno::Reference<lang::XComponent> mxComponent;
+
+public:
+ void setUp() override;
+ void tearDown() override;
+ uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
+ void load(std::u16string_view rURL);
+};
+
+void OoxVmlTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void OoxVmlTest::tearDown()
+{
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ test::BootstrapFixture::tearDown();
+}
+
+void OoxVmlTest::load(std::u16string_view rFileName)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
+ mxComponent = loadFromDesktop(aURL);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
+{
+ // Load a document with v:polyline shapes. Error was, that the size was set to zero and the
+ // points were zero because of missing decode from length with unit.
+ load(u"tdf112450_vml_polyline.docx");
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ {
+ // This tests a polyline shape which is not closed.
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ // Without fix in place, Geometry had 2 points, both 0|0.
+ drawing::PointSequenceSequence aGeometry;
+ xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ drawing::PointSequence aPolygon = aGeometry[0];
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6879), aPolygon[3].X, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(487), aPolygon[3].Y, 1);
+ // Without fix in place, width and height were zero
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6879), xShape->getSize().Width, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1926), xShape->getSize().Height, 1);
+ // After the fix the shape has still to be PolygonKind_PLIN
+ drawing::PolygonKind ePolygonKind;
+ xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_PLIN, ePolygonKind);
+ }
+ {
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ // Without fix in place, Geometry had 2 points, both 0|0.
+ drawing::PointSequenceSequence aGeometry;
+ xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ drawing::PointSequence aPolygon = aGeometry[0];
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(5062), aPolygon[2].X, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2247), aPolygon[2].Y, 1);
+ // Without fix in place, width and height were zero
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6163), xShape->getSize().Width, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2247), xShape->getSize().Height, 1);
+ // Without fix in place the shape was not closed, it had PolygonKind_PLIN
+ drawing::PolygonKind ePolygonKind;
+ xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_POLY, ePolygonKind);
+ }
+ {
+ // This tests a filled shape where v:polyline does not have attribute coordsize
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(2), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ // Without fix in place, Geometry had 2 points, both 0|0.
+ drawing::PointSequenceSequence aGeometry;
+ xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ drawing::PointSequence aPolygon = aGeometry[0];
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2095), aPolygon[3].X, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(608), aPolygon[3].Y, 1);
+ // Without fix in place, width and height were zero
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(5634), xShape->getSize().Width, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2485), xShape->getSize().Height, 1);
+ // Without fix in place the shape was not closed, it had PolygonKind_PLIN
+ drawing::PolygonKind ePolygonKind;
+ xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_POLY, ePolygonKind);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf137314_vml_rotation_unit_fd)
+{
+ // Load a document with a 30deg rotated arc on a drawing canvas. Rotation is given
+ // as 1966080fd. Error was, that the vml angle unit "fd" was not converted to Degree100.
+ load(u"tdf137314_vml_rotation_unit_fd.docx");
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords;
+ xShapeProps->getPropertyValue("PolyPolygonBezier") >>= aPolyPolygonBezierCoords;
+ drawing::PointSequence aPolygon = aPolyPolygonBezierCoords.Coordinates[1];
+ // Without fix in place, the vector was -1441|1490.
+ // [1] and [2] are Bezier-curve control points.
+ sal_Int32 nDiffX = aPolygon[3].X - aPolygon[0].X;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1490), nDiffX, 1);
+ sal_Int32 nDiffY = aPolygon[3].Y - aPolygon[0].Y;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1441), nDiffY, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType)
+{
+ // Load a document with a groupshape, 2nd child is a <v:shape>, its type has o:spt set to 202
+ // (TextBox).
+ load(u"group-spt202.docx");
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: com.sun.star.drawing.TextShape
+ // - Actual : com.sun.star.drawing.CustomShape
+ // and then the size of the group shape was incorrect, e.g. its right edge was outside the page
+ // boundaries.
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.TextShape"), xShape->getShapeType());
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
+{
+ // Load a document which has a group shape, containing a single child.
+ // 17.78 cm is the full group shape width, 19431/64008 is the child shape's relative width inside
+ // that, so 5.3975 cm should be the shape width.
+ load(u"shape-non-autosize-with-text.docx");
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Actual : 1115
+ // - Expected: 5398
+ // because the width was determined using its text size, not using the explicit size.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5398), xShape->getSize().Width);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
+{
+ load(u"graphic-stroke.pptx");
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDrawPage->getCount());
+
+ uno::Reference<beans::XPropertySet> xShape;
+ uno::Reference<lang::XServiceInfo> xInfo(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ if (xInfo->supportsService("com.sun.star.drawing.OLE2Shape"))
+ xShape.set(xInfo, uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT(xShape.is());
+
+ drawing::LineStyle eLineStyle{};
+ xShape->getPropertyValue("LineStyle") >>= eLineStyle;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. line style was NONE, not SOLID.
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, eLineStyle);
+}
+
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWatermark)
+{
+ // Given a document with a picture watermark, and the "washout" checkbox is ticked on the Word
+ // UI:
+ // When loading that document:
+ load(u"watermark.docx");
+
+ // Then make sure the watermark effect is not lost on import:
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ drawing::ColorMode eMode{};
+ xShape->getPropertyValue("GraphicColorMode") >>= eMode;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 0
+ // i.e. the color mode was STANDARD, not WATERMARK.
+ CPPUNIT_ASSERT_EQUAL(drawing::ColorMode_WATERMARK, eMode);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
new file mode 100644
index 000000000..7266e254b
--- /dev/null
+++ b/oox/source/core/binarycodec.cxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/binarycodec.hxx>
+
+#include <oox/helper/attributelist.hxx>
+
+#include <osl/diagnose.h>
+
+using namespace ::com::sun::star;
+
+namespace oox::core {
+
+sal_uInt16 CodecHelper::getPasswordHash( const AttributeList& rAttribs, sal_Int32 nElement )
+{
+ sal_Int32 nPasswordHash = rAttribs.getIntegerHex( nElement, 0 );
+ OSL_ENSURE( (0 <= nPasswordHash) && (nPasswordHash <= SAL_MAX_UINT16), "CodecHelper::getPasswordHash - invalid password hash" );
+ return static_cast< sal_uInt16 >( ((0 <= nPasswordHash) && (nPasswordHash <= SAL_MAX_UINT16)) ? nPasswordHash : 0 );
+}
+
+
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/contexthandler.cxx b/oox/source/core/contexthandler.cxx
new file mode 100644
index 000000000..80e274c4a
--- /dev/null
+++ b/oox/source/core/contexthandler.cxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/contexthandler.hxx>
+
+#include <oox/core/fragmenthandler.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+ContextHandler::ContextHandler( const ContextHandler& rParent ) :
+ ContextHandler_BASE(rParent),
+ mxBaseData( rParent.mxBaseData )
+{
+}
+
+ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) :
+ mxBaseData( rxBaseData )
+{
+}
+
+ContextHandler::~ContextHandler()
+{
+}
+
+XmlFilterBase& ContextHandler::getFilter() const
+{
+ return mxBaseData->mrFilter;
+}
+
+const Relations& ContextHandler::getRelations() const
+{
+ return *mxBaseData->mxRelations;
+}
+
+const OUString& ContextHandler::getFragmentPath() const
+{
+ return mxBaseData->maFragmentPath;
+}
+
+OUString ContextHandler::getFragmentPathFromRelation( const Relation& rRelation ) const
+{
+ return mxBaseData->mxRelations->getFragmentPathFromRelation( rRelation );
+}
+
+OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) const
+{
+ return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId );
+}
+
+OUString ContextHandler::getFragmentPathFromFirstType( std::u16string_view rType ) const
+{
+ return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
+}
+
+OUString ContextHandler::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType )
+ const
+{
+ return mxBaseData->mxRelations->getFragmentPathFromFirstTypeFromOfficeDoc( rType );
+}
+
+void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator )
+{
+ mxBaseData->mxLocator = rxLocator;
+}
+
+// com.sun.star.xml.sax.XFastContextHandler interface -------------------------
+
+void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& )
+{
+}
+
+void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
+{
+}
+
+void ContextHandler::endFastElement( sal_Int32 )
+{
+}
+
+void ContextHandler::endUnknownElement( const OUString&, const OUString& )
+{
+}
+
+Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& )
+{
+ return nullptr;
+}
+
+Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
+{
+ return nullptr;
+}
+
+void ContextHandler::characters( const OUString& )
+{
+}
+
+// record context interface ---------------------------------------------------
+
+ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& )
+{
+ return nullptr;
+}
+
+void ContextHandler::startRecord( sal_Int32, SequenceInputStream& )
+{
+}
+
+void ContextHandler::endRecord( sal_Int32 )
+{
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx
new file mode 100644
index 000000000..1613a3d33
--- /dev/null
+++ b/oox/source/core/contexthandler2.cxx
@@ -0,0 +1,340 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <o3tl/safeint.hxx>
+#include <osl/diagnose.h>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+
+/** Information about a processed element. */
+struct ElementInfo
+{
+ OUStringBuffer maChars; /// Collected element characters.
+ sal_Int32 mnElement; /// The element identifier.
+ bool mbTrimSpaces; /// True = trims leading/trailing spaces from text data.
+
+ explicit ElementInfo() : maChars( 0), mnElement( XML_TOKEN_INVALID ), mbTrimSpaces( false ) {}
+};
+
+ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBase& rFilter ) :
+ mxContextStack( std::make_shared<ContextStack>() ),
+ mnRootStackSize( 0 ),
+ mbEnableTrimSpace( bEnableTrimSpace ),
+ mrFilter( rFilter )
+{
+ pushElementInfo( XML_ROOT_CONTEXT );
+}
+
+ContextHandler2Helper::ContextHandler2Helper( const ContextHandler2Helper& rParent ) :
+ mxContextStack( rParent.mxContextStack ),
+ mnRootStackSize( rParent.mxContextStack->size() ),
+ mbEnableTrimSpace( rParent.mbEnableTrimSpace ),
+ mrFilter(rParent.mrFilter)
+{
+}
+
+ContextHandler2Helper::~ContextHandler2Helper()
+{
+}
+
+sal_Int32 ContextHandler2Helper::getCurrentElementWithMce() const
+{
+ return mxContextStack->empty() ? XML_ROOT_CONTEXT : mxContextStack->back().mnElement;
+}
+
+sal_Int32 ContextHandler2Helper::getCurrentElement() const
+{
+ auto It = std::find_if(mxContextStack->rbegin(), mxContextStack->rend(),
+ [](const ElementInfo& rItem) { return getNamespace(rItem.mnElement) != NMSP_mce; });
+ if (It != mxContextStack->rend())
+ return It->mnElement;
+ return XML_ROOT_CONTEXT;
+}
+
+sal_Int32 ContextHandler2Helper::getParentElement( sal_Int32 nCountBack ) const
+{
+ if( (nCountBack < 0) || (mxContextStack->size() < o3tl::make_unsigned( nCountBack )) )
+ return XML_TOKEN_INVALID;
+ return (mxContextStack->size() == static_cast< size_t >( nCountBack )) ?
+ XML_ROOT_CONTEXT : (*mxContextStack)[ mxContextStack->size() - nCountBack - 1 ].mnElement;
+}
+
+bool ContextHandler2Helper::isRootElement() const
+{
+ return mxContextStack->size() == mnRootStackSize + 1;
+}
+
+Reference< XFastContextHandler > ContextHandler2Helper::implCreateChildContext(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ // #i76091# process collected characters (calls onCharacters() if needed)
+ processCollectedChars();
+ ContextHandlerRef xContext = onCreateContext( nElement, AttributeList( rxAttribs ) );
+ return xContext;
+}
+
+void ContextHandler2Helper::implStartElement( sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ AttributeList aAttribs( rxAttribs );
+ pushElementInfo( nElement ).mbTrimSpaces = aAttribs.getToken( XML_TOKEN( space ), XML_TOKEN_INVALID ) != XML_preserve;
+ onStartElement( aAttribs );
+}
+
+void ContextHandler2Helper::implCharacters( std::u16string_view rChars )
+{
+ // #i76091# collect characters until new element starts or this element ends
+ if( !mxContextStack->empty() )
+ mxContextStack->back().maChars.append(rChars);
+}
+
+void ContextHandler2Helper::implEndElement( sal_Int32 nElement )
+{
+ OSL_ENSURE( getCurrentElementWithMce() == nElement, "ContextHandler2Helper::implEndElement - context stack broken" );
+ if( !mxContextStack->empty() )
+ {
+ // #i76091# process collected characters (calls onCharacters() if needed)
+ processCollectedChars();
+ onEndElement();
+ popElementInfo();
+ }
+}
+
+ContextHandlerRef ContextHandler2Helper::implCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ return onCreateRecordContext( nRecId, rStrm );
+}
+
+void ContextHandler2Helper::implStartRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ pushElementInfo( nRecId );
+ onStartRecord( rStrm );
+}
+
+void ContextHandler2Helper::implEndRecord( sal_Int32 nRecId )
+{
+ OSL_ENSURE( getCurrentElementWithMce() == nRecId, "ContextHandler2Helper::implEndRecord - context stack broken" );
+ if( !mxContextStack->empty() )
+ {
+ onEndRecord();
+ popElementInfo();
+ }
+}
+
+ElementInfo& ContextHandler2Helper::pushElementInfo( sal_Int32 nElement )
+{
+ mxContextStack->emplace_back();
+ ElementInfo& rInfo = mxContextStack->back();
+ rInfo.mnElement = nElement;
+ return rInfo;
+}
+
+void ContextHandler2Helper::popElementInfo()
+{
+ OSL_ENSURE( !mxContextStack->empty(), "ContextHandler2Helper::popElementInfo - context stack broken" );
+ if( !mxContextStack->empty() )
+ mxContextStack->pop_back();
+}
+
+void ContextHandler2Helper::processCollectedChars()
+{
+ OSL_ENSURE( !mxContextStack->empty(), "ContextHandler2Helper::processCollectedChars - no context info" );
+ if (mxContextStack->empty())
+ return;
+ ElementInfo& rInfo = mxContextStack->back();
+ if( !rInfo.maChars.isEmpty() )
+ {
+ OUString aChars = rInfo.maChars.makeStringAndClear();
+ if( mbEnableTrimSpace && rInfo.mbTrimSpaces )
+ aChars = aChars.trim();
+ if( !aChars.isEmpty() )
+ onCharacters( aChars );
+ }
+}
+
+ContextHandler2::ContextHandler2( ContextHandler2Helper const & rParent ) :
+ ContextHandler( dynamic_cast< ContextHandler const & >( rParent ) ),
+ ContextHandler2Helper( rParent )
+{
+}
+
+ContextHandler2::~ContextHandler2()
+{
+}
+
+// com.sun.star.xml.sax.XFastContextHandler interface -------------------------
+
+Reference< XFastContextHandler > SAL_CALL ContextHandler2::createFastChildContext(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ if( getNamespace( nElement ) == NMSP_mce ) // TODO for checking 'Ignorable'
+ {
+ if( prepareMceContext( nElement, AttributeList( rxAttribs ) ) )
+ return this;
+ return nullptr;
+ }
+
+ return implCreateChildContext( nElement, rxAttribs );
+}
+
+void SAL_CALL ContextHandler2::startFastElement(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ implStartElement( nElement, rxAttribs );
+}
+
+void SAL_CALL ContextHandler2::characters( const OUString& rChars )
+{
+ implCharacters( rChars );
+}
+
+void SAL_CALL ContextHandler2::endFastElement( sal_Int32 nElement )
+{
+ implEndElement( nElement );
+}
+
+bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case MCE_TOKEN( AlternateContent ):
+ addMCEState( MCE_STATE::Started );
+ break;
+
+ case MCE_TOKEN( Choice ):
+ {
+ if (isMCEStateEmpty() || getMCEState() != MCE_STATE::Started)
+ return false;
+
+ OUString aRequires = rAttribs.getString( XML_Requires, "none" );
+
+ // At this point we can't access namespaces as the correct xml filter
+ // is long gone. For now let's decide depending on a list of supported
+ // namespaces like we do in writerfilter
+
+ std::vector<OUString> aSupportedNS =
+ {
+ "a14", // Impress needs this to import math formulas.
+ "p14",
+ "p15",
+ "x12ac",
+ "v"
+ };
+
+ Reference<XServiceInfo> xModel(getDocFilter().getModel(), UNO_QUERY);
+ if (xModel.is() && xModel->supportsService("com.sun.star.sheet.SpreadsheetDocument"))
+ {
+ // No a14 for Calc documents, it would cause duplicated shapes as-is.
+ auto it = std::find(aSupportedNS.begin(), aSupportedNS.end(), "a14");
+ if (it != aSupportedNS.end())
+ {
+ aSupportedNS.erase(it);
+ }
+ }
+
+ if (std::find(aSupportedNS.begin(), aSupportedNS.end(), aRequires) != aSupportedNS.end())
+ setMCEState( MCE_STATE::FoundChoice ) ;
+ else
+ return false;
+ }
+ break;
+
+ case MCE_TOKEN( Fallback ):
+ if( !isMCEStateEmpty() && getMCEState() == MCE_STATE::Started )
+ break;
+ return false;
+ default:
+ {
+ OUString str = rAttribs.getString( MCE_TOKEN( Ignorable ), OUString() );
+ if( !str.isEmpty() )
+ {
+ // Sequence< css::xml::FastAttribute > attrs = rAttribs.getFastAttributeList()->getFastAttributes();
+ // printf("MCE: %s\n", OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
+ // TODO: Check & Get the namespaces in "Ignorable"
+ // printf("NS: %d : %s\n", attrs.getLength(), OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ }
+ return false;
+ }
+ return true;
+}
+
+// oox.core.RecordContext interface -------------------------------------------
+
+ContextHandlerRef ContextHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ return implCreateRecordContext( nRecId, rStrm );
+}
+
+void ContextHandler2::startRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ implStartRecord( nRecId, rStrm );
+}
+
+void ContextHandler2::endRecord( sal_Int32 nRecId )
+{
+ implEndRecord( nRecId );
+}
+
+// oox.core.ContextHandler2Helper interface -----------------------------------
+
+ContextHandlerRef ContextHandler2::onCreateContext( sal_Int32, const AttributeList& )
+{
+ return nullptr;
+}
+
+void ContextHandler2::onStartElement( const AttributeList& )
+{
+}
+
+void ContextHandler2::onCharacters( const OUString& )
+{
+}
+
+void ContextHandler2::onEndElement()
+{
+}
+
+ContextHandlerRef ContextHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& )
+{
+ return nullptr;
+}
+
+void ContextHandler2::onStartRecord( SequenceInputStream& )
+{
+}
+
+void ContextHandler2::onEndRecord()
+{
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx
new file mode 100644
index 000000000..53e5eb78a
--- /dev/null
+++ b/oox/source/core/fastparser.cxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <oox/core/fastparser.hxx>
+
+#include <oox/core/fasttokenhandler.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/helper/storagebase.hxx>
+#include <oox/token/namespacemap.hxx>
+
+#include <sax/fastparser.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace {
+
+class InputStreamCloseGuard
+{
+public:
+ explicit InputStreamCloseGuard( const Reference< XInputStream >& rxInStream, bool bCloseStream );
+ ~InputStreamCloseGuard();
+private:
+ Reference< XInputStream > mxInStream;
+ bool mbCloseStream;
+};
+
+InputStreamCloseGuard::InputStreamCloseGuard( const Reference< XInputStream >& rxInStream, bool bCloseStream ) :
+ mxInStream( rxInStream ),
+ mbCloseStream( bCloseStream )
+{
+}
+
+InputStreamCloseGuard::~InputStreamCloseGuard()
+{
+ if( mxInStream.is() && mbCloseStream ) try { mxInStream->closeInput(); } catch( Exception& ) {}
+}
+
+} // namespace
+
+FastParser::FastParser() :
+ mrNamespaceMap( StaticNamespaceMap() )
+{
+ // create a fast parser instance
+ mxParser = new sax_fastparser::FastSaxParser;
+
+ // create the fast tokenhandler
+ mxTokenHandler.set( new FastTokenHandler );
+
+ // create the fast token handler based on the OOXML token list
+ mxParser->setTokenHandler( mxTokenHandler );
+}
+
+FastParser::~FastParser()
+{
+}
+
+void FastParser::registerNamespace( sal_Int32 nNamespaceId )
+{
+ if( !mxParser.is() )
+ throw RuntimeException();
+
+ // add handling for OOXML strict here
+ const OUString* pNamespaceUrl = ContainerHelper::getMapElement( mrNamespaceMap.maTransitionalNamespaceMap, nNamespaceId );
+ if( !pNamespaceUrl )
+ throw IllegalArgumentException();
+
+ mxParser->registerNamespace( *pNamespaceUrl, nNamespaceId );
+
+ //also register the OOXML strict namespaces for the same id
+ const OUString* pNamespaceStrictUrl = ContainerHelper::getMapElement( mrNamespaceMap.maStrictNamespaceMap, nNamespaceId );
+ if(pNamespaceStrictUrl && (*pNamespaceUrl != *pNamespaceStrictUrl))
+ {
+ mxParser->registerNamespace( *pNamespaceStrictUrl, nNamespaceId );
+ }
+}
+
+void FastParser::setDocumentHandler( const Reference< XFastDocumentHandler >& rxDocHandler )
+{
+ if( !mxParser.is() )
+ throw RuntimeException();
+ mxParser->setFastDocumentHandler( rxDocHandler );
+}
+
+void FastParser::clearDocumentHandler()
+{
+ if (!mxParser.is())
+ return;
+ mxParser->setFastDocumentHandler(nullptr);
+}
+
+void FastParser::parseStream( const InputSource& rInputSource, bool bCloseStream )
+{
+ // guard closing the input stream also when exceptions are thrown
+ InputStreamCloseGuard aGuard( rInputSource.aInputStream, bCloseStream );
+ if( !mxParser.is() )
+ throw RuntimeException();
+ mxParser->parseStream( rInputSource );
+}
+
+void FastParser::parseStream( const Reference< XInputStream >& rxInStream, const OUString& rStreamName )
+{
+ InputSource aInputSource;
+ aInputSource.sSystemId = rStreamName;
+ aInputSource.aInputStream = rxInStream;
+ parseStream( aInputSource );
+}
+
+void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName )
+{
+ parseStream( rStorage.openInputStream( rStreamName ), rStreamName );
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/fasttokenhandler.cxx b/oox/source/core/fasttokenhandler.cxx
new file mode 100644
index 000000000..398772df0
--- /dev/null
+++ b/oox/source/core/fasttokenhandler.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/fasttokenhandler.hxx>
+
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <oox/token/tokenmap.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+using namespace ::com::sun::star;
+
+namespace oox::core {
+
+using namespace ::com::sun::star::uno;
+
+FastTokenHandler::FastTokenHandler() :
+ mrTokenMap( StaticTokenMap() )
+{
+}
+
+FastTokenHandler::~FastTokenHandler()
+{
+}
+
+// XServiceInfo
+OUString SAL_CALL FastTokenHandler::getImplementationName()
+{
+ return "com.sun.star.comp.oox.core.FastTokenHandler";
+}
+
+sal_Bool SAL_CALL FastTokenHandler::supportsService( const OUString& rServiceName )
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+Sequence< OUString > SAL_CALL FastTokenHandler::getSupportedServiceNames()
+{
+ Sequence<OUString> aServiceNames { "com.sun.star.xml.sax.FastTokenHandler" };
+ return aServiceNames;
+}
+
+Sequence< sal_Int8 > FastTokenHandler::getUTF8Identifier( sal_Int32 nToken )
+{
+ return mrTokenMap.getUtf8TokenName( nToken );
+}
+
+sal_Int32 FastTokenHandler::getTokenFromUTF8( const Sequence< sal_Int8 >& rIdentifier )
+{
+ return mrTokenMap.getTokenFromUtf8( rIdentifier );
+}
+
+sal_Int32 FastTokenHandler::getTokenDirect( const char *pToken, sal_Int32 nLength ) const
+{
+ return mrTokenMap.getTokenFromUTF8( pToken, nLength );
+}
+
+} // namespace oox::core
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_core_FastTokenHandler_get_implementation(
+ uno::XComponentContext* /*pCtx*/, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::core::FastTokenHandler());
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
new file mode 100644
index 000000000..6ae55238c
--- /dev/null
+++ b/oox/source/core/filterbase.cxx
@@ -0,0 +1,596 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/documentconstants.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <unotools/mediadescriptor.hxx>
+#include <osl/diagnose.h>
+#include <rtl/uri.hxx>
+#include <memory>
+#include <mutex>
+#include <set>
+
+#include <oox/core/filterbase.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/ole/oleobjecthelper.hxx>
+#include <oox/ole/vbaproject.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::graphic;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::task;
+using namespace ::com::sun::star::uno;
+
+using ::com::sun::star::container::XNameAccess;
+using utl::MediaDescriptor;
+using ::comphelper::SequenceAsHashMap;
+using ::oox::ole::OleObjectHelper;
+using ::oox::ole::VbaProject;
+
+namespace {
+
+struct UrlPool
+{
+ std::mutex maMutex;
+ ::std::set< OUString > maUrls;
+};
+
+UrlPool& StaticUrlPool()
+{
+ static UrlPool SINGLETON;
+ return SINGLETON;
+}
+
+/** This guard prevents recursive loading/saving of the same document. */
+class DocumentOpenedGuard
+{
+public:
+ explicit DocumentOpenedGuard( const OUString& rUrl );
+ ~DocumentOpenedGuard();
+ DocumentOpenedGuard(const DocumentOpenedGuard&) = delete;
+ DocumentOpenedGuard& operator=(const DocumentOpenedGuard&) = delete;
+
+ bool isValid() const { return mbValid; }
+
+private:
+ OUString maUrl;
+ bool mbValid;
+};
+
+DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl )
+{
+ UrlPool& rUrlPool = StaticUrlPool();
+ std::scoped_lock aGuard( rUrlPool.maMutex );
+ mbValid = rUrl.isEmpty() || (rUrlPool.maUrls.count( rUrl ) == 0);
+ if( mbValid && !rUrl.isEmpty() )
+ {
+ rUrlPool.maUrls.insert( rUrl );
+ maUrl = rUrl;
+ }
+}
+
+DocumentOpenedGuard::~DocumentOpenedGuard()
+{
+ UrlPool& rUrlPool = StaticUrlPool();
+ std::scoped_lock aGuard( rUrlPool.maMutex );
+ if( !maUrl.isEmpty() )
+ rUrlPool.maUrls.erase( maUrl );
+}
+
+/** Specifies whether this filter is an import or export filter. */
+enum FilterDirection
+{
+ FILTERDIRECTION_UNKNOWN,
+ FILTERDIRECTION_IMPORT,
+ FILTERDIRECTION_EXPORT
+};
+
+} // namespace
+
+struct FilterBaseImpl
+{
+ typedef std::shared_ptr< GraphicHelper > GraphicHelperRef;
+ typedef std::shared_ptr< ModelObjectHelper > ModelObjHelperRef;
+ typedef std::shared_ptr< OleObjectHelper > OleObjHelperRef;
+ typedef std::shared_ptr< VbaProject > VbaProjectRef;
+
+ FilterDirection meDirection;
+ SequenceAsHashMap maArguments;
+ SequenceAsHashMap maFilterData;
+ MediaDescriptor maMediaDesc;
+ OUString maFileUrl;
+ StorageRef mxStorage;
+ OoxmlVersion meVersion;
+
+ GraphicHelperRef mxGraphicHelper; /// Graphic and graphic object handling.
+ ModelObjHelperRef mxModelObjHelper; /// Tables to create new named drawing objects.
+ std::map<css::uno::Reference<css::lang::XMultiServiceFactory>, ModelObjHelperRef>
+ mxModelObjHelpers;
+ OleObjHelperRef mxOleObjHelper; /// OLE object handling.
+ VbaProjectRef mxVbaProject; /// VBA project manager.
+
+ Reference< XComponentContext > mxComponentContext;
+ Reference< XModel > mxModel;
+ Reference< XMultiServiceFactory > mxModelFactory;
+ Reference< XFrame > mxTargetFrame;
+ Reference< XInputStream > mxInStream;
+ Reference< XStream > mxOutStream;
+ Reference< XStatusIndicator > mxStatusIndicator;
+ Reference< XInteractionHandler > mxInteractionHandler;
+ Reference< XShape > mxParentShape;
+
+ bool mbExportVBA;
+
+ bool mbExportTemplate;
+
+ /// @throws RuntimeException
+ explicit FilterBaseImpl( const Reference< XComponentContext >& rxContext );
+
+ /// @throws IllegalArgumentException
+ void setDocumentModel( const Reference< XComponent >& rxComponent );
+};
+
+FilterBaseImpl::FilterBaseImpl( const Reference< XComponentContext >& rxContext ) :
+ meDirection( FILTERDIRECTION_UNKNOWN ),
+ meVersion( ECMA_DIALECT ),
+ mxComponentContext( rxContext, UNO_SET_THROW ),
+ mbExportVBA(false),
+ mbExportTemplate(false)
+{
+}
+
+void FilterBaseImpl::setDocumentModel( const Reference< XComponent >& rxComponent )
+{
+ try
+ {
+ mxModel.set( rxComponent, UNO_QUERY_THROW );
+ mxModelFactory.set( rxComponent, UNO_QUERY_THROW );
+ }
+ catch( Exception& )
+ {
+ throw IllegalArgumentException();
+ }
+}
+
+FilterBase::FilterBase( const Reference< XComponentContext >& rxContext ) :
+ mxImpl( new FilterBaseImpl( rxContext ) )
+{
+}
+
+FilterBase::~FilterBase()
+{
+}
+
+bool FilterBase::isImportFilter() const
+{
+ return mxImpl->meDirection == FILTERDIRECTION_IMPORT;
+}
+
+bool FilterBase::isExportFilter() const
+{
+ return mxImpl->meDirection == FILTERDIRECTION_EXPORT;
+}
+
+OoxmlVersion FilterBase::getVersion() const
+{
+ return mxImpl->meVersion;
+}
+
+const Reference< XComponentContext >& FilterBase::getComponentContext() const
+{
+ return mxImpl->mxComponentContext;
+}
+
+const Reference< XModel >& FilterBase::getModel() const
+{
+ return mxImpl->mxModel;
+}
+
+const Reference< XMultiServiceFactory >& FilterBase::getModelFactory() const
+{
+ return mxImpl->mxModelFactory;
+}
+
+const Reference< XFrame >& FilterBase::getTargetFrame() const
+{
+ return mxImpl->mxTargetFrame;
+}
+
+const Reference< XStatusIndicator >& FilterBase::getStatusIndicator() const
+{
+ return mxImpl->mxStatusIndicator;
+}
+
+MediaDescriptor& FilterBase::getMediaDescriptor() const
+{
+ return mxImpl->maMediaDesc;
+}
+
+SequenceAsHashMap& FilterBase::getFilterData() const
+{
+ return mxImpl->maFilterData;
+}
+
+const OUString& FilterBase::getFileUrl() const
+{
+ return mxImpl->maFileUrl;
+}
+
+namespace {
+
+bool lclIsDosDrive( const OUString& rUrl, sal_Int32 nPos = 0 )
+{
+ return
+ (rUrl.getLength() >= nPos + 3) &&
+ ((('A' <= rUrl[ nPos ]) && (rUrl[ nPos ] <= 'Z')) || (('a' <= rUrl[ nPos ]) && (rUrl[ nPos ] <= 'z'))) &&
+ (rUrl[ nPos + 1 ] == ':') &&
+ (rUrl[ nPos + 2 ] == '/');
+}
+
+} // namespace
+
+OUString FilterBase::getAbsoluteUrl( const OUString& rUrl ) const
+{
+ // handle some special cases before calling ::rtl::Uri::convertRelToAbs()
+
+ static const OUStringLiteral aFileSchema = u"file:";
+ static const OUStringLiteral aFilePrefix = u"file:///";
+ const sal_Int32 nFilePrefixLen = aFilePrefix.getLength();
+ static const OUStringLiteral aUncPrefix = u"//";
+
+ /* (1) convert all backslashes to slashes, and check that passed URL is
+ not empty. */
+ OUString aUrl = rUrl.replace( '\\', '/' );
+ if( aUrl.isEmpty() )
+ return aUrl;
+
+ /* (2) add 'file:///' to absolute Windows paths, e.g. convert
+ 'C:/path/file' to 'file:///c:/path/file'. */
+ if( lclIsDosDrive( aUrl ) )
+ return aFilePrefix + aUrl;
+
+ /* (3) add 'file:' to UNC paths, e.g. convert '//server/path/file' to
+ 'file://server/path/file'. */
+ if( aUrl.match( aUncPrefix ) )
+ return aFileSchema + aUrl;
+
+ /* (4) remove additional slashes from UNC paths, e.g. convert
+ 'file://///server/path/file' to 'file://server/path/file'. */
+ if( (aUrl.getLength() >= nFilePrefixLen + 2) &&
+ aUrl.match( aFilePrefix ) &&
+ aUrl.match( aUncPrefix, nFilePrefixLen ) )
+ {
+ return aFileSchema + aUrl.subView( nFilePrefixLen );
+ }
+
+ /* (5) handle URLs relative to current drive, e.g. the URL '/path1/file1'
+ relative to the base URL 'file:///C:/path2/file2' does not result in
+ the expected 'file:///C:/path1/file1', but in 'file:///path1/file1'. */
+ if( aUrl.startsWith("/") &&
+ mxImpl->maFileUrl.match( aFilePrefix ) &&
+ lclIsDosDrive( mxImpl->maFileUrl, nFilePrefixLen ) )
+ {
+ return OUString::Concat(mxImpl->maFileUrl.subView( 0, nFilePrefixLen + 3 )) + aUrl.subView( 1 );
+ }
+
+ try
+ {
+ return ::rtl::Uri::convertRelToAbs( mxImpl->maFileUrl, aUrl );
+ }
+ catch( ::rtl::MalformedUriException& )
+ {
+ }
+ return aUrl;
+}
+
+StorageRef const & FilterBase::getStorage() const
+{
+ return mxImpl->mxStorage;
+}
+
+Reference< XInputStream > FilterBase::openInputStream( const OUString& rStreamName ) const
+{
+ if (!mxImpl->mxStorage)
+ throw RuntimeException();
+ return mxImpl->mxStorage->openInputStream( rStreamName );
+}
+
+Reference< XOutputStream > FilterBase::openOutputStream( const OUString& rStreamName ) const
+{
+ return mxImpl->mxStorage->openOutputStream( rStreamName );
+}
+
+void FilterBase::commitStorage() const
+{
+ mxImpl->mxStorage->commit();
+}
+
+// helpers
+
+GraphicHelper& FilterBase::getGraphicHelper() const
+{
+ if( !mxImpl->mxGraphicHelper )
+ mxImpl->mxGraphicHelper.reset( implCreateGraphicHelper() );
+ return *mxImpl->mxGraphicHelper;
+}
+
+ModelObjectHelper& FilterBase::getModelObjectHelper() const
+{
+ if( !mxImpl->mxModelObjHelper )
+ mxImpl->mxModelObjHelper = std::make_shared<ModelObjectHelper>( mxImpl->mxModelFactory );
+ return *mxImpl->mxModelObjHelper;
+}
+
+ModelObjectHelper& FilterBase::getModelObjectHelperForModel(
+ const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory) const
+{
+ if (!mxImpl->mxModelObjHelpers.count(xFactory))
+ mxImpl->mxModelObjHelpers[xFactory] = std::make_shared<ModelObjectHelper>(xFactory);
+ return *mxImpl->mxModelObjHelpers[xFactory];
+}
+
+OleObjectHelper& FilterBase::getOleObjectHelper() const
+{
+ if( !mxImpl->mxOleObjHelper )
+ mxImpl->mxOleObjHelper = std::make_shared<OleObjectHelper>(mxImpl->mxModelFactory, mxImpl->mxModel);
+ return *mxImpl->mxOleObjHelper;
+}
+
+VbaProject& FilterBase::getVbaProject() const
+{
+ if( !mxImpl->mxVbaProject )
+ mxImpl->mxVbaProject.reset( implCreateVbaProject() );
+ return *mxImpl->mxVbaProject;
+}
+
+bool FilterBase::importBinaryData( StreamDataSequence & orDataSeq, const OUString& rStreamName )
+{
+ OSL_ENSURE( !rStreamName.isEmpty(), "FilterBase::importBinaryData - empty stream name" );
+ if( rStreamName.isEmpty() )
+ return false;
+
+ // try to open the stream (this may fail - do not assert)
+ BinaryXInputStream aInStrm( openInputStream( rStreamName ), true );
+ if( aInStrm.isEof() )
+ return false;
+
+ // copy the entire stream to the passed sequence
+ SequenceOutputStream aOutStrm( orDataSeq );
+ aInStrm.copyToStream( aOutStrm );
+ return true;
+}
+
+// com.sun.star.lang.XServiceInfo interface
+
+sal_Bool SAL_CALL FilterBase::supportsService( const OUString& rServiceName )
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+Sequence< OUString > SAL_CALL FilterBase::getSupportedServiceNames()
+{
+ return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExportFilter" };
+}
+
+// com.sun.star.lang.XInitialization interface
+
+void SAL_CALL FilterBase::initialize( const Sequence< Any >& rArgs )
+{
+ if( rArgs.getLength() >= 2 ) try
+ {
+ mxImpl->maArguments << rArgs[ 1 ];
+ }
+ catch( Exception& )
+ {
+ }
+
+ if (!rArgs.hasElements())
+ return;
+
+ Sequence<css::beans::PropertyValue> aSeq;
+ rArgs[0] >>= aSeq;
+ for (const auto& rVal : std::as_const(aSeq))
+ {
+ if (rVal.Name == "UserData")
+ {
+ css::uno::Sequence<OUString> aUserDataSeq;
+ rVal.Value >>= aUserDataSeq;
+ if (comphelper::findValue(aUserDataSeq, "macro-enabled") != -1)
+ mxImpl->mbExportVBA = true;
+ }
+ else if (rVal.Name == "Flags")
+ {
+ sal_Int32 nFlags(0);
+ rVal.Value >>= nFlags;
+ mxImpl->mbExportTemplate = bool(static_cast<SfxFilterFlags>(nFlags) & SfxFilterFlags::TEMPLATE);
+ }
+ }
+}
+
+// com.sun.star.document.XImporter interface
+
+void SAL_CALL FilterBase::setTargetDocument( const Reference< XComponent >& rxDocument )
+{
+ mxImpl->setDocumentModel( rxDocument );
+ mxImpl->meDirection = FILTERDIRECTION_IMPORT;
+}
+
+// com.sun.star.document.XExporter interface
+
+void SAL_CALL FilterBase::setSourceDocument( const Reference< XComponent >& rxDocument )
+{
+ mxImpl->setDocumentModel( rxDocument );
+ mxImpl->meDirection = FILTERDIRECTION_EXPORT;
+}
+
+// com.sun.star.document.XFilter interface
+
+sal_Bool SAL_CALL FilterBase::filter( const Sequence< PropertyValue >& rMediaDescSeq )
+{
+ if( !mxImpl->mxModel.is() || !mxImpl->mxModelFactory.is() || (mxImpl->meDirection == FILTERDIRECTION_UNKNOWN) )
+ throw RuntimeException();
+
+ bool bRet = false;
+ setMediaDescriptor( rMediaDescSeq );
+ DocumentOpenedGuard aOpenedGuard( mxImpl->maFileUrl );
+ if( aOpenedGuard.isValid() || mxImpl->maFileUrl.isEmpty() )
+ {
+ Reference<XModel> xTempModel = mxImpl->mxModel;
+ xTempModel->lockControllers();
+ comphelper::ScopeGuard const lockControllersGuard([xTempModel]() {
+ xTempModel->unlockControllers();
+ });
+
+ switch( mxImpl->meDirection )
+ {
+ case FILTERDIRECTION_UNKNOWN:
+ break;
+ case FILTERDIRECTION_IMPORT:
+ if( mxImpl->mxInStream.is() )
+ {
+ mxImpl->mxStorage = implCreateStorage( mxImpl->mxInStream );
+ bRet = mxImpl->mxStorage && importDocument();
+ }
+ break;
+ case FILTERDIRECTION_EXPORT:
+ if( mxImpl->mxOutStream.is() )
+ {
+ mxImpl->mxStorage = implCreateStorage( mxImpl->mxOutStream );
+ bRet = mxImpl->mxStorage && exportDocument() && implFinalizeExport( getMediaDescriptor() );
+ }
+ break;
+ }
+ }
+ return bRet;
+}
+
+void SAL_CALL FilterBase::cancel()
+{
+}
+
+// protected
+
+Reference< XInputStream > FilterBase::implGetInputStream( MediaDescriptor& rMediaDesc ) const
+{
+ return rMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INPUTSTREAM, Reference< XInputStream >() );
+}
+
+Reference< XStream > FilterBase::implGetOutputStream( MediaDescriptor& rMediaDesc ) const
+{
+ return rMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STREAMFOROUTPUT, Reference< XStream >() );
+}
+
+bool FilterBase::implFinalizeExport( MediaDescriptor& /*rMediaDescriptor*/ )
+{
+ return true;
+}
+
+Reference< XStream > const & FilterBase::getMainDocumentStream( ) const
+{
+ return mxImpl->mxOutStream;
+}
+
+// private
+
+void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDescSeq )
+{
+ mxImpl->maMediaDesc << rMediaDescSeq;
+
+ switch( mxImpl->meDirection )
+ {
+ case FILTERDIRECTION_UNKNOWN:
+ OSL_FAIL( "FilterBase::setMediaDescriptor - invalid filter direction" );
+ break;
+ case FILTERDIRECTION_IMPORT:
+ mxImpl->maMediaDesc.addInputStream();
+ mxImpl->mxInStream = implGetInputStream( mxImpl->maMediaDesc );
+ OSL_ENSURE( mxImpl->mxInStream.is(), "FilterBase::setMediaDescriptor - missing input stream" );
+ break;
+ case FILTERDIRECTION_EXPORT:
+ mxImpl->mxOutStream = implGetOutputStream( mxImpl->maMediaDesc );
+ OSL_ENSURE( mxImpl->mxOutStream.is(), "FilterBase::setMediaDescriptor - missing output stream" );
+ break;
+ }
+
+ mxImpl->maFileUrl = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL, OUString() );
+ mxImpl->mxTargetFrame = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_FRAME, Reference< XFrame >() );
+ mxImpl->mxStatusIndicator = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STATUSINDICATOR, Reference< XStatusIndicator >() );
+ mxImpl->mxInteractionHandler = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER, Reference< XInteractionHandler >() );
+ mxImpl->mxParentShape = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "ParentShape", mxImpl->mxParentShape );
+ mxImpl->maFilterData = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "FilterData", Sequence< PropertyValue >() );
+
+ // Check for ISO OOXML
+ OUString sFilterName = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "FilterName", OUString() );
+ try
+ {
+ Reference<XMultiServiceFactory> xFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW);
+ Reference<XNameAccess> xFilters(xFactory->createInstance("com.sun.star.document.FilterFactory" ), UNO_QUERY_THROW );
+ Any aValues = xFilters->getByName( sFilterName );
+ Sequence<PropertyValue > aPropSeq;
+ aValues >>= aPropSeq;
+ SequenceAsHashMap aProps( aPropSeq );
+
+ sal_Int32 nVersion = aProps.getUnpackedValueOrDefault( "FileFormatVersion", sal_Int32( 0 ) );
+ mxImpl->meVersion = OoxmlVersion( nVersion );
+ }
+ catch ( const Exception& )
+ {
+ // Not ISO OOXML
+ }
+}
+
+GraphicHelper* FilterBase::implCreateGraphicHelper() const
+{
+ // default: return base implementation without any special behaviour
+ return new GraphicHelper( mxImpl->mxComponentContext, mxImpl->mxTargetFrame, mxImpl->mxStorage );
+}
+
+bool FilterBase::exportVBA() const
+{
+ return mxImpl->mbExportVBA;
+}
+
+bool FilterBase::isExportTemplate() const
+{
+ return mxImpl->mbExportTemplate;
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
new file mode 100644
index 000000000..455d9a8b5
--- /dev/null
+++ b/oox/source/core/filterdetect.cxx
@@ -0,0 +1,479 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/filterdetect.hxx>
+
+#include <com/sun/star/io/XStream.hpp>
+#include <comphelper/docpasswordhelper.hxx>
+#include <unotools/mediadescriptor.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+#include <oox/core/fastparser.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/zipstorage.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <oox/crypto/DocumentDecryption.hxx>
+
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+
+using namespace ::com::sun::star;
+
+namespace oox::core {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uri;
+
+using utl::MediaDescriptor;
+using comphelper::IDocPasswordVerifier;
+using comphelper::DocPasswordVerifierResult;
+
+FilterDetectDocHandler::FilterDetectDocHandler( const Reference< XComponentContext >& rxContext, OUString& rFilterName, const OUString& rFileName ) :
+ mrFilterName( rFilterName ),
+ maFileName(rFileName),
+ maOOXMLVariant( OOXMLVariant::ECMA_Transitional ),
+ mxContext( rxContext )
+{
+ maContextStack.reserve( 2 );
+}
+
+FilterDetectDocHandler::~FilterDetectDocHandler()
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::startDocument()
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::endDocument()
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::setDocumentLocator( const Reference<XLocator>& /*xLocator*/ )
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::startFastElement(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rAttribs )
+{
+ AttributeList aAttribs( rAttribs );
+ switch ( nElement )
+ {
+ // cases for _rels/.rels
+ case PR_TOKEN( Relationships ):
+ break;
+ case PR_TOKEN( Relationship ):
+ if( !maContextStack.empty() && (maContextStack.back() == PR_TOKEN( Relationships )) )
+ parseRelationship( aAttribs );
+ break;
+
+ // cases for [Content_Types].xml
+ case PC_TOKEN( Types ):
+ break;
+ case PC_TOKEN( Default ):
+ if( !maContextStack.empty() && (maContextStack.back() == PC_TOKEN( Types )) )
+ parseContentTypesDefault( aAttribs );
+ break;
+ case PC_TOKEN( Override ):
+ if( !maContextStack.empty() && (maContextStack.back() == PC_TOKEN( Types )) )
+ parseContentTypesOverride( aAttribs );
+ break;
+ }
+ maContextStack.push_back( nElement );
+}
+
+void SAL_CALL FilterDetectDocHandler::startUnknownElement(
+ const OUString& /*Namespace*/, const OUString& /*Name*/, const Reference<XFastAttributeList>& /*Attribs*/ )
+{
+}
+
+void SAL_CALL FilterDetectDocHandler::endFastElement( sal_Int32 /*nElement*/ )
+{
+ maContextStack.pop_back();
+}
+
+void SAL_CALL FilterDetectDocHandler::endUnknownElement(
+ const OUString& /*Namespace*/, const OUString& /*Name*/ )
+{
+}
+
+Reference<XFastContextHandler> SAL_CALL FilterDetectDocHandler::createFastChildContext(
+ sal_Int32 /*Element*/, const Reference<XFastAttributeList>& /*Attribs*/ )
+{
+ return this;
+}
+
+Reference<XFastContextHandler> SAL_CALL FilterDetectDocHandler::createUnknownChildContext(
+ const OUString& /*Namespace*/, const OUString& /*Name*/, const Reference<XFastAttributeList>& /*Attribs*/)
+{
+ return this;
+}
+
+void SAL_CALL FilterDetectDocHandler::characters( const OUString& /*aChars*/ )
+{
+}
+
+void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
+{
+ OUString aType = rAttribs.getString( XML_Type, OUString() );
+
+ // tdf#131936 Remember filter when opening file as 'Office Open XML Text'
+ if (aType.startsWithIgnoreAsciiCase("http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties"))
+ maOOXMLVariant = OOXMLVariant::ISO_Transitional;
+ else if (aType.startsWithIgnoreAsciiCase("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"))
+ maOOXMLVariant = OOXMLVariant::ECMA_Transitional;
+ else if (aType.startsWithIgnoreAsciiCase("http://purl.oclc.org/ooxml/officeDocument"))
+ maOOXMLVariant = OOXMLVariant::ISO_Strict;
+
+ if ( aType != "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" // OOXML Transitional
+ && aType != "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument" ) //OOXML strict
+ return;
+
+ Reference<XUriReferenceFactory> xFactory = UriReferenceFactory::create( mxContext );
+ try
+ {
+ // use '/' to representent the root of the zip package ( and provide a 'file' scheme to
+ // keep the XUriReference implementation happy )
+ Reference< XUriReference > xBase = xFactory->parse( "file:///" );
+
+ Reference< XUriReference > xPart = xFactory->parse( rAttribs.getString( XML_Target, OUString() ) );
+ Reference< XUriReference > xAbs = xFactory->makeAbsolute( xBase, xPart, true, RelativeUriExcessParentSegments_RETAIN );
+
+ if ( xAbs.is() )
+ maTargetPath = xAbs->getPath();
+ }
+ catch( const Exception& )
+ {
+ }
+}
+
+OUString FilterDetectDocHandler::getFilterNameFromContentType( std::u16string_view rContentType, const OUString& rFileName )
+{
+ bool bDocm = rFileName.endsWithIgnoreAsciiCase(".docm");
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" && !bDocm )
+ {
+ switch (maOOXMLVariant)
+ {
+ case OOXMLVariant::ISO_Transitional:
+ case OOXMLVariant::ISO_Strict: // Not supported, map to ISO transitional
+ return "writer_OOXML";
+ case OOXMLVariant::ECMA_Transitional:
+ return "writer_MS_Word_2007";
+ }
+ }
+
+ if( rContentType == u"application/vnd.ms-word.document.macroEnabled.main+xml" || bDocm )
+ return "writer_MS_Word_2007_VBA";
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-word.template.macroEnabledTemplate.main+xml" )
+ {
+ switch (maOOXMLVariant)
+ {
+ case OOXMLVariant::ISO_Transitional:
+ case OOXMLVariant::ISO_Strict: // Not supported, map to ISO transitional
+ return "writer_OOXML_Text_Template";
+ case OOXMLVariant::ECMA_Transitional:
+ return "writer_MS_Word_2007_Template";
+ }
+ }
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")
+ return "MS Excel 2007 XML";
+
+ if (rContentType == u"application/vnd.ms-excel.sheet.macroEnabled.main+xml")
+ return "MS Excel 2007 VBA XML";
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-excel.template.macroEnabled.main+xml" )
+ return "MS Excel 2007 XML Template";
+
+ if ( rContentType == u"application/vnd.ms-excel.sheet.binary.macroEnabled.main" )
+ return "MS Excel 2007 Binary";
+
+ if (rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml")
+ return "MS PowerPoint 2007 XML";
+
+ if (rContentType == u"application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml")
+ return "MS PowerPoint 2007 XML VBA";
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ||
+ rContentType == u"application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" )
+ return "MS PowerPoint 2007 XML AutoPlay";
+
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-powerpoint.template.macroEnabled.main+xml" )
+ return "MS PowerPoint 2007 XML Template";
+
+ return OUString();
+}
+
+void FilterDetectDocHandler::parseContentTypesDefault( const AttributeList& rAttribs )
+{
+ // only if no overridden part name found
+ if( mrFilterName.isEmpty() )
+ {
+ // check if target path ends with extension
+ OUString aExtension = rAttribs.getString( XML_Extension, OUString() );
+ sal_Int32 nExtPos = maTargetPath.getLength() - aExtension.getLength();
+ if( (nExtPos > 0) && (maTargetPath[ nExtPos - 1 ] == '.') && maTargetPath.match( aExtension, nExtPos ) )
+ mrFilterName = getFilterNameFromContentType( rAttribs.getString( XML_ContentType, OUString() ), maFileName );
+ }
+}
+
+void FilterDetectDocHandler::parseContentTypesOverride( const AttributeList& rAttribs )
+{
+ if( rAttribs.getString( XML_PartName, OUString() ) == maTargetPath )
+ mrFilterName = getFilterNameFromContentType( rAttribs.getString( XML_ContentType, OUString() ), maFileName );
+}
+
+FilterDetect::FilterDetect( const Reference< XComponentContext >& rxContext ) :
+ mxContext( rxContext, UNO_SET_THROW )
+{
+}
+
+FilterDetect::~FilterDetect()
+{
+}
+
+namespace
+{
+
+bool lclIsZipPackage( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm )
+{
+ ZipStorage aZipStorage( rxContext, rxInStrm );
+ return aZipStorage.isStorage();
+}
+
+class PasswordVerifier : public IDocPasswordVerifier
+{
+public:
+ explicit PasswordVerifier( crypto::DocumentDecryption& aDecryptor );
+
+ virtual DocPasswordVerifierResult verifyPassword( const OUString& rPassword, Sequence<NamedValue>& rEncryptionData ) override;
+
+ virtual DocPasswordVerifierResult verifyEncryptionData( const Sequence<NamedValue>& rEncryptionData ) override;
+private:
+ crypto::DocumentDecryption& mDecryptor;
+};
+
+PasswordVerifier::PasswordVerifier( crypto::DocumentDecryption& aDecryptor ) :
+ mDecryptor(aDecryptor)
+{}
+
+comphelper::DocPasswordVerifierResult PasswordVerifier::verifyPassword( const OUString& rPassword, Sequence<NamedValue>& rEncryptionData )
+{
+ try
+ {
+ if (mDecryptor.generateEncryptionKey(rPassword))
+ rEncryptionData = mDecryptor.createEncryptionData(rPassword);
+ }
+ catch (...)
+ {
+ // Any exception is a reason to abort
+ return comphelper::DocPasswordVerifierResult::Abort;
+ }
+
+ return rEncryptionData.hasElements() ? comphelper::DocPasswordVerifierResult::OK : comphelper::DocPasswordVerifierResult::WrongPassword;
+}
+
+comphelper::DocPasswordVerifierResult PasswordVerifier::verifyEncryptionData( const Sequence<NamedValue>& )
+{
+ return comphelper::DocPasswordVerifierResult::WrongPassword;
+}
+
+} // namespace
+
+Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescriptor& rMediaDescriptor ) const
+{
+ // try the plain input stream
+ Reference<XInputStream> xInputStream( rMediaDescriptor[ MediaDescriptor::PROP_INPUTSTREAM ], UNO_QUERY );
+ if( !xInputStream.is() || lclIsZipPackage( mxContext, xInputStream ) )
+ return xInputStream;
+
+ // check if a temporary file is passed in the 'ComponentData' property
+ Reference<XStream> xDecrypted( rMediaDescriptor.getComponentDataEntry( "DecryptedPackage" ), UNO_QUERY );
+ if( xDecrypted.is() )
+ {
+ Reference<XInputStream> xDecryptedInputStream = xDecrypted->getInputStream();
+ if( lclIsZipPackage( mxContext, xDecryptedInputStream ) )
+ return xDecryptedInputStream;
+ }
+
+ // try to decrypt an encrypted OLE package
+ oox::ole::OleStorage aOleStorage( mxContext, xInputStream, false );
+ if( aOleStorage.isStorage() )
+ {
+ try
+ {
+ crypto::DocumentDecryption aDecryptor(mxContext, aOleStorage);
+
+ if( aDecryptor.readEncryptionInfo() )
+ {
+ /* "VelvetSweatshop" is the built-in default encryption
+ password used by MS Excel for the "workbook protection"
+ feature with password. Try this first before prompting the
+ user for a password. */
+ std::vector<OUString> aDefaultPasswords;
+ aDefaultPasswords.emplace_back("VelvetSweatshop");
+
+ /* Use the comphelper password helper to request a password.
+ This helper returns either with the correct password
+ (according to the verifier), or with an empty string if
+ user has cancelled the password input dialog. */
+ PasswordVerifier aVerifier( aDecryptor );
+ Sequence<NamedValue> aEncryptionData = rMediaDescriptor.requestAndVerifyDocPassword(
+ aVerifier,
+ comphelper::DocPasswordRequestType::MS,
+ &aDefaultPasswords );
+
+ if( !aEncryptionData.hasElements() )
+ {
+ rMediaDescriptor[ MediaDescriptor::PROP_ABORTED ] <<= true;
+ }
+ else
+ {
+ // create MemoryStream for unencrypted package - rather not put this in a tempfile
+ Reference<XStream> const xTempStream(
+ mxContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.comp.MemoryStream", mxContext),
+ UNO_QUERY_THROW);
+
+ // if decryption was unsuccessful (corrupted file or any other reason)
+ if (!aDecryptor.decrypt(xTempStream))
+ {
+ rMediaDescriptor[ MediaDescriptor::PROP_ABORTED ] <<= true;
+ }
+ else
+ {
+ // store temp file in media descriptor to keep it alive
+ rMediaDescriptor.setComponentDataEntry( "DecryptedPackage", Any( xTempStream ) );
+
+ Reference<XInputStream> xDecryptedInputStream = xTempStream->getInputStream();
+ if( lclIsZipPackage( mxContext, xDecryptedInputStream ) )
+ return xDecryptedInputStream;
+ }
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ }
+ }
+ return Reference<XInputStream>();
+}
+
+// com.sun.star.lang.XServiceInfo interface -----------------------------------
+
+OUString SAL_CALL FilterDetect::getImplementationName()
+{
+ return "com.sun.star.comp.oox.FormatDetector";
+}
+
+sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName )
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+Sequence< OUString > SAL_CALL FilterDetect::getSupportedServiceNames()
+{
+ return { "com.sun.star.frame.ExtendedTypeDetection" };
+}
+
+// com.sun.star.document.XExtendedFilterDetection interface -------------------
+
+OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq )
+{
+ OUString aFilterName;
+ MediaDescriptor aMediaDescriptor( rMediaDescSeq );
+
+ try
+ {
+ aMediaDescriptor.addInputStream();
+
+ /* Get the unencrypted input stream. This may include creation of a
+ temporary file that contains the decrypted package. This temporary
+ file will be stored in the 'ComponentData' property of the media
+ descriptor. */
+ Reference< XInputStream > xInputStream( extractUnencryptedPackage( aMediaDescriptor ), UNO_SET_THROW );
+
+ // stream must be a ZIP package
+ ZipStorage aZipStorage( mxContext, xInputStream );
+ if( aZipStorage.isStorage() )
+ {
+ // create the fast parser, register the XML namespaces, set document handler
+ FastParser aParser;
+ aParser.registerNamespace( NMSP_packageRel );
+ aParser.registerNamespace( NMSP_officeRel );
+ aParser.registerNamespace( NMSP_packageContentTypes );
+
+ OUString aFileName;
+ aMediaDescriptor[utl::MediaDescriptor::PROP_URL] >>= aFileName;
+
+ aParser.setDocumentHandler( new FilterDetectDocHandler( mxContext, aFilterName, aFileName ) );
+
+ /* Parse '_rels/.rels' to get the target path and '[Content_Types].xml'
+ to determine the content type of the part at the target path. */
+ aParser.parseStream( aZipStorage, "_rels/.rels" );
+ aParser.parseStream( aZipStorage, "[Content_Types].xml" );
+ }
+ }
+ catch( const Exception& )
+ {
+ if ( aMediaDescriptor.getUnpackedValueOrDefault( MediaDescriptor::PROP_ABORTED, false ) )
+ /* The user chose to abort detection, e.g. by hitting 'Cancel' in the password input dialog,
+ so we have to return non-empty type name to abort the detection loop. The loading code is
+ supposed to check whether the "Aborted" flag is present in the descriptor, and to not attempt
+ to actually load the file then.
+
+ The returned type name is the one we got as an input, which typically was detected by the flat
+ detection (i.e. by file extension), so normally that's the correct one. Also at this point we
+ already know that the file is OLE encrypted package, so trying with other type detectors doesn't
+ make much sense anyway.
+ */
+ aFilterName = aMediaDescriptor.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME, OUString() );
+ }
+
+ // write back changed media descriptor members
+ aMediaDescriptor >> rMediaDescSeq;
+ return aFilterName;
+}
+
+} // namespace oox::core
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_FormatDetector_get_implementation(uno::XComponentContext* pCtx,
+ uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::core::FilterDetect(pCtx));
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/fragmenthandler.cxx b/oox/source/core/fragmenthandler.cxx
new file mode 100644
index 000000000..22319fda6
--- /dev/null
+++ b/oox/source/core/fragmenthandler.cxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/fragmenthandler.hxx>
+
+#include <oox/core/xmlfilterbase.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef const & xRelations ) :
+ mrFilter( rFilter ),
+ maFragmentPath( rFragmentPath ),
+ mxRelations( xRelations )
+{
+}
+
+FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
+ FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) )
+{
+}
+
+FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
+ FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, xRelations ) )
+{
+}
+
+FragmentHandler::~FragmentHandler()
+{
+}
+
+// com.sun.star.xml.sax.XFastDocumentHandler interface ------------------------
+
+void FragmentHandler::startDocument()
+{
+}
+
+void FragmentHandler::endDocument()
+{
+}
+
+void FragmentHandler::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
+{
+}
+
+void FragmentHandler::setDocumentLocator( const Reference< XLocator >& rxLocator )
+{
+ implSetLocator( rxLocator );
+}
+
+// com.sun.star.xml.sax.XFastContextHandler interface -------------------------
+
+void FragmentHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& )
+{
+}
+
+void FragmentHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
+{
+}
+
+void FragmentHandler::endFastElement( sal_Int32 )
+{
+}
+
+void FragmentHandler::endUnknownElement( const OUString&, const OUString& )
+{
+}
+
+Reference< XFastContextHandler > FragmentHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& )
+{
+ return nullptr;
+}
+
+Reference< XFastContextHandler > FragmentHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
+{
+ return nullptr;
+}
+
+void FragmentHandler::characters( const OUString& )
+{
+}
+
+// XML stream handling --------------------------------------------------------
+
+Reference< XInputStream > FragmentHandler::openFragmentStream() const
+{
+ return getFilter().openInputStream( getFragmentPath() );
+}
+
+// binary records -------------------------------------------------------------
+
+const RecordInfo* FragmentHandler::getRecordInfos() const
+{
+ // default: no support for binary records
+ return nullptr;
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx
new file mode 100644
index 000000000..e4eeef076
--- /dev/null
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
+ FragmentHandler( rFilter, rFragmentPath ),
+ ContextHandler2Helper( bEnableTrimSpace, rFilter )
+{
+}
+
+FragmentHandler2::~FragmentHandler2()
+{
+}
+
+// com.sun.star.xml.sax.XFastDocumentHandler interface --------------------
+
+void SAL_CALL FragmentHandler2::startDocument()
+{
+ initializeImport();
+}
+
+void SAL_CALL FragmentHandler2::endDocument()
+{
+ finalizeImport();
+}
+
+// com.sun.star.xml.sax.XFastContextHandler interface -------------------------
+
+Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildContext(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ if( getNamespace( nElement ) == NMSP_mce ) // TODO for checking 'Ignorable'
+ {
+ if( prepareMceContext( nElement, AttributeList( rxAttribs ) ) )
+ return getFastContextHandler();
+ return nullptr;
+ }
+ return implCreateChildContext( nElement, rxAttribs );
+}
+
+void SAL_CALL FragmentHandler2::startFastElement(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ implStartElement( nElement, rxAttribs );
+}
+
+void SAL_CALL FragmentHandler2::characters( const OUString& rChars )
+{
+ implCharacters( rChars );
+}
+
+void SAL_CALL FragmentHandler2::endFastElement( sal_Int32 nElement )
+{
+ /* If MCE */
+ switch( nElement )
+ {
+ case MCE_TOKEN( AlternateContent ):
+ removeMCEState();
+ break;
+ }
+
+ implEndElement( nElement );
+}
+
+// oox.core.ContextHandler interface ------------------------------------------
+
+ContextHandlerRef FragmentHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ return implCreateRecordContext( nRecId, rStrm );
+}
+
+void FragmentHandler2::startRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
+{
+ implStartRecord( nRecId, rStrm );
+}
+
+void FragmentHandler2::endRecord( sal_Int32 nRecId )
+{
+ implEndRecord( nRecId );
+}
+
+// oox.core.ContextHandler2Helper interface -----------------------------------
+
+ContextHandlerRef FragmentHandler2::onCreateContext( sal_Int32, const AttributeList& )
+{
+ return nullptr;
+}
+
+void FragmentHandler2::onStartElement( const AttributeList& )
+{
+}
+
+void FragmentHandler2::onCharacters( const OUString& )
+{
+}
+
+void FragmentHandler2::onEndElement()
+{
+}
+
+ContextHandlerRef FragmentHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& )
+{
+ return nullptr;
+}
+
+void FragmentHandler2::onStartRecord( SequenceInputStream& )
+{
+}
+
+void FragmentHandler2::onEndRecord()
+{
+}
+
+// oox.core.FragmentHandler2 interface ----------------------------------------
+
+void FragmentHandler2::initializeImport()
+{
+}
+
+void FragmentHandler2::finalizeImport()
+{
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx
new file mode 100644
index 000000000..d6f35faca
--- /dev/null
+++ b/oox/source/core/recordparser.cxx
@@ -0,0 +1,326 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/recordparser.hxx>
+
+#include <vector>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <com/sun/star/xml/sax/XLocator.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <osl/diagnose.h>
+#include <oox/core/fragmenthandler.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace prv {
+
+class Locator : public ::cppu::WeakImplHelper< XLocator >
+{
+public:
+ explicit Locator( RecordParser* pParser ) : mpParser( pParser ) {}
+
+ void dispose();
+ /// @throws css::uno::RuntimeException
+ void checkDispose();
+
+ // com.sun.star.sax.XLocator interface
+
+ virtual sal_Int32 SAL_CALL getColumnNumber() override;
+ virtual sal_Int32 SAL_CALL getLineNumber() override;
+ virtual OUString SAL_CALL getPublicId() override;
+ virtual OUString SAL_CALL getSystemId() override;
+
+private:
+ RecordParser* mpParser;
+};
+
+void Locator::dispose()
+{
+ mpParser = nullptr;
+}
+
+void Locator::checkDispose()
+{
+ if( !mpParser )
+ throw DisposedException();
+}
+
+sal_Int32 SAL_CALL Locator::getColumnNumber()
+{
+ return -1;
+}
+
+sal_Int32 SAL_CALL Locator::getLineNumber()
+{
+ return -1;
+}
+
+OUString SAL_CALL Locator::getPublicId()
+{
+ checkDispose();
+ return OUString();
+}
+
+OUString SAL_CALL Locator::getSystemId()
+{
+ checkDispose();
+ return mpParser->getInputSource().maSystemId;
+}
+
+class ContextStack
+{
+public:
+ explicit ContextStack( FragmentHandlerRef const & xHandler );
+
+ bool empty() const { return maStack.empty(); }
+
+ sal_Int32 getCurrentRecId() const;
+ bool hasCurrentEndRecId() const;
+ ContextHandlerRef getCurrentContext() const;
+
+ void pushContext( const RecordInfo& rRec, const ContextHandlerRef& rxContext );
+ void popContext();
+
+private:
+ typedef ::std::pair< RecordInfo, ContextHandlerRef > ContextInfo;
+ typedef ::std::vector< ContextInfo > ContextInfoVec;
+
+ FragmentHandlerRef mxHandler;
+ ContextInfoVec maStack;
+};
+
+ContextStack::ContextStack( FragmentHandlerRef const & xHandler ) :
+ mxHandler( xHandler )
+{
+}
+
+sal_Int32 ContextStack::getCurrentRecId() const
+{
+ return maStack.empty() ? -1 : maStack.back().first.mnStartRecId;
+}
+
+bool ContextStack::hasCurrentEndRecId() const
+{
+ return !maStack.empty() && (maStack.back().first.mnEndRecId >= 0);
+}
+
+ContextHandlerRef ContextStack::getCurrentContext() const
+{
+ if( !maStack.empty() )
+ return maStack.back().second;
+ return mxHandler;
+}
+
+void ContextStack::pushContext( const RecordInfo& rRecInfo, const ContextHandlerRef& rxContext )
+{
+ OSL_ENSURE( (rRecInfo.mnEndRecId >= 0) || maStack.empty() || hasCurrentEndRecId(),
+ "ContextStack::pushContext - nested incomplete context record identifiers" );
+ maStack.emplace_back( rRecInfo, rxContext );
+}
+
+void ContextStack::popContext()
+{
+ OSL_ENSURE( !maStack.empty(), "ContextStack::popContext - no context on stack" );
+ if( !maStack.empty() )
+ {
+ ContextInfo& rContextInfo = maStack.back();
+ if( rContextInfo.second.is() )
+ rContextInfo.second->endRecord( rContextInfo.first.mnStartRecId );
+ maStack.pop_back();
+ }
+}
+
+} // namespace oox::core::prv
+
+namespace {
+
+/** Reads a byte from the passed stream, returns true on success. */
+bool lclReadByte( sal_uInt8& ornByte, BinaryInputStream& rStrm )
+{
+ return rStrm.readMemory( &ornByte, 1 ) == 1;
+}
+
+/** Reads a compressed signed 32-bit integer from the passed stream. */
+bool lclReadCompressedInt( sal_Int32& ornValue, BinaryInputStream& rStrm )
+{
+ ornValue = 0;
+ sal_uInt8 nByte;
+ if( !lclReadByte( nByte, rStrm ) ) return false;
+ ornValue = nByte & 0x7F;
+ if( (nByte & 0x80) == 0 ) return true;
+ if( !lclReadByte( nByte, rStrm ) ) return false;
+ ornValue |= sal_Int32( nByte & 0x7F ) << 7;
+ if( (nByte & 0x80) == 0 ) return true;
+ if( !lclReadByte( nByte, rStrm ) ) return false;
+ ornValue |= sal_Int32( nByte & 0x7F ) << 14;
+ if( (nByte & 0x80) == 0 ) return true;
+ if( !lclReadByte( nByte, rStrm ) ) return false;
+ ornValue |= sal_Int32( nByte & 0x7F ) << 21;
+ return true;
+}
+
+bool lclReadRecordHeader( sal_Int32& ornRecId, sal_Int32& ornRecSize, BinaryInputStream& rStrm )
+{
+ return
+ lclReadCompressedInt( ornRecId, rStrm ) && (ornRecId >= 0) &&
+ lclReadCompressedInt( ornRecSize, rStrm ) && (ornRecSize >= 0);
+}
+
+bool lclReadNextRecord( sal_Int32& ornRecId, StreamDataSequence& orData, BinaryInputStream& rStrm )
+{
+ sal_Int32 nRecSize = 0;
+ bool bValid = lclReadRecordHeader( ornRecId, nRecSize, rStrm );
+ if( bValid )
+ {
+ orData.realloc( nRecSize );
+ bValid = (nRecSize == 0) || (rStrm.readData( orData, nRecSize ) == nRecSize);
+ }
+ return bValid;
+}
+
+} // namespace
+
+RecordParser::RecordParser()
+{
+ mxLocator.set( new prv::Locator( this ) );
+}
+
+RecordParser::~RecordParser()
+{
+ if( mxLocator.is() )
+ mxLocator->dispose();
+}
+
+void RecordParser::setFragmentHandler( const ::rtl::Reference< FragmentHandler >& rxHandler )
+{
+ mxHandler = rxHandler;
+
+ // build record infos
+ maStartMap.clear();
+ maEndMap.clear();
+ const RecordInfo* pRecs = mxHandler.is() ? mxHandler->getRecordInfos() : nullptr;
+ OSL_ENSURE( pRecs, "RecordInfoProvider::RecordInfoProvider - missing record list" );
+ for( ; pRecs && pRecs->mnStartRecId >= 0; ++pRecs )
+ {
+ maStartMap[ pRecs->mnStartRecId ] = *pRecs;
+ if( pRecs->mnEndRecId >= 0 )
+ maEndMap[ pRecs->mnEndRecId ] = *pRecs;
+ }
+}
+
+void RecordParser::parseStream( const RecordInputSource& rInputSource )
+{
+ maSource = rInputSource;
+
+ if( !maSource.mxInStream || maSource.mxInStream->isEof() )
+ throw IOException();
+ if( !mxHandler.is() )
+ throw SAXException();
+
+ // start the document
+ mxHandler->setDocumentLocator( mxLocator );
+ mxHandler->startDocument();
+
+ // parse the stream
+ mxStack.reset( new prv::ContextStack( mxHandler ) );
+ sal_Int32 nRecId = 0;
+ StreamDataSequence aRecData;
+ while( lclReadNextRecord( nRecId, aRecData, *maSource.mxInStream ) )
+ {
+ // create record stream object from imported record data
+ SequenceInputStream aRecStrm( aRecData );
+ // try to leave a context, there may be other incomplete contexts on the stack
+ if( const RecordInfo* pEndRecInfo = getEndRecordInfo( nRecId ) )
+ {
+ // finalize contexts without record identifier for context end
+ while( !mxStack->empty() && !mxStack->hasCurrentEndRecId() )
+ mxStack->popContext();
+ // finalize the current context and pop context info from stack
+ OSL_ENSURE( mxStack->getCurrentRecId() == pEndRecInfo->mnStartRecId, "RecordParser::parseStream - context records mismatch" );
+ ContextHandlerRef xCurrContext = mxStack->getCurrentContext();
+ if( xCurrContext.is() )
+ {
+ // context end record may contain some data, handle it as simple record
+ aRecStrm.seekToStart();
+ xCurrContext->startRecord( nRecId, aRecStrm );
+ xCurrContext->endRecord( nRecId );
+ }
+ mxStack->popContext();
+ }
+ else
+ {
+ // end context with incomplete record id, if the same id comes again
+ if( (mxStack->getCurrentRecId() == nRecId) && !mxStack->hasCurrentEndRecId() )
+ mxStack->popContext();
+ // try to start a new context
+ ContextHandlerRef xCurrContext = mxStack->getCurrentContext();
+ if( xCurrContext.is() )
+ {
+ aRecStrm.seekToStart();
+ xCurrContext = xCurrContext->createRecordContext( nRecId, aRecStrm );
+ }
+ // track all context identifiers on the stack (do not push simple records)
+ const RecordInfo* pStartRecInfo = getStartRecordInfo( nRecId );
+ if( pStartRecInfo )
+ mxStack->pushContext( *pStartRecInfo, xCurrContext );
+ // import the record
+ if( xCurrContext.is() )
+ {
+ // import the record
+ aRecStrm.seekToStart();
+ xCurrContext->startRecord( nRecId, aRecStrm );
+ // end simple records (context records are finished in ContextStack::popContext)
+ if( !pStartRecInfo )
+ xCurrContext->endRecord( nRecId );
+ }
+ }
+ }
+ // close remaining contexts (missing context end records or stream error)
+ while( !mxStack->empty() )
+ mxStack->popContext();
+ mxStack.reset();
+
+ // finish document
+ mxHandler->endDocument();
+
+ maSource = RecordInputSource();
+}
+
+const RecordInfo* RecordParser::getStartRecordInfo( sal_Int32 nRecId ) const
+{
+ RecordInfoMap::const_iterator aIt = maStartMap.find( nRecId );
+ return (aIt == maStartMap.end()) ? nullptr : &aIt->second;
+}
+
+const RecordInfo* RecordParser::getEndRecordInfo( sal_Int32 nRecId ) const
+{
+ RecordInfoMap::const_iterator aIt = maEndMap.find( nRecId );
+ return (aIt == maEndMap.end()) ? nullptr : &aIt->second;
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
new file mode 100644
index 000000000..f927c542c
--- /dev/null
+++ b/oox/source/core/relations.cxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <algorithm>
+#include <string_view>
+
+#include <oox/core/relations.hxx>
+
+namespace oox::core {
+
+namespace {
+
+std::u16string_view lclRemoveFileName( std::u16string_view rPath )
+{
+ size_t idx = rPath.rfind( '/' );
+ if (idx == std::u16string_view::npos)
+ return std::u16string_view();
+ return rPath.substr( 0, idx );
+}
+
+OUString lclAppendFileName( std::u16string_view rPath, const OUString& rFileName )
+{
+ return rPath.empty() ? rFileName :
+ rPath + OUStringChar('/') + rFileName;
+}
+
+OUString createOfficeDocRelationTypeTransitional(std::u16string_view rType)
+{
+ return OUString::Concat("http://schemas.openxmlformats.org/officeDocument/2006/relationships/")
+ + rType;
+}
+
+OUString createOfficeDocRelationTypeStrict(std::u16string_view rType)
+{
+ return OUString::Concat("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rType;
+}
+
+}
+
+Relations::Relations( const OUString& rFragmentPath )
+ : maFragmentPath( rFragmentPath )
+{
+}
+
+const Relation* Relations::getRelationFromRelId( const OUString& rId ) const
+{
+ ::std::map< OUString, Relation >::const_iterator aIt = maMap.find( rId );
+ return (aIt == maMap.end()) ? nullptr : &aIt->second;
+}
+
+const Relation* Relations::getRelationFromFirstType( std::u16string_view rType ) const
+{
+ for (auto const& elem : maMap)
+ if( elem.second.maType.equalsIgnoreAsciiCase( rType ) )
+ return &elem.second;
+ return nullptr;
+}
+
+RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( std::u16string_view rType ) const
+{
+ RelationsRef xRelations = std::make_shared<Relations>( maFragmentPath );
+ for (auto const& elem : maMap)
+ if( elem.second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeTransitional(rType) ) ||
+ elem.second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeStrict(rType) ))
+ xRelations->maMap[ elem.first ] = elem.second;
+ return xRelations;
+}
+
+OUString Relations::getExternalTargetFromRelId( const OUString& rRelId ) const
+{
+ const Relation* pRelation = getRelationFromRelId( rRelId );
+ return (pRelation && pRelation->mbExternal) ? pRelation->maTarget : OUString();
+}
+
+OUString Relations::getInternalTargetFromRelId( const OUString& rRelId ) const
+{
+ const Relation* pRelation = getRelationFromRelId( rRelId );
+ return (pRelation && !pRelation->mbExternal) ? pRelation->maTarget : OUString();
+}
+
+OUString Relations::getFragmentPathFromRelation( const Relation& rRelation ) const
+{
+ // no target, no fragment path
+ if( rRelation.mbExternal || rRelation.maTarget.isEmpty() )
+ return OUString();
+
+ // absolute target: return it without leading slash (#i100978)
+ if( rRelation.maTarget[ 0 ] == '/' )
+ return rRelation.maTarget.copy( 1 );
+
+ // empty fragment path: return target
+ if( maFragmentPath.isEmpty() )
+ return rRelation.maTarget;
+
+ // resolve relative target path according to base path
+ OUString aPath( lclRemoveFileName( maFragmentPath ) );
+ sal_Int32 nStartPos = 0;
+ while( nStartPos < rRelation.maTarget.getLength() )
+ {
+ sal_Int32 nSepPos = rRelation.maTarget.indexOf( '/', nStartPos );
+ if( nSepPos < 0 ) nSepPos = rRelation.maTarget.getLength();
+ // append next directory name from aTarget to aPath, or remove last directory on '../'
+ if( (nStartPos + 2 == nSepPos) && (rRelation.maTarget[ nStartPos ] == '.') && (rRelation.maTarget[ nStartPos + 1 ] == '.') )
+ aPath = lclRemoveFileName( aPath );
+ else
+ aPath = lclAppendFileName( aPath, rRelation.maTarget.copy( nStartPos, nSepPos - nStartPos ) );
+ // move nStartPos to next directory name
+ nStartPos = nSepPos + 1;
+ }
+
+ return aPath;
+}
+
+OUString Relations::getFragmentPathFromRelId( const OUString& rRelId ) const
+{
+ const Relation* pRelation = getRelationFromRelId( rRelId );
+ return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
+}
+
+OUString Relations::getFragmentPathFromFirstType( std::u16string_view rType ) const
+{
+ const Relation* pRelation = getRelationFromFirstType( rType );
+ return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
+}
+
+OUString Relations::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType ) const
+{
+ OUString aTransitionalType(createOfficeDocRelationTypeTransitional(rType));
+ const Relation* pRelation = getRelationFromFirstType( aTransitionalType );
+ if(!pRelation)
+ {
+ OUString aStrictType = createOfficeDocRelationTypeStrict(rType);
+ pRelation = getRelationFromFirstType( aStrictType );
+ }
+ return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/relationshandler.cxx b/oox/source/core/relationshandler.cxx
new file mode 100644
index 000000000..90f3ebcef
--- /dev/null
+++ b/oox/source/core/relationshandler.cxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <oox/core/relationshandler.hxx>
+
+#include <sal/log.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::core {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace {
+
+/* Build path to relations file from passed fragment path, e.g.:
+ 'path/path/file.xml' -> 'path/path/_rels/file.xml.rels'
+ 'file.xml' -> '_rels/file.xml.rels'
+ '' -> '_rels/.rels'
+ */
+OUString lclGetRelationsPath( const OUString& rFragmentPath )
+{
+ sal_Int32 nPathLen = ::std::max< sal_Int32 >( rFragmentPath.lastIndexOf( '/' ) + 1, 0 );
+ return OUString::Concat(std::u16string_view(rFragmentPath.getStr(), nPathLen )) + // file path including slash
+ "_rels/" + // additional '_rels/' path
+ std::u16string_view(rFragmentPath.getStr() + nPathLen) + // file name after path
+ ".rels"; // '.rels' suffix
+}
+
+} // namespace
+
+RelationsFragment::RelationsFragment( XmlFilterBase& rFilter, const RelationsRef& xRelations ) :
+ FragmentHandler( rFilter, lclGetRelationsPath( xRelations->getFragmentPath() ), xRelations ),
+ mxRelations( xRelations )
+{
+}
+
+Reference< XFastContextHandler > RelationsFragment::createFastChildContext(
+ sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
+{
+ Reference< XFastContextHandler > xRet;
+ AttributeList aAttribs( rxAttribs );
+ switch( nElement )
+ {
+ case PR_TOKEN( Relationship ):
+ {
+ Relation aRelation;
+ aRelation.maId = aAttribs.getString( XML_Id, OUString() );
+ aRelation.maType = aAttribs.getString( XML_Type, OUString() );
+ aRelation.maTarget = aAttribs.getString( XML_Target, OUString() );
+ if( !aRelation.maId.isEmpty() && !aRelation.maType.isEmpty() && !aRelation.maTarget.isEmpty() )
+ {
+ sal_Int32 nTargetMode = aAttribs.getToken( XML_TargetMode, XML_Internal );
+ SAL_WARN_IF( (nTargetMode != XML_Internal) && (nTargetMode != XML_External), "oox",
+ "RelationsFragment::createFastChildContext - unexpected target mode, assuming external" );
+ aRelation.mbExternal = nTargetMode != XML_Internal;
+
+ SAL_WARN_IF( mxRelations->count( aRelation.maId ) != 0, "oox",
+ "RelationsFragment::createFastChildContext - relation identifier exists already" );
+ mxRelations->emplace( aRelation.maId, aRelation );
+ }
+ }
+ break;
+ case PR_TOKEN( Relationships ):
+ xRet = getFastContextHandler();
+ break;
+ }
+ return xRet;
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
new file mode 100644
index 000000000..e8e1a1389
--- /dev/null
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -0,0 +1,1235 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/core/xmlfilterbase.hxx>
+
+#include <cstdio>
+#include <string_view>
+
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/Pair.hpp>
+#include <com/sun/star/embed/XRelationshipAccess.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <com/sun/star/xml/sax/XSAXSerializable.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
+#include <o3tl/any.hxx>
+#include <unotools/mediadescriptor.hxx>
+#include <unotools/docinfohelper.hxx>
+#include <sax/fshelper.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <i18nlangtag/languagetag.hxx>
+#include <oox/core/fastparser.hxx>
+#include <oox/core/fragmenthandler.hxx>
+#include <oox/core/recordparser.hxx>
+#include <oox/core/relationshandler.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/helper/zipstorage.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/relationship.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
+#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
+#include <comphelper/processfactory.hxx>
+#include <oox/core/filterdetect.hxx>
+#include <comphelper/stl_types.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/ofopxmlhelper.hxx>
+
+#include <oox/crypto/DocumentEncryption.hxx>
+#include <tools/urlobj.hxx>
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/Duration.hpp>
+#include <sax/tools/converter.hxx>
+#include <oox/token/namespacemap.hxx>
+#include <editeng/unoprnms.hxx>
+#include <o3tl/sorted_vector.hxx>
+
+using ::com::sun::star::xml::dom::DocumentBuilder;
+using ::com::sun::star::xml::dom::XDocument;
+using ::com::sun::star::xml::dom::XDocumentBuilder;
+
+namespace oox::core {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+using utl::MediaDescriptor;
+using ::sax_fastparser::FSHelperPtr;
+using ::sax_fastparser::FastSerializerHelper;
+
+namespace {
+
+const Sequence< beans::Pair< OUString, sal_Int32 > >& NamespaceIds()
+{
+ static const Sequence< beans::Pair< OUString, sal_Int32 > > SINGLETON
+ {
+ {"http://www.w3.org/XML/1998/namespace", NMSP_xml},
+ {"http://schemas.openxmlformats.org/package/2006/relationships",
+ NMSP_packageRel},
+ {"http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ NMSP_officeRel},
+ {"http://purl.oclc.org/ooxml/officeDocument/relationships",
+ NMSP_officeRel},
+ {"http://schemas.openxmlformats.org/drawingml/2006/main", NMSP_dml},
+ {"http://purl.oclc.org/ooxml/drawingml/main", NMSP_dml},
+ {"http://schemas.openxmlformats.org/drawingml/2006/diagram",
+ NMSP_dmlDiagram},
+ {"http://purl.oclc.org/ooxml/drawingml/diagram", NMSP_dmlDiagram},
+ {"http://schemas.openxmlformats.org/drawingml/2006/chart",
+ NMSP_dmlChart},
+ {"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
+ NMSP_dmlChartDr},
+ {"urn:schemas-microsoft-com:vml", NMSP_vml},
+ {"urn:schemas-microsoft-com:office:office", NMSP_vmlOffice},
+ {"urn:schemas-microsoft-com:office:word", NMSP_vmlWord},
+ {"urn:schemas-microsoft-com:office:excel", NMSP_vmlExcel},
+ {"urn:schemas-microsoft-com:office:powerpoint", NMSP_vmlPowerpoint},
+ {"http://schemas.microsoft.com/office/2006/activeX", NMSP_ax},
+ {"http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ NMSP_xls},
+ {"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
+ NMSP_xm},
+ {"http://schemas.microsoft.com/office/excel/2006/main",
+ NMSP_dmlSpreadDr},
+ {"http://schemas.openxmlformats.org/presentationml/2006/main",
+ NMSP_ppt},
+ {"http://schemas.openxmlformats.org/markup-compatibility/2006",
+ NMSP_mce},
+ {"http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2",
+ NMSP_mceTest},
+ {"http://schemas.openxmlformats.org/officeDocument/2006/math",
+ NMSP_officeMath},
+ {"http://schemas.microsoft.com/office/drawing/2008/diagram",
+ NMSP_dsp},
+ {"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",
+ NMSP_xls14Lst},
+ {"http://schemas.libreoffice.org/", NMSP_loext},
+ {"http://schemas.microsoft.com/office/drawing/2010/main",
+ NMSP_a14},
+ {"http://schemas.microsoft.com/office/powerpoint/2010/main",
+ NMSP_p14},
+ {"http://schemas.microsoft.com/office/powerpoint/2012/main",
+ NMSP_p15},
+ {"http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac",
+ NMSP_x12ac},
+ {"http://schemas.microsoft.com/office/drawing/2012/chart",
+ NMSP_c15},
+ {"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2",
+ NMSP_xr2},
+ };
+ return SINGLETON;
+};
+
+void registerNamespaces( FastParser& rParser )
+{
+ const Sequence< beans::Pair<OUString, sal_Int32> >& ids = NamespaceIds();
+
+ // Filter out duplicates: a namespace can have multiple URLs, think of
+ // strict vs transitional.
+ o3tl::sorted_vector<sal_Int32> aSet;
+ aSet.reserve(ids.getLength());
+ for (const auto& rId : ids)
+ aSet.insert(rId.Second);
+
+ for (auto const& elem : aSet)
+ rParser.registerNamespace(elem);
+}
+
+} // namespace
+
+struct XmlFilterBaseImpl
+{
+ typedef RefMap< OUString, Relations > RelationsMap;
+
+ FastParser maFastParser;
+ RelationsMap maRelationsMap;
+ TextFieldStack maTextFieldStack;
+ const NamespaceMap& mrNamespaceMap;
+ NamedShapePairs* mpDiagramFontHeights = nullptr;
+
+ /// @throws RuntimeException
+ explicit XmlFilterBaseImpl();
+};
+
+constexpr OUStringLiteral gaBinSuffix( u".bin" );
+
+XmlFilterBaseImpl::XmlFilterBaseImpl() :
+ mrNamespaceMap(StaticNamespaceMap())
+{
+ // register XML namespaces
+ registerNamespaces(maFastParser);
+}
+
+XmlFilterBase::XmlFilterBase( const Reference< XComponentContext >& rxContext ) :
+ FilterBase( rxContext ),
+ mxImpl( new XmlFilterBaseImpl ),
+ mnRelId( 1 ),
+ mnMaxDocId( 0 ),
+ mbMSO2007(false),
+ mbMSO(false),
+ mbMissingExtDrawing(false)
+{
+}
+
+XmlFilterBase::~XmlFilterBase()
+{
+ // #i118640# Reset the DocumentHandler at the FastSaxParser manually; this is
+ // needed since the mechanism is that instances of FragmentHandler execute
+ // their stuff (creating objects, setting attributes, ...) on being destroyed.
+ // They get destroyed by setting a new DocumentHandler. This also happens in
+ // the following implicit destruction chain of ~XmlFilterBaseImpl, but in that
+ // case it's member RelationsMap maRelationsMap will be destroyed, but maybe
+ // still be used by ~FragmentHandler -> crash.
+ mxImpl->maFastParser.clearDocumentHandler();
+}
+
+std::shared_ptr<::oox::drawingml::Theme> XmlFilterBase::getCurrentThemePtr() const
+{
+ // default returns empty ptr
+ return std::shared_ptr<::oox::drawingml::Theme>();
+}
+
+void XmlFilterBase::checkDocumentProperties(const Reference<XDocumentProperties>& xDocProps)
+{
+ mbMSO2007 = mbMSO = false;
+ if (!xDocProps->getGenerator().startsWithIgnoreAsciiCase("Microsoft"))
+ return;
+ mbMSO = true;
+
+ uno::Reference<beans::XPropertyAccess> xUserDefProps(xDocProps->getUserDefinedProperties(), uno::UNO_QUERY);
+ if (!xUserDefProps.is())
+ return;
+
+ comphelper::SequenceAsHashMap aUserDefinedProperties(xUserDefProps->getPropertyValues());
+ comphelper::SequenceAsHashMap::iterator it = aUserDefinedProperties.find("AppVersion");
+ if (it == aUserDefinedProperties.end())
+ return;
+
+ OUString aValue;
+ if (!(it->second >>= aValue))
+ return;
+
+ if (!aValue.startsWithIgnoreAsciiCase("12."))
+ return;
+
+ SAL_INFO("oox", "a MSO 2007 document");
+ mbMSO2007 = true;
+}
+
+void XmlFilterBase::putPropertiesToDocumentGrabBag(const css::uno::Reference<css::lang::XComponent>& xDstDoc,
+ const comphelper::SequenceAsHashMap& rProperties)
+{
+ try
+ {
+ uno::Reference<beans::XPropertySet> xDocProps(xDstDoc, uno::UNO_QUERY);
+ if (xDocProps.is())
+ {
+ uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
+
+ static constexpr OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
+ if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
+ {
+ // get existing grab bag
+ comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue(aGrabBagPropName));
+
+ // put the new items
+ aGrabBag.update(rProperties);
+
+ // put it back to the document
+ xDocProps->setPropertyValue(aGrabBagPropName, uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ SAL_WARN("oox","Failed to save documents grab bag");
+ }
+}
+
+void XmlFilterBase::importDocumentProperties()
+{
+ MediaDescriptor aMediaDesc( getMediaDescriptor() );
+ Reference< XInputStream > xInputStream;
+ Reference< XComponentContext > xContext = getComponentContext();
+ rtl::Reference< ::oox::core::FilterDetect > xDetector( new ::oox::core::FilterDetect( xContext ) );
+ xInputStream = xDetector->extractUnencryptedPackage( aMediaDesc );
+ Reference< XComponent > xModel = getModel();
+ Reference< XStorage > xDocumentStorage (
+ ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( OFOPXML_STORAGE_FORMAT_STRING, xInputStream ) );
+ Reference< XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.document.OOXMLDocumentPropertiesImporter",
+ xContext);
+ Reference< XOOXMLDocumentPropertiesImporter > xImporter( xTemp, UNO_QUERY );
+ Reference< XDocumentPropertiesSupplier > xPropSupplier( xModel, UNO_QUERY);
+ Reference< XDocumentProperties > xDocProps = xPropSupplier->getDocumentProperties();
+ xImporter->importProperties( xDocumentStorage, xDocProps );
+ checkDocumentProperties(xDocProps);
+
+ importCustomFragments(xDocumentStorage);
+}
+
+FastParser* XmlFilterBase::createParser()
+{
+ FastParser* pParser = new FastParser;
+ registerNamespaces(*pParser);
+ return pParser;
+}
+
+namespace {
+
+OUString getTransitionalRelationshipOfficeDocType(std::u16string_view rPart)
+{
+ return OUString::Concat("http://schemas.openxmlformats.org/officeDocument/2006/relationships/")
+ + rPart;
+}
+
+OUString getStrictRelationshipOfficeDocType(std::u16string_view rPart)
+{
+ return OUString::Concat("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rPart;
+}
+
+}
+
+OUString XmlFilterBase::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rPart )
+{
+ // importRelations() caches the relations map for subsequence calls
+ const OUString aTransitionalRelationshipType = getTransitionalRelationshipOfficeDocType(rPart);
+ OUString aFragment = importRelations( OUString() )->getFragmentPathFromFirstType( aTransitionalRelationshipType );
+ if(aFragment.isEmpty())
+ {
+ const OUString aStrictRelationshipType = getStrictRelationshipOfficeDocType(rPart);
+ aFragment = importRelations( OUString() )->getFragmentPathFromFirstType( aStrictRelationshipType );
+ }
+
+ return aFragment;
+}
+
+bool XmlFilterBase::importFragment( const rtl::Reference<FragmentHandler>& rxHandler )
+{
+ FastParser aParser;
+ registerNamespaces(aParser);
+ return importFragment(rxHandler, aParser);
+}
+
+bool XmlFilterBase::importFragment( const rtl::Reference<FragmentHandler>& rxHandler, FastParser& rParser )
+{
+ OSL_ENSURE( rxHandler.is(), "XmlFilterBase::importFragment - missing fragment handler" );
+ if( !rxHandler.is() )
+ return false;
+
+ // fragment handler must contain path to fragment stream
+ OUString aFragmentPath = rxHandler->getFragmentPath();
+ OSL_ENSURE( !aFragmentPath.isEmpty(), "XmlFilterBase::importFragment - missing fragment path" );
+ if( aFragmentPath.isEmpty() )
+ return false;
+
+ // try to import binary streams (fragment extension must be '.bin')
+ if (aFragmentPath.endsWith(gaBinSuffix))
+ {
+ try
+ {
+ // try to open the fragment stream (this may fail - do not assert)
+ Reference< XInputStream > xInStrm( openInputStream( aFragmentPath ), UNO_SET_THROW );
+
+ // create the record parser
+ RecordParser aParser;
+ aParser.setFragmentHandler( rxHandler );
+
+ // create the input source and parse the stream
+ RecordInputSource aSource;
+ aSource.mxInStream = std::make_shared<BinaryXInputStream>( xInStrm, true );
+ aSource.maSystemId = aFragmentPath;
+ aParser.parseStream( aSource );
+ return true;
+ }
+ catch( Exception& )
+ {
+ }
+ return false;
+ }
+
+ // get the XFastDocumentHandler interface from the fragment handler
+ if( !rxHandler.is() )
+ return false;
+
+ // try to import XML stream
+ try
+ {
+ /* Try to open the fragment stream (may fail, do not throw/assert).
+ Using the virtual function openFragmentStream() allows a document
+ handler to create specialized input streams, e.g. VML streams that
+ have to preprocess the raw input data. */
+ Reference< XInputStream > xInStrm = rxHandler->openFragmentStream();
+ /* tdf#100084 Check again the aFragmentPath route with lowercase file name
+ TODO: complete handling of case-insensitive file paths */
+ if ( !xInStrm.is() )
+ {
+ sal_Int32 nPathLen = aFragmentPath.lastIndexOf('/') + 1;
+ OUString fileName = aFragmentPath.copy(nPathLen);
+ OUString sLowerCaseFileName = fileName.toAsciiLowerCase();
+ if ( fileName != sLowerCaseFileName )
+ {
+ aFragmentPath = aFragmentPath.subView(0, nPathLen) + sLowerCaseFileName;
+ xInStrm = openInputStream(aFragmentPath);
+ }
+ }
+
+ // own try/catch block for showing parser failure assertion with fragment path
+ if( xInStrm.is() ) try
+ {
+ rParser.setDocumentHandler(rxHandler);
+ rParser.parseStream(xInStrm, aFragmentPath);
+ return true;
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( OStringBuffer( "XmlFilterBase::importFragment - XML parser failed in fragment '" +
+ OUStringToOString( aFragmentPath, RTL_TEXTENCODING_ASCII_US ) + "'" ).getStr() );
+ }
+ }
+ catch( Exception& )
+ {
+ }
+ return false;
+}
+
+Reference<XDocument> XmlFilterBase::importFragment( const OUString& aFragmentPath )
+{
+ Reference<XDocument> xRet;
+
+ // path to fragment stream valid?
+ OSL_ENSURE( !aFragmentPath.isEmpty(), "XmlFilterBase::importFragment - empty fragment path" );
+ if( aFragmentPath.isEmpty() )
+ return xRet;
+
+ // try to open the fragment stream (this may fail - do not assert)
+ Reference< XInputStream > xInStrm = openInputStream( aFragmentPath );
+ if( !xInStrm.is() )
+ return xRet;
+
+ // binary streams (fragment extension is '.bin') currently not supported
+ if (aFragmentPath.endsWith(gaBinSuffix))
+ return xRet;
+
+ // try to import XML stream
+ try
+ {
+ // create the dom parser
+ Reference<XDocumentBuilder> xDomBuilder( DocumentBuilder::create( getComponentContext() ) );
+
+ // create DOM from fragment
+ xRet = xDomBuilder->parse(xInStrm);
+ }
+ catch( Exception& )
+ {
+ }
+
+ return xRet;
+}
+
+bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& rxHandler,
+ const Reference< XFastSAXSerializable >& rxSerializer )
+{
+ if( !rxHandler.is() )
+ return false;
+
+ // try to import XML stream
+ try
+ {
+ rxSerializer->fastSerialize( rxHandler,
+ mxImpl->maFastParser.getTokenHandler(),
+ Sequence< StringPair >(),
+ NamespaceIds() );
+ return true;
+ }
+ catch( Exception& )
+ {}
+
+ return false;
+}
+
+RelationsRef XmlFilterBase::importRelations( const OUString& rFragmentPath )
+{
+ // try to find cached relations
+ RelationsRef& rxRelations = mxImpl->maRelationsMap[ rFragmentPath ];
+ if( !rxRelations )
+ {
+ // import and cache relations
+ rxRelations = std::make_shared<Relations>( rFragmentPath );
+ importFragment( new RelationsFragment( *this, rxRelations ) );
+ }
+ return rxRelations;
+}
+
+Reference< XOutputStream > XmlFilterBase::openFragmentStream( const OUString& rStreamName, const OUString& rMediaType )
+{
+ Reference< XOutputStream > xOutputStream = openOutputStream( rStreamName );
+ PropertySet aPropSet( xOutputStream );
+ aPropSet.setProperty( PROP_MediaType, rMediaType );
+ return xOutputStream;
+}
+
+FSHelperPtr XmlFilterBase::openFragmentStreamWithSerializer( const OUString& rStreamName, const OUString& rMediaType )
+{
+ const bool bWriteHeader = rMediaType.indexOf( "vml" ) < 0 || rMediaType.indexOf( "+xml" ) >= 0;
+ return std::make_shared<FastSerializerHelper>( openFragmentStream( rStreamName, rMediaType ), bWriteHeader );
+}
+
+TextFieldStack& XmlFilterBase::getTextFieldStack() const
+{
+ return mxImpl->maTextFieldStack;
+}
+
+namespace {
+
+OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal_Int32 nId, const OUString& rType, std::u16string_view rTarget, bool bExternal )
+{
+ OUString sId = "rId" + OUString::number( nId );
+
+ Sequence< StringPair > aEntry( bExternal ? 3 : 2 );
+ auto pEntry = aEntry.getArray();
+ pEntry[0].First = "Type";
+ pEntry[0].Second = rType;
+ pEntry[1].First = "Target";
+ pEntry[1].Second = INetURLObject::decode(rTarget, INetURLObject::DecodeMechanism::ToIUri, RTL_TEXTENCODING_UTF8);
+ if( bExternal )
+ {
+ pEntry[2].First = "TargetMode";
+ pEntry[2].Second = "External";
+ }
+ rRelations->insertRelationshipByID( sId, aEntry, true );
+
+ return sId;
+}
+
+} // namespace
+
+OUString XmlFilterBase::addRelation( const OUString& rType, std::u16string_view rTarget )
+{
+ Reference< XRelationshipAccess > xRelations( getStorage()->getXStorage(), UNO_QUERY );
+ if( xRelations.is() )
+ return lclAddRelation( xRelations, mnRelId ++, rType, rTarget, false/*bExternal*/ );
+
+ return OUString();
+}
+
+OUString XmlFilterBase::addRelation( const Reference< XOutputStream >& rOutputStream, const OUString& rType, std::u16string_view rTarget, bool bExternal )
+{
+ sal_Int32 nId = 0;
+
+ PropertySet aPropSet( rOutputStream );
+ if( aPropSet.is() )
+ aPropSet.getProperty( nId, PROP_RelId );
+ else
+ nId = mnRelId++;
+
+ Reference< XRelationshipAccess > xRelations( rOutputStream, UNO_QUERY );
+ if( xRelations.is() )
+ return lclAddRelation( xRelations, nId, rType, rTarget, bExternal );
+
+ return OUString();
+}
+
+static void
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, std::u16string_view sValue )
+{
+ pDoc->startElement(nXmlElement);
+ pDoc->writeEscaped( sValue );
+ pDoc->endElement( nXmlElement );
+}
+
+static void
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
+{
+ pDoc->startElement(nXmlElement);
+ pDoc->write( nValue );
+ pDoc->endElement( nXmlElement );
+}
+
+static void
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const util::DateTime& rTime )
+{
+ if( rTime.Year == 0 )
+ return;
+
+ if ( ( nXmlElement >> 16 ) != XML_dcterms )
+ pDoc->startElement(nXmlElement);
+ else
+ pDoc->startElement(nXmlElement, FSNS(XML_xsi, XML_type), "dcterms:W3CDTF");
+
+ char pStr[200];
+ snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02dZ",
+ rTime.Year, rTime.Month, rTime.Day,
+ rTime.Hours, rTime.Minutes, rTime.Seconds );
+
+ pDoc->write( pStr );
+
+ pDoc->endElement( nXmlElement );
+}
+
+static void
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const Sequence< OUString >& aItems )
+{
+ if( !aItems.hasElements() )
+ return;
+
+ OUStringBuffer sRep;
+ // tdf#143175 - join elements including a delimiter using a standard iterator
+ ::comphelper::intersperse(aItems.begin(), aItems.end(),
+ ::comphelper::OUStringBufferAppender(sRep), OUString(" "));
+
+ writeElement( pDoc, nXmlElement, sRep.makeStringAndClear() );
+}
+
+static void
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const LanguageTag& rLanguageTag )
+{
+ // dc:language, Dublin Core recommends "such as RFC 4646", which is BCP 47
+ // and obsoleted by RFC 5646, see
+ // http://dublincore.org/documents/dcmi-terms/#terms-language
+ // http://dublincore.org/documents/dcmi-terms/#elements-language
+ writeElement( pDoc, nXmlElement, rLanguageTag.getBcp47MS() );
+}
+
+static void
+writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties )
+{
+ OUString sValue;
+ if( rSelf.getVersion() == oox::core::ISOIEC_29500_2008 )
+ {
+ // The lowercase "officedocument" is intentional and according to the spec
+ // (although most other places are written "officeDocument")
+ sValue = "http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties";
+ }
+ else
+ sValue = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
+
+ rSelf.addRelation( sValue, u"docProps/core.xml" );
+ FSHelperPtr pCoreProps = rSelf.openFragmentStreamWithSerializer(
+ "docProps/core.xml",
+ "application/vnd.openxmlformats-package.core-properties+xml" );
+ pCoreProps->startElementNS( XML_cp, XML_coreProperties,
+ FSNS(XML_xmlns, XML_cp), rSelf.getNamespaceURL(OOX_NS(packageMetaCorePr)),
+ FSNS(XML_xmlns, XML_dc), rSelf.getNamespaceURL(OOX_NS(dc)),
+ FSNS(XML_xmlns, XML_dcterms), rSelf.getNamespaceURL(OOX_NS(dcTerms)),
+ FSNS(XML_xmlns, XML_dcmitype), rSelf.getNamespaceURL(OOX_NS(dcmiType)),
+ FSNS(XML_xmlns, XML_xsi), rSelf.getNamespaceURL(OOX_NS(xsi)));
+
+ uno::Reference<beans::XPropertyAccess> xUserDefinedProperties(xProperties->getUserDefinedProperties(), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aUserDefinedProperties(xUserDefinedProperties->getPropertyValues());
+ comphelper::SequenceAsHashMap::iterator it;
+
+ it = aUserDefinedProperties.find("OOXMLCorePropertyCategory");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pCoreProps, FSNS( XML_cp, XML_category ), aValue );
+ }
+
+ it = aUserDefinedProperties.find("OOXMLCorePropertyContentStatus");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pCoreProps, FSNS( XML_cp, XML_contentStatus ), aValue );
+ }
+
+ it = aUserDefinedProperties.find("OOXMLCorePropertyContentType");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pCoreProps, FSNS( XML_cp, XML_contentType ), aValue );
+ }
+ writeElement( pCoreProps, FSNS( XML_dcterms, XML_created ), xProperties->getCreationDate() );
+ writeElement( pCoreProps, FSNS( XML_dc, XML_creator ), xProperties->getAuthor() );
+ writeElement( pCoreProps, FSNS( XML_dc, XML_description ), xProperties->getDescription() );
+
+ it = aUserDefinedProperties.find("OOXMLCorePropertyIdentifier");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pCoreProps, FSNS( XML_dc, XML_identifier ), aValue );
+ }
+ writeElement( pCoreProps, FSNS( XML_cp, XML_keywords ), xProperties->getKeywords() );
+ writeElement( pCoreProps, FSNS( XML_dc, XML_language ), LanguageTag( xProperties->getLanguage()) );
+ writeElement( pCoreProps, FSNS( XML_cp, XML_lastModifiedBy ), xProperties->getModifiedBy() );
+ writeElement( pCoreProps, FSNS( XML_cp, XML_lastPrinted ), xProperties->getPrintDate() );
+ writeElement( pCoreProps, FSNS( XML_dcterms, XML_modified ), xProperties->getModificationDate() );
+ writeElement( pCoreProps, FSNS( XML_cp, XML_revision ), xProperties->getEditingCycles() );
+ writeElement( pCoreProps, FSNS( XML_dc, XML_subject ), xProperties->getSubject() );
+ writeElement( pCoreProps, FSNS( XML_dc, XML_title ), xProperties->getTitle() );
+
+ it = aUserDefinedProperties.find("OOXMLCorePropertyVersion");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pCoreProps, FSNS( XML_cp, XML_version ), aValue );
+ }
+
+ pCoreProps->endElementNS( XML_cp, XML_coreProperties );
+}
+
+static void
+writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties )
+{
+ rSelf.addRelation(
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
+ u"docProps/app.xml" );
+ FSHelperPtr pAppProps = rSelf.openFragmentStreamWithSerializer(
+ "docProps/app.xml",
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml" );
+ pAppProps->startElement( XML_Properties,
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeExtPr)),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
+
+ uno::Reference<beans::XPropertyAccess> xUserDefinedProperties(xProperties->getUserDefinedProperties(), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aUserDefinedProperties(xUserDefinedProperties->getPropertyValues());
+ comphelper::SequenceAsHashMap::iterator it;
+
+ writeElement( pAppProps, XML_Template, xProperties->getTemplateName() );
+
+ it = aUserDefinedProperties.find("Manager");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pAppProps, XML_Manager, aValue );
+ }
+
+#ifdef OOXTODO
+ writeElement( pAppProps, XML_PresentationFormat, "presentation format" );
+ writeElement( pAppProps, XML_Lines, "lines" );
+ writeElement( pAppProps, XML_Slides, "slides" );
+ writeElement( pAppProps, XML_Notes, "notes" );
+#endif /* def OOXTODO */
+ // EditingDuration is in seconds, TotalTime is in minutes.
+ writeElement( pAppProps, XML_TotalTime, xProperties->getEditingDuration() / 60 );
+#ifdef OOXTODO
+ writeElement( pAppProps, XML_HiddenSlides, "hidden slides" );
+ writeElement( pAppProps, XML_MMClips, "mm clips" );
+ writeElement( pAppProps, XML_ScaleCrop, "scale crop" );
+ writeElement( pAppProps, XML_HeadingPairs, "heading pairs" );
+ writeElement( pAppProps, XML_TitlesOfParts, "titles of parts" );
+ writeElement( pAppProps, XML_LinksUpToDate, "links up-to-date" );
+ writeElement( pAppProps, XML_SharedDoc, "shared doc" );
+ writeElement( pAppProps, XML_HLinks, "hlinks" );
+ writeElement( pAppProps, XML_HyperlinksChanged, "hyperlinks changed" );
+ writeElement( pAppProps, XML_DigSig, "digital signature" );
+#endif /* def OOXTODO */
+ writeElement( pAppProps, XML_Application, utl::DocInfoHelper::GetGeneratorString() );
+
+ it = aUserDefinedProperties.find("HyperlinkBase");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement( pAppProps, XML_HyperlinkBase, aValue );
+ }
+ // AppVersion specifies the version of the application which produced document
+ // It is strictly connected with MS Office versions:
+ // * 12: [Office 2007] [LO < 7.0]
+ // * 14: [Office 2010]
+ // * 15: [Office 2013/2016/2019] [LO >= 7.0]
+ // The LibreOffice is application on 2013/2016/2019 level
+ writeElement( pAppProps, XML_AppVersion, u"15.0000" );
+
+ // OOXTODO Calculate DocSecurity value based on security (password, read-only etc.)
+ it = aUserDefinedProperties.find("DocSecurity");
+ if (it != aUserDefinedProperties.end())
+ {
+ sal_Int32 nValue;
+ if (it->second >>= nValue)
+ writeElement( pAppProps, XML_DocSecurity, nValue );
+ }
+
+ comphelper::SequenceAsHashMap aStats = xProperties->getDocumentStatistics();
+ sal_Int32 nValue = 0;
+
+ it = aStats.find("PageCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_Pages, nValue);
+ }
+
+ it = aStats.find("WordCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_Words, nValue);
+ }
+
+ it = aStats.find("NonWhitespaceCharacterCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_Characters, nValue);
+ }
+
+ it = aStats.find("CharacterCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_CharactersWithSpaces, nValue);
+ }
+
+ it = aStats.find("ParagraphCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_Paragraphs, nValue);
+ }
+
+ it = aUserDefinedProperties.find("Company");
+ if (it != aUserDefinedProperties.end())
+ {
+ OUString aValue;
+ if (it->second >>= aValue)
+ writeElement(pAppProps, XML_Company, aValue);
+ }
+
+ pAppProps->endElement( XML_Properties );
+}
+
+static void
+writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties, bool bSecurityOptOpenReadOnly )
+{
+ uno::Reference<beans::XPropertyAccess> xUserDefinedProperties( xProperties->getUserDefinedProperties(), uno::UNO_QUERY );
+ auto aprop = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(xUserDefinedProperties->getPropertyValues());
+ sal_Int32 nbCustomProperties = aprop.size();
+ // tdf#89791 : if no custom properties, no need to add docProps/custom.x
+ // tdf#107690: except the case of read-only documents, because that
+ // is handled by the _MarkAsFinal custom property in MSO.
+ if (!nbCustomProperties && !bSecurityOptOpenReadOnly)
+ return;
+
+ if (bSecurityOptOpenReadOnly)
+ {
+ PropertyValue aPropertyValue;
+ // MSO custom property for read-only documents
+ aPropertyValue.Name = "_MarkAsFinal";
+ aPropertyValue.Value <<= true;
+ aprop.push_back(aPropertyValue);
+ }
+
+ rSelf.addRelation(
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",
+ u"docProps/custom.xml" );
+ FSHelperPtr pAppProps = rSelf.openFragmentStreamWithSerializer(
+ "docProps/custom.xml",
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml" );
+ pAppProps->startElement( XML_Properties,
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeCustomPr)),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
+
+ size_t nIndex = 0;
+ for (const auto& rProp : aprop)
+ {
+ if ( !rProp.Name.isEmpty() )
+ {
+ // Skip storing these values in Custom Properties as it will be stored in Core/Extended Properties
+ if (( rProp.Name == "OOXMLCorePropertyCategory" ) || // stored in cp:category
+ ( rProp.Name == "OOXMLCorePropertyContentStatus" ) || // stored in cp:contentStatus
+ ( rProp.Name == "OOXMLCorePropertyContentType" ) || // stored in cp:contentType
+ ( rProp.Name == "OOXMLCorePropertyIdentifier" ) || // stored in dc:identifier
+ ( rProp.Name == "OOXMLCorePropertyVersion" ) || // stored in cp:version
+ ( rProp.Name == "HyperlinkBase" ) || // stored in Extended File Properties
+ ( rProp.Name == "AppVersion" ) || // stored in Extended File Properties
+ ( rProp.Name == "DocSecurity" ) || // stored in Extended File Properties
+ ( rProp.Name == "Manager" ) || // stored in Extended File Properties
+ ( rProp.Name == "Company" )) // stored in Extended File Properties
+ continue;
+
+ // pid starts from 2 not from 1 as MS supports pid from 2
+ pAppProps->startElement( XML_property ,
+ XML_fmtid, "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
+ XML_pid, OString::number(nIndex + 2),
+ XML_name, rProp.Name);
+
+ switch ( rProp.Value.getValueTypeClass() )
+ {
+ case TypeClass_STRING:
+ {
+ OUString aValue;
+ rProp.Value >>= aValue;
+ writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), aValue );
+ }
+ break;
+ case TypeClass_BOOLEAN:
+ {
+ bool val = *o3tl::forceAccess<bool>(rProp.Value);
+ writeElement( pAppProps, FSNS( XML_vt, XML_bool ), val ? 1 : 0);
+ }
+ break;
+ case TypeClass_DOUBLE:
+ {
+ double num = {}; // spurious -Werror=maybe-uninitialized
+ if ( rProp.Value >>= num )
+ {
+ // r8 - 8-byte real number
+ writeElement( pAppProps, FSNS( XML_vt, XML_r8 ), OUString::number(num) );
+ }
+ }
+ break;
+ default:
+ {
+ double num = {}; // spurious -Werror=maybe-uninitialized
+ util::Date aDate;
+ util::Duration aDuration;
+ util::DateTime aDateTime;
+ if ( rProp.Value >>= num )
+ {
+ // i4 - 4-byte signed integer
+ writeElement( pAppProps, FSNS( XML_vt, XML_i4 ), num );
+ }
+ else if ( rProp.Value >>= aDate )
+ {
+ aDateTime = util::DateTime( 0, 0 , 0, 0, aDate.Day, aDate.Month, aDate.Year, true );
+ writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime);
+ }
+ else if ( rProp.Value >>= aDuration )
+ {
+ OUStringBuffer buf;
+ ::sax::Converter::convertDuration( buf, aDuration );
+ OUString aDurationStr = buf.makeStringAndClear();
+ writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), aDurationStr );
+ }
+ else if ( rProp.Value >>= aDateTime )
+ writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime );
+ else
+ //no other options
+ OSL_FAIL( "XMLFilterBase::writeCustomProperties unsupported value type!" );
+ }
+ break;
+ }
+ pAppProps->endElement( XML_property );
+ }
+ ++nIndex;
+ }
+ pAppProps->endElement( XML_Properties );
+}
+
+void XmlFilterBase::exportDocumentProperties( const Reference< XDocumentProperties >& xProperties, bool bSecurityOptOpenReadOnly )
+{
+ if( xProperties.is() )
+ {
+ writeCoreProperties( *this, xProperties );
+ writeAppProperties( *this, xProperties );
+ writeCustomProperties( *this, xProperties, bSecurityOptOpenReadOnly );
+ }
+}
+
+// protected ------------------------------------------------------------------
+
+Reference< XInputStream > XmlFilterBase::implGetInputStream( MediaDescriptor& rMediaDesc ) const
+{
+ /* Get the input stream directly from the media descriptor, or decrypt the
+ package again. The latter is needed e.g. when the document is reloaded.
+ All this is implemented in the detector service. */
+ rtl::Reference< FilterDetect > xDetector( new FilterDetect( getComponentContext() ) );
+ return xDetector->extractUnencryptedPackage( rMediaDesc );
+}
+
+Reference<XStream> XmlFilterBase::implGetOutputStream( MediaDescriptor& rMediaDescriptor ) const
+{
+ const Sequence< NamedValue > aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
+ MediaDescriptor::PROP_ENCRYPTIONDATA,
+ Sequence< NamedValue >() );
+
+ if (aMediaEncData.getLength() == 0)
+ {
+ return FilterBase::implGetOutputStream( rMediaDescriptor );
+ }
+ else // We need to encrypt the stream so create a memory stream
+ {
+ Reference< XComponentContext > xContext = getComponentContext();
+ return Reference< XStream > (
+ xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream", xContext),
+ uno::UNO_QUERY_THROW );
+ }
+}
+
+bool XmlFilterBase::implFinalizeExport( MediaDescriptor& rMediaDescriptor )
+{
+ bool bRet = true;
+
+ const Sequence< NamedValue > aMediaEncData = rMediaDescriptor.getUnpackedValueOrDefault(
+ MediaDescriptor::PROP_ENCRYPTIONDATA,
+ Sequence< NamedValue >() );
+
+ if (aMediaEncData.getLength())
+ {
+ commitStorage();
+
+ Reference< XStream> xDocumentStream (FilterBase::implGetOutputStream(rMediaDescriptor));
+ oox::ole::OleStorage aOleStorage( getComponentContext(), xDocumentStream, true );
+ crypto::DocumentEncryption encryptor( getComponentContext(), getMainDocumentStream(), aOleStorage, aMediaEncData );
+ bRet = encryptor.encrypt();
+ if (bRet)
+ aOleStorage.commit();
+ }
+
+ return bRet;
+}
+
+// private --------------------------------------------------------------------
+
+StorageRef XmlFilterBase::implCreateStorage( const Reference< XInputStream >& rxInStream ) const
+{
+ return std::make_shared<ZipStorage>( getComponentContext(), rxInStream );
+}
+
+StorageRef XmlFilterBase::implCreateStorage( const Reference< XStream >& rxOutStream ) const
+{
+ return std::make_shared<ZipStorage>( getComponentContext(), rxOutStream );
+}
+
+bool XmlFilterBase::isMSO2007Document() const
+{
+ return mbMSO2007;
+}
+
+bool XmlFilterBase::isMSODocument() const
+{
+ return mbMSO;
+}
+
+void XmlFilterBase::setMissingExtDrawing()
+{
+ mbMissingExtDrawing = true;
+}
+
+void XmlFilterBase::setDiagramFontHeights(NamedShapePairs* pDiagramFontHeights)
+{
+ mxImpl->mpDiagramFontHeights = pDiagramFontHeights;
+}
+
+NamedShapePairs* XmlFilterBase::getDiagramFontHeights() { return mxImpl->mpDiagramFontHeights; }
+
+OUString XmlFilterBase::getNamespaceURL(sal_Int32 nNSID) const
+{
+ auto itr = mxImpl->mrNamespaceMap.maTransitionalNamespaceMap.find(nNSID);
+ if (itr == mxImpl->mrNamespaceMap.maTransitionalNamespaceMap.end())
+ {
+ SAL_WARN("oox", "missing namespace in the namespace map for : " << nNSID);
+ return OUString();
+ }
+
+ return itr->second;
+}
+
+void XmlFilterBase::importCustomFragments(css::uno::Reference<css::embed::XStorage> const & xDocumentStorage)
+{
+ Reference<XRelationshipAccess> xRelations(xDocumentStorage, UNO_QUERY);
+ if (!xRelations.is())
+ return;
+
+ const uno::Sequence<uno::Sequence<beans::StringPair>> aSeqs = xRelations->getAllRelationships();
+
+ std::vector<StreamDataSequence> aCustomFragments;
+ std::vector<OUString> aCustomFragmentTypes;
+ std::vector<OUString> aCustomFragmentTargets;
+ for (const uno::Sequence<beans::StringPair>& aSeq : aSeqs)
+ {
+ OUString sType;
+ OUString sTarget;
+ for (const beans::StringPair& aPair : aSeq)
+ {
+ if (aPair.First == "Target")
+ sTarget = aPair.Second;
+ else if (aPair.First == "Type")
+ sType = aPair.Second;
+ }
+
+ // Preserve non-standard (i.e. custom) entries.
+ if (!sType.match("http://schemas.openxmlformats.org") // OOXML/ECMA Transitional
+ && !sType.match("http://purl.oclc.org")) // OOXML Strict
+ {
+ StreamDataSequence aDataSeq;
+ if (importBinaryData(aDataSeq, sTarget))
+ {
+ aCustomFragments.emplace_back(aDataSeq);
+ aCustomFragmentTypes.emplace_back(sType);
+ aCustomFragmentTargets.emplace_back(sTarget);
+ }
+ }
+ }
+
+ // Adding the saved custom xml DOM
+ comphelper::SequenceAsHashMap aGrabBagProperties;
+ aGrabBagProperties["OOXCustomFragments"] <<= comphelper::containerToSequence(aCustomFragments);
+ aGrabBagProperties["OOXCustomFragmentTypes"] <<= comphelper::containerToSequence(aCustomFragmentTypes);
+ aGrabBagProperties["OOXCustomFragmentTargets"] <<= comphelper::containerToSequence(aCustomFragmentTargets);
+
+ std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomList;
+ std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomPropsList;
+ //FIXME: Ideally, we should get these the relations, but it seems that is not consistently set.
+ // In some cases it's stored in the workbook relationships, which is unexpected. So we discover them directly.
+ for (int i = 1; ; ++i)
+ {
+ Reference<XDocument> xCustDoc = importFragment("customXml/item" + OUString::number(i) + ".xml");
+ Reference<XDocument> xCustDocProps = importFragment("customXml/itemProps" + OUString::number(i) + ".xml");
+ if (xCustDoc && xCustDocProps)
+ {
+ aCustomXmlDomList.emplace_back(xCustDoc);
+ aCustomXmlDomPropsList.emplace_back(xCustDocProps);
+ }
+ else
+ break;
+ }
+
+ // Adding the saved custom xml DOM
+ aGrabBagProperties["OOXCustomXml"] <<= comphelper::containerToSequence(aCustomXmlDomList);
+ aGrabBagProperties["OOXCustomXmlProps"] <<= comphelper::containerToSequence(aCustomXmlDomPropsList);
+
+ // Save the [Content_Types].xml after parsing.
+ uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypeInfo;
+ uno::Reference<io::XInputStream> xInputStream = openInputStream("[Content_Types].xml");
+ if (xInputStream.is())
+ aContentTypeInfo = comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, getComponentContext());
+
+ aGrabBagProperties["OOXContentTypes"] <<= aContentTypeInfo;
+
+ Reference<XComponent> xModel = getModel();
+ oox::core::XmlFilterBase::putPropertiesToDocumentGrabBag(xModel, aGrabBagProperties);
+}
+
+void XmlFilterBase::exportCustomFragments()
+{
+ Reference<XComponent> xModel = getModel();
+ uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW);
+
+ uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
+ if (!xPropSetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG))
+ return;
+
+ uno::Sequence<uno::Reference<xml::dom::XDocument>> customXmlDomlist;
+ uno::Sequence<uno::Reference<xml::dom::XDocument>> customXmlDomPropslist;
+ uno::Sequence<StreamDataSequence> customFragments;
+ uno::Sequence<OUString> customFragmentTypes;
+ uno::Sequence<OUString> customFragmentTargets;
+ uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypes;
+
+ uno::Sequence<beans::PropertyValue> propList;
+ xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList;
+ for (const auto& rProp : std::as_const(propList))
+ {
+ const OUString propName = rProp.Name;
+ if (propName == "OOXCustomXml")
+ {
+ rProp.Value >>= customXmlDomlist;
+ }
+ else if (propName == "OOXCustomXmlProps")
+ {
+ rProp.Value >>= customXmlDomPropslist;
+ }
+ else if (propName == "OOXCustomFragments")
+ {
+ rProp.Value >>= customFragments;
+ }
+ else if (propName == "OOXCustomFragmentTypes")
+ {
+ rProp.Value >>= customFragmentTypes;
+ }
+ else if (propName == "OOXCustomFragmentTargets")
+ {
+ rProp.Value >>= customFragmentTargets;
+ }
+ else if (propName == "OOXContentTypes")
+ {
+ rProp.Value >>= aContentTypes;
+ }
+ }
+
+ // Expect customXmlDomPropslist.getLength() == customXmlDomlist.getLength().
+ for (sal_Int32 j = 0; j < customXmlDomlist.getLength(); j++)
+ {
+ uno::Reference<xml::dom::XDocument> customXmlDom = customXmlDomlist[j];
+ uno::Reference<xml::dom::XDocument> customXmlDomProps = customXmlDomPropslist[j];
+ const OUString fragmentPath = "customXml/item" + OUString::number(j+1) + ".xml";
+ if (customXmlDom.is())
+ {
+ addRelation(oox::getRelationship(Relationship::CUSTOMXML), OUStringConcatenation("../" + fragmentPath));
+
+ uno::Reference<xml::sax::XSAXSerializable> serializer(customXmlDom, uno::UNO_QUERY);
+ uno::Reference<xml::sax::XWriter> writer = xml::sax::Writer::create(comphelper::getProcessComponentContext());
+ writer->setOutputStream(openFragmentStream(fragmentPath, "application/xml"));
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+ }
+
+ if (customXmlDomProps.is())
+ {
+ uno::Reference<xml::sax::XSAXSerializable> serializer(customXmlDomProps, uno::UNO_QUERY);
+ uno::Reference<xml::sax::XWriter> writer = xml::sax::Writer::create(comphelper::getProcessComponentContext());
+ writer->setOutputStream(openFragmentStream("customXml/itemProps"+OUString::number(j+1)+".xml",
+ "application/vnd.openxmlformats-officedocument.customXmlProperties+xml"));
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // Adding itemprops's relationship entry to item.xml.rels file
+ addRelation(openFragmentStream(fragmentPath, "application/xml"),
+ oox::getRelationship(Relationship::CUSTOMXMLPROPS),
+ OUStringConcatenation("itemProps"+OUString::number(j+1)+".xml"));
+ }
+ }
+
+ // Expect customFragments.getLength() == customFragmentTypes.getLength() == customFragmentTargets.getLength().
+ for (sal_Int32 j = 0; j < customFragments.getLength(); j++)
+ {
+ addRelation(customFragmentTypes[j], customFragmentTargets[j]);
+ const OUString aFilename = customFragmentTargets[j];
+ Reference<XOutputStream> xOutStream = openOutputStream(aFilename);
+ if (xOutStream.is())
+ {
+ xOutStream->writeBytes(customFragments[j]);
+ uno::Reference<XPropertySet> xProps(xOutStream, uno::UNO_QUERY);
+ if (xProps.is())
+ {
+ const OUString aType = comphelper::OFOPXMLHelper::GetContentTypeByName(aContentTypes, aFilename);
+ const OUString aContentType = (aType.getLength() ? aType : OUString("application/octet-stream"));
+ xProps->setPropertyValue("MediaType", uno::Any(aContentType));
+ }
+ }
+ }
+}
+
+} // namespace oox::core
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
new file mode 100644
index 000000000..f75184981
--- /dev/null
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -0,0 +1,843 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/AgileEngine.hxx>
+
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+
+#include <sax/tools/converter.hxx>
+
+#include <comphelper/hash.hxx>
+#include <comphelper/docpasswordhelper.hxx>
+#include <comphelper/random.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/base64.hxx>
+#include <comphelper/sequence.hxx>
+
+#include <filter/msfilter/mscodec.hxx>
+#include <tools/stream.hxx>
+#include <tools/XmlWriter.hxx>
+#include <sax/fastattribs.hxx>
+
+#include <com/sun/star/xml/sax/XFastParser.hpp>
+#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
+#include <com/sun/star/xml/sax/FastParser.hpp>
+#include <com/sun/star/xml/sax/FastToken.hpp>
+
+using namespace css;
+using namespace css::beans;
+using namespace css::io;
+using namespace css::lang;
+using namespace css::uno;
+using namespace css::xml::sax;
+using namespace css::xml;
+
+namespace oox::crypto {
+
+namespace {
+
+std::u16string_view stripNamespacePrefix(std::u16string_view rsInputName)
+{
+ size_t idx = rsInputName.find(':');
+ if (idx == std::u16string_view::npos)
+ return rsInputName;
+ return rsInputName.substr(idx + 1);
+}
+
+class AgileTokenHandler : public sax_fastparser::FastTokenHandlerBase
+{
+public:
+ virtual sal_Int32 SAL_CALL getTokenFromUTF8(const Sequence< sal_Int8 >& /*nIdentifier*/) override
+ {
+ return FastToken::DONTKNOW;
+ }
+
+ virtual Sequence<sal_Int8> SAL_CALL getUTF8Identifier(sal_Int32 /*nToken*/) override
+ {
+ return Sequence<sal_Int8>();
+ }
+
+ virtual sal_Int32 getTokenDirect( const char * /* pToken */, sal_Int32 /* nLength */ ) const override
+ {
+ return -1;
+ }
+};
+
+class AgileDocumentHandler : public ::cppu::WeakImplHelper<XFastDocumentHandler>
+{
+ AgileEncryptionInfo& mInfo;
+
+public:
+ explicit AgileDocumentHandler(AgileEncryptionInfo& rInfo) :
+ mInfo(rInfo)
+ {}
+
+ void SAL_CALL startDocument() override {}
+ void SAL_CALL endDocument() override {}
+ void SAL_CALL processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ ) override {}
+ void SAL_CALL setDocumentLocator( const Reference< XLocator >& /*xLocator*/ ) override {}
+ void SAL_CALL startFastElement( sal_Int32 /*Element*/, const Reference< XFastAttributeList >& /*Attribs*/ ) override {}
+
+ void SAL_CALL startUnknownElement( const OUString& /*aNamespace*/, const OUString& rName, const Reference< XFastAttributeList >& aAttributeList ) override
+ {
+ std::u16string_view rLocalName = stripNamespacePrefix(rName);
+
+ const css::uno::Sequence<Attribute> aUnknownAttributes = aAttributeList->getUnknownAttributes();
+ for (const Attribute& rAttribute : aUnknownAttributes)
+ {
+ std::u16string_view rAttrLocalName = stripNamespacePrefix(rAttribute.Name);
+
+ if (rAttrLocalName == u"spinCount")
+ {
+ ::sax::Converter::convertNumber(mInfo.spinCount, rAttribute.Value);
+ }
+ else if (rAttrLocalName == u"saltSize")
+ {
+ ::sax::Converter::convertNumber(mInfo.saltSize, rAttribute.Value);
+ }
+ else if (rAttrLocalName == u"blockSize")
+ {
+ ::sax::Converter::convertNumber(mInfo.blockSize, rAttribute.Value);
+ }
+ else if (rAttrLocalName == u"keyBits")
+ {
+ ::sax::Converter::convertNumber(mInfo.keyBits, rAttribute.Value);
+ }
+ else if (rAttrLocalName == u"hashSize")
+ {
+ ::sax::Converter::convertNumber(mInfo.hashSize, rAttribute.Value);
+ }
+ else if (rAttrLocalName == u"cipherAlgorithm")
+ {
+ mInfo.cipherAlgorithm = rAttribute.Value;
+ }
+ else if (rAttrLocalName == u"cipherChaining")
+ {
+ mInfo.cipherChaining = rAttribute.Value;
+ }
+ else if (rAttrLocalName == u"hashAlgorithm")
+ {
+ mInfo.hashAlgorithm = rAttribute.Value;
+ }
+ else if (rAttrLocalName == u"saltValue")
+ {
+ Sequence<sal_Int8> saltValue;
+ comphelper::Base64::decode(saltValue, rAttribute.Value);
+ if (rLocalName == u"encryptedKey")
+ mInfo.saltValue = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(saltValue);
+ else if (rLocalName == u"keyData")
+ mInfo.keyDataSalt = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(saltValue);
+ }
+ else if (rAttrLocalName == u"encryptedVerifierHashInput")
+ {
+ Sequence<sal_Int8> encryptedVerifierHashInput;
+ comphelper::Base64::decode(encryptedVerifierHashInput, rAttribute.Value);
+ mInfo.encryptedVerifierHashInput = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(encryptedVerifierHashInput);
+ }
+ else if (rAttrLocalName == u"encryptedVerifierHashValue")
+ {
+ Sequence<sal_Int8> encryptedVerifierHashValue;
+ comphelper::Base64::decode(encryptedVerifierHashValue, rAttribute.Value);
+ mInfo.encryptedVerifierHashValue = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(encryptedVerifierHashValue);
+ }
+ else if (rAttrLocalName == u"encryptedKeyValue")
+ {
+ Sequence<sal_Int8> encryptedKeyValue;
+ comphelper::Base64::decode(encryptedKeyValue, rAttribute.Value);
+ mInfo.encryptedKeyValue = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(encryptedKeyValue);
+ }
+ if (rAttrLocalName == u"encryptedHmacKey")
+ {
+ Sequence<sal_Int8> aValue;
+ comphelper::Base64::decode(aValue, rAttribute.Value);
+ mInfo.hmacEncryptedKey = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(aValue);
+ }
+ if (rAttrLocalName == u"encryptedHmacValue")
+ {
+ Sequence<sal_Int8> aValue;
+ comphelper::Base64::decode(aValue, rAttribute.Value);
+ mInfo.hmacEncryptedValue = comphelper::sequenceToContainer<std::vector<sal_uInt8>>(aValue);
+ }
+ }
+ }
+
+ void SAL_CALL endFastElement( sal_Int32 /*aElement*/ ) override
+ {}
+ void SAL_CALL endUnknownElement( const OUString& /*aNamespace*/, const OUString& /*aName*/ ) override
+ {}
+
+ Reference< XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 /*aElement*/, const Reference< XFastAttributeList >& /*aAttribs*/ ) override
+ {
+ return nullptr;
+ }
+
+ Reference< XFastContextHandler > SAL_CALL createUnknownChildContext( const OUString& /*aNamespace*/, const OUString& /*aName*/, const Reference< XFastAttributeList >& /*aAttribs*/ ) override
+ {
+ return this;
+ }
+
+ void SAL_CALL characters( const OUString& /*aChars*/ ) override
+ {}
+};
+
+constexpr const sal_uInt32 constSegmentLength = 4096;
+
+const std::vector<sal_uInt8> constBlock1 { 0xfe, 0xa7, 0xd2, 0x76, 0x3b, 0x4b, 0x9e, 0x79 };
+const std::vector<sal_uInt8> constBlock2 { 0xd7, 0xaa, 0x0f, 0x6d, 0x30, 0x61, 0x34, 0x4e };
+const std::vector<sal_uInt8> constBlock3 { 0x14, 0x6e, 0x0b, 0xe7, 0xab, 0xac, 0xd0, 0xd6 };
+const std::vector<sal_uInt8> constBlockHmac1 { 0x5f, 0xb2, 0xad, 0x01, 0x0c, 0xb9, 0xe1, 0xf6 };
+const std::vector<sal_uInt8> constBlockHmac2 { 0xa0, 0x67, 0x7f, 0x02, 0xb2, 0x2c, 0x84, 0x33 };
+
+bool hashCalc(std::vector<sal_uInt8>& output,
+ std::vector<sal_uInt8>& input,
+ std::u16string_view sAlgorithm )
+{
+ if (sAlgorithm == u"SHA1")
+ {
+ std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA1);
+ output = out;
+ return true;
+ }
+ else if (sAlgorithm == u"SHA512")
+ {
+ std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA512);
+ output = out;
+ return true;
+ }
+ return false;
+}
+
+CryptoHashType cryptoHashTypeFromString(std::u16string_view sAlgorithm)
+{
+ if (sAlgorithm == u"SHA512")
+ return CryptoHashType::SHA512;
+ return CryptoHashType::SHA1;
+}
+
+} // namespace
+
+AgileEngine::AgileEngine()
+ : meEncryptionPreset(AgileEncryptionPreset::AES_256_SHA512)
+{}
+
+Crypto::CryptoType AgileEngine::cryptoType(const AgileEncryptionInfo& rInfo)
+{
+ if (rInfo.keyBits == 128 && rInfo.cipherAlgorithm == "AES" && rInfo.cipherChaining == "ChainingModeCBC")
+ return Crypto::AES_128_CBC;
+ else if (rInfo.keyBits == 256 && rInfo.cipherAlgorithm == "AES" && rInfo.cipherChaining == "ChainingModeCBC")
+ return Crypto::AES_256_CBC;
+ return Crypto::UNKNOWN;
+}
+
+static std::vector<sal_uInt8> calculateIV(comphelper::HashType eType,
+ std::vector<sal_uInt8> const & rSalt,
+ std::vector<sal_uInt8> const & rBlock,
+ sal_Int32 nCipherBlockSize)
+{
+ comphelper::Hash aHasher(eType);
+ aHasher.update(rSalt.data(), rSalt.size());
+ aHasher.update(rBlock.data(), rBlock.size());
+ std::vector<sal_uInt8> aIV = aHasher.finalize();
+ aIV.resize(roundUp(sal_Int32(aIV.size()), nCipherBlockSize), 0x36);
+ return aIV;
+}
+
+void AgileEngine::calculateBlock(
+ std::vector<sal_uInt8> const & rBlock,
+ std::vector<sal_uInt8>& rHashFinal,
+ std::vector<sal_uInt8>& rInput,
+ std::vector<sal_uInt8>& rOutput)
+{
+ std::vector<sal_uInt8> hash(mInfo.hashSize, 0);
+ std::vector<sal_uInt8> dataFinal(mInfo.hashSize + rBlock.size(), 0);
+ std::copy(rHashFinal.begin(), rHashFinal.end(), dataFinal.begin());
+ std::copy(rBlock.begin(), rBlock.end(), dataFinal.begin() + mInfo.hashSize);
+
+ hashCalc(hash, dataFinal, mInfo.hashAlgorithm);
+
+ sal_Int32 keySize = mInfo.keyBits / 8;
+ std::vector<sal_uInt8> key(keySize, 0);
+
+ std::copy(hash.begin(), hash.begin() + keySize, key.begin());
+
+ Decrypt aDecryptor(key, mInfo.saltValue, cryptoType(mInfo));
+ aDecryptor.update(rOutput, rInput);
+}
+
+void AgileEngine::encryptBlock(
+ std::vector<sal_uInt8> const & rBlock,
+ std::vector<sal_uInt8> & rHashFinal,
+ std::vector<sal_uInt8> & rInput,
+ std::vector<sal_uInt8> & rOutput)
+{
+ std::vector<sal_uInt8> hash(mInfo.hashSize, 0);
+ std::vector<sal_uInt8> dataFinal(mInfo.hashSize + rBlock.size(), 0);
+ std::copy(rHashFinal.begin(), rHashFinal.end(), dataFinal.begin());
+ std::copy(rBlock.begin(), rBlock.end(), dataFinal.begin() + mInfo.hashSize);
+
+ hashCalc(hash, dataFinal, mInfo.hashAlgorithm);
+
+ sal_Int32 keySize = mInfo.keyBits / 8;
+ std::vector<sal_uInt8> key(keySize, 0);
+
+ std::copy(hash.begin(), hash.begin() + keySize, key.begin());
+
+ Encrypt aEncryptor(key, mInfo.saltValue, cryptoType(mInfo));
+
+ aEncryptor.update(rOutput, rInput);
+}
+
+void AgileEngine::calculateHashFinal(const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal)
+{
+ aHashFinal = comphelper::DocPasswordHelper::GetOoxHashAsVector(
+ rPassword, mInfo.saltValue, mInfo.spinCount,
+ comphelper::Hash::IterCount::PREPEND, mInfo.hashAlgorithm);
+}
+
+namespace
+{
+
+bool generateBytes(std::vector<sal_uInt8> & rBytes, sal_Int32 nSize)
+{
+ size_t nMax = std::min(rBytes.size(), size_t(nSize));
+
+ for (size_t i = 0; i < nMax; ++i)
+ {
+ rBytes[i] = sal_uInt8(comphelper::rng::uniform_uint_distribution(0, 0xFF));
+ }
+
+ return true;
+}
+
+} // end anonymous namespace
+
+bool AgileEngine::decryptAndCheckVerifierHash(OUString const & rPassword)
+{
+ std::vector<sal_uInt8>& encryptedHashValue = mInfo.encryptedVerifierHashValue;
+ size_t encryptedHashValueSize = encryptedHashValue.size();
+ size_t nHashValueSize = mInfo.hashSize;
+ if (nHashValueSize > encryptedHashValueSize)
+ return false;
+
+ std::vector<sal_uInt8> hashFinal(nHashValueSize, 0);
+ calculateHashFinal(rPassword, hashFinal);
+
+ std::vector<sal_uInt8>& encryptedHashInput = mInfo.encryptedVerifierHashInput;
+ // SALT - needs to be a multiple of block size (?)
+ sal_uInt32 nSaltSize = roundUp(mInfo.saltSize, mInfo.blockSize);
+ if (nSaltSize < encryptedHashInput.size())
+ return false;
+ std::vector<sal_uInt8> hashInput(nSaltSize, 0);
+ calculateBlock(constBlock1, hashFinal, encryptedHashInput, hashInput);
+
+ std::vector<sal_uInt8> hashValue(encryptedHashValueSize, 0);
+ calculateBlock(constBlock2, hashFinal, encryptedHashValue, hashValue);
+
+ std::vector<sal_uInt8> hash(nHashValueSize, 0);
+ hashCalc(hash, hashInput, mInfo.hashAlgorithm);
+
+ return std::equal(hash.begin(), hash.end(), hashValue.begin());
+}
+
+void AgileEngine::decryptEncryptionKey(OUString const & rPassword)
+{
+ sal_Int32 nKeySize = mInfo.keyBits / 8;
+
+ mKey.clear();
+ mKey.resize(nKeySize, 0);
+
+ std::vector<sal_uInt8> aPasswordHash(mInfo.hashSize, 0);
+ calculateHashFinal(rPassword, aPasswordHash);
+
+ calculateBlock(constBlock3, aPasswordHash, mInfo.encryptedKeyValue, mKey);
+}
+
+// TODO: Rename
+bool AgileEngine::generateEncryptionKey(OUString const & rPassword)
+{
+ bool bResult = decryptAndCheckVerifierHash(rPassword);
+
+ if (bResult)
+ {
+ decryptEncryptionKey(rPassword);
+ decryptHmacKey();
+ decryptHmacValue();
+ }
+ return bResult;
+}
+
+bool AgileEngine::decryptHmacKey()
+{
+ // Initialize hmacKey
+ mInfo.hmacKey.clear();
+ mInfo.hmacKey.resize(mInfo.hmacEncryptedKey.size(), 0);
+
+ // Calculate IV
+ comphelper::HashType eType;
+ if (mInfo.hashAlgorithm == "SHA1")
+ eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA512")
+ eType = comphelper::HashType::SHA512;
+ else
+ return false;
+
+ std::vector<sal_uInt8> iv = calculateIV(eType, mInfo.keyDataSalt, constBlockHmac1, mInfo.blockSize);
+
+ // Decrypt without key, calculated iv
+ Decrypt aDecrypt(mKey, iv, cryptoType(mInfo));
+ aDecrypt.update(mInfo.hmacKey, mInfo.hmacEncryptedKey);
+
+ mInfo.hmacKey.resize(mInfo.hashSize, 0);
+
+ return true;
+}
+
+bool AgileEngine::decryptHmacValue()
+{
+ // Initialize hmacHash
+ mInfo.hmacHash.clear();
+ mInfo.hmacHash.resize(mInfo.hmacEncryptedValue.size(), 0);
+
+ // Calculate IV
+ comphelper::HashType eType;
+ if (mInfo.hashAlgorithm == "SHA1")
+ eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA512")
+ eType = comphelper::HashType::SHA512;
+ else
+ return false;
+ std::vector<sal_uInt8> iv = calculateIV(eType, mInfo.keyDataSalt, constBlockHmac2, mInfo.blockSize);
+
+ // Decrypt without key, calculated iv
+ Decrypt aDecrypt(mKey, iv, cryptoType(mInfo));
+ aDecrypt.update(mInfo.hmacHash, mInfo.hmacEncryptedValue);
+
+ mInfo.hmacHash.resize(mInfo.hashSize, 0);
+
+ return true;
+}
+
+bool AgileEngine::checkDataIntegrity()
+{
+ bool bResult = (mInfo.hmacHash.size() == mInfo.hmacCalculatedHash.size() &&
+ std::equal(mInfo.hmacHash.begin(), mInfo.hmacHash.end(), mInfo.hmacCalculatedHash.begin()));
+
+ return bResult;
+}
+
+bool AgileEngine::decrypt(BinaryXInputStream& aInputStream,
+ BinaryXOutputStream& aOutputStream)
+{
+ CryptoHash aCryptoHash(mInfo.hmacKey, cryptoHashTypeFromString(mInfo.hashAlgorithm));
+
+ sal_uInt32 totalSize = aInputStream.readuInt32(); // Document unencrypted size - 4 bytes
+ // account for size in HMAC
+ std::vector<sal_uInt8> aSizeBytes(sizeof(sal_uInt32));
+ ByteOrderConverter::writeLittleEndian(aSizeBytes.data(), totalSize);
+ aCryptoHash.update(aSizeBytes);
+
+ aInputStream.skip(4); // Reserved 4 Bytes
+ // account for reserved 4 bytes (must be 0)
+ std::vector<sal_uInt8> aReserved{0,0,0,0};
+ aCryptoHash.update(aReserved);
+
+ // setup decryption
+ std::vector<sal_uInt8>& keyDataSalt = mInfo.keyDataSalt;
+
+ sal_uInt32 saltSize = mInfo.saltSize;
+ sal_uInt32 keySize = mInfo.keyBits / 8;
+
+ sal_uInt32 segment = 0;
+
+ std::vector<sal_uInt8> saltWithBlockKey(saltSize + sizeof(segment), 0);
+ std::copy(keyDataSalt.begin(), keyDataSalt.end(), saltWithBlockKey.begin());
+
+ std::vector<sal_uInt8> hash(mInfo.hashSize, 0);
+ std::vector<sal_uInt8> iv(keySize, 0);
+
+ std::vector<sal_uInt8> inputBuffer(constSegmentLength);
+ std::vector<sal_uInt8> outputBuffer(constSegmentLength);
+ sal_uInt32 inputLength;
+ sal_uInt32 outputLength;
+ sal_uInt32 remaining = totalSize;
+
+ while ((inputLength = aInputStream.readMemory(inputBuffer.data(), inputBuffer.size())) > 0)
+ {
+ auto p = saltWithBlockKey.begin() + saltSize;
+ p[0] = segment & 0xFF;
+ p[1] = (segment >> 8) & 0xFF;
+ p[2] = (segment >> 16) & 0xFF;
+ p[3] = segment >> 24;
+
+ hashCalc(hash, saltWithBlockKey, mInfo.hashAlgorithm);
+
+ // Only if hash > keySize
+ std::copy(hash.begin(), hash.begin() + keySize, iv.begin());
+
+ Decrypt aDecryptor(mKey, iv, AgileEngine::cryptoType(mInfo));
+ outputLength = aDecryptor.update(outputBuffer, inputBuffer, inputLength);
+
+ sal_uInt32 writeLength = std::min(outputLength, remaining);
+
+ aCryptoHash.update(inputBuffer, inputLength);
+
+ aOutputStream.writeMemory(outputBuffer.data(), writeLength);
+
+ remaining -= outputLength;
+ segment++;
+ }
+
+ mInfo.hmacCalculatedHash = aCryptoHash.finalize();
+
+ return true;
+}
+
+bool AgileEngine::readEncryptionInfo(uno::Reference<io::XInputStream> & rxInputStream)
+{
+ // Check reserved value
+ std::vector<sal_uInt8> aExpectedReservedBytes(sizeof(sal_uInt32));
+ ByteOrderConverter::writeLittleEndian(aExpectedReservedBytes.data(), msfilter::AGILE_ENCRYPTION_RESERVED);
+
+ uno::Sequence<sal_Int8> aReadReservedBytes(sizeof(sal_uInt32));
+ rxInputStream->readBytes(aReadReservedBytes, aReadReservedBytes.getLength());
+
+ if (!std::equal(std::cbegin(aReadReservedBytes), std::cend(aReadReservedBytes), aExpectedReservedBytes.begin()))
+ return false;
+
+ mInfo.spinCount = 0;
+ mInfo.saltSize = 0;
+ mInfo.keyBits = 0;
+ mInfo.hashSize = 0;
+ mInfo.blockSize = 0;
+
+ Reference<XFastDocumentHandler> xFastDocumentHandler(new AgileDocumentHandler(mInfo));
+ Reference<XFastTokenHandler> xFastTokenHandler(new AgileTokenHandler);
+
+ Reference<XFastParser> xParser(css::xml::sax::FastParser::create(comphelper::getProcessComponentContext()));
+
+ xParser->setFastDocumentHandler(xFastDocumentHandler);
+ xParser->setTokenHandler(xFastTokenHandler);
+
+ InputSource aInputSource;
+ aInputSource.aInputStream = rxInputStream;
+ xParser->parseStream(aInputSource);
+
+ // CHECK info data
+ if (2 > mInfo.blockSize || mInfo.blockSize > 4096)
+ return false;
+
+ if (0 > mInfo.spinCount || mInfo.spinCount > 10000000)
+ return false;
+
+ if (1 > mInfo.saltSize|| mInfo.saltSize > 65536) // Check
+ return false;
+
+ // AES 128 CBC with SHA1
+ if (mInfo.keyBits == 128 &&
+ mInfo.cipherAlgorithm == "AES" &&
+ mInfo.cipherChaining == "ChainingModeCBC" &&
+ mInfo.hashAlgorithm == "SHA1" &&
+ mInfo.hashSize == comphelper::SHA1_HASH_LENGTH)
+ {
+ return true;
+ }
+
+ // AES 256 CBC with SHA512
+ if (mInfo.keyBits == 256 &&
+ mInfo.cipherAlgorithm == "AES" &&
+ mInfo.cipherChaining == "ChainingModeCBC" &&
+ mInfo.hashAlgorithm == "SHA512" &&
+ mInfo.hashSize == comphelper::SHA512_HASH_LENGTH)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+bool AgileEngine::generateAndEncryptVerifierHash(OUString const & rPassword)
+{
+ if (!generateBytes(mInfo.saltValue, mInfo.saltSize))
+ return false;
+
+ std::vector<sal_uInt8> unencryptedVerifierHashInput(mInfo.saltSize);
+ if (!generateBytes(unencryptedVerifierHashInput, mInfo.saltSize))
+ return false;
+
+ // HASH - needs to be modified to be multiple of block size
+ sal_Int32 nVerifierHash = roundUp(mInfo.hashSize, mInfo.blockSize);
+ std::vector<sal_uInt8> unencryptedVerifierHashValue;
+ if (!hashCalc(unencryptedVerifierHashValue, unencryptedVerifierHashInput, mInfo.hashAlgorithm))
+ return false;
+ unencryptedVerifierHashValue.resize(nVerifierHash, 0);
+
+ std::vector<sal_uInt8> hashFinal(mInfo.hashSize, 0);
+ calculateHashFinal(rPassword, hashFinal);
+
+ encryptBlock(constBlock1, hashFinal, unencryptedVerifierHashInput, mInfo.encryptedVerifierHashInput);
+
+ encryptBlock(constBlock2, hashFinal, unencryptedVerifierHashValue, mInfo.encryptedVerifierHashValue);
+
+ return true;
+}
+
+bool AgileEngine::encryptHmacKey()
+{
+ // Initialize hmacKey
+ mInfo.hmacKey.clear();
+ mInfo.hmacKey.resize(mInfo.hashSize, 0);
+
+ if (!generateBytes(mInfo.hmacKey, mInfo.hashSize))
+ return false;
+
+ // Encrypted salt must be multiple of block size
+ sal_Int32 nEncryptedSaltSize = oox::crypto::roundUp(mInfo.hashSize, mInfo.blockSize);
+
+ // We need to extend hmacSalt to multiple of block size, padding with 0x36
+ std::vector<sal_uInt8> extendedSalt(mInfo.hmacKey);
+ extendedSalt.resize(nEncryptedSaltSize, 0x36);
+
+ // Initialize hmacEncryptedKey
+ mInfo.hmacEncryptedKey.clear();
+ mInfo.hmacEncryptedKey.resize(nEncryptedSaltSize, 0);
+
+ // Calculate IV
+ comphelper::HashType eType;
+ if (mInfo.hashAlgorithm == "SHA1")
+ eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA512")
+ eType = comphelper::HashType::SHA512;
+ else
+ return false;
+
+ std::vector<sal_uInt8> iv = calculateIV(eType, mInfo.keyDataSalt, constBlockHmac1, mInfo.blockSize);
+
+ // Encrypt without key, calculated iv
+ Encrypt aEncryptor(mKey, iv, cryptoType(mInfo));
+ aEncryptor.update(mInfo.hmacEncryptedKey, extendedSalt);
+
+ return true;
+}
+
+bool AgileEngine::encryptHmacValue()
+{
+ sal_Int32 nEncryptedValueSize = roundUp(mInfo.hashSize, mInfo.blockSize);
+ mInfo.hmacEncryptedValue.clear();
+ mInfo.hmacEncryptedValue.resize(nEncryptedValueSize, 0);
+
+ std::vector<sal_uInt8> extendedHash(mInfo.hmacHash);
+ extendedHash.resize(nEncryptedValueSize, 0x36);
+
+ // Calculate IV
+ comphelper::HashType eType;
+ if (mInfo.hashAlgorithm == "SHA1")
+ eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA512")
+ eType = comphelper::HashType::SHA512;
+ else
+ return false;
+
+ std::vector<sal_uInt8> iv = calculateIV(eType, mInfo.keyDataSalt, constBlockHmac2, mInfo.blockSize);
+
+ // Encrypt without key, calculated iv
+ Encrypt aEncryptor(mKey, iv, cryptoType(mInfo));
+ aEncryptor.update(mInfo.hmacEncryptedValue, extendedHash);
+
+ return true;
+}
+
+bool AgileEngine::encryptEncryptionKey(OUString const & rPassword)
+{
+ sal_Int32 nKeySize = mInfo.keyBits / 8;
+
+ mKey.clear();
+ mKey.resize(nKeySize, 0);
+
+ mInfo.encryptedKeyValue.clear();
+ mInfo.encryptedKeyValue.resize(nKeySize, 0);
+
+ if (!generateBytes(mKey, nKeySize))
+ return false;
+
+ std::vector<sal_uInt8> aPasswordHash(mInfo.hashSize, 0);
+ calculateHashFinal(rPassword, aPasswordHash);
+
+ encryptBlock(constBlock3, aPasswordHash, mKey, mInfo.encryptedKeyValue);
+
+ return true;
+}
+
+bool AgileEngine::setupEncryption(OUString const & rPassword)
+{
+ if (meEncryptionPreset == AgileEncryptionPreset::AES_128_SHA1)
+ setupEncryptionParameters({ 100000, 16, 128, 20, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA1") });
+ else
+ setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA512") });
+
+ return setupEncryptionKey(rPassword);
+}
+
+void AgileEngine::setupEncryptionParameters(AgileEncryptionParameters const & rAgileEncryptionParameters)
+{
+ mInfo.spinCount = rAgileEncryptionParameters.spinCount;
+ mInfo.saltSize = rAgileEncryptionParameters.saltSize;
+ mInfo.keyBits = rAgileEncryptionParameters.keyBits;
+ mInfo.hashSize = rAgileEncryptionParameters.hashSize;
+ mInfo.blockSize = rAgileEncryptionParameters.blockSize;
+
+ mInfo.cipherAlgorithm = rAgileEncryptionParameters.cipherAlgorithm;
+ mInfo.cipherChaining = rAgileEncryptionParameters.cipherChaining;
+ mInfo.hashAlgorithm = rAgileEncryptionParameters.hashAlgorithm;
+
+ mInfo.keyDataSalt.resize(mInfo.saltSize);
+ mInfo.saltValue.resize(mInfo.saltSize);
+ mInfo.encryptedVerifierHashInput.resize(mInfo.saltSize);
+ mInfo.encryptedVerifierHashValue.resize(roundUp(mInfo.hashSize, mInfo.blockSize), 0);
+}
+
+bool AgileEngine::setupEncryptionKey(OUString const & rPassword)
+{
+ if (!generateAndEncryptVerifierHash(rPassword))
+ return false;
+ if (!encryptEncryptionKey(rPassword))
+ return false;
+ if (!generateBytes(mInfo.keyDataSalt, mInfo.saltSize))
+ return false;
+ if (!encryptHmacKey())
+ return false;
+ return true;
+}
+
+void AgileEngine::writeEncryptionInfo(BinaryXOutputStream & rStream)
+{
+ rStream.WriteUInt32(msfilter::VERSION_INFO_AGILE);
+ rStream.WriteUInt32(msfilter::AGILE_ENCRYPTION_RESERVED);
+
+ SvMemoryStream aMemStream;
+ tools::XmlWriter aXmlWriter(&aMemStream);
+
+ if (aXmlWriter.startDocument(0/*nIndent*/))
+ {
+ aXmlWriter.startElement("", "encryption", "http://schemas.microsoft.com/office/2006/encryption");
+ aXmlWriter.attribute("xmlns:p", OString("http://schemas.microsoft.com/office/2006/keyEncryptor/password"));
+
+ aXmlWriter.startElement("keyData");
+ aXmlWriter.attribute("saltSize", mInfo.saltSize);
+ aXmlWriter.attribute("blockSize", mInfo.blockSize);
+ aXmlWriter.attribute("keyBits", mInfo.keyBits);
+ aXmlWriter.attribute("hashSize", mInfo.hashSize);
+ aXmlWriter.attribute("cipherAlgorithm", mInfo.cipherAlgorithm);
+ aXmlWriter.attribute("cipherChaining", mInfo.cipherChaining);
+ aXmlWriter.attribute("hashAlgorithm", mInfo.hashAlgorithm);
+ aXmlWriter.attributeBase64("saltValue", mInfo.keyDataSalt);
+ aXmlWriter.endElement();
+
+ aXmlWriter.startElement("dataIntegrity");
+ aXmlWriter.attributeBase64("encryptedHmacKey", mInfo.hmacEncryptedKey);
+ aXmlWriter.attributeBase64("encryptedHmacValue", mInfo.hmacEncryptedValue);
+ aXmlWriter.endElement();
+
+ aXmlWriter.startElement("keyEncryptors");
+ aXmlWriter.startElement("keyEncryptor");
+ aXmlWriter.attribute("uri", OString("http://schemas.microsoft.com/office/2006/keyEncryptor/password"));
+
+ aXmlWriter.startElement("p", "encryptedKey", "");
+ aXmlWriter.attribute("spinCount", mInfo.spinCount);
+ aXmlWriter.attribute("saltSize", mInfo.saltSize);
+ aXmlWriter.attribute("blockSize", mInfo.blockSize);
+ aXmlWriter.attribute("keyBits", mInfo.keyBits);
+ aXmlWriter.attribute("hashSize", mInfo.hashSize);
+ aXmlWriter.attribute("cipherAlgorithm", mInfo.cipherAlgorithm);
+ aXmlWriter.attribute("cipherChaining", mInfo.cipherChaining);
+ aXmlWriter.attribute("hashAlgorithm", mInfo.hashAlgorithm);
+ aXmlWriter.attributeBase64("saltValue", mInfo.saltValue);
+ aXmlWriter.attributeBase64("encryptedVerifierHashInput", mInfo.encryptedVerifierHashInput);
+ aXmlWriter.attributeBase64("encryptedVerifierHashValue", mInfo.encryptedVerifierHashValue);
+ aXmlWriter.attributeBase64("encryptedKeyValue", mInfo.encryptedKeyValue);
+ aXmlWriter.endElement();
+
+ aXmlWriter.endElement();
+ aXmlWriter.endElement();
+
+ aXmlWriter.endElement();
+ aXmlWriter.endDocument();
+ }
+ rStream.writeMemory(aMemStream.GetData(), aMemStream.GetSize());
+}
+
+void AgileEngine::encrypt(const css::uno::Reference<css::io::XInputStream> & rxInputStream,
+ css::uno::Reference<css::io::XOutputStream> & rxOutputStream,
+ sal_uInt32 nSize)
+{
+ CryptoHash aCryptoHash(mInfo.hmacKey, cryptoHashTypeFromString(mInfo.hashAlgorithm));
+
+ BinaryXOutputStream aBinaryOutputStream(rxOutputStream, false);
+ BinaryXInputStream aBinaryInputStream(rxInputStream, false);
+
+ std::vector<sal_uInt8> aSizeBytes(sizeof(sal_uInt32));
+ ByteOrderConverter::writeLittleEndian(aSizeBytes.data(), nSize);
+ aBinaryOutputStream.writeMemory(aSizeBytes.data(), aSizeBytes.size()); // size
+ aCryptoHash.update(aSizeBytes, aSizeBytes.size());
+
+ std::vector<sal_uInt8> aNull{0,0,0,0};
+ aBinaryOutputStream.writeMemory(aNull.data(), aNull.size()); // reserved
+ aCryptoHash.update(aNull, aNull.size());
+
+ std::vector<sal_uInt8>& keyDataSalt = mInfo.keyDataSalt;
+
+ sal_uInt32 saltSize = mInfo.saltSize;
+ sal_uInt32 keySize = mInfo.keyBits / 8;
+
+ sal_uInt32 nSegment = 0;
+ sal_uInt32 nSegmentByteSize = sizeof(nSegment);
+
+ std::vector<sal_uInt8> saltWithBlockKey(saltSize + nSegmentByteSize, 0);
+ std::copy(keyDataSalt.begin(), keyDataSalt.end(), saltWithBlockKey.begin());
+
+ std::vector<sal_uInt8> hash(mInfo.hashSize, 0);
+ std::vector<sal_uInt8> iv(keySize, 0);
+
+ std::vector<sal_uInt8> inputBuffer(constSegmentLength);
+ std::vector<sal_uInt8> outputBuffer(constSegmentLength);
+ sal_uInt32 inputLength;
+ sal_uInt32 outputLength;
+
+ while ((inputLength = aBinaryInputStream.readMemory(inputBuffer.data(), inputBuffer.size())) > 0)
+ {
+ sal_uInt32 correctedInputLength = inputLength % mInfo.blockSize == 0 ?
+ inputLength : oox::crypto::roundUp(inputLength, sal_uInt32(mInfo.blockSize));
+
+ // Update Key
+ auto p = saltWithBlockKey.begin() + saltSize;
+ p[0] = nSegment & 0xFF;
+ p[1] = (nSegment >> 8) & 0xFF;
+ p[2] = (nSegment >> 16) & 0xFF;
+ p[3] = nSegment >> 24;
+
+ hashCalc(hash, saltWithBlockKey, mInfo.hashAlgorithm);
+
+ // Only if hash > keySize
+ std::copy(hash.begin(), hash.begin() + keySize, iv.begin());
+
+ Encrypt aEncryptor(mKey, iv, AgileEngine::cryptoType(mInfo));
+ outputLength = aEncryptor.update(outputBuffer, inputBuffer, correctedInputLength);
+ aBinaryOutputStream.writeMemory(outputBuffer.data(), outputLength);
+ aCryptoHash.update(outputBuffer, outputLength);
+
+ nSegment++;
+ }
+ mInfo.hmacHash = aCryptoHash.finalize();
+ encryptHmacValue();
+}
+
+} // namespace oox::crypto
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
new file mode 100644
index 000000000..ee68a8a50
--- /dev/null
+++ b/oox/source/crypto/CryptTools.cxx
@@ -0,0 +1,507 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/CryptTools.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+
+#include <config_oox.h>
+
+#if USE_TLS_OPENSSL
+#include <openssl/evp.h>
+#include <openssl/sha.h>
+#include <openssl/hmac.h>
+#endif // USE_TLS_OPENSSL
+
+#if USE_TLS_NSS
+#include <nss.h>
+#include <pk11pub.h>
+#endif // USE_TLS_NSS
+
+namespace oox::crypto {
+
+#if USE_TLS_OPENSSL
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+static HMAC_CTX *HMAC_CTX_new(void)
+{
+ HMAC_CTX *pContext = new HMAC_CTX;
+ HMAC_CTX_init(pContext);
+ return pContext;
+}
+
+static void HMAC_CTX_free(HMAC_CTX *pContext)
+{
+ HMAC_CTX_cleanup(pContext);
+ delete pContext;
+}
+#endif
+
+namespace
+{
+ struct cipher_delete
+ {
+ void operator()(EVP_CIPHER_CTX* p) { EVP_CIPHER_CTX_free(p); }
+ };
+
+ struct hmac_delete
+ {
+ void operator()(HMAC_CTX* p) { HMAC_CTX_free(p); }
+ };
+}
+
+struct CryptoImpl
+{
+ std::unique_ptr<EVP_CIPHER_CTX, cipher_delete> mpContext;
+ std::unique_ptr<HMAC_CTX, hmac_delete> mpHmacContext;
+
+ CryptoImpl() = default;
+
+ void setupEncryptContext(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, Crypto::CryptoType eType)
+ {
+ mpContext.reset(EVP_CIPHER_CTX_new());
+ EVP_CIPHER_CTX_init(mpContext.get());
+
+ const EVP_CIPHER* cipher = getCipher(eType);
+ if (cipher == nullptr)
+ return;
+
+ if (iv.empty())
+ EVP_EncryptInit_ex(mpContext.get(), cipher, nullptr, key.data(), nullptr);
+ else
+ EVP_EncryptInit_ex(mpContext.get(), cipher, nullptr, key.data(), iv.data());
+ EVP_CIPHER_CTX_set_padding(mpContext.get(), 0);
+ }
+
+ void setupDecryptContext(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, Crypto::CryptoType eType)
+ {
+ mpContext.reset(EVP_CIPHER_CTX_new());
+ EVP_CIPHER_CTX_init(mpContext.get());
+
+ const EVP_CIPHER* pCipher = getCipher(eType);
+ if (pCipher == nullptr)
+ return;
+
+ const size_t nMinKeySize = EVP_CIPHER_key_length(pCipher);
+ if (key.size() < nMinKeySize)
+ key.resize(nMinKeySize, 0);
+
+ if (iv.empty())
+ EVP_DecryptInit_ex(mpContext.get(), pCipher, nullptr, key.data(), nullptr);
+ else
+ {
+ const size_t nMinIVSize = EVP_CIPHER_iv_length(pCipher);
+ if (iv.size() < nMinIVSize)
+ iv.resize(nMinIVSize, 0);
+
+ EVP_DecryptInit_ex(mpContext.get(), pCipher, nullptr, key.data(), iv.data());
+ }
+ EVP_CIPHER_CTX_set_padding(mpContext.get(), 0);
+ }
+
+ void setupCryptoHashContext(std::vector<sal_uInt8>& rKey, CryptoHashType eType)
+ {
+ mpHmacContext.reset(HMAC_CTX_new());
+ const EVP_MD* aEvpMd = nullptr;
+ switch (eType)
+ {
+ case CryptoHashType::SHA1:
+ aEvpMd = EVP_sha1(); break;
+ case CryptoHashType::SHA256:
+ aEvpMd = EVP_sha256(); break;
+ case CryptoHashType::SHA512:
+ aEvpMd = EVP_sha512(); break;
+ }
+ HMAC_Init_ex(mpHmacContext.get(), rKey.data(), rKey.size(), aEvpMd, nullptr);
+ }
+
+ ~CryptoImpl()
+ {
+ if (mpContext)
+ EVP_CIPHER_CTX_cleanup(mpContext.get());
+ }
+
+ static const EVP_CIPHER* getCipher(Crypto::CryptoType type)
+ {
+ switch(type)
+ {
+ case Crypto::CryptoType::AES_128_ECB:
+ return EVP_aes_128_ecb();
+ case Crypto::CryptoType::AES_128_CBC:
+ return EVP_aes_128_cbc();
+ case Crypto::CryptoType::AES_256_CBC:
+ return EVP_aes_256_cbc();
+ default:
+ break;
+ }
+ return nullptr;
+ }
+};
+
+#elif USE_TLS_NSS
+
+#define MAX_WRAPPED_KEY_LEN 128
+
+struct CryptoImpl
+{
+ PK11SlotInfo* mSlot;
+ PK11Context* mContext;
+ SECItem* mSecParam;
+ PK11SymKey* mSymKey;
+ PK11Context* mWrapKeyContext;
+ PK11SymKey* mWrapKey;
+
+ CryptoImpl()
+ : mSlot(nullptr)
+ , mContext(nullptr)
+ , mSecParam(nullptr)
+ , mSymKey(nullptr)
+ , mWrapKeyContext(nullptr)
+ , mWrapKey(nullptr)
+ {
+ // Initialize NSS, database functions are not needed
+ NSS_NoDB_Init(nullptr);
+ }
+
+ ~CryptoImpl()
+ {
+ if (mContext)
+ PK11_DestroyContext(mContext, PR_TRUE);
+ if (mSecParam)
+ SECITEM_FreeItem(mSecParam, PR_TRUE);
+ if (mSymKey)
+ PK11_FreeSymKey(mSymKey);
+ if (mWrapKeyContext)
+ PK11_DestroyContext(mWrapKeyContext, PR_TRUE);
+ if (mWrapKey)
+ PK11_FreeSymKey(mWrapKey);
+ if (mSlot)
+ PK11_FreeSlot(mSlot);
+ }
+
+ PK11SymKey* ImportSymKey(CK_MECHANISM_TYPE mechanism, CK_ATTRIBUTE_TYPE operation, SECItem* key)
+ {
+ mSymKey = PK11_ImportSymKey(mSlot, mechanism, PK11_OriginUnwrap, operation, key, nullptr);
+ if (!mSymKey) //rhbz#1614419 maybe failed due to FIPS, use rhbz#1461450 style workaround
+ {
+ /*
+ * Without FIPS it would be possible to just use
+ * mSymKey = PK11_ImportSymKey( mSlot, mechanism, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, nullptr );
+ * with FIPS NSS Level 2 certification has to be "workarounded" (so it becomes Level 1) by using
+ * following method:
+ * 1. Generate wrap key
+ * 2. Encrypt authkey with wrap key
+ * 3. Unwrap encrypted authkey using wrap key
+ */
+
+ /*
+ * Generate wrapping key
+ */
+ CK_MECHANISM_TYPE wrap_mechanism = PK11_GetBestWrapMechanism(mSlot);
+ int wrap_key_len = PK11_GetBestKeyLength(mSlot, wrap_mechanism);
+ mWrapKey = PK11_KeyGen(mSlot, wrap_mechanism, nullptr, wrap_key_len, nullptr);
+ if (!mWrapKey)
+ throw css::uno::RuntimeException("PK11_KeyGen SymKey failure", css::uno::Reference<css::uno::XInterface>());
+
+ /*
+ * Encrypt authkey with wrapping key
+ */
+
+ /*
+ * Initialization of IV is not needed because PK11_GetBestWrapMechanism should return ECB mode
+ */
+ SECItem tmp_sec_item = {};
+ mWrapKeyContext = PK11_CreateContextBySymKey(wrap_mechanism, CKA_ENCRYPT, mWrapKey, &tmp_sec_item);
+ if (!mWrapKeyContext)
+ throw css::uno::RuntimeException("PK11_CreateContextBySymKey failure", css::uno::Reference<css::uno::XInterface>());
+
+ unsigned char wrapped_key_data[MAX_WRAPPED_KEY_LEN];
+ int wrapped_key_len = sizeof(wrapped_key_data);
+
+ if (PK11_CipherOp(mWrapKeyContext, wrapped_key_data, &wrapped_key_len,
+ sizeof(wrapped_key_data), key->data, key->len) != SECSuccess)
+ {
+ throw css::uno::RuntimeException("PK11_CipherOp failure", css::uno::Reference<css::uno::XInterface>());
+ }
+
+ if (PK11_Finalize(mWrapKeyContext) != SECSuccess)
+ throw css::uno::RuntimeException("PK11_Finalize failure", css::uno::Reference<css::uno::XInterface>());
+
+ /*
+ * Finally unwrap sym key
+ */
+ SECItem wrapped_key = {};
+ wrapped_key.data = wrapped_key_data;
+ wrapped_key.len = wrapped_key_len;
+
+ mSymKey = PK11_UnwrapSymKey(mWrapKey, wrap_mechanism, &tmp_sec_item, &wrapped_key,
+ mechanism, operation, key->len);
+ }
+ return mSymKey;
+ }
+
+ void setupCryptoContext(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, Crypto::CryptoType type, CK_ATTRIBUTE_TYPE operation)
+ {
+ CK_MECHANISM_TYPE mechanism = static_cast<CK_ULONG>(-1);
+
+ SECItem ivItem;
+ ivItem.type = siBuffer;
+ if(iv.empty())
+ ivItem.data = nullptr;
+ else
+ ivItem.data = iv.data();
+ ivItem.len = iv.size();
+
+ SECItem* pIvItem = nullptr;
+
+ switch(type)
+ {
+ case Crypto::CryptoType::AES_128_ECB:
+ mechanism = CKM_AES_ECB;
+ break;
+ case Crypto::CryptoType::AES_128_CBC:
+ mechanism = CKM_AES_CBC;
+ pIvItem = &ivItem;
+ break;
+ case Crypto::CryptoType::AES_256_CBC:
+ mechanism = CKM_AES_CBC;
+ pIvItem = &ivItem;
+ break;
+ default:
+ break;
+ }
+
+ mSlot = PK11_GetBestSlot(mechanism, nullptr);
+
+ if (!mSlot)
+ throw css::uno::RuntimeException("NSS Slot failure", css::uno::Reference<css::uno::XInterface>());
+
+ SECItem keyItem;
+ keyItem.type = siBuffer;
+ keyItem.data = key.data();
+ keyItem.len = key.size();
+
+ mSymKey = ImportSymKey(mechanism, CKA_ENCRYPT, &keyItem);
+ if (!mSymKey)
+ throw css::uno::RuntimeException("NSS SymKey failure", css::uno::Reference<css::uno::XInterface>());
+
+ mSecParam = PK11_ParamFromIV(mechanism, pIvItem);
+ mContext = PK11_CreateContextBySymKey(mechanism, operation, mSymKey, mSecParam);
+ }
+
+ void setupCryptoHashContext(std::vector<sal_uInt8>& rKey, CryptoHashType eType)
+ {
+ CK_MECHANISM_TYPE aMechanism = static_cast<CK_ULONG>(-1);
+
+ switch(eType)
+ {
+ case CryptoHashType::SHA1:
+ aMechanism = CKM_SHA_1_HMAC;
+ break;
+ case CryptoHashType::SHA256:
+ aMechanism = CKM_SHA256_HMAC;
+ break;
+ case CryptoHashType::SHA512:
+ aMechanism = CKM_SHA512_HMAC;
+ break;
+ }
+
+ mSlot = PK11_GetBestSlot(aMechanism, nullptr);
+
+ if (!mSlot)
+ throw css::uno::RuntimeException("NSS Slot failure", css::uno::Reference<css::uno::XInterface>());
+
+ SECItem aKeyItem;
+ aKeyItem.data = rKey.data();
+ aKeyItem.len = rKey.size();
+
+ mSymKey = ImportSymKey(aMechanism, CKA_SIGN, &aKeyItem);
+ if (!mSymKey)
+ throw css::uno::RuntimeException("NSS SymKey failure", css::uno::Reference<css::uno::XInterface>());
+
+ SECItem param;
+ param.data = nullptr;
+ param.len = 0;
+ mContext = PK11_CreateContextBySymKey(aMechanism, CKA_SIGN, mSymKey, &param);
+ }
+};
+#else
+struct CryptoImpl
+{};
+#endif
+
+Crypto::Crypto()
+ : mpImpl(std::make_unique<CryptoImpl>())
+{
+}
+
+Crypto::~Crypto()
+{
+}
+
+// DECRYPT
+
+Decrypt::Decrypt(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, CryptoType type)
+{
+#if USE_TLS_OPENSSL + USE_TLS_NSS == 0
+ (void)key;
+ (void)iv;
+ (void)type;
+#endif
+
+#if USE_TLS_OPENSSL
+ mpImpl->setupDecryptContext(key, iv, type);
+#endif
+
+#if USE_TLS_NSS
+ mpImpl->setupCryptoContext(key, iv, type, CKA_DECRYPT);
+#endif // USE_TLS_NSS
+}
+
+sal_uInt32 Decrypt::update(std::vector<sal_uInt8>& output, std::vector<sal_uInt8>& input, sal_uInt32 inputLength)
+{
+ int outputLength = 0;
+
+#if USE_TLS_OPENSSL + USE_TLS_NSS > 0
+ sal_uInt32 actualInputLength = inputLength == 0 || inputLength > input.size() ? input.size() : inputLength;
+#else
+ (void)output;
+ (void)input;
+ (void)inputLength;
+#endif
+
+#if USE_TLS_OPENSSL
+ (void)EVP_DecryptUpdate(mpImpl->mpContext.get(), output.data(), &outputLength, input.data(), actualInputLength);
+#endif // USE_TLS_OPENSSL
+
+#if USE_TLS_NSS
+ if (!mpImpl->mContext)
+ return 0;
+ (void)PK11_CipherOp(mpImpl->mContext, output.data(), &outputLength, actualInputLength, input.data(), actualInputLength);
+#endif // USE_TLS_NSS
+
+ return static_cast<sal_uInt32>(outputLength);
+}
+
+sal_uInt32 Decrypt::aes128ecb(std::vector<sal_uInt8>& output, std::vector<sal_uInt8>& input, std::vector<sal_uInt8>& key)
+{
+ sal_uInt32 outputLength = 0;
+ std::vector<sal_uInt8> iv;
+ Decrypt crypto(key, iv, Crypto::AES_128_ECB);
+ outputLength = crypto.update(output, input);
+ return outputLength;
+}
+
+// ENCRYPT
+
+Encrypt::Encrypt(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, CryptoType type)
+{
+#if USE_TLS_OPENSSL + USE_TLS_NSS == 0
+ (void)key;
+ (void)iv;
+ (void)type;
+#endif
+
+#if USE_TLS_OPENSSL
+ mpImpl->setupEncryptContext(key, iv, type);
+#elif USE_TLS_NSS
+ mpImpl->setupCryptoContext(key, iv, type, CKA_ENCRYPT);
+#endif // USE_TLS_NSS
+}
+
+sal_uInt32 Encrypt::update(std::vector<sal_uInt8>& output, std::vector<sal_uInt8>& input, sal_uInt32 inputLength)
+{
+ int outputLength = 0;
+
+#if USE_TLS_OPENSSL + USE_TLS_NSS > 0
+ sal_uInt32 actualInputLength = inputLength == 0 || inputLength > input.size() ? input.size() : inputLength;
+#else
+ (void)output;
+ (void)input;
+ (void)inputLength;
+#endif
+
+#if USE_TLS_OPENSSL
+ (void)EVP_EncryptUpdate(mpImpl->mpContext.get(), output.data(), &outputLength, input.data(), actualInputLength);
+#endif // USE_TLS_OPENSSL
+
+#if USE_TLS_NSS
+ (void)PK11_CipherOp(mpImpl->mContext, output.data(), &outputLength, actualInputLength, input.data(), actualInputLength);
+#endif // USE_TLS_NSS
+
+ return static_cast<sal_uInt32>(outputLength);
+}
+
+// CryptoHash - HMAC
+
+namespace
+{
+
+sal_Int32 getSizeForHashType(CryptoHashType eType)
+{
+ switch (eType)
+ {
+ case CryptoHashType::SHA1: return 20;
+ case CryptoHashType::SHA256: return 32;
+ case CryptoHashType::SHA512: return 64;
+ }
+ return 0;
+}
+
+} // end anonymous namespace
+
+CryptoHash::CryptoHash(std::vector<sal_uInt8>& rKey, CryptoHashType eType)
+ : mnHashSize(getSizeForHashType(eType))
+{
+#if USE_TLS_OPENSSL
+ mpImpl->setupCryptoHashContext(rKey, eType);
+#elif USE_TLS_NSS
+ mpImpl->setupCryptoHashContext(rKey, eType);
+ PK11_DigestBegin(mpImpl->mContext);
+#else
+ (void)rKey;
+#endif
+}
+
+bool CryptoHash::update(std::vector<sal_uInt8>& rInput, sal_uInt32 nInputLength)
+{
+#if USE_TLS_OPENSSL + USE_TLS_NSS > 0
+ sal_uInt32 nActualInputLength = (nInputLength == 0 || nInputLength > rInput.size()) ? rInput.size() : nInputLength;
+#else
+ (void)rInput;
+ (void)nInputLength;
+#endif
+
+#if USE_TLS_OPENSSL
+ return HMAC_Update(mpImpl->mpHmacContext.get(), rInput.data(), nActualInputLength) != 0;
+#elif USE_TLS_NSS
+ return PK11_DigestOp(mpImpl->mContext, rInput.data(), nActualInputLength) == SECSuccess;
+#else
+ return false; // ???
+#endif
+}
+
+std::vector<sal_uInt8> CryptoHash::finalize()
+{
+ std::vector<sal_uInt8> aHash(mnHashSize, 0);
+ unsigned int nSizeWritten;
+#if USE_TLS_OPENSSL
+ (void) HMAC_Final(mpImpl->mpHmacContext.get(), aHash.data(), &nSizeWritten);
+#elif USE_TLS_NSS
+ PK11_DigestFinal(mpImpl->mContext, aHash.data(), &nSizeWritten, aHash.size());
+#endif
+ (void)nSizeWritten;
+
+ return aHash;
+}
+
+} // namespace oox::crypto
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
new file mode 100644
index 000000000..cae8a1331
--- /dev/null
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/DocumentDecryption.hxx>
+
+#include <comphelper/sequenceashashmap.hxx>
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/packages/XPackageEncryption.hpp>
+#include <oox/ole/olestorage.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+
+#include <sal/log.hxx>
+
+namespace
+{
+void lcl_getListOfStreams(oox::StorageBase* pStorage, std::vector<OUString>& rElementNames)
+{
+ std::vector<OUString> oElementNames;
+ pStorage->getElementNames(oElementNames);
+ for (const auto& sName : oElementNames)
+ {
+ oox::StorageRef rSubStorage = pStorage->openSubStorage(sName, false);
+ if (rSubStorage && rSubStorage->isStorage())
+ {
+ lcl_getListOfStreams(rSubStorage.get(), rElementNames);
+ }
+ else
+ {
+ if (pStorage->isRootStorage())
+ rElementNames.push_back(sName);
+ else
+ rElementNames.push_back(pStorage->getPath() + "/" + sName);
+ }
+ }
+}
+}
+
+namespace oox::crypto
+{
+using namespace css;
+
+DocumentDecryption::DocumentDecryption(
+ const css::uno::Reference<css::uno::XComponentContext>& rxContext,
+ oox::ole::OleStorage& rOleStorage)
+ : mxContext(rxContext)
+ , mrOleStorage(rOleStorage)
+{
+ // Get OLE streams into sequences for later use in CryptoEngine
+ std::vector<OUString> aStreamNames;
+ lcl_getListOfStreams(&mrOleStorage, aStreamNames);
+
+ comphelper::SequenceAsHashMap aStreamsData;
+ for (const auto& sStreamName : aStreamNames)
+ {
+ uno::Reference<io::XInputStream> xStream = mrOleStorage.openInputStream(sStreamName);
+ if (!xStream.is())
+ throw io::IOException("Cannot open OLE input stream for " + sStreamName + "!");
+
+ BinaryXInputStream aBinaryInputStream(xStream, true);
+
+ css::uno::Sequence<sal_Int8> oData;
+ sal_Int32 nStreamSize = aBinaryInputStream.size();
+ sal_Int32 nReadBytes = aBinaryInputStream.readData(oData, nStreamSize);
+
+ if (nStreamSize != nReadBytes)
+ {
+ SAL_WARN("oox", "OLE stream invalid content");
+ throw io::IOException("OLE stream invalid content for " + sStreamName + "!");
+ }
+
+ aStreamsData[sStreamName] <<= oData;
+ }
+ maStreamsSequence = aStreamsData.getAsConstNamedValueList();
+}
+
+bool DocumentDecryption::generateEncryptionKey(const OUString& rPassword)
+{
+ if (mxPackageEncryption.is())
+ return mxPackageEncryption->generateEncryptionKey(rPassword);
+ return false;
+}
+
+bool DocumentDecryption::readEncryptionInfo()
+{
+ if (!mrOleStorage.isStorage())
+ return false;
+
+ // Read 0x6DataSpaces/DataSpaceMap
+ uno::Reference<io::XInputStream> xDataSpaceMap
+ = mrOleStorage.openInputStream("\006DataSpaces/DataSpaceMap");
+ OUString sDataSpaceName;
+
+ if (xDataSpaceMap.is())
+ {
+ bool bBroken = false;
+
+ BinaryXInputStream aDataSpaceStream(xDataSpaceMap, true);
+ sal_uInt32 aHeaderLength = aDataSpaceStream.readuInt32();
+ SAL_WARN_IF(aHeaderLength != 8, "oox",
+ "DataSpaceMap length != 8 is not supported. Some content may be skipped");
+ sal_uInt32 aEntryCount = aDataSpaceStream.readuInt32();
+ SAL_WARN_IF(aEntryCount != 1, "oox",
+ "DataSpaceMap contains more than one entry. Some content may be skipped");
+
+ // Read each DataSpaceMapEntry (MS-OFFCRYPTO 2.1.6.1)
+ for (sal_uInt32 i = 0; i < aEntryCount && !bBroken; i++)
+ {
+ // entryLen unused for the moment
+ aDataSpaceStream.skip(sizeof(sal_uInt32));
+
+ // Read each DataSpaceReferenceComponent (MS-OFFCRYPTO 2.1.6.2)
+ sal_uInt32 aReferenceComponentCount = aDataSpaceStream.readuInt32();
+ for (sal_uInt32 j = 0; j < aReferenceComponentCount && !bBroken; j++)
+ {
+ // Read next reference component
+ // refComponentType unused for the moment
+ aDataSpaceStream.skip(sizeof(sal_uInt32));
+ sal_uInt32 aReferenceComponentNameLength = aDataSpaceStream.readuInt32();
+ // sReferenceComponentName unused for the moment
+ if (aDataSpaceStream.getRemaining() < aReferenceComponentNameLength)
+ {
+ bBroken = true;
+ break;
+ }
+ aDataSpaceStream.readUnicodeArray(aReferenceComponentNameLength / 2);
+ aDataSpaceStream.skip((4 - (aReferenceComponentNameLength & 3))
+ & 3); // Skip padding
+
+ bBroken |= aDataSpaceStream.isEof();
+ }
+
+ sal_uInt32 aDataSpaceNameLength = aDataSpaceStream.readuInt32();
+ if (aDataSpaceStream.getRemaining() < aDataSpaceNameLength)
+ {
+ bBroken = true;
+ break;
+ }
+ sDataSpaceName = aDataSpaceStream.readUnicodeArray(aDataSpaceNameLength / 2);
+ aDataSpaceStream.skip((4 - (aDataSpaceNameLength & 3)) & 3); // Skip padding
+
+ bBroken |= aDataSpaceStream.isEof();
+ }
+
+ if (bBroken)
+ {
+ SAL_WARN("oox", "EOF on parsing DataSpaceMapEntry table");
+ return false;
+ }
+ }
+ else
+ {
+ // Fallback for documents generated by LO: they sometimes do not have all
+ // required by MS-OFFCRYPTO specification streams (0x6DataSpaces/DataSpaceMap and others)
+ SAL_WARN("oox", "Encrypted package does not contain DataSpaceMap");
+ sDataSpaceName = "StrongEncryptionDataSpace";
+ }
+
+ uno::Sequence<uno::Any> aArguments;
+ mxPackageEncryption.set(
+ mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.comp.oox.crypto." + sDataSpaceName, aArguments, mxContext),
+ css::uno::UNO_QUERY);
+
+ if (!mxPackageEncryption.is())
+ {
+ // we do not know how to decrypt this document
+ return false;
+ }
+
+ return mxPackageEncryption->readEncryptionInfo(maStreamsSequence);
+}
+
+uno::Sequence<beans::NamedValue> DocumentDecryption::createEncryptionData(const OUString& rPassword)
+{
+ if (!mxPackageEncryption.is())
+ return uno::Sequence<beans::NamedValue>();
+
+ return mxPackageEncryption->createEncryptionData(rPassword);
+}
+
+bool DocumentDecryption::decrypt(const uno::Reference<io::XStream>& xDocumentStream)
+{
+ bool bResult = false;
+
+ if (!mrOleStorage.isStorage())
+ return false;
+
+ if (!mxPackageEncryption.is())
+ return false;
+
+ // open the required input streams in the encrypted package
+ uno::Reference<io::XInputStream> xEncryptedPackage
+ = mrOleStorage.openInputStream("EncryptedPackage");
+
+ // create temporary file for unencrypted package
+ uno::Reference<io::XOutputStream> xDecryptedPackage = xDocumentStream->getOutputStream();
+
+ bResult = mxPackageEncryption->decrypt(xEncryptedPackage, xDecryptedPackage);
+
+ css::uno::Reference<io::XSeekable> xSeekable(xDecryptedPackage, css::uno::UNO_QUERY);
+ xSeekable->seek(0);
+
+ if (bResult)
+ return mxPackageEncryption->checkDataIntegrity();
+
+ return bResult;
+}
+
+} // namespace oox::crypto
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx
new file mode 100644
index 000000000..6b8854929
--- /dev/null
+++ b/oox/source/crypto/DocumentEncryption.cxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/DocumentEncryption.hxx>
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/packages/XPackageEncryption.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <sal/log.hxx>
+
+namespace oox::crypto {
+
+using namespace css::io;
+using namespace css::uno;
+using namespace css::beans;
+
+DocumentEncryption::DocumentEncryption(const Reference< XComponentContext >& rxContext,
+ Reference<XStream> const & xDocumentStream,
+ oox::ole::OleStorage& rOleStorage,
+ const Sequence<NamedValue>& rMediaEncData)
+ : mxContext(rxContext)
+ , mxDocumentStream(xDocumentStream)
+ , mrOleStorage(rOleStorage)
+ , mMediaEncData(rMediaEncData)
+{
+ // Select engine
+ for (int i = 0; i < rMediaEncData.getLength(); i++)
+ {
+ if (rMediaEncData[i].Name == "CryptoType")
+ {
+ OUString sCryptoType;
+ rMediaEncData[i].Value >>= sCryptoType;
+
+ if (sCryptoType == "Standard")
+ sCryptoType = "StrongEncryptionDataSpace";
+
+ Sequence<Any> aArguments;
+ mxPackageEncryption.set(
+ mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, mxContext), css::uno::UNO_QUERY);
+
+ if (!mxPackageEncryption.is())
+ {
+ SAL_WARN("oox", "Requested encryption method \"" << sCryptoType << "\" is not supported");
+ }
+
+ break;
+ }
+ }
+}
+
+bool DocumentEncryption::encrypt()
+{
+ if (!mxPackageEncryption.is())
+ return false;
+
+ Reference<XInputStream> xInputStream (mxDocumentStream->getInputStream(), UNO_SET_THROW);
+ Reference<XSeekable> xSeekable(xInputStream, UNO_QUERY);
+
+ if (!xSeekable.is())
+ return false;
+
+ xSeekable->seek(0); // seek to begin of the document stream
+
+ if (!mrOleStorage.isStorage())
+ return false;
+
+ mxPackageEncryption->setupEncryption(mMediaEncData);
+
+ Sequence<NamedValue> aStreams = mxPackageEncryption->encrypt(xInputStream);
+
+ for (const NamedValue & aStream : std::as_const(aStreams))
+ {
+ Reference<XOutputStream> xOutputStream(mrOleStorage.openOutputStream(aStream.Name), UNO_SET_THROW);
+ BinaryXOutputStream aBinaryOutputStream(xOutputStream, true);
+
+ css::uno::Sequence<sal_Int8> aStreamSequence;
+ aStream.Value >>= aStreamSequence;
+
+ aBinaryOutputStream.writeData(aStreamSequence);
+
+ aBinaryOutputStream.close();
+ }
+
+ return true;
+}
+
+} // namespace oox::crypto
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
new file mode 100644
index 000000000..c3b0efad9
--- /dev/null
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -0,0 +1,333 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/Standard2007Engine.hxx>
+
+#include <oox/crypto/CryptTools.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <rtl/random.h>
+
+#include <comphelper/hash.hxx>
+
+namespace oox::crypto {
+
+/* =========================================================================== */
+/* Kudos to Caolan McNamara who provided the core decryption implementations. */
+/* =========================================================================== */
+namespace
+{
+
+void lclRandomGenerateValues(sal_uInt8* aArray, sal_uInt32 aSize)
+{
+ rtlRandomPool aRandomPool = rtl_random_createPool();
+ rtl_random_getBytes(aRandomPool, aArray, aSize);
+ rtl_random_destroyPool(aRandomPool);
+}
+
+constexpr OUStringLiteral lclCspName = u"Microsoft Enhanced RSA and AES Cryptographic Provider";
+constexpr const sal_uInt32 AES128Size = 16;
+
+} // end anonymous namespace
+
+bool Standard2007Engine::generateVerifier()
+{
+ // only support key of size 128 bit (16 byte)
+ if (mKey.size() != 16)
+ return false;
+
+ std::vector<sal_uInt8> verifier(msfilter::ENCRYPTED_VERIFIER_LENGTH);
+ std::vector<sal_uInt8> encryptedVerifier(msfilter::ENCRYPTED_VERIFIER_LENGTH);
+
+ lclRandomGenerateValues(verifier.data(), verifier.size());
+
+ std::vector<sal_uInt8> iv;
+ Encrypt aEncryptorVerifier(mKey, iv, Crypto::AES_128_ECB);
+ if (aEncryptorVerifier.update(encryptedVerifier, verifier) != msfilter::ENCRYPTED_VERIFIER_LENGTH)
+ return false;
+ std::copy(encryptedVerifier.begin(), encryptedVerifier.end(), mInfo.verifier.encryptedVerifier);
+
+ mInfo.verifier.encryptedVerifierHashSize = comphelper::SHA1_HASH_LENGTH;
+ std::vector<sal_uInt8> hash = comphelper::Hash::calculateHash(verifier.data(), verifier.size(), comphelper::HashType::SHA1);
+ hash.resize(comphelper::SHA256_HASH_LENGTH, 0);
+
+ std::vector<sal_uInt8> encryptedHash(comphelper::SHA256_HASH_LENGTH, 0);
+
+ Encrypt aEncryptorHash(mKey, iv, Crypto::AES_128_ECB);
+ aEncryptorHash.update(encryptedHash, hash, hash.size());
+ std::copy(encryptedHash.begin(), encryptedHash.end(), mInfo.verifier.encryptedVerifierHash);
+
+ return true;
+}
+
+bool Standard2007Engine::calculateEncryptionKey(const OUString& rPassword)
+{
+ sal_uInt32 saltSize = mInfo.verifier.saltSize;
+ sal_uInt32 passwordByteLength = rPassword.getLength() * 2;
+ const sal_uInt8* saltArray = mInfo.verifier.salt;
+
+ // Prepare initial data -> salt + password (in 16-bit chars)
+ std::vector<sal_uInt8> initialData(saltSize + passwordByteLength);
+ std::copy(saltArray, saltArray + saltSize, initialData.begin());
+
+ auto p = initialData.begin() + saltSize;
+ for (sal_Int32 i = 0; i != rPassword.getLength(); ++i) {
+ auto c = rPassword[i];
+ *p++ = c & 0xFF;
+ *p++ = c >> 8;
+ }
+
+ // use "hash" vector for result of sha1 hashing
+ // calculate SHA1 hash of initialData
+ std::vector<sal_uInt8> hash = comphelper::Hash::calculateHash(initialData.data(), initialData.size(), comphelper::HashType::SHA1);
+
+ // data = iterator (4bytes) + hash
+ std::vector<sal_uInt8> data(comphelper::SHA1_HASH_LENGTH + 4, 0);
+
+ for (sal_Int32 i = 0; i < 50000; ++i)
+ {
+ ByteOrderConverter::writeLittleEndian(data.data(), i);
+ std::copy(hash.begin(), hash.end(), data.begin() + 4);
+ hash = comphelper::Hash::calculateHash(data.data(), data.size(), comphelper::HashType::SHA1);
+ }
+ std::copy(hash.begin(), hash.end(), data.begin() );
+ std::fill(data.begin() + comphelper::SHA1_HASH_LENGTH, data.end(), 0 );
+
+ hash = comphelper::Hash::calculateHash(data.data(), data.size(), comphelper::HashType::SHA1);
+
+ // derive key
+ std::vector<sal_uInt8> buffer(64, 0x36);
+ for (size_t i = 0; i < hash.size(); ++i)
+ buffer[i] ^= hash[i];
+
+ hash = comphelper::Hash::calculateHash(buffer.data(), buffer.size(), comphelper::HashType::SHA1);
+ if (mKey.size() > hash.size())
+ return false;
+ std::copy(hash.begin(), hash.begin() + mKey.size(), mKey.begin());
+
+ return true;
+}
+
+bool Standard2007Engine::generateEncryptionKey(const OUString& password)
+{
+ mKey.clear();
+ /*
+ KeySize (4 bytes): An unsigned integer that specifies the number of bits in the encryption key.
+ MUST be a multiple of 8. MUST be one of the values in the following table:
+ Algorithm Value Comment
+ Any 0x00000000 Determined by Flags
+ RC4 0x00000028 – 0x00000080 (inclusive) 8-bit increments.
+ AES 0x00000080, 0x000000C0, 0x00000100 128, 192 or 256-bit
+ */
+ if (mInfo.header.keyBits > 8192) // should we strictly enforce the above 256 bit limit ?
+ return false;
+ mKey.resize(mInfo.header.keyBits / 8, 0);
+ if (mKey.empty())
+ return false;
+
+ calculateEncryptionKey(password);
+
+ std::vector<sal_uInt8> encryptedVerifier(msfilter::ENCRYPTED_VERIFIER_LENGTH);
+ std::copy(
+ mInfo.verifier.encryptedVerifier,
+ mInfo.verifier.encryptedVerifier + msfilter::ENCRYPTED_VERIFIER_LENGTH,
+ encryptedVerifier.begin());
+
+ std::vector<sal_uInt8> encryptedHash(comphelper::SHA256_HASH_LENGTH);
+ std::copy(
+ mInfo.verifier.encryptedVerifierHash,
+ mInfo.verifier.encryptedVerifierHash + comphelper::SHA256_HASH_LENGTH,
+ encryptedHash.begin());
+
+ std::vector<sal_uInt8> verifier(encryptedVerifier.size(), 0);
+ Decrypt::aes128ecb(verifier, encryptedVerifier, mKey);
+
+ std::vector<sal_uInt8> verifierHash(encryptedHash.size(), 0);
+ Decrypt::aes128ecb(verifierHash, encryptedHash, mKey);
+
+ std::vector<sal_uInt8> hash = comphelper::Hash::calculateHash(verifier.data(), verifier.size(), comphelper::HashType::SHA1);
+
+ return std::equal(hash.begin(), hash.end(), verifierHash.begin());
+}
+
+bool Standard2007Engine::decrypt(BinaryXInputStream& aInputStream,
+ BinaryXOutputStream& aOutputStream)
+{
+ sal_uInt32 totalSize = aInputStream.readuInt32(); // Document unencrypted size - 4 bytes
+ aInputStream.skip(4); // Reserved 4 Bytes
+
+ std::vector<sal_uInt8> iv;
+ Decrypt aDecryptor(mKey, iv, Crypto::AES_128_ECB);
+ std::vector<sal_uInt8> inputBuffer (4096);
+ std::vector<sal_uInt8> outputBuffer(4096);
+ sal_uInt32 inputLength;
+ sal_uInt32 outputLength;
+ sal_uInt32 remaining = totalSize;
+
+ while ((inputLength = aInputStream.readMemory(inputBuffer.data(), inputBuffer.size())) > 0)
+ {
+ outputLength = aDecryptor.update(outputBuffer, inputBuffer, inputLength);
+ sal_uInt32 writeLength = std::min(outputLength, remaining);
+ aOutputStream.writeMemory(outputBuffer.data(), writeLength);
+ remaining -= outputLength;
+ }
+ return true;
+}
+
+bool Standard2007Engine::checkDataIntegrity()
+{
+ return true;
+}
+
+bool Standard2007Engine::setupEncryption(OUString const & password)
+{
+ mInfo.header.flags = msfilter::ENCRYPTINFO_AES | msfilter::ENCRYPTINFO_CRYPTOAPI;
+ mInfo.header.algId = msfilter::ENCRYPT_ALGO_AES128;
+ mInfo.header.algIdHash = msfilter::ENCRYPT_HASH_SHA1;
+ mInfo.header.keyBits = msfilter::ENCRYPT_KEY_SIZE_AES_128;
+ mInfo.header.providedType = msfilter::ENCRYPT_PROVIDER_TYPE_AES;
+
+ lclRandomGenerateValues(mInfo.verifier.salt, mInfo.verifier.saltSize);
+ const sal_Int32 keyLength = mInfo.header.keyBits / 8;
+
+ mKey.clear();
+ mKey.resize(keyLength, 0);
+
+ if (!calculateEncryptionKey(password))
+ return false;
+
+ if (!generateVerifier())
+ return false;
+
+ return true;
+}
+
+void Standard2007Engine::writeEncryptionInfo(BinaryXOutputStream& rStream)
+{
+ rStream.WriteUInt32(msfilter::VERSION_INFO_2007_FORMAT);
+
+ sal_uInt32 cspNameSize = (lclCspName.getLength() * 2) + 2;
+
+ sal_uInt32 encryptionHeaderSize = static_cast<sal_uInt32>(sizeof(msfilter::EncryptionStandardHeader));
+
+ rStream.WriteUInt32(mInfo.header.flags);
+ sal_uInt32 headerSize = encryptionHeaderSize + cspNameSize;
+ rStream.WriteUInt32(headerSize);
+
+ rStream.WriteUInt32(mInfo.header.flags);
+ rStream.WriteUInt32(mInfo.header.sizeExtra);
+ rStream.WriteUInt32(mInfo.header.algId);
+ rStream.WriteUInt32(mInfo.header.algIdHash);
+ rStream.WriteUInt32(mInfo.header.keyBits);
+ rStream.WriteUInt32(mInfo.header.providedType);
+ rStream.WriteUInt32(mInfo.header.reserved1);
+ rStream.WriteUInt32(mInfo.header.reserved2);
+ rStream.writeUnicodeArray(lclCspName);
+ rStream.WriteUInt16(0);
+
+ rStream.WriteUInt32(mInfo.verifier.saltSize);
+ rStream.writeMemory(&mInfo.verifier.salt, sizeof mInfo.verifier.salt);
+ rStream.writeMemory(&mInfo.verifier.encryptedVerifier, sizeof mInfo.verifier.encryptedVerifier);
+ rStream.WriteUInt32(mInfo.verifier.encryptedVerifierHashSize);
+ rStream.writeMemory(
+ &mInfo.verifier.encryptedVerifierHash, sizeof mInfo.verifier.encryptedVerifierHash);
+}
+
+void Standard2007Engine::encrypt(const css::uno::Reference<css::io::XInputStream> & rxInputStream,
+ css::uno::Reference<css::io::XOutputStream> & rxOutputStream,
+ sal_uInt32 nSize)
+{
+ if (mKey.empty())
+ return;
+
+ BinaryXOutputStream aBinaryOutputStream(rxOutputStream, false);
+ BinaryXInputStream aBinaryInputStream(rxInputStream, false);
+
+ aBinaryOutputStream.WriteUInt32(nSize); // size
+ aBinaryOutputStream.WriteUInt32(0U); // reserved
+
+ std::vector<sal_uInt8> inputBuffer(1024);
+ std::vector<sal_uInt8> outputBuffer(1024);
+
+ sal_uInt32 inputLength;
+ sal_uInt32 outputLength;
+
+ std::vector<sal_uInt8> iv;
+ Encrypt aEncryptor(mKey, iv, Crypto::AES_128_ECB);
+
+ while ((inputLength = aBinaryInputStream.readMemory(inputBuffer.data(), inputBuffer.size())) > 0)
+ {
+ // increase size to multiple of 16 (size of mKey) if necessary
+ inputLength = inputLength % AES128Size == 0 ?
+ inputLength : roundUp(inputLength, AES128Size);
+ outputLength = aEncryptor.update(outputBuffer, inputBuffer, inputLength);
+ aBinaryOutputStream.writeMemory(outputBuffer.data(), outputLength);
+ }
+}
+
+bool Standard2007Engine::readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream)
+{
+ BinaryXInputStream aBinaryStream(rxInputStream, false);
+
+ mInfo.header.flags = aBinaryStream.readuInt32();
+ if (getFlag(mInfo.header.flags, msfilter::ENCRYPTINFO_EXTERNAL))
+ return false;
+
+ sal_uInt32 nHeaderSize = aBinaryStream.readuInt32();
+
+ sal_uInt32 actualHeaderSize = sizeof(mInfo.header);
+
+ if (nHeaderSize < actualHeaderSize)
+ return false;
+
+ mInfo.header.flags = aBinaryStream.readuInt32();
+ mInfo.header.sizeExtra = aBinaryStream.readuInt32();
+ mInfo.header.algId = aBinaryStream.readuInt32();
+ mInfo.header.algIdHash = aBinaryStream.readuInt32();
+ mInfo.header.keyBits = aBinaryStream.readuInt32();
+ mInfo.header.providedType = aBinaryStream.readuInt32();
+ mInfo.header.reserved1 = aBinaryStream.readuInt32();
+ mInfo.header.reserved2 = aBinaryStream.readuInt32();
+
+ aBinaryStream.skip(nHeaderSize - actualHeaderSize);
+
+ mInfo.verifier.saltSize = aBinaryStream.readuInt32();
+ aBinaryStream.readArray(mInfo.verifier.salt, SAL_N_ELEMENTS(mInfo.verifier.salt));
+ aBinaryStream.readArray(mInfo.verifier.encryptedVerifier, SAL_N_ELEMENTS(mInfo.verifier.encryptedVerifier));
+ mInfo.verifier.encryptedVerifierHashSize = aBinaryStream.readuInt32();
+ aBinaryStream.readArray(mInfo.verifier.encryptedVerifierHash, SAL_N_ELEMENTS(mInfo.verifier.encryptedVerifierHash));
+
+ if (mInfo.verifier.saltSize != 16)
+ return false;
+
+ // check flags and algorithm IDs, required are AES128 and SHA-1
+ if (!getFlag(mInfo.header.flags, msfilter::ENCRYPTINFO_CRYPTOAPI))
+ return false;
+
+ if (!getFlag(mInfo.header.flags, msfilter::ENCRYPTINFO_AES))
+ return false;
+
+ // algorithm ID 0 defaults to AES128 too, if ENCRYPTINFO_AES flag is set
+ if (mInfo.header.algId != 0 && mInfo.header.algId != msfilter::ENCRYPT_ALGO_AES128)
+ return false;
+
+ // hash algorithm ID 0 defaults to SHA-1 too
+ if (mInfo.header.algIdHash != 0 && mInfo.header.algIdHash != msfilter::ENCRYPT_HASH_SHA1)
+ return false;
+
+ if (mInfo.verifier.encryptedVerifierHashSize != 20)
+ return false;
+
+ return !aBinaryStream.isEof();
+}
+
+} // namespace oox::crypto
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/StrongEncryptionDataSpace.cxx b/oox/source/crypto/StrongEncryptionDataSpace.cxx
new file mode 100644
index 000000000..fd1b823b8
--- /dev/null
+++ b/oox/source/crypto/StrongEncryptionDataSpace.cxx
@@ -0,0 +1,203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/crypto/StrongEncryptionDataSpace.hxx>
+#include <oox/crypto/AgileEngine.hxx>
+#include <oox/crypto/Standard2007Engine.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <com/sun/star/io/SequenceInputStream.hpp>
+#include <com/sun/star/io/XSequenceOutputStream.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+using namespace css;
+using namespace css::beans;
+using namespace css::io;
+using namespace css::lang;
+using namespace css::uno;
+
+namespace oox::crypto
+{
+StrongEncryptionDataSpace::StrongEncryptionDataSpace(const Reference<XComponentContext>& rxContext)
+ : mxContext(rxContext)
+ , mCryptoEngine(new Standard2007Engine)
+{
+}
+
+sal_Bool StrongEncryptionDataSpace::generateEncryptionKey(const OUString& rPassword)
+{
+ if (!mCryptoEngine)
+ return false;
+
+ return mCryptoEngine->generateEncryptionKey(rPassword);
+}
+
+sal_Bool StrongEncryptionDataSpace::checkDataIntegrity()
+{
+ if (!mCryptoEngine)
+ return false;
+
+ return mCryptoEngine->checkDataIntegrity();
+}
+
+sal_Bool StrongEncryptionDataSpace::decrypt(const Reference<XInputStream>& rxInputStream,
+ Reference<XOutputStream>& rxOutputStream)
+{
+ if (!mCryptoEngine)
+ return false;
+
+ BinaryXInputStream aInputStream(rxInputStream, true);
+ BinaryXOutputStream aOutputStream(rxOutputStream, true);
+
+ mCryptoEngine->decrypt(aInputStream, aOutputStream);
+
+ rxOutputStream->flush();
+ return true;
+}
+
+Reference<XInputStream> StrongEncryptionDataSpace::getStream(const Sequence<NamedValue>& rStreams,
+ std::u16string_view sStreamName)
+{
+ for (const auto& aStream : rStreams)
+ {
+ if (aStream.Name == sStreamName)
+ {
+ Sequence<sal_Int8> aSeq;
+ aStream.Value >>= aSeq;
+ Reference<XInputStream> aStream2(
+ io::SequenceInputStream::createStreamFromSequence(mxContext, aSeq),
+ UNO_QUERY_THROW);
+ return aStream2;
+ }
+ }
+ return nullptr;
+}
+
+sal_Bool StrongEncryptionDataSpace::readEncryptionInfo(const Sequence<NamedValue>& aStreams)
+{
+ Reference<XInputStream> xEncryptionInfo = getStream(aStreams, u"EncryptionInfo");
+ if (!xEncryptionInfo.is())
+ return false;
+
+ BinaryXInputStream aBinaryInputStream(xEncryptionInfo, true);
+ sal_uInt32 aVersion = aBinaryInputStream.readuInt32();
+
+ switch (aVersion)
+ {
+ case msfilter::VERSION_INFO_2007_FORMAT:
+ case msfilter::VERSION_INFO_2007_FORMAT_SP2:
+ mCryptoEngine.reset(new Standard2007Engine);
+ break;
+ case msfilter::VERSION_INFO_AGILE:
+ mCryptoEngine.reset(new AgileEngine());
+ break;
+ default:
+ break;
+ }
+
+ if (!mCryptoEngine)
+ return false;
+
+ return mCryptoEngine->readEncryptionInfo(xEncryptionInfo);
+}
+
+sal_Bool StrongEncryptionDataSpace::setupEncryption(const Sequence<NamedValue>& rMediaEncData)
+{
+ if (!mCryptoEngine)
+ return false;
+
+ OUString sPassword;
+ for (const auto& aParam : rMediaEncData)
+ {
+ if (aParam.Name == "OOXPassword")
+ {
+ aParam.Value >>= sPassword;
+ }
+ }
+
+ return mCryptoEngine->setupEncryption(sPassword);
+}
+
+Sequence<NamedValue> StrongEncryptionDataSpace::createEncryptionData(const OUString& rPassword)
+{
+ comphelper::SequenceAsHashMap aEncryptionData;
+ aEncryptionData["OOXPassword"] <<= rPassword;
+ aEncryptionData["CryptoType"] <<= OUString("StrongEncryptionDataSpace");
+
+ return aEncryptionData.getAsConstNamedValueList();
+}
+
+Sequence<NamedValue>
+StrongEncryptionDataSpace::encrypt(const Reference<XInputStream>& rxInputStream)
+{
+ if (!mCryptoEngine)
+ return Sequence<NamedValue>();
+
+ Reference<XSeekable> xSeekable(rxInputStream, UNO_QUERY);
+ if (!xSeekable.is())
+ return Sequence<NamedValue>();
+
+ sal_uInt32 aLength = xSeekable->getLength(); // check length of the stream
+
+ Reference<XOutputStream> xOutputStream(
+ mxContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.io.SequenceOutputStream", mxContext),
+ UNO_QUERY);
+
+ mCryptoEngine->encrypt(rxInputStream, xOutputStream, aLength);
+
+ comphelper::SequenceAsHashMap aStreams;
+
+ Reference<XSequenceOutputStream> xEncodedFileSequenceStream(xOutputStream, UNO_QUERY);
+ aStreams["EncryptedPackage"] <<= xEncodedFileSequenceStream->getWrittenBytes();
+
+ Reference<XOutputStream> aEncryptionInfoStream(
+ mxContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.io.SequenceOutputStream", mxContext),
+ UNO_QUERY);
+ BinaryXOutputStream rStream(aEncryptionInfoStream, false);
+ mCryptoEngine->writeEncryptionInfo(rStream);
+ aEncryptionInfoStream->flush();
+ Reference<XSequenceOutputStream> aEncryptionInfoSequenceStream(aEncryptionInfoStream,
+ UNO_QUERY);
+
+ aStreams["EncryptionInfo"] <<= aEncryptionInfoSequenceStream->getWrittenBytes();
+
+ return aStreams.getAsConstNamedValueList();
+}
+
+OUString SAL_CALL StrongEncryptionDataSpace::getImplementationName()
+{
+ return "com.sun.star.comp.oox.crypto.StrongEncryptionDataSpace";
+}
+
+sal_Bool SAL_CALL StrongEncryptionDataSpace::supportsService(const OUString& rServiceName)
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+css::uno::Sequence<OUString> SAL_CALL StrongEncryptionDataSpace::getSupportedServiceNames()
+{
+ Sequence<OUString> aServices{ "com.sun.star.packages.PackageEncryption" };
+ return aServices;
+}
+
+} // namespace oox::crypto
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_crypto_StrongEncryptionDataSpace_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::crypto::StrongEncryptionDataSpace(pCtx));
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
new file mode 100644
index 000000000..9a23991a4
--- /dev/null
+++ b/oox/source/docprop/docprophandler.cxx
@@ -0,0 +1,716 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "docprophandler.hxx"
+
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/PropertyExistException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <o3tl/safeint.hxx>
+#include <osl/time.h>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <i18nlangtag/languagetag.hxx>
+
+#include <vector>
+#include <boost/algorithm/string.hpp>
+
+#include <oox/helper/attributelist.hxx>
+
+using namespace ::com::sun::star;
+
+namespace oox::docprop {
+
+OOXMLDocPropHandler::OOXMLDocPropHandler( const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Reference< document::XDocumentProperties >& rDocProp )
+ : m_xDocProp( rDocProp )
+ , m_nState( 0 )
+ , m_nBlock( 0 )
+ , m_nType( 0 )
+ , m_nInBlock( 0 )
+ , m_CustomStringPropertyState(NONE)
+{
+ if ( !xContext.is() || !rDocProp.is() )
+ throw uno::RuntimeException();
+}
+
+OOXMLDocPropHandler::~OOXMLDocPropHandler()
+{
+}
+
+void OOXMLDocPropHandler::InitNew()
+{
+ m_nState = 0;
+ m_nBlock = 0;
+ m_aCustomPropertyName.clear();
+ m_nType = 0;
+ m_nInBlock = 0;
+ m_CustomStringPropertyState = NONE;
+}
+
+void OOXMLDocPropHandler::AddCustomProperty( const uno::Any& aAny )
+{
+ if ( m_aCustomPropertyName.isEmpty() )
+ return;
+
+ const uno::Reference< beans::XPropertyContainer > xUserProps =
+ m_xDocProp->getUserDefinedProperties();
+ if ( !xUserProps.is() )
+ throw uno::RuntimeException();
+
+ try
+ {
+ xUserProps->addProperty( m_aCustomPropertyName,
+ beans::PropertyAttribute::REMOVABLE, aAny );
+ }
+ catch( beans::PropertyExistException& )
+ {
+ // conflicts with core and extended properties are possible
+ }
+ catch( uno::Exception& )
+ {
+ OSL_FAIL( "Can not add custom property!" );
+ }
+}
+
+util::DateTime OOXMLDocPropHandler::GetDateTimeFromW3CDTF( const OUString& aChars )
+{
+ oslDateTime aOslDTime = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ const sal_Int32 nLen = aChars.getLength();
+ if ( nLen >= 4 )
+ {
+ aOslDTime.Year = static_cast<sal_Int16>(o3tl::toInt32(aChars.subView( 0, 4 )));
+
+ if ( nLen >= 7 && aChars[4] == '-' )
+ {
+ aOslDTime.Month = static_cast<sal_uInt16>(o3tl::toInt32(aChars.subView( 5, 2 )));
+
+ if ( nLen >= 10 && aChars[7] == '-' )
+ {
+ aOslDTime.Day = static_cast<sal_uInt16>(o3tl::toInt32(aChars.subView( 8, 2 )));
+
+ if ( nLen >= 16 && aChars[10] == 'T' && aChars[13] == ':' )
+ {
+ aOslDTime.Hours = static_cast<sal_uInt16>(o3tl::toInt32(aChars.subView( 11, 2 )));
+ aOslDTime.Minutes = static_cast<sal_uInt16>(o3tl::toInt32(aChars.subView( 14, 2 )));
+
+ sal_Int32 nOptTime = 0;
+ if ( nLen >= 19 && aChars[16] == ':' )
+ {
+ aOslDTime.Seconds = static_cast<sal_uInt16>(o3tl::toInt32(aChars.subView( 17, 2 )));
+ nOptTime += 3;
+ if ( nLen >= 20 && aChars[19] == '.' )
+ {
+ nOptTime += 1;
+ sal_Int32 digitPos = 20;
+ while (nLen > digitPos && digitPos < 29)
+ {
+ sal_Unicode c = aChars[digitPos];
+ if ( c < '0' || c > '9')
+ break;
+ aOslDTime.NanoSeconds *= 10;
+ aOslDTime.NanoSeconds += c - '0';
+ ++digitPos;
+ }
+ if ( digitPos < 29 )
+ {
+ // read less digits than 9
+ // add correct exponent of 10
+ nOptTime += digitPos - 20;
+ for(; digitPos<29; ++digitPos)
+ {
+ aOslDTime.NanoSeconds *= 10;
+ }
+ }
+ else
+ {
+ //skip digits with more precision than we can handle
+ while(nLen > digitPos)
+ {
+ sal_Unicode c = aChars[digitPos];
+ if ( c < '0' || c > '9')
+ break;
+ ++digitPos;
+ }
+ nOptTime += digitPos - 20;
+ }
+ }
+ }
+
+ sal_Int32 nModif = 0;
+ if ( nLen >= 16 + nOptTime + 6 )
+ {
+ if ( ( aChars[16 + nOptTime] == '+' || aChars[16 + nOptTime] == '-' )
+ && aChars[16 + nOptTime + 3] == ':' )
+ {
+ nModif = o3tl::toInt32(aChars.subView( 16 + nOptTime + 1, 2 )) * 3600;
+ nModif += o3tl::toInt32(aChars.subView( 16 + nOptTime + 4, 2 )) * 60;
+ if ( aChars[16 + nOptTime] == '-' )
+ nModif *= -1;
+ }
+ }
+
+ if ( nModif )
+ {
+ // convert to UTC time
+ TimeValue aTmp;
+ if ( osl_getTimeValueFromDateTime( &aOslDTime, &aTmp ) )
+ {
+ aTmp.Seconds -= nModif;
+ osl_getDateTimeFromTimeValue( &aTmp, &aOslDTime );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return util::DateTime( aOslDTime.NanoSeconds, aOslDTime.Seconds,
+ aOslDTime.Minutes, aOslDTime.Hours,
+ aOslDTime.Day, aOslDTime.Month, aOslDTime.Year, false);
+}
+
+uno::Sequence< OUString > OOXMLDocPropHandler::GetKeywordsSet( std::u16string_view aChars )
+{
+ if ( !aChars.empty() )
+ {
+ std::string aUtf8Chars = OUStringToOString( aChars, RTL_TEXTENCODING_UTF8 ).getStr();
+ std::vector<std::string> aUtf8Result;
+ boost::split( aUtf8Result, aUtf8Chars, boost::is_any_of(" ,;:\t"), boost::token_compress_on );
+
+ if (!aUtf8Result.empty())
+ {
+ uno::Sequence< OUString > aResult( aUtf8Result.size() );
+ OUString* pResultValues = aResult.getArray();
+ for (auto const& elem : aUtf8Result)
+ {
+ *pResultValues = OUString( elem.c_str(), static_cast< sal_Int32 >( elem.size() ),RTL_TEXTENCODING_UTF8 );
+ ++pResultValues;
+ }
+
+ return aResult;
+ }
+ }
+ return uno::Sequence< OUString >();
+}
+
+void OOXMLDocPropHandler::UpdateDocStatistic( std::u16string_view aChars )
+{
+ uno::Sequence< beans::NamedValue > aSet = m_xDocProp->getDocumentStatistics();
+ OUString aName;
+
+ switch( m_nBlock )
+ {
+ case EXTPR_TOKEN( Characters ):
+ aName = "NonWhitespaceCharacterCount";
+ break;
+
+ case EXTPR_TOKEN( CharactersWithSpaces ):
+ aName = "CharacterCount";
+ break;
+
+ case EXTPR_TOKEN( Pages ):
+ aName = "PageCount";
+ break;
+
+ case EXTPR_TOKEN( Words ):
+ aName = "WordCount";
+ break;
+
+ case EXTPR_TOKEN( Paragraphs ):
+ aName = "ParagraphCount";
+ break;
+
+ default:
+ OSL_FAIL( "Unexpected statistic!" );
+ break;
+ }
+
+ if ( aName.isEmpty() )
+ return;
+
+ sal_Int32 nInd = 0;
+ for ( auto pProp = aSet.getConstArray(); nInd < aSet.getLength(); ++nInd )
+ if ( pProp[nInd].Name == aName )
+ break;
+
+ if (nInd == aSet.getLength())
+ aSet.realloc( nInd + 1 );
+
+ aSet.getArray()[nInd] = { aName, uno::Any(o3tl::toInt32(aChars)) };
+
+ m_xDocProp->setDocumentStatistics( aSet );
+}
+
+// com.sun.star.xml.sax.XFastDocumentHandler
+
+void SAL_CALL OOXMLDocPropHandler::startDocument()
+{
+}
+
+void SAL_CALL OOXMLDocPropHandler::endDocument()
+{
+ InitNew();
+}
+
+void OOXMLDocPropHandler::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
+{
+}
+
+void SAL_CALL OOXMLDocPropHandler::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& )
+{
+}
+
+// com.sun.star.xml.sax.XFastContextHandler
+
+void SAL_CALL OOXMLDocPropHandler::startFastElement( ::sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttribs )
+{
+ if ( !m_nInBlock && !m_nState )
+ {
+ if ( nElement == COREPR_TOKEN( coreProperties )
+ || nElement == EXTPR_TOKEN( Properties )
+ || nElement == CUSTPR_TOKEN( Properties ) )
+ {
+ m_nState = nElement;
+ }
+ else
+ {
+ OSL_FAIL( "Unexpected file format!" );
+ }
+ }
+ else if ( m_nState && m_nInBlock == 1 ) // that tag should contain the property name
+ {
+ // Currently the attributes are ignored for the core properties since the only
+ // known attribute is xsi:type that can only be used with dcterms:created and
+ // dcterms:modified, and this element is allowed currently to have only one value dcterms:W3CDTF
+ m_nBlock = nElement;
+
+ if ( xAttribs.is() && xAttribs->hasAttribute( XML_name ) )
+ m_aCustomPropertyName = xAttribs->getValue( XML_name );
+ }
+ else if ( m_nState && m_nInBlock == 2 && getNamespace( nElement ) == NMSP_officeDocPropsVT )
+ {
+ m_nType = nElement;
+ }
+ // variant tags in vector
+ else if ( m_nState && m_nInBlock == 3 && getNamespace( nElement ) == NMSP_officeDocPropsVT )
+ {
+ m_nType = nElement;
+ }
+ // lpstr or i4 tags in vector
+ else if ( m_nState && m_nInBlock == 4 && getNamespace( nElement ) == NMSP_officeDocPropsVT )
+ {
+ m_nType = nElement;
+ }
+ else
+ {
+ SAL_WARN("oox", "OOXMLDocPropHandler::startFastElement: unknown element " << getBaseToken(nElement) << " m_nState=" << m_nState << " m_nInBlock=" << m_nInBlock);
+ }
+
+ if ( m_nInBlock == SAL_MAX_INT32 )
+ throw uno::RuntimeException();
+
+ m_nInBlock++;
+}
+
+void SAL_CALL OOXMLDocPropHandler::startUnknownElement( const OUString& aNamespace, const OUString& aName, const uno::Reference< xml::sax::XFastAttributeList >& )
+{
+ SAL_WARN("oox", "Unknown element " << aNamespace << ":" << aName);
+
+ if ( m_nInBlock == SAL_MAX_INT32 )
+ throw uno::RuntimeException();
+
+ m_nInBlock++;
+}
+
+void SAL_CALL OOXMLDocPropHandler::endFastElement( ::sal_Int32 )
+{
+ if ( !m_nInBlock )
+ return;
+
+ m_nInBlock--;
+
+ if ( !m_nInBlock )
+ m_nState = 0;
+ else if ( m_nInBlock == 1 )
+ {
+ m_nBlock = 0;
+ m_aCustomPropertyName.clear();
+ }
+ else if ( m_nInBlock == 2 )
+ {
+ if ( m_nState == CUSTPR_TOKEN(Properties)
+ && m_nBlock == CUSTPR_TOKEN(property))
+ {
+ switch (m_nType)
+ {
+ case VT_TOKEN(bstr):
+ case VT_TOKEN(lpstr):
+ case VT_TOKEN(lpwstr):
+ if (!m_aCustomPropertyName.isEmpty() &&
+ INSERTED != m_CustomStringPropertyState)
+ {
+ // the property has string type, so it is valid
+ // even with an empty value - characters() has
+ // not been called in that case
+ AddCustomProperty(uno::Any(OUString()));
+ }
+ break;
+ }
+ }
+ m_CustomStringPropertyState = NONE;
+ m_nType = 0;
+ }
+}
+
+void SAL_CALL OOXMLDocPropHandler::endUnknownElement( const OUString&, const OUString& )
+{
+ if ( m_nInBlock )
+ m_nInBlock--;
+}
+
+uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLDocPropHandler::createFastChildContext( ::sal_Int32, const uno::Reference< xml::sax::XFastAttributeList >& )
+{
+ // Should the arguments be parsed?
+ return uno::Reference< xml::sax::XFastContextHandler >( static_cast< xml::sax::XFastContextHandler* >( this ) );
+}
+
+uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLDocPropHandler::createUnknownChildContext( const OUString&, const OUString&, const uno::Reference< xml::sax::XFastAttributeList >& )
+{
+ return uno::Reference< xml::sax::XFastContextHandler >( static_cast< xml::sax::XFastContextHandler* >( this ) );
+}
+
+void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars )
+{
+ try
+ {
+ if ( (m_nInBlock == 2) || ((m_nInBlock == 3) && m_nType) )
+ {
+ if ( m_nState == COREPR_TOKEN( coreProperties ) )
+ {
+ switch( m_nBlock )
+ {
+ case COREPR_TOKEN( category ):
+ m_aCustomPropertyName = "OOXMLCorePropertyCategory";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case COREPR_TOKEN( contentStatus ):
+ m_aCustomPropertyName = "OOXMLCorePropertyContentStatus";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case COREPR_TOKEN( contentType ):
+ m_aCustomPropertyName = "OOXMLCorePropertyContentType";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case DC_TOKEN( identifier ):
+ m_aCustomPropertyName = "OOXMLCorePropertyIdentifier";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case COREPR_TOKEN( version ):
+ m_aCustomPropertyName = "OOXMLCorePropertyVersion";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case DCT_TOKEN( created ):
+ if ( aChars.getLength() >= 4 )
+ m_xDocProp->setCreationDate( GetDateTimeFromW3CDTF( aChars ) );
+ break;
+
+ case DC_TOKEN( creator ):
+ m_xDocProp->setAuthor( aChars );
+ break;
+
+ case DC_TOKEN( description ):
+ m_xDocProp->setDescription( aChars );
+ break;
+
+ case COREPR_TOKEN( keywords ):
+ m_xDocProp->setKeywords( GetKeywordsSet( aChars ) );
+ break;
+
+ case DC_TOKEN( language ):
+ if ( aChars.getLength() >= 2 )
+ m_xDocProp->setLanguage( LanguageTag::convertToLocale( aChars) );
+ break;
+
+ case COREPR_TOKEN( lastModifiedBy ):
+ m_xDocProp->setModifiedBy( aChars );
+ break;
+
+ case COREPR_TOKEN( lastPrinted ):
+ if ( aChars.getLength() >= 4 )
+ m_xDocProp->setPrintDate( GetDateTimeFromW3CDTF( aChars ) );
+ break;
+
+ case DCT_TOKEN( modified ):
+ if ( aChars.getLength() >= 4 )
+ m_xDocProp->setModificationDate( GetDateTimeFromW3CDTF( aChars ) );
+ break;
+
+ case COREPR_TOKEN( revision ):
+ try
+ {
+ m_xDocProp->setEditingCycles(
+ static_cast<sal_Int16>(aChars.toInt32()) );
+ }
+ catch (lang::IllegalArgumentException &)
+ {
+ // ignore
+ }
+ break;
+
+ case DC_TOKEN( subject ):
+ m_xDocProp->setSubject( m_xDocProp->getSubject() + aChars );
+ break;
+
+ case DC_TOKEN( title ):
+ m_xDocProp->setTitle( m_xDocProp->getTitle() + aChars );
+ break;
+
+ default:
+ OSL_FAIL( "Unexpected core property!" );
+ }
+ }
+ else if ( m_nState == EXTPR_TOKEN( Properties ) )
+ {
+ switch( m_nBlock )
+ {
+ case EXTPR_TOKEN( Application ):
+ m_xDocProp->setGenerator( aChars );
+ break;
+
+ case EXTPR_TOKEN( Template ):
+ m_xDocProp->setTemplateName( aChars );
+ break;
+
+ case EXTPR_TOKEN( TotalTime ):
+ {
+ sal_Int32 nDuration;
+ if (!o3tl::checked_multiply<sal_Int32>(aChars.toInt32(), 60, nDuration))
+ {
+ try
+ {
+ // The TotalTime is in mins as per ECMA specification.
+ m_xDocProp->setEditingDuration(nDuration);
+ }
+ catch (const lang::IllegalArgumentException&)
+ {
+ // ignore
+ }
+ }
+ break;
+ }
+ case EXTPR_TOKEN( Characters ):
+ case EXTPR_TOKEN( CharactersWithSpaces ):
+ case EXTPR_TOKEN( Pages ):
+ case EXTPR_TOKEN( Words ):
+ case EXTPR_TOKEN( Paragraphs ):
+ UpdateDocStatistic( aChars );
+ break;
+
+ case EXTPR_TOKEN( HyperlinksChanged ):
+ m_aCustomPropertyName = "HyperlinksChanged";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toBoolean() )
+ AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type
+ break;
+
+ case EXTPR_TOKEN( LinksUpToDate ):
+ m_aCustomPropertyName = "LinksUpToDate";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toBoolean() )
+ AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type
+ break;
+
+ case EXTPR_TOKEN( ScaleCrop ):
+ m_aCustomPropertyName = "ScaleCrop";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toBoolean() )
+ AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type
+ break;
+
+ case EXTPR_TOKEN( SharedDoc ):
+ m_aCustomPropertyName = "ShareDoc";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toBoolean() )
+ AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type
+ break;
+
+ case EXTPR_TOKEN( DocSecurity ):
+ m_aCustomPropertyName = "DocSecurity";
+ // tdf#103987 Don't create custom property if the value is default
+ // OOXTODO Instead of storing value, enable security
+ // 1 - password protected, 2 - recommended read-only
+ // 4 - enforced read-only, 8 - locked for annotation
+ if ( aChars.toInt32() != 0 )
+ AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type
+ break;
+
+ case EXTPR_TOKEN( HiddenSlides ):
+ m_aCustomPropertyName = "HiddenSlides";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toInt32() != 0 )
+ AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type
+ break;
+
+ case EXTPR_TOKEN( MMClips ):
+ m_aCustomPropertyName = "MMClips";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toInt32() != 0 )
+ AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type
+ break;
+
+ case EXTPR_TOKEN( Notes ):
+ m_aCustomPropertyName = "Notes";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toInt32() != 0 )
+ AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type
+ break;
+
+ case EXTPR_TOKEN( Slides ):
+ m_aCustomPropertyName = "Slides";
+ // tdf#103987 Don't create custom property if the value is default
+ if ( aChars.toInt32() != 0 )
+ AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type
+ break;
+
+ case EXTPR_TOKEN( AppVersion ):
+ m_aCustomPropertyName = "AppVersion";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case EXTPR_TOKEN( Company ):
+ m_aCustomPropertyName = "Company";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case EXTPR_TOKEN( HyperlinkBase ):
+ m_aCustomPropertyName = "HyperlinkBase";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case EXTPR_TOKEN( Manager ):
+ m_aCustomPropertyName = "Manager";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case EXTPR_TOKEN( PresentationFormat ):
+ m_aCustomPropertyName = "PresentationFormat";
+ AddCustomProperty( uno::Any( aChars ) ); // the property has string type
+ break;
+
+ case EXTPR_TOKEN( Lines ):
+ case EXTPR_TOKEN( DigSig ):
+ case EXTPR_TOKEN( HeadingPairs ):
+ case EXTPR_TOKEN( HLinks ):
+ case EXTPR_TOKEN( TitlesOfParts ):
+ // ignored during the import currently
+ break;
+
+ default:
+ OSL_FAIL( "Unexpected extended property!" );
+ }
+ }
+ else if ( m_nState == CUSTPR_TOKEN( Properties ) )
+ {
+ if ( m_nBlock == CUSTPR_TOKEN( property ) )
+ {
+ // this is a custom property
+ switch( m_nType )
+ {
+ case VT_TOKEN( bool ):
+ AddCustomProperty( uno::Any( aChars.toBoolean() ) );
+ break;
+
+ case VT_TOKEN( bstr ):
+ case VT_TOKEN( lpstr ):
+ case VT_TOKEN( lpwstr ):
+ // the property has string type
+ AddCustomProperty( uno::Any( AttributeConversion::decodeXString( aChars ) ) );
+ m_CustomStringPropertyState = INSERTED;
+ break;
+
+ case VT_TOKEN( date ):
+ case VT_TOKEN( filetime ):
+ AddCustomProperty( uno::Any( GetDateTimeFromW3CDTF( aChars ) ) );
+ break;
+
+ case VT_TOKEN( i1 ):
+ case VT_TOKEN( i2 ):
+ AddCustomProperty( uno::Any( static_cast<sal_Int16>(aChars.toInt32()) ) );
+ break;
+
+ case VT_TOKEN( i4 ):
+ case VT_TOKEN( int ):
+ AddCustomProperty( uno::Any( aChars.toInt32() ) );
+ break;
+
+ case VT_TOKEN( i8 ):
+ AddCustomProperty( uno::Any( aChars.toInt64() ) );
+ break;
+
+ case VT_TOKEN( r4 ):
+ AddCustomProperty( uno::Any( aChars.toFloat() ) );
+ break;
+
+ case VT_TOKEN( r8 ):
+ AddCustomProperty( uno::Any( aChars.toDouble() ) );
+ break;
+
+ default:
+ // all the other types are ignored;
+ break;
+ }
+ }
+ else
+ {
+ OSL_FAIL( "Unexpected tag in custom property!" );
+ }
+ }
+ }
+ }
+ catch( uno::RuntimeException& )
+ {
+ throw;
+ }
+ catch( xml::sax::SAXException& )
+ {
+ throw;
+ }
+ catch( uno::Exception& )
+ {
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw xml::sax::SAXException(
+ "Error while setting document property!",
+ uno::Reference< uno::XInterface >(),
+ anyEx );
+ }
+}
+
+} // namespace oox::docprop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/docprop/docprophandler.hxx b/oox/source/docprop/docprophandler.hxx
new file mode 100644
index 000000000..69e091850
--- /dev/null
+++ b/oox/source/docprop/docprophandler.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DOCPROP_DOCPROPHANDLER_HXX
+#define INCLUDED_OOX_SOURCE_DOCPROP_DOCPROPHANDLER_HXX
+
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
+
+#include <cppuhelper/implbase.hxx>
+
+#include <oox/token/namespaces.hxx>
+
+namespace oox::docprop {
+
+#define COREPR_TOKEN( token ) (::oox::NMSP_packageMetaCorePr | XML_##token)
+#define CUSTPR_TOKEN( token ) (::oox::NMSP_officeCustomPr | XML_##token)
+#define EXTPR_TOKEN( token ) (::oox::NMSP_officeExtPr | XML_##token)
+#define VT_TOKEN( token ) (::oox::NMSP_officeDocPropsVT | XML_##token)
+#define DC_TOKEN( token ) (::oox::NMSP_dc | XML_##token)
+#define DCT_TOKEN( token ) (::oox::NMSP_dcTerms | XML_##token)
+
+class OOXMLDocPropHandler : public ::cppu::WeakImplHelper< css::xml::sax::XFastDocumentHandler >
+{
+ css::uno::Reference< css::document::XDocumentProperties > m_xDocProp;
+
+ sal_Int32 m_nState;
+ sal_Int32 m_nBlock;
+ sal_Int32 m_nType;
+
+ sal_Int32 m_nInBlock;
+
+ enum { NONE, INSERTED } m_CustomStringPropertyState;
+ OUString m_aCustomPropertyName;
+
+public:
+ explicit OOXMLDocPropHandler( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::document::XDocumentProperties >& rDocProp );
+
+ virtual ~OOXMLDocPropHandler() override;
+
+ void InitNew();
+ void AddCustomProperty( const css::uno::Any& aAny );
+
+ static css::util::DateTime GetDateTimeFromW3CDTF( const OUString& aChars );
+ static css::uno::Sequence< OUString > GetKeywordsSet( std::u16string_view aChars );
+ void UpdateDocStatistic( std::u16string_view aChars );
+
+ // com.sun.star.xml.sax.XFastDocumentHandler
+
+ virtual void SAL_CALL startDocument() override;
+ virtual void SAL_CALL endDocument() override;
+ virtual void SAL_CALL processingInstruction( const OUString& rTarget, const OUString& rData ) override;
+ virtual void SAL_CALL setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& rxLocator ) override;
+
+ // com.sun.star.xml.sax.XFastContextHandler
+
+ virtual void SAL_CALL startFastElement( ::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL startUnknownElement( const OUString& Namespace, const OUString& Name, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) override;
+ virtual void SAL_CALL endUnknownElement( const OUString& Namespace, const OUString& Name ) override;
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override;
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext( const OUString& Namespace, const OUString& Name, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL characters( const OUString& aChars ) override;
+
+};
+
+} // namespace oox::core
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
new file mode 100644
index 000000000..f58476c56
--- /dev/null
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -0,0 +1,229 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "ooxmldocpropimport.hxx"
+
+#include <vector>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
+#include <com/sun/star/embed/XRelationshipAccess.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <oox/core/fastparser.hxx>
+#include <oox/core/relations.hxx>
+#include "docprophandler.hxx"
+
+#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+using namespace ::com::sun::star;
+
+namespace oox::docprop {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace {
+
+/// @throws RuntimeException
+/// @throws css::io::IOException
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxStorage, const OUString& rStreamType )
+{
+ Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
+ Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, UNO_QUERY_THROW );
+
+ const Sequence< Sequence< StringPair > > aPropsInfo = xRelation->getRelationshipsByType( rStreamType );
+
+ ::std::vector< InputSource > aResult;
+
+ for( const Sequence< StringPair >& rEntries : aPropsInfo )
+ {
+ auto pEntry = std::find_if(rEntries.begin(), rEntries.end(),
+ [](const StringPair& rEntry) { return rEntry.First == "Target"; });
+ if (pEntry != rEntries.end())
+ {
+ // The stream path is always a relative one, ignore the leading "/" if it's there.
+ OUString aStreamPath = pEntry->Second;
+ if (aStreamPath.startsWith("/"))
+ aStreamPath = aStreamPath.copy(1);
+
+ Reference< XExtendedStorageStream > xExtStream(
+ xHierarchy->openStreamElementByHierarchicalName( aStreamPath, ElementModes::READ ), UNO_SET_THROW );
+ Reference< XInputStream > xInStream = xExtStream->getInputStream();
+ if( xInStream.is() )
+ {
+ aResult.emplace_back();
+ aResult.back().sSystemId = pEntry->Second;
+ aResult.back().aInputStream = xExtStream->getInputStream();
+ }
+ }
+ }
+
+ return comphelper::containerToSequence( aResult );
+}
+
+Sequence< InputSource > lclGetCoreStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCoreStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("metadata/core-properties"));
+ // OOXML strict
+ if (!aCoreStreams.hasElements())
+ aCoreStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("metadata/core-properties"));
+ // MS Office seems to have a bug, so we have to do similar handling
+ if (!aCoreStreams.hasElements())
+ aCoreStreams = lclGetRelatedStreams(rxSource, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
+
+ return aCoreStreams;
+}
+
+Sequence< InputSource > lclGetExtStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aExtStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("extended-properties"));
+ // OOXML strict
+ if (!aExtStreams.hasElements())
+ aExtStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("extended-properties"));
+
+ return aExtStreams;
+}
+
+Sequence< InputSource > lclGetCustomStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCustomStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("custom-properties"));
+ // OOXML strict
+ if (!aCustomStreams.hasElements())
+ aCustomStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("custom-properties"));
+
+ return aCustomStreams;
+}
+
+
+} // namespace
+
+DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentContext >& rxContext ) :
+ mxContext( rxContext )
+{
+}
+
+// XServiceInfo
+OUString SAL_CALL DocumentPropertiesImport::getImplementationName()
+{
+ return "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter";
+}
+
+sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rServiceName )
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames()
+{
+ Sequence<OUString> aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" };
+ return aServices;
+}
+
+// XOOXMLDocumentPropertiesImporter
+void SAL_CALL DocumentPropertiesImport::importProperties(
+ const Reference< XStorage >& rxSource, const Reference< XDocumentProperties >& rxDocumentProperties )
+{
+ if( !mxContext.is() )
+ throw RuntimeException();
+
+ if( !rxSource.is() || !rxDocumentProperties.is() )
+ throw IllegalArgumentException();
+
+ Sequence< InputSource > aCoreStreams = lclGetCoreStreams(rxSource);
+
+ Sequence< InputSource > aExtStreams = lclGetExtStreams(rxSource);
+
+ Sequence< InputSource > aCustomStreams = lclGetCustomStreams(rxSource);
+
+ if( !(aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements()) )
+ return;
+
+ if( aCoreStreams.getLength() > 1 )
+ throw IOException( "Unexpected core properties stream!" );
+
+ ::oox::core::FastParser aParser;
+ aParser.registerNamespace( NMSP_packageMetaCorePr );
+ aParser.registerNamespace( NMSP_dc );
+ aParser.registerNamespace( NMSP_dcTerms );
+ aParser.registerNamespace( NMSP_officeExtPr );
+ aParser.registerNamespace( NMSP_officeCustomPr );
+ aParser.registerNamespace( NMSP_officeDocPropsVT );
+ aParser.setDocumentHandler( new OOXMLDocPropHandler( mxContext, rxDocumentProperties ) );
+
+ if( aCoreStreams.hasElements() )
+ aParser.parseStream( aCoreStreams[ 0 ], true );
+ for( const auto& rExtStream : std::as_const(aExtStreams) )
+ aParser.parseStream( rExtStream, true );
+ for( const auto& rCustomStream : std::as_const(aCustomStreams) )
+ aParser.parseStream( rCustomStream, true );
+}
+
+Reference < com::sun::star::io::XInputStream > SAL_CALL DocumentPropertiesImport::getCorePropertiesStream(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCoreStreams = lclGetCoreStreams(rxSource);
+ if (!aCoreStreams.hasElements())
+ return nullptr;
+
+ return aCoreStreams[0].aInputStream;
+}
+
+Reference < com::sun::star::io::XInputStream > SAL_CALL DocumentPropertiesImport::getExtendedPropertiesStream(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aExtStreams = lclGetExtStreams(rxSource);
+ if (!aExtStreams.hasElements())
+ return nullptr;
+
+ return aExtStreams[0].aInputStream;
+}
+
+css::uno::Sequence< css::uno::Reference< com::sun::star::io::XInputStream > > SAL_CALL DocumentPropertiesImport::getCustomPropertiesStreams(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence <InputSource> aExtStreams = lclGetCustomStreams(rxSource);
+
+ // Repack the sequence
+ std::vector<Reference<XInputStream>> aResult(aExtStreams.getLength());
+ for (const auto& aInputSource : aExtStreams)
+ {
+ aResult.push_back(aInputSource.aInputStream);
+ }
+
+ return comphelper::containerToSequence(aResult);
+}
+
+} // namespace oox::docprop
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::docprop::DocumentPropertiesImport(pCtx));
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/docprop/ooxmldocpropimport.hxx b/oox/source/docprop/ooxmldocpropimport.hxx
new file mode 100644
index 000000000..ba406bae9
--- /dev/null
+++ b/oox/source/docprop/ooxmldocpropimport.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DOCPROP_OOXMLDOCPROPIMPORT_HXX
+#define INCLUDED_OOX_SOURCE_DOCPROP_OOXMLDOCPROPIMPORT_HXX
+
+#include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/implbase.hxx>
+
+namespace oox::docprop {
+
+class DocumentPropertiesImport :
+ public ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::document::XOOXMLDocumentPropertiesImporter >
+{
+public:
+ explicit DocumentPropertiesImport(
+ const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // XOOXMLDocumentPropertiesImporter
+ virtual void SAL_CALL importProperties(
+ const css::uno::Reference< css::embed::XStorage >& rxSource,
+ const css::uno::Reference< css::document::XDocumentProperties >& rxDocumentProperties ) override;
+ virtual css::uno::Reference < com::sun::star::io::XInputStream > SAL_CALL getCorePropertiesStream(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
+ virtual css::uno::Reference < com::sun::star::io::XInputStream > SAL_CALL getExtendedPropertiesStream(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
+ virtual css::uno::Sequence< css::uno::Reference< com::sun::star::io::XInputStream > > SAL_CALL getCustomPropertiesStreams(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
+
+private:
+ css::uno::Reference< css::uno::XComponentContext > mxContext;
+};
+
+} // namespace oox::docprop
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx
new file mode 100644
index 000000000..1be56980c
--- /dev/null
+++ b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <drawingml/ThemeOverrideFragmentHandler.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/token/namespaces.hxx>
+#include <drawingml/themeelementscontext.hxx>
+
+using namespace ::oox::core;
+
+namespace oox::drawingml {
+
+ThemeOverrideFragmentHandler::ThemeOverrideFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rTheme ) :
+ FragmentHandler2( rFilter, rFragmentPath ),
+ mrTheme( rTheme )
+{
+}
+
+ThemeOverrideFragmentHandler::~ThemeOverrideFragmentHandler()
+{
+}
+
+ContextHandlerRef ThemeOverrideFragmentHandler::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ // CT_OfficeStyleSheet
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ switch( nElement )
+ {
+ case A_TOKEN( themeOverride ): // CT_BaseStylesOverride
+ return new ThemeElementsContext( *this, mrTheme );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx
new file mode 100644
index 000000000..b90857785
--- /dev/null
+++ b/oox/source/drawingml/chart/axiscontext.cxx
@@ -0,0 +1,298 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/axiscontext.hxx>
+
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/chart/axismodel.hxx>
+#include <drawingml/chart/titlecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandlerRef;
+using ::oox::core::ContextHandler2Helper;
+
+AxisDispUnitsContext::AxisDispUnitsContext( ContextHandler2Helper& rParent, AxisDispUnitsModel& rModel ) :
+ ContextBase< AxisDispUnitsModel >( rParent, rModel )
+{
+}
+
+AxisDispUnitsContext::~AxisDispUnitsContext()
+{
+}
+
+ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( dispUnits ):
+ switch( nElement )
+ {
+ case C_TOKEN( builtInUnit ):
+ mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, "thousands" );
+ return nullptr;
+ case C_TOKEN( custUnit ):
+ mrModel.mfCustomUnit = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( dispUnitsLbl ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( dispUnitsLbl ):
+ switch( nElement )
+ {
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( tx ):
+ return new TextContext( *this, mrModel.mxText.create() );
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+AxisContextBase::AxisContextBase( ContextHandler2Helper& rParent, AxisModel& rModel ) :
+ ContextBase< AxisModel >( rParent, rModel )
+{
+}
+
+AxisContextBase::~AxisContextBase()
+{
+}
+
+ContextHandlerRef AxisContextBase::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( catAx ):
+ case C_TOKEN( dateAx ):
+ case C_TOKEN( serAx ):
+ case C_TOKEN( valAx ):
+ switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.mnAxisId = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( crossAx ):
+ mrModel.mnCrossAxisId = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( crosses ):
+ mrModel.mnCrossMode = rAttribs.getToken( XML_val, XML_autoZero );
+ return nullptr;
+ case C_TOKEN( crossesAt ):
+ mrModel.mofCrossesAt = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( delete ):
+ mrModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( majorGridlines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxMajorGridLines.create() );
+ case C_TOKEN( majorTickMark ):
+ mrModel.mnMajorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_out : XML_cross );
+ return nullptr;
+ case C_TOKEN(axPos):
+ mrModel.mnAxisPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID );
+ return nullptr;
+ case C_TOKEN( minorGridlines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxMinorGridLines.create() );
+ case C_TOKEN( minorTickMark ):
+ mrModel.mnMinorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_none : XML_cross );
+ return nullptr;
+ case C_TOKEN( numFmt ):
+ mrModel.maNumberFormat.setAttributes( rAttribs );
+ return nullptr;
+ case C_TOKEN( scaling ):
+ return this;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( tickLblPos ):
+ mrModel.mnTickLabelPos = rAttribs.getToken( XML_val, XML_nextTo );
+ return nullptr;
+ case C_TOKEN( title ):
+ {
+ bool bVerticalDefault = mrModel.mnAxisPos == XML_l || mrModel.mnAxisPos == XML_r;
+ sal_Int32 nDefaultRotation = bVerticalDefault ? -5400000 : 0;
+ return new TitleContext( *this, mrModel.mxTitle.create(nDefaultRotation) );
+ }
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ }
+ break;
+
+ case C_TOKEN( scaling ):
+ switch( nElement )
+ {
+ case C_TOKEN( logBase ):
+ mrModel.mofLogBase = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( max ):
+ mrModel.mofMax = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( min ):
+ mrModel.mofMin = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( orientation ):
+ mrModel.mnOrientation = rAttribs.getToken( XML_val, XML_minMax );
+ return nullptr;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+CatAxisContext::CatAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) :
+ AxisContextBase( rParent, rModel )
+{
+}
+
+CatAxisContext::~CatAxisContext()
+{
+}
+
+ContextHandlerRef CatAxisContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( auto ):
+ mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( lblAlgn ):
+ mrModel.mnLabelAlign = rAttribs.getToken( XML_val, XML_ctr );
+ return nullptr;
+ case C_TOKEN( lblOffset ):
+ mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 );
+ return nullptr;
+ case C_TOKEN( noMultiLvlLbl ):
+ mrModel.mbNoMultiLevel = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( tickLblSkip ):
+ mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ case C_TOKEN( tickMarkSkip ):
+ mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ }
+ return AxisContextBase::onCreateContext( nElement, rAttribs );
+}
+
+DateAxisContext::DateAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) :
+ AxisContextBase( rParent, rModel )
+{
+}
+
+DateAxisContext::~DateAxisContext()
+{
+}
+
+ContextHandlerRef DateAxisContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( auto ):
+ mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( baseTimeUnit ):
+ mrModel.monBaseTimeUnit = rAttribs.getToken( XML_val, XML_days );
+ return nullptr;
+ case C_TOKEN( lblOffset ):
+ mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 );
+ return nullptr;
+ case C_TOKEN( majorTimeUnit ):
+ mrModel.mnMajorTimeUnit = rAttribs.getToken( XML_val, XML_days );
+ return nullptr;
+ case C_TOKEN( majorUnit ):
+ mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( minorTimeUnit ):
+ mrModel.mnMinorTimeUnit = rAttribs.getToken( XML_val, XML_days );
+ return nullptr;
+ case C_TOKEN( minorUnit ):
+ mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ }
+ return AxisContextBase::onCreateContext( nElement, rAttribs );
+}
+
+SerAxisContext::SerAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) :
+ AxisContextBase( rParent, rModel )
+{
+}
+
+SerAxisContext::~SerAxisContext()
+{
+}
+
+ContextHandlerRef SerAxisContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( tickLblSkip ):
+ mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ case C_TOKEN( tickMarkSkip ):
+ mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ }
+ return AxisContextBase::onCreateContext( nElement, rAttribs );
+}
+
+ValAxisContext::ValAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) :
+ AxisContextBase( rParent, rModel )
+{
+}
+
+ValAxisContext::~ValAxisContext()
+{
+}
+
+ContextHandlerRef ValAxisContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( crossBetween ):
+ mrModel.mnCrossBetween = rAttribs.getToken( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( dispUnits ):
+ return new AxisDispUnitsContext( *this, mrModel.mxDispUnits.create() );
+ case C_TOKEN( majorUnit ):
+ mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( minorUnit ):
+ mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ }
+ return AxisContextBase::onCreateContext( nElement, rAttribs );
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
new file mode 100644
index 000000000..a8ccc6cdf
--- /dev/null
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -0,0 +1,437 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/axisconverter.hxx>
+#include <ooxresid.hxx>
+#include <strings.hrc>
+
+#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
+#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
+#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
+#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart/TimeInterval.hpp>
+#include <com/sun/star/chart/TimeUnit.hpp>
+#include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart2/TickmarkStyle.hpp>
+#include <com/sun/star/chart2/LinearScaling.hpp>
+#include <com/sun/star/chart2/LogarithmicScaling.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <com/sun/star/chart2/XTitled.hpp>
+#include <drawingml/chart/axismodel.hxx>
+#include <drawingml/chart/titleconverter.hxx>
+#include <drawingml/chart/typegroupconverter.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <comphelper/processfactory.hxx>
+#include <osl/diagnose.h>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+void lclSetValueOrClearAny( Any& orAny, const OptValue< double >& rofValue )
+{
+ if( rofValue.has() ) orAny <<= rofValue.get(); else orAny.clear();
+}
+
+bool lclIsLogarithmicScale( const AxisModel& rAxisModel )
+{
+ return rAxisModel.mofLogBase.has() && (2.0 <= rAxisModel.mofLogBase.get()) && (rAxisModel.mofLogBase.get() <= 1000.0);
+}
+
+sal_Int32 lclGetApiTimeUnit( sal_Int32 nTimeUnit )
+{
+ using namespace ::com::sun::star::chart;
+ switch( nTimeUnit )
+ {
+ case XML_days: return TimeUnit::DAY;
+ case XML_months: return TimeUnit::MONTH;
+ case XML_years: return TimeUnit::YEAR;
+ default: OSL_ENSURE( false, "lclGetApiTimeUnit - unexpected time unit" );
+ }
+ return TimeUnit::DAY;
+}
+
+void lclConvertTimeInterval( Any& orInterval, const OptValue< double >& rofUnit, sal_Int32 nTimeUnit )
+{
+ if( rofUnit.has() && (1.0 <= rofUnit.get()) && (rofUnit.get() <= SAL_MAX_INT32) )
+ orInterval <<= css::chart::TimeInterval( static_cast< sal_Int32 >( rofUnit.get() ), lclGetApiTimeUnit( nTimeUnit ) );
+ else
+ orInterval.clear();
+}
+
+css::chart::ChartAxisLabelPosition lclGetLabelPosition( sal_Int32 nToken )
+{
+ using namespace ::com::sun::star::chart;
+ switch( nToken )
+ {
+ case XML_high: return ChartAxisLabelPosition_OUTSIDE_END;
+ case XML_low: return ChartAxisLabelPosition_OUTSIDE_START;
+ case XML_nextTo: return ChartAxisLabelPosition_NEAR_AXIS;
+ }
+ return ChartAxisLabelPosition_NEAR_AXIS;
+}
+
+sal_Int32 lclGetTickMark( sal_Int32 nToken )
+{
+ using namespace ::com::sun::star::chart2::TickmarkStyle;
+ switch( nToken )
+ {
+ case XML_in: return INNER;
+ case XML_out: return OUTER;
+ case XML_cross: return INNER | OUTER;
+ }
+ return css::chart2::TickmarkStyle::NONE;
+}
+
+/**
+ * The groups is of percent type only when all of its members are of percent
+ * type.
+ */
+bool isPercent( const RefVector<TypeGroupConverter>& rTypeGroups )
+{
+ if (rTypeGroups.empty())
+ return false;
+
+ for (auto const& typeGroup : rTypeGroups)
+ {
+ TypeGroupConverter& rConv = *typeGroup;
+ if (!rConv.isPercent())
+ return false;
+ }
+
+ return true;
+}
+
+} // namespace
+
+AxisConverter::AxisConverter( const ConverterRoot& rParent, AxisModel& rModel ) :
+ ConverterBase< AxisModel >( rParent, rModel )
+{
+}
+
+AxisConverter::~AxisConverter()
+{
+}
+
+void AxisConverter::convertFromModel(const Reference<XCoordinateSystem>& rxCoordSystem,
+ RefVector<TypeGroupConverter>& rTypeGroups,
+ const AxisModel* pCrossingAxis, sal_Int32 nAxesSetIdx,
+ sal_Int32 nAxisIdx, bool bUseFixedInnerSize)
+{
+ if (rTypeGroups.empty())
+ return;
+
+ Reference< XAxis > xAxis;
+ try
+ {
+ namespace cssc = ::com::sun::star::chart;
+ namespace cssc2 = ::com::sun::star::chart2;
+
+ const TypeGroupInfo& rTypeInfo = rTypeGroups.front()->getTypeInfo();
+ ObjectFormatter& rFormatter = getFormatter();
+
+ // create the axis object (always)
+ xAxis.set( createInstance( "com.sun.star.chart2.Axis" ), UNO_QUERY_THROW );
+ PropertySet aAxisProp( xAxis );
+ // #i58688# axis enabled
+ aAxisProp.setProperty( PROP_Show, !mrModel.mbDeleted );
+
+ // axis line, tick, and gridline properties ---------------------------
+
+ // show axis labels
+ aAxisProp.setProperty( PROP_DisplayLabels, mrModel.mnTickLabelPos != XML_none );
+ aAxisProp.setProperty( PROP_LabelPosition, lclGetLabelPosition( mrModel.mnTickLabelPos ) );
+ // no X axis line in radar charts
+ if( (nAxisIdx == API_X_AXIS) && (rTypeInfo.meTypeCategory == TYPECATEGORY_RADAR) )
+ mrModel.mxShapeProp.getOrCreate().getLineProperties().maLineFill.moFillType = XML_noFill;
+ // axis line and tick label formatting
+ rFormatter.convertFormatting( aAxisProp, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_AXIS );
+ // tick label rotation
+ ObjectFormatter::convertTextRotation( aAxisProp, mrModel.mxTextProp, true );
+
+ // tick mark style
+ aAxisProp.setProperty( PROP_MajorTickmarks, lclGetTickMark( mrModel.mnMajorTickMark ) );
+ aAxisProp.setProperty( PROP_MinorTickmarks, lclGetTickMark( mrModel.mnMinorTickMark ) );
+ aAxisProp.setProperty( PROP_MarkPosition, cssc::ChartAxisMarkPosition_AT_AXIS );
+
+ // main grid
+ PropertySet aGridProp( xAxis->getGridProperties() );
+ aGridProp.setProperty( PROP_Show, mrModel.mxMajorGridLines.is() );
+ if( mrModel.mxMajorGridLines.is() )
+ rFormatter.convertFrameFormatting( aGridProp, mrModel.mxMajorGridLines, OBJECTTYPE_MAJORGRIDLINE );
+
+ // sub grid
+ Sequence< Reference< XPropertySet > > aSubGridPropSeq = xAxis->getSubGridProperties();
+ if( aSubGridPropSeq.hasElements() )
+ {
+ PropertySet aSubGridProp( aSubGridPropSeq[ 0 ] );
+ aSubGridProp.setProperty( PROP_Show, mrModel.mxMinorGridLines.is() );
+ if( mrModel.mxMinorGridLines.is() )
+ rFormatter.convertFrameFormatting( aSubGridProp, mrModel.mxMinorGridLines, OBJECTTYPE_MINORGRIDLINE );
+ }
+
+ // axis type and X axis categories ------------------------------------
+
+ ScaleData aScaleData = xAxis->getScaleData();
+ // set axis type
+ switch( nAxisIdx )
+ {
+ case API_X_AXIS:
+ if( rTypeInfo.mbCategoryAxis )
+ {
+ OSL_ENSURE( (mrModel.mnTypeId == C_TOKEN( catAx )) || (mrModel.mnTypeId == C_TOKEN( dateAx )),
+ "AxisConverter::convertFromModel - unexpected axis model type (must: c:catAx or c:dateAx)" );
+ bool bDateAxis = mrModel.mnTypeId == C_TOKEN( dateAx );
+ // tdf#132076: set axis type to date, if it is a date axis!
+ aScaleData.AxisType = bDateAxis ? cssc2::AxisType::DATE : cssc2::AxisType::CATEGORY;
+ aScaleData.AutoDateAxis = mrModel.mbAuto;
+ /* TODO: create main category axis labels once, while InternalDataProvider
+ can not handle different category names on the primary and secondary category axis. */
+ if( nAxesSetIdx == 0 )
+ aScaleData.Categories = rTypeGroups.front()->createCategorySequence();
+ /* set default ShiftedCategoryPosition values for some charttype,
+ because the XML can contain wrong CrossBetween value, if came from MSO */
+ if( rTypeGroups.front()->is3dChart() && (rTypeInfo.meTypeId == TYPEID_BAR || rTypeInfo.meTypeId == TYPEID_HORBAR || rTypeInfo.meTypeId == TYPEID_STOCK) )
+ aScaleData.ShiftedCategoryPosition = true;
+ else if( rTypeInfo.meTypeId == TYPEID_RADARLINE || rTypeInfo.meTypeId == TYPEID_RADARAREA )
+ aScaleData.ShiftedCategoryPosition = false;
+ else if( pCrossingAxis->mnCrossBetween != -1 ) /*because of backwards compatibility*/
+ aScaleData.ShiftedCategoryPosition = pCrossingAxis->mnCrossBetween == XML_between;
+ else if( rTypeInfo.meTypeCategory == TYPECATEGORY_BAR || rTypeInfo.meTypeId == TYPEID_LINE || rTypeInfo.meTypeId == TYPEID_STOCK )
+ aScaleData.ShiftedCategoryPosition = true;
+ }
+ else
+ {
+ OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( valAx ), "AxisConverter::convertFromModel - unexpected axis model type (must: c:valAx)" );
+ aScaleData.AxisType = cssc2::AxisType::REALNUMBER;
+ }
+ break;
+ case API_Y_AXIS:
+ OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( valAx ), "AxisConverter::convertFromModel - unexpected axis model type (must: c:valAx)" );
+ aScaleData.AxisType = isPercent(rTypeGroups) ? cssc2::AxisType::PERCENT : cssc2::AxisType::REALNUMBER;
+ break;
+ case API_Z_AXIS:
+ OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( serAx ), "AxisConverter::convertFromModel - unexpected axis model type (must: c:serAx)" );
+ OSL_ENSURE( rTypeGroups.front()->isDeep3dChart(), "AxisConverter::convertFromModel - series axis not supported by this chart type" );
+ aScaleData.AxisType = cssc2::AxisType::SERIES;
+ break;
+ }
+
+ // axis scaling and increment -----------------------------------------
+
+ switch( aScaleData.AxisType )
+ {
+ case cssc2::AxisType::CATEGORY:
+ case cssc2::AxisType::SERIES:
+ case cssc2::AxisType::DATE:
+ {
+ /* Determine date axis type from XML type identifier, and not
+ via aScaleData.AxisType, as this value sticks to CATEGORY
+ for automatic category/date axes). */
+ if( mrModel.mnTypeId == C_TOKEN( dateAx ) )
+ {
+ // scaling algorithm
+ aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
+ // min/max
+ lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
+ lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );
+ // major/minor increment
+ lclConvertTimeInterval( aScaleData.TimeIncrement.MajorTimeInterval, mrModel.mofMajorUnit, mrModel.mnMajorTimeUnit );
+ lclConvertTimeInterval( aScaleData.TimeIncrement.MinorTimeInterval, mrModel.mofMinorUnit, mrModel.mnMinorTimeUnit );
+ // base time unit
+ if( mrModel.monBaseTimeUnit.has() )
+ aScaleData.TimeIncrement.TimeResolution <<= lclGetApiTimeUnit( mrModel.monBaseTimeUnit.get() );
+ else
+ aScaleData.TimeIncrement.TimeResolution.clear();
+ }
+ else
+ {
+ // do not overlap text unless the rotation is 0 in xml
+ bool bTextOverlap = false;
+ if (mrModel.mxTextProp.is()
+ && mrModel.mxTextProp->getTextProperties().moRotation.has())
+ bTextOverlap
+ = mrModel.mxTextProp->getTextProperties().moRotation.get() == 0;
+ aAxisProp.setProperty(PROP_TextOverlap, bTextOverlap);
+ /* do not break text into several lines unless the rotation is 0 degree,
+ or the rotation is 90 degree and the inner size of the chart is not fixed,
+ or the rotation is 270 degree and the inner size of the chart is not fixed */
+ bool bTextBreak = true;
+ double fRotationAngle = 0.0;
+ if (aAxisProp.getProperty(fRotationAngle, PROP_TextRotation)
+ && fRotationAngle != 0.0)
+ bTextBreak = !bUseFixedInnerSize
+ && (fRotationAngle == 90.0 || fRotationAngle == 270.0);
+ aAxisProp.setProperty(PROP_TextBreak, bTextBreak);
+ // do not stagger labels in two lines
+ aAxisProp.setProperty( PROP_ArrangeOrder, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE );
+ //! TODO #i58731# show n-th category
+ }
+ }
+ break;
+ case cssc2::AxisType::REALNUMBER:
+ case cssc2::AxisType::PERCENT:
+ {
+ // scaling algorithm
+ const bool bLogScale = lclIsLogarithmicScale( mrModel );
+ if( bLogScale )
+ aScaleData.Scaling = LogarithmicScaling::create( comphelper::getProcessComponentContext() );
+ else
+ aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
+ // min/max
+ lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
+ lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );
+ // major increment
+ IncrementData& rIncrementData = aScaleData.IncrementData;
+ if( mrModel.mofMajorUnit.has() && aScaleData.Scaling.is() )
+ rIncrementData.Distance <<= aScaleData.Scaling->doScaling( mrModel.mofMajorUnit.get() );
+ else
+ lclSetValueOrClearAny( rIncrementData.Distance, mrModel.mofMajorUnit );
+ // minor increment
+ Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
+ rSubIncrementSeq.realloc( 1 );
+ Any& rIntervalCount = rSubIncrementSeq.getArray()[ 0 ].IntervalCount;
+ rIntervalCount.clear();
+ if( bLogScale )
+ {
+ if( mrModel.mofMinorUnit.has() )
+ rIntervalCount <<= sal_Int32( 9 );
+ }
+ else if( mrModel.mofMajorUnit.has() && mrModel.mofMinorUnit.has() && (0.0 < mrModel.mofMinorUnit.get()) && (mrModel.mofMinorUnit.get() <= mrModel.mofMajorUnit.get()) )
+ {
+ double fCount = mrModel.mofMajorUnit.get() / mrModel.mofMinorUnit.get() + 0.5;
+ if( (1.0 <= fCount) && (fCount < 1001.0) )
+ rIntervalCount <<= static_cast< sal_Int32 >( fCount );
+ }
+ else if( !mrModel.mofMinorUnit.has() )
+ {
+ // tdf#114168 If minor unit is not set then set interval to 5, as MS Excel do.
+ rIntervalCount <<= static_cast< sal_Int32 >( 5 );
+ }
+ }
+ break;
+ default:
+ OSL_FAIL( "AxisConverter::convertFromModel - unknown axis type" );
+ }
+
+ /* Do not set a value to the Origin member anymore (already done via
+ new axis properties 'CrossoverPosition' and 'CrossoverValue'). */
+ aScaleData.Origin.clear();
+
+ // axis orientation ---------------------------------------------------
+
+ // #i85167# pie/donut charts need opposite direction at Y axis
+ // #i87747# radar charts need opposite direction at X axis
+ bool bMirrorDirection =
+ ((nAxisIdx == API_Y_AXIS) && (rTypeInfo.meTypeCategory == TYPECATEGORY_PIE)) ||
+ ((nAxisIdx == API_X_AXIS) && (rTypeInfo.meTypeCategory == TYPECATEGORY_RADAR));
+ bool bReverse = (mrModel.mnOrientation == XML_maxMin) != bMirrorDirection;
+ aScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
+
+ // write back scaling data
+ xAxis->setScaleData( aScaleData );
+
+ // number format ------------------------------------------------------
+ if( !mrModel.mbDeleted && aScaleData.AxisType != cssc2::AxisType::SERIES )
+ {
+ getFormatter().convertNumberFormat(aAxisProp, mrModel.maNumberFormat, true);
+ }
+
+ // position of crossing axis ------------------------------------------
+
+ bool bManualCrossing = mrModel.mofCrossesAt.has();
+ cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE;
+ if( !bManualCrossing ) switch( mrModel.mnCrossMode )
+ {
+ case XML_min: eAxisPos = cssc::ChartAxisPosition_START; break;
+ case XML_max: eAxisPos = cssc::ChartAxisPosition_END; break;
+ case XML_autoZero: eAxisPos = cssc::ChartAxisPosition_ZERO; break;
+ }
+
+ aAxisProp.setProperty( PROP_CrossoverPosition, eAxisPos );
+
+ // calculate automatic origin depending on scaling mode of crossing axis
+ bool bCrossingLogScale = pCrossingAxis && lclIsLogarithmicScale( *pCrossingAxis );
+ double fCrossingPos = bManualCrossing ? mrModel.mofCrossesAt.get() : (bCrossingLogScale ? 1.0 : 0.0);
+ aAxisProp.setProperty( PROP_CrossoverValue, fCrossingPos );
+
+ // axis title ---------------------------------------------------------
+
+ // in radar charts, title objects may exist, but are not shown
+ if( mrModel.mxTitle.is() && (rTypeGroups.front()->getTypeInfo().meTypeCategory != TYPECATEGORY_RADAR) )
+ {
+ Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW );
+ if (((nAxisIdx == API_X_AXIS && rTypeInfo.meTypeId != TYPEID_HORBAR)
+ || (nAxisIdx == API_Y_AXIS && rTypeInfo.meTypeId == TYPEID_HORBAR))
+ && (mrModel.mnAxisPos == XML_l || mrModel.mnAxisPos == XML_r))
+ mrModel.mxTitle->mnDefaultRotation = 0;
+ TitleConverter aTitleConv( *this, *mrModel.mxTitle );
+ aTitleConv.convertFromModel( xTitled, OoxResId(STR_DIAGRAM_AXISTITLE), OBJECTTYPE_AXISTITLE, nAxesSetIdx, nAxisIdx );
+ }
+
+ // axis data unit label -----------------------------------------------
+ AxisDispUnitsConverter axisDispUnitsConverter (*this, mrModel.mxDispUnits.getOrCreate());
+ axisDispUnitsConverter.convertFromModel(xAxis);
+ }
+ catch( Exception& )
+ {
+ }
+
+ if( xAxis.is() && rxCoordSystem.is() ) try
+ {
+ // insert axis into coordinate system
+ rxCoordSystem->setAxisByDimension( nAxisIdx, xAxis, nAxesSetIdx );
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "AxisConverter::convertFromModel - cannot insert axis into coordinate system" );
+ }
+}
+
+AxisDispUnitsConverter::AxisDispUnitsConverter( const ConverterRoot& rParent, AxisDispUnitsModel& rModel ) :
+ ConverterBase< AxisDispUnitsModel >( rParent, rModel )
+{
+}
+
+AxisDispUnitsConverter::~AxisDispUnitsConverter()
+{
+}
+
+void AxisDispUnitsConverter::convertFromModel( const Reference< XAxis >& rxAxis )
+{
+ PropertySet aPropSet( rxAxis );
+ if (!mrModel.mnBuiltInUnit.isEmpty() )
+ {
+ aPropSet.setProperty(PROP_DisplayUnits, true);
+ aPropSet.setProperty( PROP_BuiltInUnit, mrModel.mnBuiltInUnit );
+ }
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/axismodel.cxx b/oox/source/drawingml/chart/axismodel.cxx
new file mode 100644
index 000000000..0159810df
--- /dev/null
+++ b/oox/source/drawingml/chart/axismodel.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/axismodel.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+AxisDispUnitsModel::AxisDispUnitsModel() :
+ mfCustomUnit( 0.0 )
+{
+}
+
+AxisDispUnitsModel::~AxisDispUnitsModel()
+{
+}
+
+AxisModel::AxisModel( sal_Int32 nTypeId, bool bMSO2007Doc ) :
+ mnAxisId( -1 ),
+ mnAxisPos( XML_TOKEN_INVALID ),
+ mnCrossAxisId( -1 ),
+ mnCrossBetween( -1 ),
+ mnCrossMode( XML_autoZero ),
+ mnLabelAlign( XML_ctr ),
+ mnLabelOffset( 100 ),
+ mnMajorTickMark( bMSO2007Doc ? XML_out : XML_cross ),
+ mnMajorTimeUnit( XML_days ),
+ mnMinorTickMark( bMSO2007Doc ? XML_none : XML_cross ),
+ mnMinorTimeUnit( XML_days ),
+ mnOrientation( XML_minMax ),
+ mnTickLabelPos( XML_nextTo ),
+ mnTickLabelSkip( 0 ),
+ mnTickMarkSkip( 0 ),
+ mnTypeId( nTypeId ),
+ mbAuto( false ),
+ mbDeleted( false ),
+ mbNoMultiLevel( false )
+{
+}
+
+AxisModel::~AxisModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartcontextbase.cxx b/oox/source/drawingml/chart/chartcontextbase.cxx
new file mode 100644
index 000000000..5423c52b3
--- /dev/null
+++ b/oox/source/drawingml/chart/chartcontextbase.cxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+#include <oox/drawingml/chart/modelbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+ShapePrWrapperContext::ShapePrWrapperContext( ContextHandler2Helper& rParent, Shape& rModel ) :
+ ContextBase< Shape >( rParent, rModel )
+{
+}
+
+ShapePrWrapperContext::~ShapePrWrapperContext()
+{
+}
+
+ContextHandlerRef ShapePrWrapperContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ return (isRootElement() && (nElement == C_TOKEN( spPr ))) ? new ShapePropertiesContext( *this, mrModel ) : nullptr;
+}
+
+LayoutContext::LayoutContext( ContextHandler2Helper& rParent, LayoutModel& rModel ) :
+ ContextBase< LayoutModel >( rParent, rModel )
+{
+}
+
+LayoutContext::~LayoutContext()
+{
+}
+
+ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( layout ):
+ switch( nElement )
+ {
+ case C_TOKEN( manualLayout ):
+ mrModel.mbAutoLayout = false;
+ return this;
+ }
+ break;
+
+ case C_TOKEN( manualLayout ):
+ switch( nElement )
+ {
+ case C_TOKEN( x ):
+ mrModel.mfX = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( y ):
+ mrModel.mfY = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( w ):
+ mrModel.mfW = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( h ):
+ mrModel.mfH = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( xMode ):
+ mrModel.mnXMode = rAttribs.getToken( XML_val, XML_factor );
+ return nullptr;
+ case C_TOKEN( yMode ):
+ mrModel.mnYMode = rAttribs.getToken( XML_val, XML_factor );
+ return nullptr;
+ case C_TOKEN( wMode ):
+ mrModel.mnWMode = rAttribs.getToken( XML_val, XML_factor );
+ return nullptr;
+ case C_TOKEN( hMode ):
+ mrModel.mnHMode = rAttribs.getToken( XML_val, XML_factor );
+ return nullptr;
+ case C_TOKEN( layoutTarget ):
+ mrModel.mnTarget = rAttribs.getToken( XML_val, XML_outer );
+ return nullptr;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx
new file mode 100644
index 000000000..e3b2abe6b
--- /dev/null
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/chart/chartconverter.hxx>
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <drawingml/chart/chartspaceconverter.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <osl/diagnose.h>
+
+using ::oox::drawingml::chart::DataSequenceModel;
+using ::com::sun::star::uno::Any;
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::XmlFilterBase;
+
+const sal_Unicode API_TOKEN_ARRAY_OPEN = '{';
+const sal_Unicode API_TOKEN_ARRAY_CLOSE = '}';
+const sal_Unicode API_TOKEN_ARRAY_COLSEP = ';';
+
+// Code similar to oox/source/xls/formulabase.cxx
+static OUString lclGenerateApiString( const OUString& rString )
+{
+ OUString aRetString = rString;
+ sal_Int32 nQuotePos = aRetString.getLength();
+ while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 )
+ aRetString = aRetString.replaceAt( nQuotePos, 1, u"\"\"" );
+ return "\"" + aRetString + "\"";
+}
+
+static OUString lclGenerateApiArray(const std::vector<Any>& rRow, sal_Int32 nStart, sal_Int32 nCount)
+{
+ OSL_ENSURE( !rRow.empty(), "ChartConverter::lclGenerateApiArray - missing matrix values" );
+ OUStringBuffer aBuffer;
+ aBuffer.append( API_TOKEN_ARRAY_OPEN );
+ for (auto aBeg = rRow.begin() + nStart, aIt = aBeg, aEnd = aBeg + nCount; aIt != aEnd; ++aIt)
+ {
+ double fValue = 0.0;
+ OUString aString;
+ if( aIt != aBeg )
+ aBuffer.append( API_TOKEN_ARRAY_COLSEP );
+ if( *aIt >>= fValue )
+ aBuffer.append( fValue );
+ else if( *aIt >>= aString )
+ aBuffer.append( lclGenerateApiString( aString ) );
+ else
+ aBuffer.append( "\"\"" );
+ }
+ aBuffer.append( API_TOKEN_ARRAY_CLOSE );
+ return aBuffer.makeStringAndClear();
+}
+
+ChartConverter::ChartConverter()
+{
+}
+
+ChartConverter::~ChartConverter()
+{
+}
+
+void ChartConverter::convertFromModel( XmlFilterBase& rFilter,
+ ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc,
+ const Reference< XShapes >& rxExternalPage, const awt::Point& rChartPos, const awt::Size& rChartSize )
+{
+ OSL_ENSURE( rxChartDoc.is(), "ChartConverter::convertFromModel - missing chart document" );
+ if( rxChartDoc.is() )
+ {
+ Reference< data::XDataReceiver > xDataReceiver( rxChartDoc, uno::UNO_QUERY_THROW );
+ Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( rFilter.getModel(), uno::UNO_QUERY );
+ if (xNumberFormatsSupplier.is())
+ xDataReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier );
+
+ ConverterRoot aConvBase( rFilter, *this, rChartModel, rxChartDoc, rChartSize );
+ ChartSpaceConverter aSpaceConv( aConvBase, rChartModel );
+ aSpaceConv.convertFromModel( rxExternalPage, rChartPos );
+ }
+}
+
+void ChartConverter::createDataProvider( const Reference< XChartDocument >& rxChartDoc )
+{
+ try
+ {
+ if( !rxChartDoc->hasInternalDataProvider() )
+ rxChartDoc->createInternalDataProvider( false );
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+Reference< XDataSequence > ChartConverter::createDataSequence(
+ const Reference< XDataProvider >& rxDataProvider, const DataSequenceModel& rDataSeq,
+ const OUString& rRole, const OUString& rRoleQualifier )
+{
+ Reference< XDataSequence > xDataSeq;
+ if( rxDataProvider.is() )
+ {
+ OUString aRangeRep;
+ if( !rDataSeq.maData.empty() || (rRole == "values-y" && rDataSeq.mnPointCount > 0) ) try
+ {
+ // create a single-row array from constant source data
+ // (multiple levels in the case of complex categories)
+ std::vector<Any> aRow(rDataSeq.mnLevelCount * rDataSeq.mnPointCount);
+ for (auto const& elem : rDataSeq.maData)
+ aRow.at(elem.first) = elem.second;
+
+ for (sal_Int32 i = rDataSeq.mnLevelCount-1; i >= 0; i--)
+ {
+ aRangeRep = lclGenerateApiArray( aRow, i * rDataSeq.mnPointCount, rDataSeq.mnPointCount);
+
+ if (!aRangeRep.isEmpty())
+ {
+ // create or add a new level to the data sequence
+ xDataSeq = rxDataProvider->createDataSequenceByValueArray(rRole, aRangeRep, rRoleQualifier);
+ if (i == 0)
+ return xDataSeq;
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "ChartConverter::createDataSequence - cannot create data sequence" );
+ }
+ }
+
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
new file mode 100644
index 000000000..b9977c933
--- /dev/null
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -0,0 +1,244 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/chartdrawingfragment.hxx>
+
+#include <osl/diagnose.h>
+
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/connectorshapecontext.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/drawingml/shapecontext.hxx>
+#include <oox/drawingml/shapegroupcontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+using namespace ::oox::core;
+
+ShapeAnchor::ShapeAnchor( bool bRelSize ) :
+ mbRelSize( bRelSize )
+{
+}
+
+void ShapeAnchor::importExt( const AttributeList& rAttribs )
+{
+ OSL_ENSURE( !mbRelSize, "ShapeAnchor::importExt - unexpected 'cdr:ext' element" );
+ maSize.Width = rAttribs.getHyper( XML_cx, 0 );
+ maSize.Height = rAttribs.getHyper( XML_cy, 0 );
+}
+
+void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, std::u16string_view rValue )
+{
+ AnchorPosModel* pAnchorPos = nullptr;
+ switch( nParentContext )
+ {
+ case CDR_TOKEN( from ):
+ pAnchorPos = &maFrom;
+ break;
+ case CDR_TOKEN( to ):
+ OSL_ENSURE( mbRelSize, "ShapeAnchor::setPos - unexpected 'cdr:to' element" );
+ pAnchorPos = &maTo;
+ break;
+ default:
+ OSL_FAIL( "ShapeAnchor::setPos - unexpected parent element" );
+ }
+ if( pAnchorPos ) switch( nElement )
+ {
+ case CDR_TOKEN( x ): pAnchorPos->mfX = o3tl::toDouble(rValue); break;
+ case CDR_TOKEN( y ): pAnchorPos->mfY = o3tl::toDouble(rValue); break;
+ default: OSL_FAIL( "ShapeAnchor::setPos - unexpected element" );
+ }
+}
+
+EmuRectangle ShapeAnchor::calcAnchorRectEmu( const EmuRectangle& rChartRect ) const
+{
+ EmuRectangle aAnchorRect( -1, -1, -1, -1 );
+
+ OSL_ENSURE( maFrom.isValid(), "ShapeAnchor::calcAnchorRectEmu - invalid from position" );
+ OSL_ENSURE( mbRelSize ? maTo.isValid() : maSize.isValid(), "ShapeAnchor::calcAnchorRectEmu - invalid to/size" );
+ if( maFrom.isValid() && (mbRelSize ? maTo.isValid() : maSize.isValid()) )
+ {
+ // calculate shape position
+ aAnchorRect.X = static_cast< sal_Int64 >( maFrom.mfX * rChartRect.Width + 0.5 );
+ aAnchorRect.Y = static_cast< sal_Int64 >( maFrom.mfY * rChartRect.Height + 0.5 );
+
+ // calculate shape size
+ if( mbRelSize )
+ {
+ aAnchorRect.Width = static_cast< sal_Int64 >( maTo.mfX * rChartRect.Width + 0.5 ) - aAnchorRect.X;
+ if( aAnchorRect.Width < 0 )
+ {
+ aAnchorRect.X += aAnchorRect.Width;
+ aAnchorRect.Width *= -1;
+ }
+ aAnchorRect.Height = static_cast< sal_Int64 >( maTo.mfY * rChartRect.Height + 0.5 ) - aAnchorRect.Y;
+ if( aAnchorRect.Height < 0 )
+ {
+ aAnchorRect.Y += aAnchorRect.Height;
+ aAnchorRect.Height *= -1;
+ }
+ }
+ else
+ {
+ aAnchorRect.setSize( maSize );
+ }
+ }
+
+ return aAnchorRect;
+}
+
+ChartDrawingFragment::ChartDrawingFragment( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath, const Reference< XShapes >& rxDrawPage,
+ const awt::Size& rChartSize, const awt::Point& rShapesOffset, bool bOleSupport ) :
+ FragmentHandler2( rFilter, rFragmentPath ),
+ mxDrawPage( rxDrawPage ),
+ mbOleSupport( bOleSupport )
+{
+ maChartRectEmu.X = convertHmmToEmu( rShapesOffset.X );
+ maChartRectEmu.Y = convertHmmToEmu( rShapesOffset.Y );
+ maChartRectEmu.Width = convertHmmToEmu( rChartSize.Width );
+ maChartRectEmu.Height = convertHmmToEmu( rChartSize.Height );
+}
+
+ChartDrawingFragment::~ChartDrawingFragment()
+{
+}
+
+ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ if( nElement == C_TOKEN( userShapes ) ) return this;
+ break;
+
+ case C_TOKEN( userShapes ):
+ switch( nElement )
+ {
+ case CDR_TOKEN( absSizeAnchor ):
+ mxAnchor = std::make_shared<ShapeAnchor>( false );
+ return this;
+ case CDR_TOKEN( relSizeAnchor ):
+ mxAnchor = std::make_shared<ShapeAnchor>( true );
+ return this;
+ }
+ break;
+
+ case CDR_TOKEN( absSizeAnchor ):
+ case CDR_TOKEN( relSizeAnchor ):
+ switch( nElement )
+ {
+ case CDR_TOKEN( sp ):
+ mxShape = std::make_shared<Shape>( "com.sun.star.drawing.CustomShape" );
+ return new ShapeContext( *this, ShapePtr(), mxShape );
+ case CDR_TOKEN( cxnSp ):
+ mxShape = std::make_shared<Shape>( "com.sun.star.drawing.ConnectorShape" );
+ return new ConnectorShapeContext(*this, ShapePtr(), mxShape,
+ mxShape->getConnectorShapeProperties());
+ case CDR_TOKEN( pic ):
+ mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" );
+ return new GraphicShapeContext( *this, ShapePtr(), mxShape );
+ case CDR_TOKEN( graphicFrame ):
+ if( !mbOleSupport )
+ return nullptr;
+ mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" );
+ return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true );
+ case CDR_TOKEN( grpSp ):
+ mxShape = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
+ return new ShapeGroupContext( *this, ShapePtr(), mxShape );
+
+ case CDR_TOKEN( from ):
+ case CDR_TOKEN( to ):
+ return this;
+
+ case CDR_TOKEN( ext ):
+ if( mxAnchor ) mxAnchor->importExt( rAttribs );
+ return nullptr;
+ }
+ break;
+
+ case CDR_TOKEN( from ):
+ case CDR_TOKEN( to ):
+ switch( nElement )
+ {
+ case CDR_TOKEN( x ):
+ case CDR_TOKEN( y ):
+ return this; // collect value in onEndElement()
+ }
+ break;
+ }
+ return nullptr;
+}
+
+void ChartDrawingFragment::onCharacters( const OUString& rChars )
+{
+ if( isCurrentElement( CDR_TOKEN( x ), CDR_TOKEN( y ) ) && mxAnchor )
+ mxAnchor->setPos( getCurrentElement(), getParentElement(), rChars );
+}
+
+void ChartDrawingFragment::onEndElement()
+{
+ if( !isCurrentElement( CDR_TOKEN( absSizeAnchor ), CDR_TOKEN( relSizeAnchor ) ) )
+ return;
+
+ if( mxDrawPage.is() && mxShape && mxAnchor )
+ {
+ EmuRectangle aShapeRectEmu = mxAnchor->calcAnchorRectEmu( maChartRectEmu );
+ if( (aShapeRectEmu.X >= 0) && (aShapeRectEmu.Y >= 0) && (aShapeRectEmu.Width >= 0) && (aShapeRectEmu.Height >= 0) )
+ {
+ const sal_Int32 aRotation = mxShape->getRotation();
+ if( (aRotation >= 45 * PER_DEGREE && aRotation < 135 * PER_DEGREE) || (aRotation >= 225 * PER_DEGREE && aRotation < 315 * PER_DEGREE) )
+ {
+ sal_Int64 nHalfWidth = aShapeRectEmu.Width / 2;
+ sal_Int64 nHalfHeight = aShapeRectEmu.Height / 2;
+ aShapeRectEmu.X = aShapeRectEmu.X + nHalfWidth - nHalfHeight;
+ aShapeRectEmu.Y = aShapeRectEmu.Y + nHalfHeight - nHalfWidth;
+ std::swap(aShapeRectEmu.Width, aShapeRectEmu.Height);
+ }
+ // TODO: DrawingML implementation expects 32-bit coordinates for EMU rectangles (change that to EmuRectangle)
+ awt::Rectangle aShapeRectEmu32(
+ getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.X, 0, SAL_MAX_INT32 ),
+ getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Y, 0, SAL_MAX_INT32 ),
+ getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Width, 0, SAL_MAX_INT32 ),
+ getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Height, 0, SAL_MAX_INT32 ) );
+
+ // Set the position and size before calling addShape().
+ mxShape->setPosition(awt::Point(aShapeRectEmu32.X, aShapeRectEmu32.Y));
+ mxShape->setSize(awt::Size(aShapeRectEmu32.Width, aShapeRectEmu32.Height));
+
+ basegfx::B2DHomMatrix aMatrix;
+ mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, aMatrix, mxShape->getFillProperties() );
+ }
+ }
+ mxShape.reset();
+ mxAnchor.reset();
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
new file mode 100644
index 000000000..774d784a6
--- /dev/null
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -0,0 +1,308 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/chartspaceconverter.hxx>
+
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XChartType.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/chart/chartdrawingfragment.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <drawingml/chart/plotareaconverter.hxx>
+#include <drawingml/chart/titleconverter.hxx>
+#include <ooxresid.hxx>
+#include <strings.hrc>
+
+using namespace ::com::sun::star;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::drawing::XDrawPageSupplier;
+using ::com::sun::star::drawing::XShapes;
+using ::com::sun::star::chart2::XDiagram;
+using ::com::sun::star::chart2::XTitled;
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+
+ChartSpaceConverter::ChartSpaceConverter( const ConverterRoot& rParent, ChartSpaceModel& rModel ) :
+ ConverterBase< ChartSpaceModel >( rParent, rModel )
+{
+}
+
+ChartSpaceConverter::~ChartSpaceConverter()
+{
+}
+
+// Formulas with no numeric values and strings are zeroes in OOXML line charts also in the mode DispBlanksAs=gap,
+// unlike in OpenDocument LEAVE_GAP mode. As a workaround, we will use the OpenDocument mode USE_ZERO, if the OOXML
+// line chart has got formulas with no numeric values and strings, but it doesn't have empty cells, showing the
+// same chart as in MSO. (Empty cells need gaps, so in that case, we cannot use this workaround).
+static bool lcl_useWorkaroundForNoGapInOOXML( Reference< chart2::XChartDocument > const & xChartDoc)
+{
+ Reference <chart2::XDiagram > xDiagram = xChartDoc->getFirstDiagram();
+ if ( !xDiagram.is() )
+ return false;
+
+ Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, UNO_QUERY_THROW );
+
+ Sequence< Reference< chart2::XCoordinateSystem > > xCooSysSequence( xCooSysContainer->getCoordinateSystems());
+ if ( !xCooSysSequence.hasElements() )
+ return false;
+
+ Reference< chart2::XChartTypeContainer > xChartTypeContainer( xCooSysSequence[0], UNO_QUERY_THROW );
+
+ Sequence< Reference< chart2::XChartType > > xChartTypeSequence( xChartTypeContainer->getChartTypes() );
+ if ( !xChartTypeSequence.hasElements() )
+ return false;
+
+ const Reference<chart2::XChartType>& xCT = xChartTypeSequence[0];
+
+ if ( xCT->getChartType() != "com.sun.star.chart2.LineChartType" )
+ return false;
+
+ Reference<chart2::XDataSeriesContainer> xDSCont(xCT, uno::UNO_QUERY);
+
+ if (!xDSCont.is())
+ return false;
+
+ const Sequence<uno::Reference<chart2::XDataSeries> > aDataSeriesSeq = xDSCont->getDataSeries();
+
+ bool bHasNoGapBlankValue = false;
+ bool bHasEmptyCell = false;
+
+ for (const auto& rDataSeries : aDataSeriesSeq)
+ {
+ uno::Reference<chart2::data::XDataSource> xDSrc(rDataSeries, uno::UNO_QUERY);
+ if (!xDSrc.is())
+ return false;
+
+ const uno::Sequence<Reference<chart2::data::XLabeledDataSequence> > aDataSeqs = xDSrc->getDataSequences();
+ for (const auto& rDataSeq : aDataSeqs)
+ {
+ Reference<chart2::data::XDataSequence> xValues = rDataSeq->getValues();
+ if(!xValues.is())
+ return false;
+ Reference<beans::XPropertySet> xPropSet(xValues, uno::UNO_QUERY);
+ if (!xPropSet.is())
+ continue;
+
+ OUString aRoleName;
+ xPropSet->getPropertyValue("Role") >>= aRoleName;
+ if (aRoleName == "values-y")
+ {
+ const uno::Sequence<uno::Any> aData = xValues->getData();
+ for (const auto& rVal : aData)
+ {
+ double fVal;
+ OUString sStr;
+ if (rVal >>= fVal)
+ continue;
+ else if (rVal >>= sStr)
+ bHasNoGapBlankValue = true;
+ else
+ bHasEmptyCell = true;
+ }
+ }
+ }
+ }
+
+ return bHasNoGapBlankValue && !bHasEmptyCell;
+}
+
+void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExternalPage, const awt::Point& rChartPos )
+{
+ /* create data provider (virtual function in the ChartConverter class,
+ derived converters may create an external data provider) */
+ getChartConverter().createDataProvider( getChartDocument() );
+
+ // formatting of the chart background. The default fill style varies with applications.
+ PropertySet aBackPropSet( getChartDocument()->getPageBackground() );
+ getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
+
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ // convert plot area (container of all chart type groups)
+ PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() );
+ aPlotAreaConv.convertFromModel( mrModel.mxView3D.getOrCreate(bMSO2007Doc) );
+
+ // plot area converter has created the diagram object
+ Reference< XDiagram > xDiagram = getChartDocument()->getFirstDiagram();
+
+ // convert wall and floor formatting in 3D charts
+ if( xDiagram.is() && aPlotAreaConv.isWall3dChart() )
+ {
+ WallFloorConverter aFloorConv( *this, mrModel.mxFloor.getOrCreate() );
+ aFloorConv.convertFromModel( xDiagram, OBJECTTYPE_FLOOR );
+
+ WallFloorConverter aWallConv( *this, mrModel.mxBackWall.getOrCreate() );
+ aWallConv.convertFromModel( xDiagram, OBJECTTYPE_WALL );
+ }
+
+ // chart title
+ /* tdf#119138 autoTitleDeleted might be omitted by generators other than Excel
+ while providing custom title. mbAutoTitleDel is set only based on the attribute value
+ and the default also varies on whether MSO 2007 or newer is the generator, see tdf#78080 */
+ if( !mrModel.mbAutoTitleDel || mrModel.mxTitle.is() ) try
+ {
+ /* If the title model is missing, but the chart shows exactly one
+ series, the series title is shown as chart title. */
+ OUString aAutoTitle = aPlotAreaConv.getAutomaticTitle();
+ if( mrModel.mxTitle.is() || !aAutoTitle.isEmpty() )
+ {
+ if( aAutoTitle.isEmpty() )
+ aAutoTitle = OoxResId(STR_DIAGRAM_TITLE);
+ Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY_THROW );
+ TitleConverter aTitleConv( *this, mrModel.mxTitle.getOrCreate() );
+ aTitleConv.convertFromModel( xTitled, aAutoTitle, OBJECTTYPE_CHARTTITLE );
+ }
+ }
+ catch( Exception& )
+ {
+ }
+
+ // legend
+ if( xDiagram.is() && mrModel.mxLegend.is() )
+ {
+ LegendConverter aLegendConv( *this, *mrModel.mxLegend );
+ aLegendConv.convertFromModel( xDiagram );
+ }
+
+ // treatment of missing values
+ if( xDiagram.is() )
+ {
+ using namespace ::com::sun::star::chart::MissingValueTreatment;
+ sal_Int32 nMissingValues = LEAVE_GAP;
+
+ // tdf#134118 leave gap if the time unit is month
+ bool bIsMonthBasedTimeUnit = false;
+ if( mrModel.mxPlotArea.is() && mrModel.mxPlotArea->maAxes.size() > 0 &&
+ mrModel.mxPlotArea->maAxes[0]->monBaseTimeUnit.has() )
+ {
+ bIsMonthBasedTimeUnit = mrModel.mxPlotArea->maAxes[0]->monBaseTimeUnit.get() == XML_months;
+ }
+
+ if (!bIsMonthBasedTimeUnit) switch( mrModel.mnDispBlanksAs )
+ {
+ case XML_gap: nMissingValues = LEAVE_GAP; break;
+ case XML_zero: nMissingValues = USE_ZERO; break;
+ case XML_span: nMissingValues = CONTINUE; break;
+ }
+
+ // use a workaround, if it's possible for the difference of OOXML and OpenDocument
+ if ( nMissingValues == LEAVE_GAP && lcl_useWorkaroundForNoGapInOOXML(getChartDocument()) )
+ nMissingValues = USE_ZERO;
+
+ PropertySet aDiaProp( xDiagram );
+ aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues );
+ }
+
+ /* Following all conversions needing the old Chart1 API that involves full
+ initialization of the chart view. */
+ namespace cssc = ::com::sun::star::chart;
+ Reference< cssc::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY );
+ if( xChart1Doc.is() )
+ {
+ /* Set the IncludeHiddenCells property via the old API as only this
+ ensures that the data provider and all created sequences get this
+ flag correctly. */
+ PropertySet aDiaProp( xChart1Doc->getDiagram() );
+ aDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly );
+
+ // plot area position and size
+ aPlotAreaConv.convertPositionFromModel();
+
+ // positions of main title and all axis titles
+ convertTitlePositions();
+ }
+
+ // embedded drawing shapes
+ if( !mrModel.maDrawingPath.isEmpty() ) try
+ {
+ /* Get the internal draw page of the chart document, if no external
+ drawing page has been passed. */
+ Reference< XShapes > xShapes;
+ awt::Point aShapesOffset( 0, 0 );
+ if( rxExternalPage.is() )
+ {
+ xShapes = rxExternalPage;
+ // offset for embedded shapes to move them inside the chart area
+ aShapesOffset = rChartPos;
+ }
+ else
+ {
+ Reference< XDrawPageSupplier > xDrawPageSupp( getChartDocument(), UNO_QUERY_THROW );
+ xShapes.set( xDrawPageSupp->getDrawPage(), UNO_QUERY_THROW );
+ }
+
+ /* If an external drawing page is passed, all embedded shapes will be
+ inserted there (used e.g. with 'chart sheets' in spreadsheet
+ documents). In this case, all types of shapes including OLE objects
+ are supported. If the shapes are inserted into the internal chart
+ drawing page instead, it is not possible to embed OLE objects. */
+ bool bOleSupport = rxExternalPage.is();
+
+ awt::Size aChartSize = getChartSize();
+ if( aChartSize.Width <= 0 || aChartSize.Height <= 0 )
+ aChartSize = getDefaultPageSize();
+
+ // now, xShapes is not null anymore
+ getFilter().importFragment( new ChartDrawingFragment(
+ getFilter(), mrModel.maDrawingPath, xShapes, aChartSize, aShapesOffset, bOleSupport ) );
+ }
+ catch( Exception& )
+ {
+ }
+
+ // pivot chart
+ if ( mrModel.mbPivotChart )
+ {
+ PropertySet aProps( getChartDocument() );
+ aProps.setProperty( PROP_DisableDataTableDialog , true );
+ aProps.setProperty( PROP_DisableComplexChartTypes , true );
+ }
+
+ if(!mrModel.maSheetPath.isEmpty() )
+ {
+ Reference< css::chart::XChartDocument > xChartDoc( getChartDocument(), UNO_QUERY );
+ PropertySet aProps( xChartDoc->getDiagram() );
+ aProps.setProperty( PROP_ExternalData , uno::Any(mrModel.maSheetPath) );
+ }
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx
new file mode 100644
index 000000000..aa045d4a5
--- /dev/null
+++ b/oox/source/drawingml/chart/chartspacefragment.cxx
@@ -0,0 +1,124 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/chartspacefragment.hxx>
+
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <drawingml/chart/plotareacontext.hxx>
+#include <drawingml/chart/titlecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::oox::core;
+
+ChartSpaceFragment::ChartSpaceFragment( XmlFilterBase& rFilter, const OUString& rFragmentPath, ChartSpaceModel& rModel ) :
+ FragmentBase< ChartSpaceModel >( rFilter, rFragmentPath, rModel )
+{
+}
+
+ChartSpaceFragment::~ChartSpaceFragment()
+{
+}
+
+ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Document = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ switch( nElement )
+ {
+ case C_TOKEN( chartSpace ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( chartSpace ):
+ switch( nElement )
+ {
+ case C_TOKEN( chart ):
+ return this;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( style ):
+ mrModel.mnStyle = rAttribs.getInteger( XML_val, 2 );
+ return nullptr;
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ case C_TOKEN( userShapes ):
+ mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ return nullptr;
+ case C_TOKEN( pivotSource ):
+ mrModel.mbPivotChart = true;
+ return nullptr;
+ case C_TOKEN (externalData):
+ mrModel.maSheetPath = getFragmentPathFromRelId(rAttribs.getString(R_TOKEN(id),OUString()));
+ return nullptr;
+ }
+ break;
+
+ case C_TOKEN( chart ):
+ switch( nElement )
+ {
+ case C_TOKEN( autoTitleDeleted ):
+ {
+
+ mrModel.mbAutoTitleDel = rAttribs.getBool( XML_val, !bMSO2007Document );
+ return nullptr;
+ }
+ case C_TOKEN( backWall ):
+ return new WallFloorContext( *this, mrModel.mxBackWall.create() );
+ case C_TOKEN( dispBlanksAs ):
+ {
+ // default value is XML_gap for MSO 2007 and XML_zero in OOXML
+ mrModel.mnDispBlanksAs = rAttribs.getToken( XML_val, bMSO2007Document ? XML_gap : XML_zero );
+ return nullptr;
+ }
+ case C_TOKEN( floor ):
+ return new WallFloorContext( *this, mrModel.mxFloor.create() );
+ case C_TOKEN( legend ):
+ return new LegendContext( *this, mrModel.mxLegend.create() );
+ case C_TOKEN( plotArea ):
+ return new PlotAreaContext( *this, mrModel.mxPlotArea.create() );
+ case C_TOKEN( plotVisOnly ):
+ mrModel.mbPlotVisOnly = rAttribs.getBool( XML_val, !bMSO2007Document );
+ return nullptr;
+ case C_TOKEN( showDLblsOverMax ):
+ mrModel.mbShowLabelsOverMax = rAttribs.getBool( XML_val, !bMSO2007Document );
+ return nullptr;
+ case C_TOKEN( sideWall ):
+ return new WallFloorContext( *this, mrModel.mxSideWall.create() );
+ case C_TOKEN( title ):
+ return new TitleContext( *this, mrModel.mxTitle.create() );
+ case C_TOKEN( view3D ):
+ return new View3DContext( *this, mrModel.mxView3D.create(bMSO2007Document) );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartspacemodel.cxx b/oox/source/drawingml/chart/chartspacemodel.cxx
new file mode 100644
index 000000000..3aa7366ff
--- /dev/null
+++ b/oox/source/drawingml/chart/chartspacemodel.cxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+ChartSpaceModel::ChartSpaceModel(bool bMSO2007Doc) :
+ mnDispBlanksAs( bMSO2007Doc ? XML_gap : XML_zero ), // difference between OOXML spec and MSO 2007
+ mnStyle( 2 ),
+ mbAutoTitleDel( !bMSO2007Doc ), // difference between OOXML spec and MSO 2007
+ mbPlotVisOnly( !bMSO2007Doc ),
+ mbShowLabelsOverMax( !bMSO2007Doc ),
+ mbPivotChart( false )
+{
+}
+
+ChartSpaceModel::~ChartSpaceModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
new file mode 100644
index 000000000..d7130ec97
--- /dev/null
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -0,0 +1,446 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/converterbase.hxx>
+
+#include <com/sun/star/chart/XAxisXSupplier.hpp>
+#include <com/sun/star/chart/XAxisYSupplier.hpp>
+#include <com/sun/star/chart/XAxisZSupplier.hpp>
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+
+namespace oox::drawingml::chart {
+
+namespace cssc = ::com::sun::star::chart;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::XmlFilterBase;
+
+namespace {
+
+struct TitleKey : public ::std::pair< ObjectType, ::std::pair< sal_Int32, sal_Int32 > >
+{
+ explicit TitleKey( ObjectType eObjType, sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 )
+ { first = eObjType; second.first = nMainIdx; second.second = nSubIdx; }
+};
+
+/** A helper structure to store all data related to title objects. Needed for
+ the conversion of manual title positions that needs the old Chart1 API.
+ */
+struct TitleLayoutInfo
+{
+ typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& );
+
+ Reference< XTitle > mxTitle; /// The API title object.
+ ModelRef< LayoutModel > mxLayout; /// The layout model, if existing.
+ GetShapeFunc mpGetShape; /// Helper function to receive the title shape.
+
+ explicit TitleLayoutInfo() : mpGetShape( nullptr ) {}
+
+ void convertTitlePos(
+ ConverterRoot const & rRoot,
+ const Reference< cssc::XChartDocument >& rxChart1Doc );
+};
+
+void TitleLayoutInfo::convertTitlePos( ConverterRoot const & rRoot, const Reference< cssc::XChartDocument >& rxChart1Doc )
+{
+ if( !(mxTitle.is() && mpGetShape) )
+ return;
+
+ try
+ {
+ // try to get the title shape
+ Reference< XShape > xTitleShape = mpGetShape( rxChart1Doc );
+ if (!xTitleShape)
+ {
+ SAL_WARN("oox", "failed to get a TitleShape");
+ return;
+ }
+ // get title rotation angle, needed for correction of position of top-left edge
+ double fAngle = 0.0;
+ PropertySet aTitleProp( mxTitle );
+ aTitleProp.getProperty( fAngle, PROP_TextRotation );
+ // convert the position
+ LayoutModel& rLayout = mxLayout.getOrCreate();
+ LayoutConverter aLayoutConv( rRoot, rLayout );
+ aLayoutConv.convertFromModel( xTitleShape, fAngle );
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+/* The following local functions implement getting the XShape interface of all
+ supported title objects (chart and axes). This needs some effort due to the
+ design of the old Chart1 API used to access these objects. */
+
+/** A code fragment that returns a shape object from the passed shape supplier
+ using the specified interface function. Checks a boolean property first. */
+#define OOX_FRAGMENT_GETTITLESHAPE( shape_supplier, supplier_func, property_name ) \
+ PropertySet aPropSet( shape_supplier ); \
+ if( shape_supplier.is() && aPropSet.getBoolProperty( PROP_##property_name ) ) \
+ return shape_supplier->supplier_func(); \
+ return Reference< XShape >(); \
+
+/** Implements a function returning the drawing shape of an axis title, if
+ existing, using the specified API interface and its function. */
+#define OOX_DEFINEFUNC_GETAXISTITLESHAPE( func_name, interface_type, supplier_func, property_name ) \
+Reference< XShape > func_name( const Reference< cssc::XChartDocument >& rxChart1Doc ) \
+{ \
+ Reference< cssc::interface_type > xAxisSupp( rxChart1Doc->getDiagram(), UNO_QUERY ); \
+ OOX_FRAGMENT_GETTITLESHAPE( xAxisSupp, supplier_func, property_name ) \
+}
+
+/** Returns the drawing shape of the main title, if existing. */
+Reference< XShape > lclGetMainTitleShape( const Reference< cssc::XChartDocument >& rxChart1Doc )
+{
+ OOX_FRAGMENT_GETTITLESHAPE( rxChart1Doc, getTitle, HasMainTitle )
+}
+
+OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetXAxisTitleShape, XAxisXSupplier, getXAxisTitle, HasXAxisTitle )
+OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetYAxisTitleShape, XAxisYSupplier, getYAxisTitle, HasYAxisTitle )
+OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetZAxisTitleShape, XAxisZSupplier, getZAxisTitle, HasZAxisTitle )
+OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecXAxisTitleShape, XSecondAxisTitleSupplier, getSecondXAxisTitle, HasSecondaryXAxisTitle )
+OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, getSecondYAxisTitle, HasSecondaryYAxisTitle )
+
+#undef OOX_DEFINEFUNC_GETAXISTITLESHAPE
+#undef OOX_IMPLEMENT_GETTITLESHAPE
+
+} // namespace
+
+struct ConverterData
+{
+ ObjectFormatter maFormatter;
+ std::map< TitleKey, TitleLayoutInfo >
+ maTitles;
+ XmlFilterBase& mrFilter;
+ ChartConverter& mrConverter;
+ Reference< XChartDocument > mxDoc;
+ awt::Size maSize;
+
+ explicit ConverterData(
+ XmlFilterBase& rFilter,
+ ChartConverter& rChartConverter,
+ const ChartSpaceModel& rChartModel,
+ const Reference< XChartDocument >& rxChartDoc,
+ const awt::Size& rChartSize );
+ ~ConverterData();
+};
+
+ConverterData::ConverterData(
+ XmlFilterBase& rFilter,
+ ChartConverter& rChartConverter,
+ const ChartSpaceModel& rChartModel,
+ const Reference< XChartDocument >& rxChartDoc,
+ const awt::Size& rChartSize ) :
+ maFormatter( rFilter, rxChartDoc, rChartModel ),
+ mrFilter( rFilter ),
+ mrConverter( rChartConverter ),
+ mxDoc( rxChartDoc ),
+ maSize( rChartSize )
+{
+ OSL_ENSURE( mxDoc.is(), "ConverterData::ConverterData - missing chart document" );
+ // lock the model to suppress internal updates during conversion
+ try
+ {
+ mxDoc->lockControllers();
+ }
+ catch( Exception& )
+ {
+ }
+
+ // prepare conversion of title positions
+ maTitles[ TitleKey( OBJECTTYPE_CHARTTITLE ) ].mpGetShape = lclGetMainTitleShape;
+ maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetXAxisTitleShape;
+ maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetYAxisTitleShape;
+ maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_Z_AXIS ) ].mpGetShape = lclGetZAxisTitleShape;
+ maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_SECN_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetSecXAxisTitleShape;
+ maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_SECN_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetSecYAxisTitleShape;
+}
+
+ConverterData::~ConverterData()
+{
+ // unlock the model
+ try
+ {
+ mxDoc->unlockControllers();
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+ConverterRoot::ConverterRoot(
+ XmlFilterBase& rFilter,
+ ChartConverter& rChartConverter,
+ const ChartSpaceModel& rChartModel,
+ const Reference< XChartDocument >& rxChartDoc,
+ const awt::Size& rChartSize ) :
+ mxData( std::make_shared<ConverterData>( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) )
+{
+}
+
+ConverterRoot::~ConverterRoot()
+{
+}
+
+Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceName ) const
+{
+ Reference< XInterface > xInt;
+ try
+ {
+ Reference<XMultiServiceFactory> xMSF(getComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+
+ xInt = xMSF->createInstance( rServiceName );
+ }
+ catch( Exception& )
+ {
+ }
+ OSL_ENSURE( xInt.is(), "ConverterRoot::createInstance - cannot create instance" );
+ return xInt;
+}
+
+Reference< XComponentContext > const & ConverterRoot::getComponentContext() const
+{
+ return mxData->mrFilter.getComponentContext();
+}
+
+XmlFilterBase& ConverterRoot::getFilter() const
+{
+ return mxData->mrFilter;
+}
+
+ChartConverter& ConverterRoot::getChartConverter() const
+{
+ return mxData->mrConverter;
+}
+
+Reference< XChartDocument > const & ConverterRoot::getChartDocument() const
+{
+ return mxData->mxDoc;
+}
+
+const awt::Size& ConverterRoot::getChartSize() const
+{
+ return mxData->maSize;
+}
+
+ObjectFormatter& ConverterRoot::getFormatter() const
+{
+ return mxData->maFormatter;
+}
+
+void ConverterRoot::registerTitleLayout( const Reference< XTitle >& rxTitle,
+ const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx )
+{
+ OSL_ENSURE( rxTitle.is(), "ConverterRoot::registerTitleLayout - missing title object" );
+ TitleLayoutInfo& rTitleInfo = mxData->maTitles[ TitleKey( eObjType, nMainIdx, nSubIdx ) ];
+ OSL_ENSURE( rTitleInfo.mpGetShape, "ConverterRoot::registerTitleLayout - invalid title key" );
+ rTitleInfo.mxTitle = rxTitle;
+ rTitleInfo.mxLayout = rxLayout;
+}
+
+void ConverterRoot::convertTitlePositions()
+{
+ try
+ {
+ Reference< cssc::XChartDocument > xChart1Doc( mxData->mxDoc, UNO_QUERY_THROW );
+ for (auto & title : mxData->maTitles)
+ title.second.convertTitlePos( *this, xChart1Doc );
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+namespace {
+
+/** Returns a position value in the chart area in 1/100 mm. */
+sal_Int32 lclCalcPosition( sal_Int32 nChartSize, double fPos, sal_Int32 nPosMode )
+{
+ switch( nPosMode )
+ {
+ case XML_edge: // absolute start position as factor of chart size
+ return getLimitedValue< sal_Int32, double >( nChartSize * fPos + 0.5, 0, nChartSize );
+ case XML_factor: // position relative to object default position
+ OSL_FAIL( "lclCalcPosition - relative positioning not supported" );
+ return -1;
+ };
+
+ OSL_FAIL( "lclCalcPosition - unknown positioning mode" );
+ return -1;
+}
+
+/** Returns a size value in the chart area in 1/100 mm. */
+sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_Int32 nSizeMode )
+{
+ sal_Int32 nValue = getLimitedValue< sal_Int32, double >( nChartSize * fSize + 0.5, 0, nChartSize );
+ switch( nSizeMode )
+ {
+ case XML_factor: // passed value is width/height
+ return nValue;
+ case XML_edge: // passed value is right/bottom position
+ return nValue - nPos + 1;
+ };
+
+ OSL_FAIL( "lclCalcSize - unknown size mode" );
+ return -1;
+}
+
+/** Returns a relative size value in the chart area. */
+double lclCalcRelSize( double fPos, double fSize, sal_Int32 nSizeMode )
+{
+ switch( nSizeMode )
+ {
+ case XML_factor: // passed value is width/height
+ break;
+ case XML_edge: // passed value is right/bottom position
+ fSize -= fPos;
+ break;
+ default:
+ OSL_ENSURE( false, "lclCalcRelSize - unknown size mode" );
+ fSize = 0.0;
+ };
+ return getLimitedValue< double, double >( fSize, 0.0, 1.0 - fPos );
+}
+
+} // namespace
+
+LayoutConverter::LayoutConverter( const ConverterRoot& rParent, LayoutModel& rModel ) :
+ ConverterBase< LayoutModel >( rParent, rModel )
+{
+}
+
+LayoutConverter::~LayoutConverter()
+{
+}
+
+bool LayoutConverter::calcAbsRectangle( awt::Rectangle& orRect ) const
+{
+ if( !mrModel.mbAutoLayout )
+ {
+ awt::Size aChartSize = getChartSize();
+ if( aChartSize.Width <= 0 || aChartSize.Height <= 0 )
+ {
+ aChartSize = getDefaultPageSize();
+ }
+ orRect.X = lclCalcPosition( aChartSize.Width, mrModel.mfX, mrModel.mnXMode );
+ orRect.Y = lclCalcPosition( aChartSize.Height, mrModel.mfY, mrModel.mnYMode );
+ if( (orRect.X >= 0) && (orRect.Y >= 0) )
+ {
+ orRect.Width = lclCalcSize( orRect.X, aChartSize.Width, mrModel.mfW, mrModel.mnWMode );
+ orRect.Height = lclCalcSize( orRect.Y, aChartSize.Height, mrModel.mfH, mrModel.mnHMode );
+ return (orRect.Width > 0) && (orRect.Height > 0);
+ }
+ }
+ return false;
+}
+
+bool LayoutConverter::convertFromModel( PropertySet& rPropSet )
+{
+ if( !mrModel.mbAutoLayout &&
+ (mrModel.mnXMode == XML_edge) && (mrModel.mfX >= 0.0) &&
+ (mrModel.mnYMode == XML_edge) && (mrModel.mfY >= 0.0) )
+ {
+ RelativePosition aPos(
+ getLimitedValue< double, double >( mrModel.mfX, 0.0, 1.0 ),
+ getLimitedValue< double, double >( mrModel.mfY, 0.0, 1.0 ),
+ Alignment_TOP_LEFT );
+ rPropSet.setProperty( PROP_RelativePosition, aPos );
+
+ RelativeSize aSize(
+ lclCalcRelSize( aPos.Primary, mrModel.mfW, mrModel.mnWMode ),
+ lclCalcRelSize( aPos.Secondary, mrModel.mfH, mrModel.mnHMode ) );
+ if( (aSize.Primary > 0.0) && (aSize.Secondary > 0.0) )
+ {
+ rPropSet.setProperty( PROP_RelativeSize, aSize );
+ return true;
+ }
+ }
+ return false;
+}
+
+void LayoutConverter::convertFromModel( const Reference< XShape >& rxShape, double fRotationAngle )
+{
+ if( mrModel.mbAutoLayout )
+ return;
+
+ awt::Size aChartSize = getChartSize();
+ if( aChartSize.Width <= 0 || aChartSize.Height <= 0 )
+ {
+ aChartSize = getDefaultPageSize();
+ }
+ awt::Point aShapePos(
+ lclCalcPosition( aChartSize.Width, mrModel.mfX, mrModel.mnXMode ),
+ lclCalcPosition( aChartSize.Height, mrModel.mfY, mrModel.mnYMode ) );
+ if( (aShapePos.X < 0) || (aShapePos.Y < 0) )
+ return;
+
+ bool bPropSet = false;
+ // the call to XShape.getSize() may recalc the chart view
+ awt::Size aShapeSize = rxShape->getSize();
+ // rotated shapes need special handling...
+ if( aShapeSize.Height > 0 || aShapeSize.Width > 0 )
+ {
+ double fSin = fabs(sin(basegfx::deg2rad(fRotationAngle)));
+ // add part of height to X direction, if title is rotated down
+ if( fRotationAngle > 180.0 )
+ aShapePos.X += static_cast<sal_Int32>(fSin * aShapeSize.Height + 0.5);
+ // add part of width to Y direction, if title is rotated up
+ else if( fRotationAngle > 0.0 )
+ aShapePos.Y += static_cast<sal_Int32>(fSin * aShapeSize.Width + 0.5);
+ }
+ else if( fRotationAngle == 90.0 || fRotationAngle == 270.0 )
+ {
+ PropertySet aShapeProp( rxShape );
+ RelativePosition aPos(
+ getLimitedValue< double, double >(mrModel.mfX, 0.0, 1.0),
+ getLimitedValue< double, double >(mrModel.mfY, 0.0, 1.0),
+ fRotationAngle == 90.0 ? Alignment_TOP_RIGHT : Alignment_BOTTOM_LEFT );
+ // set the resulting position at the shape
+ if( aShapeProp.setProperty(PROP_RelativePosition, aPos) )
+ bPropSet = true;
+ }
+ // set the resulting position at the shape
+ if( !bPropSet )
+ rxShape->setPosition( aShapePos );
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx
new file mode 100644
index 000000000..f4660f5db
--- /dev/null
+++ b/oox/source/drawingml/chart/datasourcecontext.cxx
@@ -0,0 +1,335 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/datasourcecontext.hxx>
+
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <svl/numformat.hxx>
+#include <svl/zforlist.hxx>
+#include <osl/diagnose.h>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+using namespace ::com::sun::star;
+
+DoubleSequenceContext::DoubleSequenceContext( ContextHandler2Helper& rParent, DataSequenceModel& rModel ) :
+ DataSequenceContextBase( rParent, rModel ),
+ mnPtIndex( -1 )
+{
+}
+
+DoubleSequenceContext::~DoubleSequenceContext()
+{
+}
+
+ContextHandlerRef DoubleSequenceContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( numRef ):
+ switch( nElement )
+ {
+ case C_TOKEN( f ):
+ case C_TOKEN( numCache ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( numCache ):
+ case C_TOKEN( numLit ):
+ switch( nElement )
+ {
+ case C_TOKEN( formatCode ):
+ return this;
+ case C_TOKEN( ptCount ):
+ mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( pt ):
+ mnPtIndex = rAttribs.getInteger( XML_idx, -1 );
+ return this;
+ }
+ break;
+
+ case C_TOKEN( pt ):
+ switch( nElement )
+ {
+ case C_TOKEN( v ):
+ return this;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+void DoubleSequenceContext::onCharacters( const OUString& rChars )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( f ):
+ mrModel.maFormula = rChars;
+ break;
+ case C_TOKEN( formatCode ):
+ mrModel.maFormatCode = rChars;
+ break;
+ case C_TOKEN( v ):
+ if( mnPtIndex >= 0 )
+ {
+ /* Import categories as String even though it could
+ * be values except when the format code indicates that they are dates.
+ * n#810508: xVal needs to be imported as double
+ * TODO: NumberFormat conversion, remove the check then.
+ */
+ if( isParentElement( C_TOKEN( cat ), 4 ) )
+ {
+ // workaround for bug n#889755
+ SvNumberFormatter* pNumFrmt = getNumberFormatter();
+ if( pNumFrmt )
+ {
+ sal_uInt32 nKey = pNumFrmt->GetEntryKey( mrModel.maFormatCode );
+ bool bNoKey = ( nKey == NUMBERFORMAT_ENTRY_NOT_FOUND );
+ if( bNoKey )
+ {
+ OUString aFormatCode = mrModel.maFormatCode;
+ sal_Int32 nCheckPos = 0;
+ SvNumFormatType nType;
+ pNumFrmt->PutEntry( aFormatCode, nCheckPos, nType, nKey );
+ bNoKey = (nCheckPos != 0);
+ if (!bNoKey)
+ mrModel.meFormatType = nType;
+ }
+ if( bNoKey )
+ {
+ mrModel.maData[ mnPtIndex ] <<= rChars;
+ }
+ else
+ {
+ double fValue = rChars.toDouble();
+ if (mrModel.meFormatType == SvNumFormatType::DATE)
+ mrModel.maData[ mnPtIndex ] <<= fValue;
+ else
+ {
+ const ::Color* pColor = nullptr;
+ OUString aFormattedValue;
+ // tdf#91250: use UNLIMITED_PRECISION in case of GENERAL Number Format of category axis labels
+ if( pNumFrmt->GetStandardPrec() != SvNumberFormatter::UNLIMITED_PRECISION )
+ pNumFrmt->ChangeStandardPrec(SvNumberFormatter::UNLIMITED_PRECISION);
+ pNumFrmt->GetOutputString( fValue, nKey, aFormattedValue, &pColor );
+ mrModel.maData[ mnPtIndex ] <<= aFormattedValue;
+ }
+ }
+ }
+ else
+ {
+ mrModel.maData[ mnPtIndex ] <<= rChars;
+ }
+ }
+ else
+ {
+ mrModel.maData[ mnPtIndex ] <<= rChars.toDouble();
+ }
+ }
+ break;
+ }
+}
+
+
+SvNumberFormatter* DoubleSequenceContext::getNumberFormatter()
+{
+ if( mpNumberFormatter == nullptr )
+ {
+ uno::Reference<uno::XComponentContext> rContext =
+ getFilter().getComponentContext();
+ mpNumberFormatter.reset(
+ new SvNumberFormatter(rContext, LANGUAGE_SYSTEM) );
+ }
+ return mpNumberFormatter.get();
+}
+
+
+StringSequenceContext::StringSequenceContext( ContextHandler2Helper& rParent, DataSequenceModel& rModel )
+ : DataSequenceContextBase( rParent, rModel )
+ , mnPtIndex(-1)
+ , mbReadC15(false)
+{
+}
+
+StringSequenceContext::~StringSequenceContext()
+{
+}
+
+ContextHandlerRef StringSequenceContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( multiLvlStrRef ):
+ switch( nElement )
+ {
+ case C_TOKEN( f ):
+ case C_TOKEN( multiLvlStrCache ):
+ return this;
+ }
+ break;
+
+ case C15_TOKEN( datalabelsRange ):
+ mbReadC15 = true;
+ switch( nElement )
+ {
+ case C15_TOKEN( f ):
+ case C15_TOKEN( dlblRangeCache ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( strRef ):
+ switch( nElement )
+ {
+ case C_TOKEN( f ):
+ case C_TOKEN( strCache ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( strCache ):
+ case C_TOKEN( strLit ):
+ case C15_TOKEN( dlblRangeCache ):
+ if (nElement == C15_TOKEN( dlblRangeCache ) && !mbReadC15)
+ break;
+
+ switch( nElement )
+ {
+ case C_TOKEN( ptCount ):
+ mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( pt ):
+ mnPtIndex = rAttribs.getInteger( XML_idx, -1 );
+ return this;
+ }
+ break;
+
+ case C_TOKEN( multiLvlStrCache ):
+ switch (nElement)
+ {
+ case C_TOKEN( ptCount ):
+ mrModel.mnPointCount = rAttribs.getInteger(XML_val, -1);
+ mrModel.mnLevelCount--; // normalize level count
+ return nullptr;
+ case C_TOKEN( lvl ):
+ mrModel.mnLevelCount++;
+ return this;
+ }
+ break;
+
+ case C_TOKEN( lvl ):
+ switch (nElement)
+ {
+ case C_TOKEN(pt):
+ mnPtIndex = rAttribs.getInteger(XML_idx, -1);
+ return this;
+ }
+ break;
+
+ case C_TOKEN( pt ):
+ switch( nElement )
+ {
+ case C_TOKEN( v ):
+ return this;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+void StringSequenceContext::onCharacters( const OUString& rChars )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( f ):
+ mrModel.maFormula = rChars;
+ break;
+ case C15_TOKEN( f ):
+ if (mbReadC15)
+ mrModel.maFormula = rChars;
+ break;
+ case C_TOKEN( v ):
+ if( mnPtIndex >= 0 )
+ mrModel.maData[ (mrModel.mnLevelCount-1) * mrModel.mnPointCount + mnPtIndex ] <<= rChars;
+ break;
+ }
+}
+
+DataSourceContext::DataSourceContext( ContextHandler2Helper& rParent, DataSourceModel& rModel ) :
+ ContextBase< DataSourceModel >( rParent, rModel )
+{
+}
+
+DataSourceContext::~DataSourceContext()
+{
+}
+
+ContextHandlerRef DataSourceContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( cat ):
+ case C_TOKEN( xVal ):
+ case C_TOKEN( ext ):
+ switch( nElement )
+ {
+ case C_TOKEN( multiLvlStrRef ):
+ case C_TOKEN( strLit ):
+ case C_TOKEN( strRef ):
+ case C15_TOKEN( datalabelsRange ):
+ OSL_ENSURE( !mrModel.mxDataSeq, "DataSourceContext::onCreateContext - multiple data sequences" );
+ return new StringSequenceContext( *this, mrModel.mxDataSeq.create() );
+
+ case C_TOKEN( numLit ):
+ case C_TOKEN( numRef ):
+ OSL_ENSURE( !mrModel.mxDataSeq, "DataSourceContext::onCreateContext - multiple data sequences" );
+ return new DoubleSequenceContext( *this, mrModel.mxDataSeq.create() );
+ }
+ break;
+
+ case C_TOKEN( plus ):
+ case C_TOKEN( minus ):
+ case C_TOKEN( val ):
+ case C_TOKEN( yVal ):
+ case C_TOKEN( bubbleSize ):
+ switch( nElement )
+ {
+ case C_TOKEN( numLit ):
+ case C_TOKEN( numRef ):
+ OSL_ENSURE( !mrModel.mxDataSeq, "DataSourceContext::onCreateContext - multiple data sequences" );
+ return new DoubleSequenceContext( *this, mrModel.mxDataSeq.create() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/datasourceconverter.cxx b/oox/source/drawingml/chart/datasourceconverter.cxx
new file mode 100644
index 000000000..92cacb428
--- /dev/null
+++ b/oox/source/drawingml/chart/datasourceconverter.cxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/datasourceconverter.hxx>
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+#include <oox/token/properties.hxx>
+#include <svl/zforlist.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::uno;
+
+DataSequenceConverter::DataSequenceConverter( const ConverterRoot& rParent, DataSequenceModel& rModel ) :
+ ConverterBase< DataSequenceModel >( rParent, rModel )
+{
+}
+
+DataSequenceConverter::~DataSequenceConverter()
+{
+}
+
+Reference< XDataSequence > DataSequenceConverter::createDataSequence( const OUString& rRole )
+{
+ // create data sequence from data source model (virtual call at chart converter)
+ Reference< XDataSequence > xDataSeq;
+ // the internal data table does not support complex labels
+ // this is only supported in Calc!!!
+ // merge the labels into a single one
+ if(rRole == "label")
+ {
+ mrModel.mnPointCount = std::min<sal_Int32>(mrModel.mnPointCount, 1);
+ OUStringBuffer aTitle;
+ bool bFirst = true;
+ for (auto const& elem : mrModel.maData)
+ {
+ Any aAny = elem.second;
+ if(aAny.has<OUString>())
+ {
+ if(!bFirst)
+ aTitle.append(" ");
+
+ aTitle.append(aAny.get<OUString>());
+ bFirst = false;
+ }
+ }
+
+ if(!bFirst)
+ {
+ mrModel.maData.clear();
+ mrModel.maData.insert(std::make_pair<sal_Int32, Any>(0, Any(aTitle.makeStringAndClear())));
+ }
+ }
+
+ bool bDateCategories = (mrModel.meFormatType == SvNumFormatType::DATE) && (rRole == "categories");
+ xDataSeq = getChartConverter().createDataSequence(getChartDocument()->getDataProvider(), mrModel,
+ rRole, bDateCategories ? OUString("date") : OUString(""));
+
+ // set sequence role
+ PropertySet aSeqProp( xDataSeq );
+ aSeqProp.setProperty( PROP_Role, rRole );
+ return xDataSeq;
+}
+
+DataSourceConverter::DataSourceConverter( const ConverterRoot& rParent, DataSourceModel& rModel ) :
+ ConverterBase< DataSourceModel >( rParent, rModel )
+{
+}
+
+DataSourceConverter::~DataSourceConverter()
+{
+}
+
+Reference< XDataSequence > DataSourceConverter::createDataSequence( const OUString& rRole )
+{
+ Reference< XDataSequence > xDataSeq;
+ if( mrModel.mxDataSeq.is() )
+ {
+ DataSequenceConverter aDataSeqConv( *this, *mrModel.mxDataSeq );
+ xDataSeq = aDataSeqConv.createDataSequence( rRole );
+ }
+ return xDataSeq;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/datasourcemodel.cxx b/oox/source/drawingml/chart/datasourcemodel.cxx
new file mode 100644
index 000000000..51514437d
--- /dev/null
+++ b/oox/source/drawingml/chart/datasourcemodel.cxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/chart/datasourcemodel.hxx>
+#include <svl/zforlist.hxx>
+
+namespace oox::drawingml::chart {
+
+DataSequenceModel::DataSequenceModel() :
+ mnPointCount( -1 ),
+ mnLevelCount( 1 ),
+ meFormatType( SvNumFormatType::UNDEFINED )
+{
+}
+
+DataSequenceModel::~DataSequenceModel()
+{
+}
+
+DataSourceModel::DataSourceModel()
+{
+}
+
+DataSourceModel::~DataSourceModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/datatablecontext.cxx b/oox/source/drawingml/chart/datatablecontext.cxx
new file mode 100644
index 000000000..0813a6424
--- /dev/null
+++ b/oox/source/drawingml/chart/datatablecontext.cxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/datatablecontext.hxx>
+
+#include <drawingml/chart/plotareamodel.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart
+{
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+DataTableContext::DataTableContext(ContextHandler2Helper& rParent, DataTableModel& rModel)
+ : ContextBase<DataTableModel>(rParent, rModel)
+{
+}
+
+DataTableContext::~DataTableContext() {}
+
+ContextHandlerRef DataTableContext::onCreateContext(sal_Int32 nElement,
+ const AttributeList& rAttribs)
+{
+ switch (getCurrentElement())
+ {
+ case C_TOKEN(dTable):
+ switch (nElement)
+ {
+ case C_TOKEN(showHorzBorder):
+ mrModel.mbShowHBorder = rAttribs.getBool(XML_val, false);
+ break;
+ case C_TOKEN(showVertBorder):
+ mrModel.mbShowVBorder = rAttribs.getBool(XML_val, false);
+ break;
+ case C_TOKEN(showOutline):
+ mrModel.mbShowOutline = rAttribs.getBool(XML_val, false);
+ break;
+ case C_TOKEN(showKeys):
+ mrModel.mbShowKeys = rAttribs.getBool(XML_val, false);
+ break;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/datatableconverter.cxx b/oox/source/drawingml/chart/datatableconverter.cxx
new file mode 100644
index 000000000..802edc946
--- /dev/null
+++ b/oox/source/drawingml/chart/datatableconverter.cxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/datatableconverter.hxx>
+
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <drawingml/chart/plotareamodel.hxx>
+#include <oox/token/properties.hxx>
+
+using namespace css;
+
+namespace oox::drawingml::chart
+{
+DataTableConverter::DataTableConverter(const ConverterRoot& rParent, DataTableModel& rModel)
+ : ConverterBase<DataTableModel>(rParent, rModel)
+{
+}
+
+DataTableConverter::~DataTableConverter() = default;
+
+void DataTableConverter::convertFromModel(uno::Reference<chart2::XDiagram> const& rxDiagram)
+{
+ PropertySet aPropSet(rxDiagram);
+ if (mrModel.mbShowHBorder)
+ aPropSet.setProperty(PROP_DataTableHBorder, mrModel.mbShowHBorder);
+ if (mrModel.mbShowVBorder)
+ aPropSet.setProperty(PROP_DataTableVBorder, mrModel.mbShowVBorder);
+ if (mrModel.mbShowOutline)
+ aPropSet.setProperty(PROP_DataTableOutline, mrModel.mbShowOutline);
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/modelbase.cxx b/oox/source/drawingml/chart/modelbase.cxx
new file mode 100644
index 000000000..b897d9306
--- /dev/null
+++ b/oox/source/drawingml/chart/modelbase.cxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/chart/modelbase.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+NumberFormat::NumberFormat() :
+ mbSourceLinked( true )
+{
+}
+
+void NumberFormat::setAttributes( const AttributeList& rAttribs )
+{
+ mbSourceLinked = rAttribs.getBool( XML_sourceLinked, true);
+ maFormatCode = rAttribs.getString( XML_formatCode, OUString() );
+}
+
+LayoutModel::LayoutModel() :
+ mfX( 0.0 ),
+ mfY( 0.0 ),
+ mfW( 0.0 ),
+ mfH( 0.0 ),
+ mnXMode( XML_factor ),
+ mnYMode( XML_factor ),
+ mnWMode( XML_factor ),
+ mnHMode( XML_factor ),
+ mnTarget( XML_outer ),
+ mbAutoLayout( true )
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
new file mode 100644
index 000000000..1df1c48a0
--- /dev/null
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -0,0 +1,1151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/objectformatter.hxx>
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#include <osl/thread.h>
+#include <osl/diagnose.h>
+#include <rtl/strbuf.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <unotools/mediadescriptor.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::graphic;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+
+using ::oox::core::XmlFilterBase;
+
+namespace {
+
+struct AutoFormatPatternEntry
+{
+ sal_Int32 mnColorToken; /// Theme color token.
+ sal_Int32 mnModToken; /// Color modification token.
+ sal_Int32 mnModValue; /// Color modification value.
+};
+
+#define AUTOFORMAT_PATTERN_COLOR( color_token ) \
+ { color_token, XML_TOKEN_INVALID, 0 }
+
+#define AUTOFORMAT_PATTERN_COLORMOD( color_token, mod_token, mod_value ) \
+ { color_token, mod_token, mod_value }
+
+#define AUTOFORMAT_PATTERN_END() \
+ AUTOFORMAT_PATTERN_COLOR( XML_TOKEN_INVALID )
+
+const AutoFormatPatternEntry spAutoFormatPattern1[] =
+{
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 88500 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 55000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 78000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 92500 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 70000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 30000 ),
+ AUTOFORMAT_PATTERN_END()
+};
+
+const AutoFormatPatternEntry spAutoFormatPattern2[] =
+{
+ AUTOFORMAT_PATTERN_COLOR( XML_accent1 ),
+ AUTOFORMAT_PATTERN_COLOR( XML_accent2 ),
+ AUTOFORMAT_PATTERN_COLOR( XML_accent3 ),
+ AUTOFORMAT_PATTERN_COLOR( XML_accent4 ),
+ AUTOFORMAT_PATTERN_COLOR( XML_accent5 ),
+ AUTOFORMAT_PATTERN_COLOR( XML_accent6 ),
+ AUTOFORMAT_PATTERN_END()
+};
+
+const AutoFormatPatternEntry spAutoFormatPattern3[] =
+{
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent1, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent2, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent3, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent4, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent5, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_accent6, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN_END()
+};
+
+const AutoFormatPatternEntry spAutoFormatPattern4[] =
+{
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 5000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 55000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 78000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 15000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 70000 ),
+ AUTOFORMAT_PATTERN_COLORMOD( XML_dk1, XML_tint, 30000 ),
+ AUTOFORMAT_PATTERN_END()
+};
+
+#undef AUTOFORMAT_PATTERN_COLOR
+#undef AUTOFORMAT_PATTERN_COLORMOD
+#undef AUTOFORMAT_PATTERN_END
+
+struct AutoFormatEntry
+{
+ sal_Int32 mnFirstStyleIdx; /// First chart style index.
+ sal_Int32 mnLastStyleIdx; /// Last chart style index.
+ sal_Int32 mnThemedIdx; /// Themed style index.
+ sal_Int32 mnColorToken; /// Theme color token.
+ sal_Int32 mnModToken; /// Color modification token.
+ sal_Int32 mnModValue; /// Color modification value.
+ sal_Int32 mnRelLineWidth; /// Relative line width (percent).
+ const AutoFormatPatternEntry* mpPattern;/// Color cycling pattern for data series.
+ bool mbFadedColor; /// True = Faded color for data series.
+};
+
+#define AUTOFORMAT_COLOR( first, last, themed_style, color_token ) \
+ { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, 100, nullptr, false }
+
+#define AUTOFORMAT_COLORMOD( first, last, themed_style, color_token, mod_token, mod_value ) \
+ { first, last, themed_style, color_token, mod_token, mod_value, 100, nullptr, false }
+
+#define AUTOFORMAT_ACCENTSMOD( first, themed_style, mod_token, mod_value ) \
+ AUTOFORMAT_COLORMOD( first, first, themed_style, XML_accent1, mod_token, mod_value ), \
+ AUTOFORMAT_COLORMOD( first + 1, first + 1, themed_style, XML_accent2, mod_token, mod_value ), \
+ AUTOFORMAT_COLORMOD( first + 2, first + 2, themed_style, XML_accent3, mod_token, mod_value ), \
+ AUTOFORMAT_COLORMOD( first + 3, first + 3, themed_style, XML_accent4, mod_token, mod_value ), \
+ AUTOFORMAT_COLORMOD( first + 4, first + 4, themed_style, XML_accent5, mod_token, mod_value ), \
+ AUTOFORMAT_COLORMOD( first + 5, first + 5, themed_style, XML_accent6, mod_token, mod_value )
+
+#define AUTOFORMAT_PATTERN( first, last, themed_style, line_width, pattern ) \
+ { first, last, themed_style, XML_TOKEN_INVALID, XML_TOKEN_INVALID, 0, line_width, pattern, false }
+
+#define AUTOFORMAT_FADED( first, last, themed_style, color_token, line_width ) \
+ { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, line_width, nullptr, true }
+
+#define AUTOFORMAT_FADEDACCENTS( first, themed_style, line_width ) \
+ AUTOFORMAT_FADED( first, first, themed_style, XML_accent1, line_width ), \
+ AUTOFORMAT_FADED( first + 1, first + 1, themed_style, XML_accent2, line_width ), \
+ AUTOFORMAT_FADED( first + 2, first + 2, themed_style, XML_accent3, line_width ), \
+ AUTOFORMAT_FADED( first + 3, first + 3, themed_style, XML_accent4, line_width ), \
+ AUTOFORMAT_FADED( first + 4, first + 4, themed_style, XML_accent5, line_width ), \
+ AUTOFORMAT_FADED( first + 5, first + 5, themed_style, XML_accent6, line_width )
+
+#define AUTOFORMAT_INVISIBLE( first, last ) \
+ AUTOFORMAT_COLOR( first, last, -1, XML_TOKEN_INVALID )
+
+#define AUTOFORMAT_END() \
+ AUTOFORMAT_INVISIBLE( -1, -1 )
+
+const AutoFormatEntry spNoFormats[] =
+{
+ AUTOFORMAT_INVISIBLE( 1, 48 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spChartSpaceFill[] =
+{
+ AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_bg1 ),
+ AUTOFORMAT_COLOR( 33, 40, THEMED_STYLE_SUBTLE, XML_lt1 ),
+ AUTOFORMAT_COLOR( 41, 48, THEMED_STYLE_SUBTLE, XML_dk1 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spDataTableLines[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ),
+ AUTOFORMAT_COLORMOD( 33, 40, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 ),
+ // 41...48: no line, same as Chart2
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spPlotArea2dFills[] =
+{
+ AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_bg1 ),
+ AUTOFORMAT_COLORMOD( 33, 34, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 20000 ),
+ AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE, XML_tint, 20000 ), // tint not documented!?
+ AUTOFORMAT_COLORMOD( 41, 48, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spWallFloorLines[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ),
+ AUTOFORMAT_COLORMOD( 33, 40, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 ),
+ // 41...48: no line, same as Chart2
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spWallFloorFills[] =
+{
+ AUTOFORMAT_INVISIBLE( 1, 32 ),
+ AUTOFORMAT_COLORMOD( 33, 34, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 20000 ),
+ AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE, XML_tint, 20000 ), // tint not documented!?
+ AUTOFORMAT_COLORMOD( 41, 48, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spAxisLines[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ), // tint not documented!?
+ AUTOFORMAT_COLORMOD( 33, 48, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 ), // tint not documented!?
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spMajorGridLines[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ), // tint not documented!?
+ AUTOFORMAT_COLORMOD( 33, 48, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 ), // tint not documented!?
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spMinorGridLines[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 40, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 50000 ),
+ AUTOFORMAT_COLORMOD( 41, 48, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 90000 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spOtherLines[] =
+{
+ AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1 ),
+ AUTOFORMAT_COLOR( 33, 34, THEMED_STYLE_SUBTLE, XML_dk1 ),
+ AUTOFORMAT_COLORMOD( 35, 40, THEMED_STYLE_SUBTLE, XML_dk1, XML_shade, 25000 ),
+ AUTOFORMAT_COLOR( 41, 48, THEMED_STYLE_SUBTLE, XML_lt1 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spLinearSeriesLines[] =
+{
+ AUTOFORMAT_PATTERN( 1, 1, THEMED_STYLE_SUBTLE, 300, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 2, 2, THEMED_STYLE_SUBTLE, 300, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 3, THEMED_STYLE_SUBTLE, 300 ),
+ AUTOFORMAT_PATTERN( 9, 9, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 10, 10, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 11, THEMED_STYLE_SUBTLE, 500 ),
+ AUTOFORMAT_PATTERN( 17, 17, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 18, 18, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 19, THEMED_STYLE_SUBTLE, 500 ),
+ AUTOFORMAT_PATTERN( 25, 25, THEMED_STYLE_SUBTLE, 700, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 26, 26, THEMED_STYLE_SUBTLE, 700, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 27, THEMED_STYLE_SUBTLE, 700 ),
+ AUTOFORMAT_PATTERN( 33, 33, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 34, 34, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 35, THEMED_STYLE_SUBTLE, 500 ),
+ AUTOFORMAT_PATTERN( 41, 42, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern4 ),
+ AUTOFORMAT_PATTERN( 42, 42, THEMED_STYLE_SUBTLE, 500, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 43, THEMED_STYLE_SUBTLE, 500 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spFilledSeriesLines[] =
+{
+ AUTOFORMAT_INVISIBLE( 1, 8 ),
+ AUTOFORMAT_COLOR( 9, 16, THEMED_STYLE_SUBTLE, XML_lt1 ),
+ AUTOFORMAT_INVISIBLE( 17, 32 ),
+ AUTOFORMAT_COLORMOD( 33, 33, THEMED_STYLE_SUBTLE, XML_dk1, XML_shade, 50000 ),
+ AUTOFORMAT_PATTERN( 34, 34, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern3 ),
+ AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE, XML_shade, 50000 ),
+ AUTOFORMAT_INVISIBLE( 41, 48 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spFilledSeries2dFills[] =
+{
+ AUTOFORMAT_PATTERN( 1, 1, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 2, 2, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 3, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 9, 9, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 10, 10, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 11, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 17, 17, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 18, 18, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 19, THEMED_STYLE_INTENSE, 100 ),
+ AUTOFORMAT_PATTERN( 25, 25, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 26, 26, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 27, THEMED_STYLE_INTENSE, 100 ),
+ AUTOFORMAT_PATTERN( 33, 33, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 34, 34, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 35, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 41, 42, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern4 ),
+ AUTOFORMAT_PATTERN( 42, 42, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 43, THEMED_STYLE_INTENSE, 100 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spFilledSeries3dFills[] =
+{
+ AUTOFORMAT_PATTERN( 1, 1, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 2, 2, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 3, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 9, 9, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 10, 10, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 11, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 17, 17, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 18, 18, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 19, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 25, 25, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 26, 26, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 27, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 33, 33, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern1 ),
+ AUTOFORMAT_PATTERN( 34, 34, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 35, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_PATTERN( 41, 42, THEMED_STYLE_SUBTLE, 100, spAutoFormatPattern4 ),
+ AUTOFORMAT_PATTERN( 42, 42, THEMED_STYLE_INTENSE, 100, spAutoFormatPattern2 ),
+ AUTOFORMAT_FADEDACCENTS( 43, THEMED_STYLE_SUBTLE, 100 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spUpDownBarLines[] =
+{
+ AUTOFORMAT_COLOR( 1, 16, THEMED_STYLE_SUBTLE, XML_tx1 ),
+ AUTOFORMAT_INVISIBLE( 17, 32 ),
+ AUTOFORMAT_COLOR( 33, 34, THEMED_STYLE_SUBTLE, XML_dk1 ),
+ AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE, XML_shade, 25000 ),
+ AUTOFORMAT_INVISIBLE( 41, 48 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spUpBarFills[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 1, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 2, 2, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 5000 ),
+ AUTOFORMAT_ACCENTSMOD( 3, THEMED_STYLE_SUBTLE, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 9, 9, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 10, 10, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 5000 ),
+ AUTOFORMAT_ACCENTSMOD( 11, THEMED_STYLE_SUBTLE, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 17, 17, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 18, 18, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 5000 ),
+ AUTOFORMAT_ACCENTSMOD( 19, THEMED_STYLE_INTENSE, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 25, 25, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 25000 ),
+ AUTOFORMAT_COLORMOD( 26, 26, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 5000 ),
+ AUTOFORMAT_ACCENTSMOD( 27, THEMED_STYLE_INTENSE, XML_tint, 25000 ),
+ AUTOFORMAT_COLOR( 33, 40, THEMED_STYLE_SUBTLE, XML_lt1 ),
+ AUTOFORMAT_COLORMOD( 41, 41, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 25000 ),
+ AUTOFORMAT_COLOR( 42, 42, THEMED_STYLE_INTENSE, XML_lt1 ),
+ AUTOFORMAT_ACCENTSMOD( 43, THEMED_STYLE_INTENSE, XML_tint, 25000 ),
+ AUTOFORMAT_END()
+};
+
+const AutoFormatEntry spDownBarFills[] =
+{
+ AUTOFORMAT_COLORMOD( 1, 1, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLORMOD( 2, 2, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_ACCENTSMOD( 3, THEMED_STYLE_SUBTLE, XML_shade, 25000 ),
+ AUTOFORMAT_COLORMOD( 9, 9, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLORMOD( 10, 10, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_ACCENTSMOD( 11, THEMED_STYLE_SUBTLE, XML_shade, 25000 ),
+ AUTOFORMAT_COLORMOD( 17, 17, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLORMOD( 18, 18, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_ACCENTSMOD( 19, THEMED_STYLE_INTENSE, XML_shade, 25000 ),
+ AUTOFORMAT_COLORMOD( 25, 25, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLORMOD( 26, 26, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_ACCENTSMOD( 27, THEMED_STYLE_INTENSE, XML_shade, 25000 ),
+ AUTOFORMAT_COLORMOD( 33, 33, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLORMOD( 34, 34, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 95000 ),
+ AUTOFORMAT_ACCENTSMOD( 35, THEMED_STYLE_SUBTLE, XML_shade, 25000 ),
+ AUTOFORMAT_COLORMOD( 41, 41, THEMED_STYLE_INTENSE, XML_dk1, XML_tint, 85000 ),
+ AUTOFORMAT_COLOR( 42, 42, THEMED_STYLE_INTENSE, XML_dk1 ),
+ AUTOFORMAT_ACCENTSMOD( 43, THEMED_STYLE_INTENSE, XML_shade, 25000 ),
+ AUTOFORMAT_END()
+};
+
+#undef AUTOFORMAT_COLOR
+#undef AUTOFORMAT_COLORMOD
+#undef AUTOFORMAT_ACCENTSMOD
+#undef AUTOFORMAT_PATTERN
+#undef AUTOFORMAT_FADED
+#undef AUTOFORMAT_FADEDACCENTS
+#undef AUTOFORMAT_INVISIBLE
+#undef AUTOFORMAT_END
+
+const AutoFormatEntry* lclGetAutoFormatEntry( const AutoFormatEntry* pEntries, sal_Int32 nStyle )
+{
+ for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries )
+ if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) )
+ return pEntries;
+ return nullptr;
+}
+
+struct AutoTextEntry
+{
+ sal_Int32 mnFirstStyleIdx; /// First chart style index.
+ sal_Int32 mnLastStyleIdx; /// Last chart style index.
+ sal_Int32 mnThemedFont; /// Themed font (minor/major).
+ sal_Int32 mnColorToken; /// Theme color token.
+ sal_Int32 mnDefFontSize; /// Default font size (1/100 points).
+ sal_Int32 mnRelFontSize; /// Font size relative to chart global font (percent).
+ bool mbBold; /// True = bold font.
+};
+
+#define AUTOTEXT_COLOR( first, last, themed_font, color_token, def_font_size, rel_font_size, bold ) \
+ { first, last, themed_font, color_token, def_font_size, rel_font_size, bold }
+
+#define AUTOTEXT_END() \
+ AUTOTEXT_COLOR( -1, -1, XML_none, XML_TOKEN_INVALID, 1000, 100, false )
+
+const AutoTextEntry spChartTitleTexts[] =
+{
+ AUTOTEXT_COLOR( 1, 40, XML_minor, XML_tx1, 1800, 120, true ),
+ AUTOTEXT_COLOR( 41, 48, XML_minor, XML_lt1, 1800, 120, true ),
+ AUTOTEXT_END()
+};
+
+const AutoTextEntry spAxisTitleTexts[] =
+{
+ AUTOTEXT_COLOR( 1, 40, XML_minor, XML_tx1, 1000, 100, true ),
+ AUTOTEXT_COLOR( 41, 48, XML_minor, XML_lt1, 1000, 100, true ),
+ AUTOTEXT_END()
+};
+
+const AutoTextEntry spOtherTexts[] =
+{
+ AUTOTEXT_COLOR( 1, 40, XML_minor, XML_tx1, 1000, 100, false ),
+ AUTOTEXT_COLOR( 41, 48, XML_minor, XML_lt1, 1000, 100, false ),
+ AUTOTEXT_END()
+};
+
+#undef AUTOTEXT_COLOR
+#undef AUTOTEXT_END
+
+const AutoTextEntry* lclGetAutoTextEntry( const AutoTextEntry* pEntries, sal_Int32 nStyle )
+{
+ for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries )
+ if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) )
+ return pEntries;
+ return nullptr;
+}
+
+// These PropIds arrays will be indexed into using a ShapeProperty enum
+
+const ShapePropertyIds spnCommonPropIds =
+{
+ PROP_LineStyle, PROP_LineWidth, PROP_LineColor, PROP_LineTransparence, PROP_LineDashName,
+ PROP_LineCap, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID,
+ PROP_FillStyle, PROP_FillColor, PROP_FillTransparence, PROP_FillTransparenceGradientName, PROP_FillGradientName,
+ PROP_FillBitmapName, PROP_FillBitmapMode, PROP_FillBitmapSizeX, PROP_FillBitmapSizeY,
+ PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint,
+ PROP_FillHatchName, PROP_FillBackground
+};
+
+const ShapePropertyIds spnLinearPropIds =
+{
+ PROP_LineStyle, PROP_LineWidth, PROP_Color, PROP_Transparency, PROP_LineDashName,
+ PROP_LineCap, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID,
+ PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID,
+ PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID,
+ PROP_INVALID, PROP_INVALID, PROP_INVALID,
+ PROP_INVALID, PROP_INVALID
+};
+
+const ShapePropertyIds spnFilledPropIds =
+{
+ PROP_BorderStyle,
+ PROP_BorderWidth,
+ PROP_BorderColor,
+ PROP_BorderTransparency,
+ PROP_BorderDashName,
+ PROP_LineCap,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_INVALID,
+ PROP_FillStyle,
+ PROP_Color,
+ PROP_Transparency,
+ PROP_FillTransparenceGradientName,
+ PROP_GradientName,
+ PROP_FillBitmapName,
+ PROP_FillBitmapMode,
+ PROP_FillBitmapSizeX,
+ PROP_FillBitmapSizeY,
+ PROP_FillBitmapPositionOffsetX,
+ PROP_FillBitmapPositionOffsetY,
+ PROP_FillBitmapRectanglePoint,
+ PROP_HatchName,
+ PROP_FillBackground
+};
+
+/** Property info for common chart objects, to be used in ShapePropertyMap. */
+const ShapePropertyInfo saCommonPropInfo( spnCommonPropIds, false, true, true, true, true );
+/** Property info for linear data series, to be used in ShapePropertyMap. */
+const ShapePropertyInfo saLinearPropInfo( spnLinearPropIds, false, true, true, true, true );
+/** Property info for filled data series, to be used in ShapePropertyMap. */
+const ShapePropertyInfo saFilledPropInfo( spnFilledPropIds, false, true, true, true, true );
+
+/** Contains information about formatting of a specific chart object type. */
+struct ObjectTypeFormatEntry
+{
+ ObjectType meObjType; /// Object type for automatic format.
+ const ShapePropertyInfo& mrPropInfo; /// Property info for the ShapePropertyMap class.
+ const AutoFormatEntry* mpAutoLines; /// Automatic line formatting for all chart styles.
+ const AutoFormatEntry* mpAutoFills; /// Automatic fill formatting for all chart styles.
+ const AutoTextEntry* mpAutoTexts; /// Automatic text attributes for all chart styles.
+ bool mbIsFrame; /// True = object is a frame, false = object is a line.
+ ObjectTypeFormatEntry(ObjectType eObjType, const ShapePropertyInfo& rPropInfo,
+ const AutoFormatEntry* pAutoLines,
+ const AutoFormatEntry* pAutoFills,
+ const AutoTextEntry* pAutoTexts,
+ bool bIsFrame)
+ :meObjType(eObjType), mrPropInfo(rPropInfo), mpAutoLines(pAutoLines)
+ ,mpAutoFills(pAutoFills), mpAutoTexts(pAutoTexts), mbIsFrame(bIsFrame)
+ {} // prevent creation of implicit default ctor which fails in MSVC
+};
+
+#define TYPEFORMAT_FRAME( obj_type, prop_type, auto_texts, auto_lines, auto_fills ) \
+ { obj_type, prop_type, auto_lines, auto_fills, auto_texts, true }
+
+#define TYPEFORMAT_LINE( obj_type, prop_type, auto_texts, auto_lines ) \
+ { obj_type, prop_type, auto_lines, nullptr, auto_texts, false }
+
+const ObjectTypeFormatEntry spObjTypeFormatEntries[] =
+{
+ // object type property info auto text auto line auto fill
+ TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, saCommonPropInfo, nullptr, spNoFormats, spChartSpaceFill ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, saCommonPropInfo, spChartTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */),
+ TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, spPlotArea2dFills ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_WALL, saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR, saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills ),
+ TYPEFORMAT_LINE( OBJECTTYPE_AXIS, saCommonPropInfo, spOtherTexts, spAxisLines ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE, saCommonPropInfo, spAxisTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT, saCommonPropInfo, spAxisTitleTexts, nullptr /* eq in Ch2 */, nullptr /* eq in Ch2 */ ),
+ TYPEFORMAT_LINE( OBJECTTYPE_MAJORGRIDLINE, saCommonPropInfo, nullptr, spMajorGridLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_MINORGRIDLINE, saCommonPropInfo, nullptr, spMinorGridLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_LINEARSERIES2D, saLinearPropInfo, nullptr, spLinearSeriesLines ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES2D, saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries2dFills ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES3D, saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries3dFills ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_DATALABEL, saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ),
+ TYPEFORMAT_LINE( OBJECTTYPE_TRENDLINE, saCommonPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_TRENDLINELABEL, saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ),
+ TYPEFORMAT_LINE( OBJECTTYPE_ERRORBAR, saCommonPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_SERLINE, saCommonPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_LEADERLINE, saCommonPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_DROPLINE, saCommonPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, saLinearPropInfo, nullptr, spOtherLines ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, saCommonPropInfo, nullptr, spUpDownBarLines, spUpBarFills ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, saCommonPropInfo, nullptr, spUpDownBarLines, spDownBarFills ),
+ TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, saCommonPropInfo, spOtherTexts, spDataTableLines )
+};
+
+#undef TYPEFORMAT_FRAME
+#undef TYPEFORMAT_LINE
+
+void lclConvertPictureOptions( FillProperties& orFillProps, const PictureOptionsModel& rPicOptions )
+{
+ bool bStacked = (rPicOptions.mnPictureFormat == XML_stack) || (rPicOptions.mnPictureFormat == XML_stackScale);
+ orFillProps.maBlipProps.moBitmapMode = bStacked ? XML_tile : XML_stretch;
+}
+
+} // namespace
+
+struct ObjectFormatterData;
+
+namespace {
+
+class DetailFormatterBase
+{
+public:
+ explicit DetailFormatterBase(
+ ObjectFormatterData& rData,
+ const AutoFormatEntry* pAutoFormatEntry );
+ explicit DetailFormatterBase(
+ ObjectFormatterData& rData,
+ const AutoTextEntry* pAutoTextEntry );
+
+protected:
+ /** Returns the placeholder color which may depend on the passed series index. */
+ ::Color getPhColor( sal_Int32 nSeriesIdx ) const;
+
+private:
+ /** Resolves and returns the scheme color with the passed transformation. */
+ ::Color getSchemeColor( sal_Int32 nColorToken, sal_Int32 nModToken, sal_Int32 nModValue ) const;
+
+protected:
+ typedef ::std::vector< ::Color > ColorPatternVec;
+
+ ObjectFormatterData& mrData; /// Shared formatter data.
+ ::Color mnPhClr; /// RGB placeholder color for themed style.
+ ColorPatternVec maColorPattern; /// Different cycling colors for data series.
+};
+
+class LineFormatter : public DetailFormatterBase
+{
+public:
+ explicit LineFormatter(
+ ObjectFormatterData& rData,
+ const AutoFormatEntry* pAutoFormatEntry,
+ const ObjectType eObjType );
+
+ /** Converts line formatting to the passed property set. */
+ void convertFormatting(
+ ShapePropertyMap& rPropMap,
+ const ModelRef< Shape >& rxShapeProp,
+ sal_Int32 nSeriesIdx );
+
+private:
+ LinePropertiesPtr mxAutoLine; /// Automatic line properties.
+};
+
+class FillFormatter : public DetailFormatterBase
+{
+public:
+ explicit FillFormatter(
+ ObjectFormatterData& rData,
+ const AutoFormatEntry* pAutoFormatEntry,
+ const ObjectType eObjType );
+
+ /** Converts area formatting to the passed property set. */
+ void convertFormatting(
+ ShapePropertyMap& rPropMap,
+ const ModelRef< Shape >& rxShapeProp,
+ const PictureOptionsModel* pPicOptions,
+ sal_Int32 nSeriesIdx );
+
+private:
+ FillPropertiesPtr mxAutoFill; /// Automatic fill properties.
+};
+
+class TextFormatter : public DetailFormatterBase
+{
+public:
+ explicit TextFormatter(
+ ObjectFormatterData& rData,
+ const AutoTextEntry* pAutoTextEntry,
+ const ModelRef< TextBody >& rxGlobalTextProp );
+
+ /** Converts text formatting to the passed property set. */
+ void convertFormatting(
+ PropertySet& rPropSet,
+ const TextCharacterProperties* pTextProps );
+ /** Converts text formatting to the passed property set. */
+ void convertFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< TextBody >& rxTextProp );
+
+private:
+ TextCharacterPropertiesPtr mxAutoText; /// Automatic text properties.
+};
+
+/** Formatter for a specific object type. */
+class ObjectTypeFormatter
+{
+public:
+ explicit ObjectTypeFormatter(
+ ObjectFormatterData& rData,
+ const ObjectTypeFormatEntry& rEntry,
+ const ChartSpaceModel& rChartSpace,
+ const ObjectType eObjType );
+
+ /** Sets frame formatting properties to the passed property set. */
+ void convertFrameFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< Shape >& rxShapeProp,
+ const PictureOptionsModel* pPicOptions,
+ sal_Int32 nSeriesIdx );
+
+ /** Sets text formatting properties to the passed property set. */
+ void convertTextFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< TextBody >& rxTextProp );
+
+ /** Sets frame/text formatting properties to the passed property set. */
+ void convertFormatting(
+ PropertySet& rPropSet,
+ const ModelRef< Shape >& rxShapeProp,
+ const ModelRef< TextBody >& rxTextProp );
+
+ /** Sets text formatting properties to the passed property set. */
+ void convertTextFormatting(
+ PropertySet& rPropSet,
+ const TextCharacterProperties& rTextProps );
+
+ /** Sets automatic fill properties to the passed property set. */
+ void convertAutomaticFill(
+ PropertySet& rPropSet,
+ sal_Int32 nSeriesIdx );
+
+private:
+ LineFormatter maLineFormatter; /// Converter for line formatting.
+ FillFormatter maFillFormatter; /// Converter for fill formatting.
+ TextFormatter maTextFormatter; /// Converter for text formatting.
+ ModelObjectHelper& mrModelObjHelper; /// Helper for named drawing formatting.
+ const ObjectTypeFormatEntry& mrEntry; /// Additional settings.
+};
+
+}
+
+struct ObjectFormatterData
+{
+ typedef RefMap< ObjectType, ObjectTypeFormatter > ObjectTypeFormatterMap;
+
+ const XmlFilterBase& mrFilter; /// Base filter object.
+ ObjectTypeFormatterMap maTypeFormatters; /// Formatters for all types of objects in a chart.
+ ModelObjectHelper maModelObjHelper; /// Helper for named drawing formatting (dashes, gradients, bitmaps).
+ Reference< XNumberFormats > mxNumFmts; /// Number formats collection of container document.
+ Reference< XNumberFormatTypes > mxNumTypes; /// Number format types collection of container document.
+ Locale maEnUsLocale; /// Locale struct containing en-US.
+ Locale maFromLocale; /// Empty locale struct.
+ sal_Int32 mnMaxSeriesIdx; /// Maximum series index used for color cycling/fading.
+
+ explicit ObjectFormatterData(
+ const XmlFilterBase& rFilter,
+ const Reference< XChartDocument >& rxChartDoc,
+ const ChartSpaceModel& rChartSpace );
+
+ ObjectTypeFormatter* getTypeFormatter( ObjectType eObjType );
+};
+
+DetailFormatterBase::DetailFormatterBase( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry ) :
+ mrData( rData ),
+ mnPhClr( ColorTransparency, 0xffffffff )
+{
+ if( !pAutoFormatEntry )
+ return;
+
+ if( pAutoFormatEntry->mpPattern )
+ {
+ // prepare multi-color pattern
+ for( const AutoFormatPatternEntry* pPatternEntry = pAutoFormatEntry->mpPattern; pPatternEntry->mnColorToken != XML_TOKEN_INVALID; ++pPatternEntry )
+ maColorPattern.push_back( getSchemeColor( pPatternEntry->mnColorToken, pPatternEntry->mnModToken, pPatternEntry->mnModValue ) );
+ }
+ else if( pAutoFormatEntry->mnColorToken != XML_TOKEN_INVALID )
+ {
+ // prepare color or single-color pattern (color fading)
+ mnPhClr = getSchemeColor( pAutoFormatEntry->mnColorToken, pAutoFormatEntry->mnModToken, pAutoFormatEntry->mnModValue );
+ if( pAutoFormatEntry->mbFadedColor )
+ maColorPattern.push_back( mnPhClr );
+ }
+}
+
+DetailFormatterBase::DetailFormatterBase( ObjectFormatterData& rData, const AutoTextEntry* pAutoTextEntry ) :
+ mrData( rData ),
+ mnPhClr( ColorTransparency, 0xffffffff )
+{
+ if( pAutoTextEntry && (pAutoTextEntry->mnColorToken != XML_TOKEN_INVALID) )
+ mnPhClr = getSchemeColor( pAutoTextEntry->mnColorToken, XML_TOKEN_INVALID, 0 );
+}
+
+::Color DetailFormatterBase::getPhColor( sal_Int32 nSeriesIdx ) const
+{
+ if( maColorPattern.empty() || (mrData.mnMaxSeriesIdx < 0) || (nSeriesIdx < 0) )
+ return mnPhClr;
+
+ /* Apply tint/shade depending on the cycle index. The colors of leading
+ series are darkened (color shade), the colors of trailing series are
+ lightened (color tint). Shade/tint is applied in an exclusive range of
+ -70% to 70%.
+
+ Example 1: 3 data series using single-color shading with accent color 1
+ (e.g. automatic chart style #3). Shade/tint is applied per series.
+ Shade/tint changes in steps of 140%/(<series_count+1) = 140%/4 = 35%,
+ starting at -70%:
+ Step 1: -70% -> Not used.
+ Step 2: -35% -> Series 1 has 35% shade of accent color 1.
+ Step 3: 0% -> Series 2 has pure accent color 1.
+ Step 4: 35% -> Series 3 has 35% tint of accent color 1.
+ Step 5: 70% -> Not used.
+
+ Example 2: 20 data series using accent color pattern (e.g. automatic
+ chart style #2). Each color cycle has a size of 6 series (accent colors
+ 1 to 6). Shade/tint is applied per color cycle.
+ Cycle #1: Series 1...6 are based on accent colors 1 to 6.
+ Cycle #2: Series 7...12 are based on accent colors 1 to 6.
+ Cycle #3: Series 13...18 are based on accent colors 1 to 6.
+ Cycle #4: Series 19...20 are based on accent colors 1 to 2.
+ Shade/tint changes in steps of 140%/(cycle_count+1) = 140%/5 = 28%,
+ starting at -70%:
+ Step 1: -70% -> Not used.
+ Step 2: -42% -> Cycle #1 has 42% shade of accent colors 1...6
+ step 3: -14% -> Cycle #2 has 14% shade of accent colors 1...6
+ step 4: 14% -> Cycle #3 has 14% tint of accent colors 1...6
+ step 5: 42% -> Cycle #4 has 42% tint of accent colors 1...6
+ step 6: 70% -> Not used.
+ */
+ ::Color nPhClr = maColorPattern[ static_cast< size_t >( nSeriesIdx % maColorPattern.size() ) ];
+ size_t nCycleIdx = static_cast< size_t >( nSeriesIdx / maColorPattern.size() );
+ size_t nMaxCycleIdx = static_cast< size_t >( mrData.mnMaxSeriesIdx / maColorPattern.size() );
+ double fShadeTint = static_cast< double >( nCycleIdx + 1 ) / (nMaxCycleIdx + 2) * 1.4 - 0.7;
+ if( fShadeTint != 0.0 )
+ {
+ Color aColor;
+ aColor.setSrgbClr( nPhClr );
+ aColor.addChartTintTransformation( fShadeTint );
+ nPhClr = aColor.getColor( mrData.mrFilter.getGraphicHelper() );
+ }
+
+ return nPhClr;
+}
+
+::Color DetailFormatterBase::getSchemeColor( sal_Int32 nColorToken, sal_Int32 nModToken, sal_Int32 nModValue ) const
+{
+ Color aColor;
+ aColor.setSchemeClr( nColorToken );
+ if( nModToken != XML_TOKEN_INVALID )
+ aColor.addTransformation( nModToken, nModValue );
+ return aColor.getColor( mrData.mrFilter.getGraphicHelper() );
+}
+
+LineFormatter::LineFormatter( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry, const ObjectType eObjType ) :
+ DetailFormatterBase(rData, pAutoFormatEntry)
+{
+ if( !pAutoFormatEntry )
+ return;
+
+ mxAutoLine = std::make_shared<LineProperties>();
+ mxAutoLine->maLineFill.moFillType = XML_noFill;
+ if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
+ if( const LineProperties* pLineProps = pTheme->getLineStyle( pAutoFormatEntry->mnThemedIdx ) )
+ *mxAutoLine = *pLineProps;
+ // set automatic border property for chartarea, because of tdf#81437 and tdf#82217, except for Impress (tdf#150176)
+ if ( eObjType == OBJECTTYPE_CHARTSPACE )
+ {
+ OUString aFilterName;
+ rData.mrFilter.getMediaDescriptor()[utl::MediaDescriptor::PROP_FILTERNAME] >>= aFilterName;
+ if (!aFilterName.startsWithIgnoreAsciiCase("Impress"))
+ {
+ mxAutoLine->maLineFill.moFillType = oox::GraphicHelper::getDefaultChartAreaLineStyle();
+ mxAutoLine->moLineWidth = oox::GraphicHelper::getDefaultChartAreaLineWidth();
+ // this value is what MSO 2016 use as a default color for chartspace border
+ mxAutoLine->maLineFill.maFillColor.setSrgbClr(0xD9D9D9);
+ }
+ }
+ // change line width according to chart auto style
+ if( mxAutoLine->moLineWidth.has() )
+ mxAutoLine->moLineWidth = mxAutoLine->moLineWidth.get() * pAutoFormatEntry->mnRelLineWidth / 100;
+}
+
+void LineFormatter::convertFormatting( ShapePropertyMap& rPropMap, const ModelRef< Shape >& rxShapeProp, sal_Int32 nSeriesIdx )
+{
+ LineProperties aLineProps;
+ if( mxAutoLine )
+ aLineProps.assignUsed( *mxAutoLine );
+ if( rxShapeProp.is() )
+ aLineProps.assignUsed( rxShapeProp->getLineProperties() );
+ aLineProps.pushToPropMap( rPropMap, mrData.mrFilter.getGraphicHelper(), getPhColor( nSeriesIdx ) );
+}
+
+FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry, const ObjectType eObjType ) :
+ DetailFormatterBase( rData, pAutoFormatEntry )
+{
+ if( !pAutoFormatEntry )
+ return;
+
+ mxAutoFill = std::make_shared<FillProperties>();
+ if( eObjType != OBJECTTYPE_CHARTSPACE )
+ mxAutoFill->moFillType = XML_noFill;
+ if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
+ if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) )
+ *mxAutoFill = *pFillProps;
+
+ if (eObjType == OBJECTTYPE_CHARTSPACE)
+ {
+ mxAutoFill->moFillType = rData.mrFilter.getGraphicHelper().getDefaultChartAreaFillStyle();
+ }
+}
+
+void FillFormatter::convertFormatting( ShapePropertyMap& rPropMap, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel* pPicOptions, sal_Int32 nSeriesIdx )
+{
+ FillProperties aFillProps;
+ if( mxAutoFill )
+ aFillProps.assignUsed( *mxAutoFill );
+ if (rxShapeProp)
+ aFillProps.assignUsed( rxShapeProp->getFillProperties() );
+ if( pPicOptions )
+ lclConvertPictureOptions( aFillProps, *pPicOptions );
+ aFillProps.pushToPropMap( rPropMap, mrData.mrFilter.getGraphicHelper(), 0, getPhColor( nSeriesIdx ) );
+}
+
+namespace {
+
+const TextCharacterProperties* lclGetTextProperties( const ModelRef< TextBody >& rxTextProp )
+{
+ return (rxTextProp.is() && !rxTextProp->getParagraphs().empty()) ?
+ &rxTextProp->getParagraphs().front()->getProperties().getTextCharacterProperties() : nullptr;
+}
+
+} // namespace
+
+TextFormatter::TextFormatter( ObjectFormatterData& rData, const AutoTextEntry* pAutoTextEntry, const ModelRef< TextBody >& rxGlobalTextProp ) :
+ DetailFormatterBase( rData, pAutoTextEntry )
+{
+ if( !pAutoTextEntry )
+ return;
+
+ mxAutoText = std::make_shared<TextCharacterProperties>();
+ if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
+ if( const TextCharacterProperties* pTextProps = pTheme->getFontStyle( pAutoTextEntry->mnThemedFont ) )
+ *mxAutoText = *pTextProps;
+ ::Color nTextColor = getPhColor( -1 );
+ if( sal_Int32(nTextColor) >= 0 ) {
+ mxAutoText->maFillProperties.maFillColor.setSrgbClr( nTextColor );
+ mxAutoText->maFillProperties.moFillType.set(XML_solidFill);
+ }
+ mxAutoText->moHeight = pAutoTextEntry->mnDefFontSize;
+ mxAutoText->moBold = pAutoTextEntry->mbBold;
+
+ if( const TextCharacterProperties* pTextProps = lclGetTextProperties( rxGlobalTextProp ) )
+ {
+ mxAutoText->assignUsed( *pTextProps );
+ if( pTextProps->moHeight.has() )
+ mxAutoText->moHeight = pTextProps->moHeight.get() * pAutoTextEntry->mnRelFontSize / 100;
+ }
+}
+
+void TextFormatter::convertFormatting( PropertySet& rPropSet, const TextCharacterProperties* pTextProps )
+{
+ TextCharacterProperties aTextProps;
+ if( mxAutoText )
+ aTextProps.assignUsed( *mxAutoText );
+ if( pTextProps )
+ aTextProps.assignUsed( *pTextProps );
+ aTextProps.pushToPropSet( rPropSet, mrData.mrFilter );
+}
+
+void TextFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< TextBody >& rxTextProp )
+{
+ convertFormatting( rPropSet, lclGetTextProperties( rxTextProp ) );
+}
+
+ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData& rData, const ObjectTypeFormatEntry& rEntry, const ChartSpaceModel& rChartSpace, const ObjectType eObjType ) :
+ maLineFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoLines, rChartSpace.mnStyle ), eObjType ),
+ maFillFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoFills, rChartSpace.mnStyle ), eObjType ),
+ maTextFormatter( rData, lclGetAutoTextEntry( rEntry.mpAutoTexts, rChartSpace.mnStyle ), rChartSpace.mxTextProp ),
+ mrModelObjHelper( rData.maModelObjHelper ),
+ mrEntry( rEntry )
+{
+}
+
+void ObjectTypeFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel* pPicOptions, sal_Int32 nSeriesIdx )
+{
+ ShapePropertyMap aPropMap( mrModelObjHelper, mrEntry.mrPropInfo );
+ maLineFormatter.convertFormatting( aPropMap, rxShapeProp, nSeriesIdx );
+ if( mrEntry.mbIsFrame )
+ maFillFormatter.convertFormatting( aPropMap, rxShapeProp, pPicOptions, nSeriesIdx );
+ rPropSet.setProperties( aPropMap );
+}
+
+void ObjectTypeFormatter::convertTextFormatting( PropertySet& rPropSet, const ModelRef< TextBody >& rxTextProp )
+{
+ maTextFormatter.convertFormatting( rPropSet, rxTextProp );
+}
+
+void ObjectTypeFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const ModelRef< TextBody >& rxTextProp )
+{
+ convertFrameFormatting( rPropSet, rxShapeProp, nullptr, -1 );
+ convertTextFormatting( rPropSet, rxTextProp );
+}
+
+void ObjectTypeFormatter::convertTextFormatting( PropertySet& rPropSet, const TextCharacterProperties& rTextProps )
+{
+ maTextFormatter.convertFormatting( rPropSet, &rTextProps );
+}
+
+void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32 nSeriesIdx )
+{
+ ShapePropertyMap aPropMap( mrModelObjHelper, mrEntry.mrPropInfo );
+ ModelRef< Shape > xShapeProp;
+ maFillFormatter.convertFormatting( aPropMap, xShapeProp, nullptr, nSeriesIdx );
+ rPropSet.setProperties( aPropMap );
+}
+
+ObjectFormatterData::ObjectFormatterData( const XmlFilterBase& rFilter, const Reference< XChartDocument >& rxChartDoc, const ChartSpaceModel& rChartSpace ) :
+ mrFilter( rFilter ),
+ maModelObjHelper( Reference< XMultiServiceFactory >( rxChartDoc, UNO_QUERY ) ),
+ maEnUsLocale( "en", "US", OUString() ),
+ mnMaxSeriesIdx( -1 )
+{
+ for(auto const &rEntry : spObjTypeFormatEntries)
+ maTypeFormatters[ rEntry.meObjType ] = std::make_shared<ObjectTypeFormatter>( *this, rEntry, rChartSpace, rEntry.meObjType );
+
+ try
+ {
+ Reference< XNumberFormatsSupplier > xNumFmtsSupp( rxChartDoc, UNO_QUERY_THROW );
+ mxNumFmts = xNumFmtsSupp->getNumberFormats();
+ mxNumTypes.set( mxNumFmts, UNO_QUERY );
+ }
+ catch( Exception& )
+ {
+ }
+ OSL_ENSURE( mxNumFmts.is() && mxNumTypes.is(), "ObjectFormatterData::ObjectFormatterData - cannot get number formats" );
+}
+
+ObjectTypeFormatter* ObjectFormatterData::getTypeFormatter( ObjectType eObjType )
+{
+ OSL_ENSURE( maTypeFormatters.has( eObjType ), "ObjectFormatterData::getTypeFormatter - unknown object type" );
+ return maTypeFormatters.get( eObjType ).get();
+}
+
+ObjectFormatter::ObjectFormatter( const XmlFilterBase& rFilter, const Reference< XChartDocument >& rxChartDoc, const ChartSpaceModel& rChartSpace ) :
+ mxData( std::make_shared<ObjectFormatterData>( rFilter, rxChartDoc, rChartSpace ) )
+{
+}
+
+ObjectFormatter::~ObjectFormatter()
+{
+}
+
+void ObjectFormatter::setMaxSeriesIndex( sal_Int32 nMaxSeriesIdx )
+{
+ mxData->mnMaxSeriesIdx = nMaxSeriesIdx;
+}
+
+sal_Int32 ObjectFormatter::getMaxSeriesIndex() const
+{
+ return mxData->mnMaxSeriesIdx;
+}
+
+void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, ObjectType eObjType, sal_Int32 nSeriesIdx )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertFrameFormatting( rPropSet, rxShapeProp, nullptr, nSeriesIdx );
+}
+
+void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel& rPicOptions, ObjectType eObjType, sal_Int32 nSeriesIdx )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertFrameFormatting( rPropSet, rxShapeProp, &rPicOptions, nSeriesIdx );
+}
+
+void ObjectFormatter::convertTextFormatting( PropertySet& rPropSet, const ModelRef< TextBody >& rxTextProp, ObjectType eObjType )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertTextFormatting( rPropSet, rxTextProp );
+}
+
+void ObjectFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const ModelRef< TextBody >& rxTextProp, ObjectType eObjType )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertFormatting( rPropSet, rxShapeProp, rxTextProp );
+}
+
+void ObjectFormatter::convertTextFormatting( PropertySet& rPropSet, const TextCharacterProperties& rTextProps, ObjectType eObjType )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertTextFormatting( rPropSet, rTextProps );
+}
+
+void ObjectFormatter::convertTextRotation( PropertySet& rPropSet, const ModelRef< TextBody >& rxTextProp, bool bSupportsStacked, sal_Int32 nDefaultRotation )
+{
+ if( !rxTextProp.is() )
+ return;
+
+ bool bStacked = false;
+ if( bSupportsStacked )
+ {
+ sal_Int32 nVert = rxTextProp->getTextProperties().moVert.get( XML_horz );
+ bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl);
+ rPropSet.setProperty( PROP_StackCharacters, bStacked );
+ }
+
+ /* Chart2 expects rotation angle as double value in range of [0,360).
+ OOXML counts clockwise, Chart2 counts counterclockwise. */
+ double fAngle = static_cast< double >( bStacked ? 0 : rxTextProp->getTextProperties().moRotation.get( nDefaultRotation ) );
+ // MS Office UI allows values only in range of [-90,90].
+ if ( fAngle < -5400000.0 || fAngle > 5400000.0 )
+ {
+ fAngle = 0.0;
+ }
+ fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 );
+ rPropSet.setProperty( PROP_TextRotation, fAngle );
+}
+
+void ObjectFormatter::convertTextWrap( PropertySet& rPropSet, const ModelRef< TextBody >& rxTextProp )
+{
+ if( !rxTextProp.is() )
+ {
+ // set default value (in OOXML the default value is true)
+ rPropSet.setProperty( PROP_TextWordWrap, true );
+ return;
+ }
+
+ PropertyMap& aPropMap = rxTextProp->getTextProperties().maPropertyMap;
+ if( aPropMap.hasProperty(PROP_TextWordWrap) )
+ {
+ Any aValue = aPropMap.getProperty( PROP_TextWordWrap );
+ if( aValue.hasValue() )
+ {
+ bool bValue = false;
+ aValue >>= bValue;
+ rPropSet.setProperty( PROP_TextWordWrap, bValue );
+ }
+ }
+}
+
+void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFormat& rNumberFormat, bool bAxis, bool bShowPercent )
+{
+ if( !mxData->mxNumFmts.is() )
+ return;
+
+ const bool bGeneral = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general");
+ const bool bPercent = !bAxis && bShowPercent && !rNumberFormat.mbSourceLinked;
+ sal_Int32 nPropId = bPercent ? PROP_PercentageNumberFormat : PROP_NumberFormat;
+ OUString sFormatCode(rNumberFormat.maFormatCode);
+ if (bPercent && bGeneral)
+ sFormatCode = "0%";
+ try
+ {
+ sal_Int32 nIndex = bGeneral && !bPercent ?
+ mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) :
+ mxData->mxNumFmts->addNewConverted( sFormatCode, mxData->maEnUsLocale, mxData->maFromLocale );
+ if( nIndex >= 0 )
+ rPropSet.setProperty( nPropId, nIndex );
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( OStringBuffer( "ObjectFormatter::convertNumberFormat - cannot create number format '" +
+ OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) + "'" ).getStr() );
+ }
+
+ // Setting "LinkNumberFormatToSource" does not really work, at least not for axis :-/
+ if (!bAxis)
+ rPropSet.setProperty(PROP_LinkNumberFormatToSource, Any(rNumberFormat.mbSourceLinked));
+ else
+ rPropSet.setProperty(PROP_LinkNumberFormatToSource, Any(rNumberFormat.maFormatCode.isEmpty()));
+}
+
+void ObjectFormatter::convertAutomaticFill( PropertySet& rPropSet, ObjectType eObjType, sal_Int32 nSeriesIdx )
+{
+ if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) )
+ pFormat->convertAutomaticFill( rPropSet, nSeriesIdx );
+}
+
+bool ObjectFormatter::isAutomaticFill( const ModelRef< Shape >& rxShapeProp )
+{
+ return !rxShapeProp || !rxShapeProp->getFillProperties().moFillType.has();
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx
new file mode 100644
index 000000000..4afddee47
--- /dev/null
+++ b/oox/source/drawingml/chart/plotareacontext.cxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/plotareacontext.hxx>
+
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/chart/axiscontext.hxx>
+#include <drawingml/chart/plotareamodel.hxx>
+#include <drawingml/chart/seriescontext.hxx>
+#include <drawingml/chart/typegroupcontext.hxx>
+#include <drawingml/chart/datatablecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+View3DContext::View3DContext( ContextHandler2Helper& rParent, View3DModel& rModel ) :
+ ContextBase< View3DModel >( rParent, rModel )
+{
+}
+
+View3DContext::~View3DContext()
+{
+}
+
+ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( view3D ):
+ switch( nElement )
+ {
+ case C_TOKEN( depthPercent ):
+ mrModel.mnDepthPercent = rAttribs.getInteger( XML_val, 100 );
+ return nullptr;
+ case C_TOKEN( hPercent ):
+ mrModel.monHeightPercent = rAttribs.getInteger( XML_val, 100 );
+ return nullptr;
+ case C_TOKEN( perspective ):
+ mrModel.mnPerspective = rAttribs.getInteger( XML_val, 30 );
+ return nullptr;
+ case C_TOKEN( rAngAx ):
+ mrModel.mbRightAngled = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( rotX ):
+ // default value dependent on chart type
+ mrModel.monRotationX = rAttribs.getInteger( XML_val );
+ return nullptr;
+ case C_TOKEN( rotY ):
+ // default value dependent on chart type
+ mrModel.monRotationY = rAttribs.getInteger( XML_val );
+ return nullptr;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+WallFloorContext::WallFloorContext( ContextHandler2Helper& rParent, WallFloorModel& rModel ) :
+ ContextBase< WallFloorModel >( rParent, rModel )
+{
+}
+
+WallFloorContext::~WallFloorContext()
+{
+}
+
+ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( backWall ):
+ case C_TOKEN( floor ):
+ case C_TOKEN( sideWall ):
+ switch( nElement )
+ {
+ case C_TOKEN( pictureOptions ):
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+PlotAreaContext::PlotAreaContext( ContextHandler2Helper& rParent, PlotAreaModel& rModel ) :
+ ContextBase< PlotAreaModel >( rParent, rModel )
+{
+}
+
+PlotAreaContext::~PlotAreaContext()
+{
+}
+
+ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( plotArea ):
+ switch( nElement )
+ {
+ case C_TOKEN( area3DChart ):
+ case C_TOKEN( areaChart ):
+ return new AreaTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( bar3DChart ):
+ case C_TOKEN( barChart ):
+ return new BarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( bubbleChart ):
+ return new BubbleTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( line3DChart ):
+ case C_TOKEN( lineChart ):
+ case C_TOKEN( stockChart ):
+ return new LineTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( doughnutChart ):
+ case C_TOKEN( ofPieChart ):
+ case C_TOKEN( pie3DChart ):
+ case C_TOKEN( pieChart ):
+ return new PieTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( radarChart ):
+ return new RadarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( scatterChart ):
+ return new ScatterTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( surface3DChart ):
+ case C_TOKEN( surfaceChart ):
+ return new SurfaceTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement, bMSO2007Doc ) );
+
+ case C_TOKEN( catAx ):
+ return new CatAxisContext( *this, mrModel.maAxes.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( dateAx ):
+ return new DateAxisContext( *this, mrModel.maAxes.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( serAx ):
+ return new SerAxisContext( *this, mrModel.maAxes.create( nElement, bMSO2007Doc ) );
+ case C_TOKEN( valAx ):
+ return new ValAxisContext( *this, mrModel.maAxes.create( nElement, bMSO2007Doc ) );
+
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.getOrCreate() );
+ case C_TOKEN(dTable):
+ return new DataTableContext( *this, mrModel.mxDataTable.create() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
new file mode 100644
index 000000000..afbb28ade
--- /dev/null
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -0,0 +1,481 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/plotareaconverter.hxx>
+
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/chart/XDiagramPositioning.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/drawing/Direction3D.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <osl/diagnose.h>
+#include <drawingml/chart/datatableconverter.hxx>
+#include <drawingml/chart/axisconverter.hxx>
+#include <drawingml/chart/plotareamodel.hxx>
+#include <drawingml/chart/typegroupconverter.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/helpers.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+/** Axes set model. This is a helper for the plot area converter collecting all
+ type groups and axes of the primary or secondary axes set. */
+struct AxesSetModel
+{
+ typedef ModelVector< TypeGroupModel > TypeGroupVector;
+ typedef ModelMap< sal_Int32, AxisModel > AxisMap;
+
+ TypeGroupVector maTypeGroups; /// All type groups containing data series.
+ AxisMap maAxes; /// All axes mapped by API axis type.
+
+ explicit AxesSetModel() {}
+};
+
+/** Axes set converter. This is a helper class for the plot area converter. */
+class AxesSetConverter : public ConverterBase< AxesSetModel >
+{
+public:
+ explicit AxesSetConverter( const ConverterRoot& rParent, AxesSetModel& rModel );
+
+ /** Converts the axes set model to a chart2 diagram. Returns an automatic
+ chart title from a single series title, if possible. */
+ void convertFromModel(
+ const Reference< XDiagram >& rxDiagram,
+ View3DModel& rView3DModel,
+ sal_Int32 nAxesSetIdx,
+ bool bSupportsVaryColorsByPoint,
+ bool bUseFixedInnerSize );
+
+ /** Returns the automatic chart title if the axes set contains only one series. */
+ const OUString& getAutomaticTitle() const { return maAutoTitle; }
+ /** Returns true, if the chart is three-dimensional. */
+ bool is3dChart() const { return mb3dChart; }
+ /** Returns true, if chart type supports wall and floor format in 3D mode. */
+ bool isWall3dChart() const { return mbWall3dChart; }
+ /** Returns true, if chart is a pie chart or doughnut chart. */
+ bool isPieChart() const { return mbPieChart; }
+
+private:
+ OUString maAutoTitle;
+ bool mb3dChart;
+ bool mbWall3dChart;
+ bool mbPieChart;
+};
+
+AxesSetConverter::AxesSetConverter( const ConverterRoot& rParent, AxesSetModel& rModel ) :
+ ConverterBase< AxesSetModel >( rParent, rModel ),
+ mb3dChart( false ),
+ mbWall3dChart( false ),
+ mbPieChart( false )
+{
+}
+
+ModelRef< AxisModel > lclGetOrCreateAxis( const AxesSetModel::AxisMap& rFromAxes, sal_Int32 nAxisIdx, sal_Int32 nDefTypeId, bool bMSO2007Doc )
+{
+ ModelRef< AxisModel > xAxis = rFromAxes.get( nAxisIdx );
+ if( !xAxis )
+ xAxis.create( nDefTypeId, bMSO2007Doc ).mbDeleted = true; // missing axis is invisible
+ return xAxis;
+}
+
+void AxesSetConverter::convertFromModel( const Reference< XDiagram >& rxDiagram,
+ View3DModel& rView3DModel, sal_Int32 nAxesSetIdx,
+ bool bSupportsVaryColorsByPoint, bool bUseFixedInnerSize)
+{
+ // create type group converter objects for all type groups
+ typedef RefVector< TypeGroupConverter > TypeGroupConvVector;
+ TypeGroupConvVector aTypeGroups;
+ for (auto const& typeGroup : mrModel.maTypeGroups)
+ aTypeGroups.push_back( std::make_shared<TypeGroupConverter>( *this, *typeGroup ) );
+
+ OSL_ENSURE( !aTypeGroups.empty(), "AxesSetConverter::convertFromModel - no type groups in axes set" );
+ if( aTypeGroups.empty() )
+ return;
+
+ try
+ {
+ // first type group needed for coordinate system and axis conversion
+ TypeGroupConverter& rFirstTypeGroup = *aTypeGroups.front();
+
+ // get automatic chart title, if there is only one type group
+ if( aTypeGroups.size() == 1 )
+ maAutoTitle = rFirstTypeGroup.getSingleSeriesTitle();
+
+ /* Create a coordinate system. For now, all type groups from all axes sets
+ have to be inserted into one coordinate system. Later, chart2 should
+ support using one coordinate system for each axes set. */
+ Reference< XCoordinateSystem > xCoordSystem;
+ Reference< XCoordinateSystemContainer > xCoordSystemCont( rxDiagram, UNO_QUERY_THROW );
+ Sequence< Reference< XCoordinateSystem > > aCoordSystems = xCoordSystemCont->getCoordinateSystems();
+ if( aCoordSystems.hasElements() )
+ {
+ OSL_ENSURE( aCoordSystems.getLength() == 1, "AxesSetConverter::convertFromModel - too many coordinate systems" );
+ xCoordSystem = aCoordSystems[ 0 ];
+ OSL_ENSURE( xCoordSystem.is(), "AxesSetConverter::convertFromModel - invalid coordinate system" );
+ }
+ else
+ {
+ xCoordSystem = rFirstTypeGroup.createCoordinateSystem();
+ if( xCoordSystem.is() )
+ xCoordSystemCont->addCoordinateSystem( xCoordSystem );
+ }
+
+ // 3D view settings
+ mb3dChart = rFirstTypeGroup.is3dChart();
+ mbWall3dChart = rFirstTypeGroup.isWall3dChart();
+ mbPieChart = rFirstTypeGroup.getTypeInfo().meTypeCategory == TYPECATEGORY_PIE;
+ if( mb3dChart )
+ {
+ View3DConverter aView3DConv( *this, rView3DModel );
+ aView3DConv.convertFromModel( rxDiagram, rFirstTypeGroup );
+ }
+
+ /* Convert all chart type groups. Each type group will add its series
+ to the data provider attached to the chart document. */
+ if( xCoordSystem.is() )
+ {
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ // convert all axes (create missing axis models)
+ ModelRef< AxisModel > xXAxis = lclGetOrCreateAxis( mrModel.maAxes, API_X_AXIS, rFirstTypeGroup.getTypeInfo().mbCategoryAxis ? C_TOKEN( catAx ) : C_TOKEN( valAx ), bMSO2007Doc );
+ ModelRef< AxisModel > xYAxis = lclGetOrCreateAxis( mrModel.maAxes, API_Y_AXIS, C_TOKEN( valAx ), bMSO2007Doc );
+
+ AxisConverter aXAxisConv( *this, *xXAxis );
+ aXAxisConv.convertFromModel(xCoordSystem, aTypeGroups, xYAxis.get(), nAxesSetIdx,
+ API_X_AXIS, bUseFixedInnerSize);
+ AxisConverter aYAxisConv( *this, *xYAxis );
+ aYAxisConv.convertFromModel(xCoordSystem, aTypeGroups, xXAxis.get(), nAxesSetIdx,
+ API_Y_AXIS, bUseFixedInnerSize);
+
+ if( rFirstTypeGroup.isDeep3dChart() )
+ {
+ ModelRef< AxisModel > xZAxis = lclGetOrCreateAxis( mrModel.maAxes, API_Z_AXIS, C_TOKEN( serAx ), bMSO2007Doc );
+ AxisConverter aZAxisConv( *this, *xZAxis );
+ aZAxisConv.convertFromModel(xCoordSystem, aTypeGroups, nullptr, nAxesSetIdx,
+ API_Z_AXIS, bUseFixedInnerSize);
+ }
+
+ // convert all chart type groups, this converts all series data and formatting
+ for (auto const& typeGroup : aTypeGroups)
+ typeGroup->convertFromModel( rxDiagram, xCoordSystem, nAxesSetIdx, bSupportsVaryColorsByPoint );
+ }
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+} // namespace
+
+View3DConverter::View3DConverter( const ConverterRoot& rParent, View3DModel& rModel ) :
+ ConverterBase< View3DModel >( rParent, rModel )
+{
+}
+
+View3DConverter::~View3DConverter()
+{
+}
+
+void View3DConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, TypeGroupConverter const & rTypeGroup )
+{
+ namespace cssd = ::com::sun::star::drawing;
+ PropertySet aPropSet( rxDiagram );
+
+ sal_Int32 nRotationY = 0;
+ sal_Int32 nRotationX = 0;
+ bool bRightAngled = false;
+ sal_Int32 nAmbientColor = 0;
+ sal_Int32 nLightColor = 0;
+
+ if( rTypeGroup.getTypeInfo().meTypeCategory == TYPECATEGORY_PIE )
+ {
+ // Y rotation used as 'first pie slice angle' in 3D pie charts
+ rTypeGroup.convertPieRotation( aPropSet, mrModel.monRotationY.get( 0 ) );
+ // X rotation a.k.a. elevation (map OOXML [0..90] to Chart2 [-90,0])
+ nRotationX = getLimitedValue< sal_Int32, sal_Int32 >( mrModel.monRotationX.get( 15 ), 0, 90 ) - 90;
+ // no right-angled axes in pie charts
+ bRightAngled = false;
+ // ambient color (Gray 30%)
+ nAmbientColor = 0xB3B3B3;
+ // light color (Gray 70%)
+ nLightColor = 0x4C4C4C;
+ }
+ else // 3D bar/area/line charts
+ {
+ // Y rotation (OOXML [0..359], Chart2 [-179,180])
+ nRotationY = mrModel.monRotationY.get( 20 );
+ // X rotation a.k.a. elevation (OOXML [-90..90], Chart2 [-179,180])
+ nRotationX = getLimitedValue< sal_Int32, sal_Int32 >( mrModel.monRotationX.get( 15 ), -90, 90 );
+ // right-angled axes
+ bRightAngled = mrModel.mbRightAngled;
+ // ambient color (Gray 20%)
+ nAmbientColor = 0xCCCCCC;
+ // light color (Gray 60%)
+ nLightColor = 0x666666;
+ }
+
+ // Y rotation (map OOXML [0..359] to Chart2 [-179,180])
+ nRotationY = NormAngle180(nRotationY);
+ /* Perspective (map OOXML [0..200] to Chart2 [0,100]). Seems that MSO 2007 is
+ buggy here, the XML plugin of MSO 2003 writes the correct perspective in
+ the range from 0 to 100. We will emulate the wrong behaviour of MSO 2007. */
+ sal_Int32 nPerspective = getLimitedValue< sal_Int32, sal_Int32 >( mrModel.mnPerspective / 2, 0, 100 );
+ // projection mode (parallel axes, if right-angled, #i90360# or if perspective is at 0%)
+ bool bParallel = bRightAngled || (nPerspective == 0);
+ cssd::ProjectionMode eProjMode = bParallel ? cssd::ProjectionMode_PARALLEL : cssd::ProjectionMode_PERSPECTIVE;
+
+ // set rotation properties
+ aPropSet.setProperty( PROP_RightAngledAxes, bRightAngled );
+ aPropSet.setProperty( PROP_RotationVertical, nRotationY );
+ aPropSet.setProperty( PROP_RotationHorizontal, nRotationX );
+ aPropSet.setProperty( PROP_Perspective, nPerspective );
+ aPropSet.setProperty( PROP_D3DScenePerspective, eProjMode );
+
+ // set light settings
+ aPropSet.setProperty( PROP_D3DSceneShadeMode, cssd::ShadeMode_FLAT );
+ aPropSet.setProperty( PROP_D3DSceneAmbientColor, nAmbientColor );
+ aPropSet.setProperty( PROP_D3DSceneLightOn1, false );
+ aPropSet.setProperty( PROP_D3DSceneLightOn2, true );
+ aPropSet.setProperty( PROP_D3DSceneLightColor2, nLightColor );
+ aPropSet.setProperty( PROP_D3DSceneLightDirection2, cssd::Direction3D( 0.2, 0.4, 1.0 ) );
+}
+
+WallFloorConverter::WallFloorConverter( const ConverterRoot& rParent, WallFloorModel& rModel ) :
+ ConverterBase< WallFloorModel >( rParent, rModel )
+{
+}
+
+WallFloorConverter::~WallFloorConverter()
+{
+}
+
+void WallFloorConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, ObjectType eObjType )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( rxDiagram.is() )
+ {
+ PropertySet aPropSet;
+ switch( eObjType )
+ {
+ case OBJECTTYPE_FLOOR: aPropSet.set( rxDiagram->getFloor() ); break;
+ case OBJECTTYPE_WALL: aPropSet.set( rxDiagram->getWall() ); break;
+ default: OSL_FAIL( "WallFloorConverter::convertFromModel - invalid object type" );
+ }
+ if( aPropSet.is() )
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), eObjType );
+ }
+}
+
+PlotAreaConverter::PlotAreaConverter( const ConverterRoot& rParent, PlotAreaModel& rModel ) :
+ ConverterBase< PlotAreaModel >( rParent, rModel ),
+ mb3dChart( false ),
+ mbWall3dChart( false ),
+ mbPieChart( false )
+{
+}
+
+PlotAreaConverter::~PlotAreaConverter()
+{
+}
+
+void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
+{
+ /* Create the diagram object and attach it to the chart document. One
+ diagram is used to carry all coordinate systems and data series. */
+ Reference< XDiagram > xDiagram;
+ try
+ {
+ xDiagram.set( createInstance( "com.sun.star.chart2.Diagram" ), UNO_QUERY_THROW );
+ getChartDocument()->setFirstDiagram( xDiagram );
+ }
+ catch( Exception& )
+ {
+ }
+
+ // store all axis models in a map, keyed by axis identifier
+ typedef ModelMap< sal_Int32, AxisModel > AxisMap;
+ AxisMap aAxisMap;
+ std::vector<sal_Int32>rValAxisIds;
+ std::vector<sal_Int32>rRealValAxisIds;
+
+ for (auto const& atypeGroup : mrModel.maTypeGroups)
+ {
+ if (atypeGroup->maAxisIds.size() > 1)
+ {
+ // let's collect which axId belongs to the Y Axis according to maTypeGroups
+ rRealValAxisIds.push_back(atypeGroup->maAxisIds[1]);
+ }
+ }
+
+ for (auto const& axis : mrModel.maAxes)
+ {
+ OSL_ENSURE( axis->mnAxisId >= 0, "PlotAreaConverter::convertFromModel - invalid axis identifier" );
+ OSL_ENSURE( !aAxisMap.has( axis->mnAxisId ), "PlotAreaConverter::convertFromModel - axis identifiers not unique" );
+ if( axis->mnAxisId != -1 )
+ aAxisMap[ axis->mnAxisId ] = axis;
+
+ if ( axis->mnAxisId != -1 && axis->mnTypeId == C_TOKEN(valAx) )
+ {
+ for (size_t i = 0; i < rRealValAxisIds.size(); i++)
+ {
+ if (axis->mnAxisId == rRealValAxisIds[i])
+ {
+ // let's collect which axId belongs to the Y Axis according to maAxes
+ rValAxisIds.push_back(axis->mnAxisId);
+ }
+ }
+ }
+ }
+
+ // group the type group models into different axes sets
+ typedef ModelVector< AxesSetModel > AxesSetVector;
+ AxesSetVector aAxesSets;
+ sal_Int32 nMaxSeriesIdx = -1;
+ for (auto const& typeGroup : mrModel.maTypeGroups)
+ {
+ if( !typeGroup->maSeries.empty() )
+ {
+ // try to find a compatible axes set for the type group
+ AxesSetModel* pAxesSet = nullptr;
+ for (auto const& axesSet : aAxesSets)
+ {
+ if( axesSet->maTypeGroups.front()->maAxisIds == typeGroup->maAxisIds )
+ {
+ pAxesSet = axesSet.get();
+ if (pAxesSet)
+ break;
+ }
+ }
+
+ // not possible to insert into an existing axes set -> start a new axes set
+ if( !pAxesSet )
+ {
+ pAxesSet = &aAxesSets.create();
+ // find axis models used by the type group
+ const std::vector<sal_Int32>& rAxisIds = typeGroup->maAxisIds;
+ if( !rAxisIds.empty() )
+ pAxesSet->maAxes[ API_X_AXIS ] = aAxisMap.get( rAxisIds[ 0 ] );
+ if( rAxisIds.size() >= 2 )
+ pAxesSet->maAxes[ API_Y_AXIS ] = aAxisMap.get( rAxisIds[ 1 ] );
+ if( rAxisIds.size() >= 3 )
+ pAxesSet->maAxes[ API_Z_AXIS ] = aAxisMap.get( rAxisIds[ 2 ] );
+ }
+
+ // insert the type group model
+ pAxesSet->maTypeGroups.push_back( typeGroup );
+
+ // collect the maximum series index for automatic series formatting
+ for (auto const& elemSeries : typeGroup->maSeries)
+ nMaxSeriesIdx = ::std::max( nMaxSeriesIdx, elemSeries->mnIndex );
+ }
+ }
+ getFormatter().setMaxSeriesIndex( nMaxSeriesIdx );
+
+ // varying point colors only for single series in single chart type
+ bool bSupportsVaryColorsByPoint = mrModel.maTypeGroups.size() == 1;
+
+ bool bIsCombinedChart = mrModel.maTypeGroups.size() == 2 &&
+ mrModel.maTypeGroups[0]->mnTypeId != mrModel.maTypeGroups[1]->mnTypeId;
+
+ // convert all axes sets, and check which axis is attached to the first maTypeGroups
+ sal_Int32 nStartAxesSetIdx = bIsCombinedChart ? ((rValAxisIds.size() > 1 && aAxesSets.size() > 0 && aAxesSets[0]->maAxes.count( API_Y_AXIS )
+ && aAxesSets[0]->maAxes[ API_Y_AXIS ]->mnAxisId != rValAxisIds[0] ) ? 1 : 0)
+ : 0;
+ sal_Int32 nAxesSetIdx = nStartAxesSetIdx;
+
+ bool bUseFixedInnerSize = false;
+ if (mrModel.mxLayout && !mrModel.mxLayout->mbAutoLayout)
+ bUseFixedInnerSize = mrModel.mxLayout->mnTarget == XML_inner;
+
+ for (auto const& axesSet : aAxesSets)
+ {
+ AxesSetConverter aAxesSetConv(*this, *axesSet);
+ aAxesSetConv.convertFromModel(xDiagram, rView3DModel, nAxesSetIdx,
+ bSupportsVaryColorsByPoint, bUseFixedInnerSize);
+ if(nAxesSetIdx == nStartAxesSetIdx)
+ {
+ maAutoTitle = aAxesSetConv.getAutomaticTitle();
+ mb3dChart = aAxesSetConv.is3dChart();
+ mbWall3dChart = aAxesSetConv.isWall3dChart();
+ mbPieChart = aAxesSetConv.isPieChart();
+ }
+ else
+ {
+ maAutoTitle.clear();
+ }
+ nAxesSetIdx = 1 - nAxesSetIdx;
+ }
+
+ DataTableConverter dataTableConverter (*this, mrModel.mxDataTable.getOrCreate());
+ dataTableConverter.convertFromModel(xDiagram);
+
+ // plot area formatting
+ if( xDiagram.is() && !mb3dChart )
+ {
+ PropertySet aPropSet( xDiagram->getWall() );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_PLOTAREA2D );
+ }
+}
+
+void PlotAreaConverter::convertPositionFromModel()
+{
+ LayoutModel& rLayout = mrModel.mxLayout.getOrCreate();
+ LayoutConverter aLayoutConv( *this, rLayout );
+ awt::Rectangle aDiagramRect;
+ if( !aLayoutConv.calcAbsRectangle( aDiagramRect ) )
+ return;
+
+ try
+ {
+ namespace cssc = ::com::sun::star::chart;
+ Reference< cssc::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY_THROW );
+ Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
+ // for pie charts, always set inner plot area size to exclude the data labels as Excel does
+ sal_Int32 nTarget = (mbPieChart && (rLayout.mnTarget == XML_outer)) ? XML_inner : rLayout.mnTarget;
+ switch( nTarget )
+ {
+ case XML_inner:
+ xPositioning->setDiagramPositionExcludingAxes( aDiagramRect );
+ break;
+ case XML_outer:
+ xPositioning->setDiagramPositionIncludingAxes( aDiagramRect );
+ break;
+ default:
+ OSL_FAIL( "PlotAreaConverter::convertPositionFromModel - unknown positioning target" );
+ }
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/plotareamodel.cxx b/oox/source/drawingml/chart/plotareamodel.cxx
new file mode 100644
index 000000000..cb4f6383d
--- /dev/null
+++ b/oox/source/drawingml/chart/plotareamodel.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/plotareamodel.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+View3DModel::View3DModel(bool bMSO2007Doc) :
+ mnDepthPercent( 100 ),
+ mnPerspective( 30 ),
+ mbRightAngled( !bMSO2007Doc )
+{
+}
+
+WallFloorModel::WallFloorModel()
+{
+}
+
+WallFloorModel::~WallFloorModel()
+{
+}
+
+PlotAreaModel::PlotAreaModel()
+{
+ mxShapeProp.create().getFillProperties().moFillType = XML_noFill;
+}
+
+PlotAreaModel::~PlotAreaModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx
new file mode 100644
index 000000000..5afc32c14
--- /dev/null
+++ b/oox/source/drawingml/chart/seriescontext.cxx
@@ -0,0 +1,749 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/seriescontext.hxx>
+
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/chart/datasourcecontext.hxx>
+#include <drawingml/chart/seriesmodel.hxx>
+#include <drawingml/chart/titlecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2;
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+namespace {
+
+ContextHandlerRef lclDataLabelSharedCreateContext( ContextHandler2& rContext,
+ sal_Int32 nElement, const AttributeList& rAttribs, DataLabelModelBase& orModel, bool bMSO2007 )
+{
+ if( rContext.isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( delete ):
+ orModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007 );
+ return nullptr;
+ case C_TOKEN( dLblPos ):
+ orModel.monLabelPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID );
+ return nullptr;
+ case C_TOKEN( numFmt ):
+ orModel.maNumberFormat.setAttributes( rAttribs );
+ return nullptr;
+ case C_TOKEN( showBubbleSize ):
+ orModel.mobShowBubbleSize = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( showCatName ):
+ orModel.mobShowCatName = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( showLegendKey ):
+ orModel.mobShowLegendKey = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( showPercent ):
+ orModel.mobShowPercent = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( showSerName ):
+ orModel.mobShowSerName = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( showVal ):
+ orModel.mobShowVal = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( separator ):
+ // collect separator text in onCharacters()
+ return &rContext;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( rContext, orModel.mxShapeProp.create() );
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( rContext, orModel.mxTextProp.create() );
+ }
+ return nullptr;
+}
+
+void lclDataLabelSharedCharacters( ContextHandler2 const & rContext, const OUString& rChars, DataLabelModelBase& orModel )
+{
+ if( rContext.isCurrentElement( C_TOKEN( separator ) ) )
+ orModel.moaSeparator = rChars;
+}
+
+} // namespace
+
+DataLabelContext::DataLabelContext( ContextHandler2Helper& rParent, DataLabelModel& rModel ) :
+ ContextBase< DataLabelModel >( rParent, rModel )
+{
+ mrModel.mbDeleted = false;
+}
+
+DataLabelContext::~DataLabelContext()
+{
+}
+
+ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() )
+ {
+ switch( nElement )
+ {
+ case C_TOKEN( idx ):
+ mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+ case C_TOKEN( tx ):
+ return new TextContext( *this, mrModel.mxText.create() );
+ case C_TOKEN( extLst ):
+ return this;
+ }
+ }
+ else
+ {
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( extLst ):
+ if ( nElement == C_TOKEN( ext ) )
+ return this;
+ break;
+ case C_TOKEN( ext ):
+ if ( nElement == C15_TOKEN( showDataLabelsRange ) )
+ {
+ mrModel.mobShowDataLabelsRange = rAttribs.getBool( XML_val );
+ return nullptr;
+ }
+ break;
+ }
+ }
+ bool bMSO2007 = getFilter().isMSO2007Document();
+ return lclDataLabelSharedCreateContext( *this, nElement, rAttribs, mrModel, bMSO2007 );
+}
+
+void DataLabelContext::onCharacters( const OUString& rChars )
+{
+ lclDataLabelSharedCharacters( *this, rChars, mrModel );
+}
+
+DataLabelsContext::DataLabelsContext( ContextHandler2Helper& rParent, DataLabelsModel& rModel ) :
+ ContextBase< DataLabelsModel >( rParent, rModel )
+{
+ mrModel.mbDeleted = false;
+}
+
+DataLabelsContext::~DataLabelsContext()
+{
+}
+
+ContextHandlerRef DataLabelsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( dLbl ):
+ return new DataLabelContext( *this, mrModel.maPointLabels.create(mrModel, bMSO2007Doc) );
+ case C_TOKEN( leaderLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxLeaderLines.create() );
+ case C_TOKEN( showLeaderLines ):
+ case C15_TOKEN( showLeaderLines ):
+ mrModel.mbShowLeaderLines = rAttribs.getBool( XML_val, true );
+ return nullptr;
+ case C_TOKEN( extLst ):
+ case C_TOKEN( ext ):
+ return new DataLabelsContext( *this, mrModel );
+ }
+ return lclDataLabelSharedCreateContext( *this, nElement, rAttribs, mrModel, bMSO2007Doc );
+}
+
+void DataLabelsContext::onCharacters( const OUString& rChars )
+{
+ lclDataLabelSharedCharacters( *this, rChars, mrModel );
+}
+
+PictureOptionsContext::PictureOptionsContext( ContextHandler2Helper& rParent, PictureOptionsModel& rModel ) :
+ ContextBase< PictureOptionsModel >( rParent, rModel )
+{
+}
+
+PictureOptionsContext::~PictureOptionsContext()
+{
+}
+
+ContextHandlerRef PictureOptionsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( applyToEnd ):
+ mrModel.mbApplyToEnd = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( applyToFront ):
+ mrModel.mbApplyToFront = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( applyToSides ):
+ mrModel.mbApplyToSides = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( pictureFormat ):
+ mrModel.mnPictureFormat = rAttribs.getToken( XML_val, XML_stretch );
+ return nullptr;
+ case C_TOKEN( pictureStackUnit ):
+ mrModel.mfStackUnit = rAttribs.getDouble( XML_val, 1.0 );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+ErrorBarContext::ErrorBarContext( ContextHandler2Helper& rParent, ErrorBarModel& rModel ) :
+ ContextBase< ErrorBarModel >( rParent, rModel )
+{
+}
+
+ErrorBarContext::~ErrorBarContext()
+{
+}
+
+ContextHandlerRef ErrorBarContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( errBarType ):
+ mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_both );
+ return nullptr;
+ case C_TOKEN( errDir ):
+ mrModel.mnDirection = rAttribs.getToken( XML_val, XML_TOKEN_INVALID );
+ return nullptr;
+ case C_TOKEN( errValType ):
+ mrModel.mnValueType = rAttribs.getToken( XML_val, XML_fixedVal );
+ return nullptr;
+ case C_TOKEN( minus ):
+ return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::MINUS ) );
+ case C_TOKEN( noEndCap ):
+ mrModel.mbNoEndCap = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( plus ):
+ return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::PLUS ) );
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( val ):
+ mrModel.mfValue = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+TrendlineLabelContext::TrendlineLabelContext( ContextHandler2Helper& rParent, TrendlineLabelModel& rModel ) :
+ ContextBase< TrendlineLabelModel >( rParent, rModel )
+{
+}
+
+TrendlineLabelContext::~TrendlineLabelContext()
+{
+}
+
+ContextHandlerRef TrendlineLabelContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+ case C_TOKEN( numFmt ):
+ mrModel.maNumberFormat.setAttributes( rAttribs );
+ return nullptr;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( tx ):
+ return new TextContext( *this, mrModel.mxText.create() );
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ }
+ return nullptr;
+}
+
+TrendlineContext::TrendlineContext( ContextHandler2Helper& rParent, TrendlineModel& rModel ) :
+ ContextBase< TrendlineModel >( rParent, rModel )
+{
+}
+
+TrendlineContext::~TrendlineContext()
+{
+}
+
+ContextHandlerRef TrendlineContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( backward ):
+ mrModel.mfBackward = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( dispEq ):
+ mrModel.mbDispEquation = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( dispRSqr ):
+ mrModel.mbDispRSquared = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( forward ):
+ mrModel.mfForward = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( intercept ):
+ mrModel.mfIntercept = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( name ):
+ return this; // collect name in onCharacters()
+ case C_TOKEN( order ):
+ mrModel.mnOrder = rAttribs.getInteger( XML_val, 2 );
+ return nullptr;
+ case C_TOKEN( period ):
+ mrModel.mnPeriod = rAttribs.getInteger( XML_val, 2 );
+ return nullptr;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( trendlineLbl ):
+ return new TrendlineLabelContext( *this, mrModel.mxLabel.create() );
+ case C_TOKEN( trendlineType ):
+ mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_linear );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+void TrendlineContext::onCharacters( const OUString& rChars )
+{
+ if( isCurrentElement( C_TOKEN( name ) ) )
+ mrModel.maName = rChars;
+}
+
+DataPointContext::DataPointContext( ContextHandler2Helper& rParent, DataPointModel& rModel ) :
+ ContextBase< DataPointModel >( rParent, rModel )
+{
+}
+
+DataPointContext::~DataPointContext()
+{
+}
+
+ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( dPt ):
+ switch( nElement )
+ {
+ case C_TOKEN( bubble3D ):
+ mrModel.mobBubble3d = rAttribs.getBool( XML_val );
+ return nullptr;
+ case C_TOKEN( explosion ):
+ // if the 'val' attribute is missing, series explosion remains unchanged
+ mrModel.monExplosion = rAttribs.getInteger( XML_val );
+ return nullptr;
+ case C_TOKEN( idx ):
+ mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( invertIfNegative ):
+ mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( marker ):
+ return this;
+ case C_TOKEN( pictureOptions ):
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ }
+ break;
+
+ case C_TOKEN( marker ):
+ switch( nElement )
+ {
+ case C_TOKEN( size ):
+ mrModel.monMarkerSize = rAttribs.getInteger( XML_val, 5 );
+ return nullptr;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() );
+ case C_TOKEN( symbol ):
+ mrModel.monMarkerSymbol = rAttribs.getToken( XML_val, XML_none );
+ return nullptr;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+SeriesContextBase::SeriesContextBase( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ ContextBase< SeriesModel >( rParent, rModel )
+{
+}
+
+SeriesContextBase::~SeriesContextBase()
+{
+}
+
+ContextHandlerRef SeriesContextBase::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( idx ):
+ mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( order ):
+ mrModel.mnOrder = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+ case C_TOKEN( tx ):
+ return new TextContext( *this, mrModel.mxText.create() );
+ case C_TOKEN( extLst ):
+ return this;
+ }
+ break;
+
+ case C_TOKEN( marker ):
+ switch( nElement )
+ {
+ case C_TOKEN( size ):
+ mrModel.mnMarkerSize = rAttribs.getInteger( XML_val, 5 );
+ return nullptr;
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() );
+ case C_TOKEN( symbol ):
+ mrModel.mnMarkerSymbol = rAttribs.getToken( XML_val, XML_none );
+ return nullptr;
+ }
+ break;
+
+ case C_TOKEN( extLst ):
+ switch( nElement )
+ {
+ case C_TOKEN( ext ):
+ if (mrModel.maSources.has( SeriesModel::DATALABELS ))
+ break;
+
+ DataSourceModel& rLabelsSource = mrModel.maSources.create( SeriesModel::DATALABELS );
+ if (mrModel.mxLabels.is())
+ mrModel.mxLabels->mpLabelsSource = &rLabelsSource;
+ return new DataSourceContext( *this, rLabelsSource );
+ }
+ }
+ return nullptr;
+}
+
+AreaSeriesContext::AreaSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+AreaSeriesContext::~AreaSeriesContext()
+{
+}
+
+ContextHandlerRef AreaSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( errBars ):
+ return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( trendline ):
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+BarSeriesContext::BarSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+BarSeriesContext::~BarSeriesContext()
+{
+}
+
+ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( errBars ):
+ return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
+ case C_TOKEN( invertIfNegative ):
+ mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( pictureOptions ):
+ return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) );
+ case C_TOKEN( shape ):
+ mrModel.monShape = rAttribs.getToken(XML_val);
+ return nullptr;
+ case C_TOKEN( trendline ):
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+BubbleSeriesContext::BubbleSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+BubbleSeriesContext::~BubbleSeriesContext()
+{
+}
+
+ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( bubble3D ):
+ mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( bubbleSize ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::POINTS ) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( errBars ):
+ return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
+ case C_TOKEN( invertIfNegative ):
+ mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( trendline ):
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
+ case C_TOKEN( xVal ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( yVal ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+LineSeriesContext::LineSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+LineSeriesContext::~LineSeriesContext()
+{
+}
+
+ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( errBars ):
+ return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
+ case C_TOKEN( marker ):
+ return this;
+ case C_TOKEN( smooth ):
+ mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( trendline ):
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+PieSeriesContext::PieSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+PieSeriesContext::~PieSeriesContext()
+{
+}
+
+ContextHandlerRef PieSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( explosion ):
+ mrModel.mnExplosion = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+RadarSeriesContext::RadarSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+RadarSeriesContext::~RadarSeriesContext()
+{
+}
+
+ContextHandlerRef RadarSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( marker ):
+ return this;
+ case C_TOKEN( smooth ):
+ mrModel.mbSmooth = rAttribs.getBool( XML_val, bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+ScatterSeriesContext::ScatterSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+ScatterSeriesContext::~ScatterSeriesContext()
+{
+}
+
+ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dPt ):
+ return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) );
+ case C_TOKEN( errBars ):
+ return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) );
+ case C_TOKEN( marker ):
+ return this;
+ case C_TOKEN( smooth ):
+ mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( trendline ):
+ return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) );
+ case C_TOKEN( xVal ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( yVal ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+SurfaceSeriesContext::SurfaceSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) :
+ SeriesContextBase( rParent, rModel )
+{
+}
+
+SurfaceSeriesContext::~SurfaceSeriesContext()
+{
+}
+
+ContextHandlerRef SurfaceSeriesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( ser ):
+ switch( nElement )
+ {
+ case C_TOKEN( cat ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::CATEGORIES ) );
+ case C_TOKEN( val ):
+ return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) );
+ }
+ break;
+ }
+ return SeriesContextBase::onCreateContext( nElement, rAttribs );
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
new file mode 100644
index 000000000..3ace8e9a7
--- /dev/null
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -0,0 +1,920 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/seriesconverter.hxx>
+
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/chart2/DataPointLabel.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
+#include <com/sun/star/chart2/DataPointCustomLabelField.hpp>
+#include <com/sun/star/chart2/DataPointCustomLabelFieldType.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/chart2/XRegressionCurve.hpp>
+#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+#include <comphelper/sequence.hxx>
+#include <osl/diagnose.h>
+#include <drawingml/chart/datasourceconverter.hxx>
+#include <drawingml/chart/seriesmodel.hxx>
+#include <drawingml/chart/titleconverter.hxx>
+#include <drawingml/chart/typegroupconverter.hxx>
+#include <drawingml/chart/typegroupmodel.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textrun.hxx>
+#include <drawingml/textfield.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/hatchmap.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
+ const ConverterRoot& rParent,
+ DataSourceModel* pValues, const OUString& rRole,
+ TextModel* pTitle = nullptr )
+{
+ // create data sequence for values
+ Reference< XDataSequence > xValueSeq;
+ if( pValues )
+ {
+ DataSourceConverter aSourceConv( rParent, *pValues );
+ xValueSeq = aSourceConv.createDataSequence( rRole );
+ }
+
+ // create data sequence for title
+ Reference< XDataSequence > xTitleSeq;
+ if( pTitle )
+ {
+ TextConverter aTextConv( rParent, *pTitle );
+ xTitleSeq = aTextConv.createDataSequence( "label" );
+ }
+
+ // create the labeled data sequence, if values or title are present
+ Reference< XLabeledDataSequence > xLabeledSeq;
+ if( xValueSeq.is() || xTitleSeq.is() )
+ {
+ xLabeledSeq = LabeledDataSequence::create(rParent.getComponentContext());
+ if( xLabeledSeq.is() )
+ {
+ xLabeledSeq->setValues( xValueSeq );
+ xLabeledSeq->setLabel( xTitleSeq );
+ }
+ }
+ return xLabeledSeq;
+}
+
+void convertTextProperty(PropertySet& rPropSet, ObjectFormatter& rFormatter,
+ DataLabelModelBase::TextBodyRef xTextProps)
+{
+ rFormatter.convertTextFormatting( rPropSet, xTextProps, OBJECTTYPE_DATALABEL );
+ ObjectFormatter::convertTextRotation( rPropSet, xTextProps, false );
+ ObjectFormatter::convertTextWrap( rPropSet, xTextProps );
+}
+
+void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatter,
+ DataLabelModelBase& rDataLabel, const TypeGroupConverter& rTypeGroup,
+ bool bDataSeriesLabel, bool bCustomLabelField, bool bHasInternalData, bool bMSO2007Doc )
+{
+ const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo();
+
+ /* Excel 2007 does not change the series setting for a single data point,
+ if none of some specific elements occur. But only one existing element
+ in a data point will reset most other of these elements from the series
+ (e.g.: series has <c:showVal>, data point has <c:showCatName>, this
+ will reset <c:showVal> for this point, unless <c:showVal> is repeated
+ in the data point). The elements <c:layout>, <c:numberFormat>,
+ <c:spPr>, <c:tx>, and <c:txPr> are not affected at all. */
+ bool bHasAnyElement = true;
+ if (bMSO2007Doc)
+ {
+ bHasAnyElement = rDataLabel.moaSeparator.has() || rDataLabel.monLabelPos.has() ||
+ rDataLabel.mobShowCatName.has() || rDataLabel.mobShowLegendKey.has() ||
+ rDataLabel.mobShowPercent.has() || rDataLabel.mobShowSerName.has() ||
+ rDataLabel.mobShowVal.has();
+ }
+
+ bool bShowValue = !rDataLabel.mbDeleted && rDataLabel.mobShowVal.get( !bMSO2007Doc );
+ bool bShowPercent = !rDataLabel.mbDeleted && rDataLabel.mobShowPercent.get( !bMSO2007Doc ) && (rTypeInfo.meTypeCategory == TYPECATEGORY_PIE);
+ bool bShowCateg = !rDataLabel.mbDeleted && rDataLabel.mobShowCatName.get( !bMSO2007Doc );
+ bool bShowSerName = !rDataLabel.mbDeleted && rDataLabel.mobShowSerName.get( !bMSO2007Doc );
+ bool bShowSymbol = !rDataLabel.mbDeleted && rDataLabel.mobShowLegendKey.get( !bMSO2007Doc );
+
+ // tdf#132174, tdf#136650: the inner data table has no own cell number format.
+ if( bHasInternalData && bShowValue && !bShowPercent )
+ rDataLabel.maNumberFormat.mbSourceLinked = false;
+
+ // type of attached label
+ if( bHasAnyElement || rDataLabel.mbDeleted )
+ {
+ DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol, bCustomLabelField, bShowSerName );
+ rPropSet.setProperty( PROP_Label, aPointLabel );
+ }
+
+ if( rDataLabel.mbDeleted )
+ return;
+
+ // data label number format (percentage format wins over value format)
+ rFormatter.convertNumberFormat( rPropSet, rDataLabel.maNumberFormat, false, bShowPercent );
+
+ // data label text formatting (frame formatting not supported by Chart2)
+ if( bDataSeriesLabel || (rDataLabel.mxTextProp.is() && !rDataLabel.mxTextProp->getParagraphs().empty()) )
+ convertTextProperty(rPropSet, rFormatter, rDataLabel.mxTextProp);
+
+ // data label separator (do not overwrite series separator, if no explicit point separator is present)
+ // Set the data label separator to "new line" if the value is shown as percentage with a category name,
+ // just like in MS-Office. In any other case the default separator will be a semicolon.
+ if( bShowPercent && !bShowValue && ( bDataSeriesLabel || rDataLabel.moaSeparator.has() ) )
+ rPropSet.setProperty( PROP_LabelSeparator, rDataLabel.moaSeparator.get( "\n" ) );
+ else if( bDataSeriesLabel || rDataLabel.moaSeparator.has() )
+ rPropSet.setProperty( PROP_LabelSeparator, rDataLabel.moaSeparator.get( "; " ) );
+
+ // data label placement (do not overwrite series placement, if no explicit point placement is present)
+ if( !(bDataSeriesLabel || rDataLabel.monLabelPos.has()) )
+ return;
+
+ namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
+ sal_Int32 nPlacement = -1;
+ switch( rDataLabel.monLabelPos.get( XML_TOKEN_INVALID ) )
+ {
+ case XML_outEnd: nPlacement = csscd::OUTSIDE; break;
+ case XML_inEnd: nPlacement = csscd::INSIDE; break;
+ case XML_ctr: nPlacement = csscd::CENTER; break;
+ case XML_inBase: nPlacement = csscd::NEAR_ORIGIN; break;
+ case XML_t: nPlacement = csscd::TOP; break;
+ case XML_b: nPlacement = csscd::BOTTOM; break;
+ case XML_l: nPlacement = csscd::LEFT; break;
+ case XML_r: nPlacement = csscd::RIGHT; break;
+ case XML_bestFit: nPlacement = csscd::AVOID_OVERLAP; break;
+ }
+
+ if( !bDataSeriesLabel && nPlacement == -1 )
+ return;
+
+ if( nPlacement == -1 )
+ nPlacement = rTypeInfo.mnDefLabelPos;
+
+ rPropSet.setProperty( PROP_LabelPlacement, nPlacement );
+}
+
+void importBorderProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHelper& rGraphicHelper )
+{
+ LineProperties& rLP = rShape.getLineProperties();
+ // no fill has the same effect as no border so skip it
+ if (rLP.maLineFill.moFillType.get() == XML_noFill)
+ return;
+
+ if (rLP.moLineWidth.has())
+ {
+ sal_Int32 nWidth = convertEmuToHmm(rLP.moLineWidth.get());
+ rPropSet.setProperty(PROP_LabelBorderWidth, uno::Any(nWidth));
+ rPropSet.setProperty(PROP_LabelBorderStyle, uno::Any(drawing::LineStyle_SOLID));
+ }
+ const Color& aColor = rLP.maLineFill.maFillColor;
+ ::Color nColor = aColor.getColor(rGraphicHelper);
+ rPropSet.setProperty(PROP_LabelBorderColor, uno::Any(nColor));
+}
+
+void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHelper& rGraphicHelper, ModelObjectHelper& rModelObjHelper )
+{
+ FillProperties& rFP = rShape.getFillProperties();
+
+ if (rFP.moFillType.has() && rFP.moFillType.get() == XML_solidFill)
+ {
+ rPropSet.setProperty(PROP_LabelFillStyle, drawing::FillStyle_SOLID);
+
+ const Color& aColor = rFP.maFillColor;
+ ::Color nColor = aColor.getColor(rGraphicHelper);
+ rPropSet.setProperty(PROP_LabelFillColor, uno::Any(nColor));
+ }
+ else if(rFP.moFillType.has() && rFP.moFillType.get() == XML_pattFill)
+ {
+ rPropSet.setProperty(PROP_LabelFillStyle, drawing::FillStyle_HATCH);
+ rPropSet.setProperty(PROP_LabelFillBackground, true);
+
+ Color aHatchColor( rFP.maPatternProps.maPattFgColor );
+ drawing::Hatch aHatch = createHatch(rFP.maPatternProps.moPattPreset.get(), aHatchColor.getColor(rGraphicHelper, 0));
+
+ OUString sHatchName = rModelObjHelper.insertFillHatch(aHatch);
+ rPropSet.setProperty(PROP_LabelFillHatchName, sHatchName);
+
+ const Color& aColor = rFP.maPatternProps.maPattBgColor;
+ ::Color nColor = aColor.getColor(rGraphicHelper);
+ rPropSet.setProperty(PROP_LabelFillColor, uno::Any(nColor));
+ }
+
+}
+
+DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( std::u16string_view rField )
+{
+ if (rField == u"VALUE")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE;
+ else if (rField == u"SERIESNAME")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME;
+ else if (rField == u"CATEGORYNAME")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME;
+ else if (rField == u"CELLREF")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF;
+ else if (rField == u"CELLRANGE")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE;
+ else if (rField == u"PERCENTAGE")
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE;
+ else
+ return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT;
+}
+
+} // namespace
+
+DataLabelConverter::DataLabelConverter( const ConverterRoot& rParent, DataLabelModel& rModel ) :
+ ConverterBase< DataLabelModel >( rParent, rModel )
+{
+}
+
+DataLabelConverter::~DataLabelConverter()
+{
+}
+
+void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries, const TypeGroupConverter& rTypeGroup )
+{
+ if (!rxDataSeries.is())
+ return;
+
+ try
+ {
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ bool bHasInternalData = getChartDocument()->hasInternalDataProvider();
+ bool bCustomLabelField = mrModel.mxText && mrModel.mxText->mxTextBody && !mrModel.mxText->mxTextBody->getParagraphs().empty();
+ PropertySet aPropSet( rxDataSeries->getDataPointByIndex( mrModel.mnIndex ) );
+
+ lclConvertLabelFormatting( aPropSet, getFormatter(), mrModel, rTypeGroup, false, bCustomLabelField, bHasInternalData, bMSO2007Doc );
+
+ const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo();
+ bool bIsPie = rTypeInfo.meTypeCategory == TYPECATEGORY_PIE;
+
+ if( mrModel.mxLayout && !mrModel.mxLayout->mbAutoLayout )
+ {
+ RelativePosition aPos(mrModel.mxLayout->mfX, mrModel.mxLayout->mfY, css::drawing::Alignment_TOP_LEFT);
+ aPropSet.setProperty(PROP_CustomLabelPosition, aPos);
+ sal_Int32 nPlacement = -1;
+ if (bIsPie && aPropSet.getProperty(nPlacement, PROP_LabelPlacement)
+ && nPlacement == css::chart::DataLabelPlacement::AVOID_OVERLAP)
+ aPropSet.setProperty(PROP_LabelPlacement, css::chart::DataLabelPlacement::CUSTOM);
+ }
+
+ if (mrModel.mxShapeProp)
+ {
+ importBorderProperties(aPropSet, *mrModel.mxShapeProp, getFilter().getGraphicHelper());
+ uno::Reference<lang::XMultiServiceFactory> xFactory(getChartDocument(), uno::UNO_QUERY);
+ ModelObjectHelper& rHelper = getFilter().getModelObjectHelperForModel(xFactory);
+ importFillProperties(aPropSet, *mrModel.mxShapeProp, getFilter().getGraphicHelper(),
+ rHelper);
+ }
+ if( bCustomLabelField )
+ {
+ css::uno::Reference< XComponentContext > xContext = getComponentContext();
+
+ auto& rParagraphs = mrModel.mxText->mxTextBody->getParagraphs();
+
+ int nSequenceSize = 0;
+ for( auto& pParagraph : rParagraphs )
+ nSequenceSize += pParagraph->getRuns().size();
+
+ int nParagraphs = rParagraphs.size();
+ if( nParagraphs > 1 )
+ nSequenceSize += nParagraphs - 1;
+
+ OptValue< OUString > oaLabelText;
+ OptValue< OUString > oaCellRange;
+ if (mrModel.mobShowDataLabelsRange.get(false))
+ {
+ const DataSourceModel* pLabelSource = mrModel.mrParent.mpLabelsSource;
+ if (pLabelSource && pLabelSource->mxDataSeq.is())
+ {
+ oaCellRange = pLabelSource->mxDataSeq->maFormula;
+ const auto& rLabelMap = pLabelSource->mxDataSeq->maData;
+ const auto& rKV = rLabelMap.find(mrModel.mnIndex);
+ if (rKV != rLabelMap.end())
+ rKV->second >>= oaLabelText.use();
+ }
+ }
+
+ uno::Sequence< css::uno::Reference< XDataPointCustomLabelField > > aSequence( nSequenceSize );
+ auto aSequenceRange = asNonConstRange(aSequence);
+
+ int nPos = 0;
+
+ for( auto& pParagraph : rParagraphs )
+ {
+ for( auto& pRun : pParagraph->getRuns() )
+ {
+ css::uno::Reference< XDataPointCustomLabelField > xCustomLabel = DataPointCustomLabelField::create( xContext );
+
+ // Store properties
+ oox::PropertySet aPropertySet( xCustomLabel );
+ convertTextProperty( aPropertySet, getFormatter(), mrModel.mxText->mxTextBody );
+ pRun->getTextCharacterProperties().pushToPropSet( aPropertySet, getFilter() );
+
+ TextField* pField = nullptr;
+ if( ( pField = dynamic_cast< TextField* >( pRun.get() ) ) )
+ {
+ DataPointCustomLabelFieldType eType = lcl_ConvertFieldNameToFieldEnum( pField->getType() );
+
+ if (eType == DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE && oaCellRange.has())
+ {
+ xCustomLabel->setCellRange( oaCellRange.get() );
+ xCustomLabel->setString( oaLabelText.get() );
+ xCustomLabel->setDataLabelsRange( true );
+ }
+ else
+ xCustomLabel->setString( pField->getText() );
+
+ xCustomLabel->setFieldType( eType );
+ xCustomLabel->setGuid( pField->getUuid() );
+ }
+ else if( pRun )
+ {
+ xCustomLabel->setString( pRun->getText() );
+ xCustomLabel->setFieldType( DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT );
+ }
+ aSequenceRange[ nPos++ ] = xCustomLabel;
+ }
+
+ if( nParagraphs > 1 && nPos < nSequenceSize )
+ {
+ css::uno::Reference< XDataPointCustomLabelField > xCustomLabel = DataPointCustomLabelField::create( xContext );
+ xCustomLabel->setFieldType( DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE );
+ xCustomLabel->setString("\n");
+ aSequenceRange[ nPos++ ] = xCustomLabel;
+ }
+ }
+
+ aPropSet.setProperty( PROP_CustomLabelFields, Any( aSequence ) );
+ convertTextProperty(aPropSet, getFormatter(), mrModel.mxText->mxTextBody);
+ }
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+DataLabelsConverter::DataLabelsConverter( const ConverterRoot& rParent, DataLabelsModel& rModel ) :
+ ConverterBase< DataLabelsModel >( rParent, rModel )
+{
+}
+
+DataLabelsConverter::~DataLabelsConverter()
+{
+}
+
+namespace
+{
+/// Inherit <c:dLbl> text props (if not set) from <c:dLbls> text props (if set).
+void InheritFromDataLabelsTextProps(const DataLabelsModel& rLabels, const DataLabelModel& rLabel)
+{
+ // See if <c:dLbls> contains text properties to inherit.
+ if (!rLabels.mxTextProp.is() || rLabels.mxTextProp->getParagraphs().empty())
+ {
+ return;
+ }
+
+ const std::shared_ptr<TextParagraph>& rLabelsParagraph = rLabels.mxTextProp->getParagraphs()[0];
+
+ // See if <c:dLbl> lacks text properties.
+ if (rLabel.mxTextProp.is())
+ {
+ return;
+ }
+
+ if (!rLabel.mxText || !rLabel.mxText->mxTextBody
+ || rLabel.mxText->mxTextBody->getParagraphs().empty())
+ {
+ return;
+ }
+
+ const std::shared_ptr<TextParagraph>& rLabelParagraph
+ = rLabel.mxText->mxTextBody->getParagraphs()[0];
+
+ // Inherit rLabel.mxText's char props from rLabels.mxTextProp's char props.
+ TextCharacterProperties aCharProps;
+ aCharProps.assignUsed(rLabelsParagraph->getProperties().getTextCharacterProperties());
+ aCharProps.assignUsed(rLabelParagraph->getProperties().getTextCharacterProperties());
+ rLabelParagraph->getProperties().getTextCharacterProperties().assignUsed(aCharProps);
+}
+}
+
+void DataLabelsConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries, const TypeGroupConverter& rTypeGroup )
+{
+ PropertySet aPropSet( rxDataSeries );
+ if( !mrModel.mbDeleted )
+ {
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ bool bHasInternalData = getChartDocument()->hasInternalDataProvider();
+
+ lclConvertLabelFormatting( aPropSet, getFormatter(), mrModel, rTypeGroup, true, false, bHasInternalData, bMSO2007Doc );
+
+ if (mrModel.mxShapeProp)
+ {
+ // Import baseline border properties for these data labels.
+ importBorderProperties(aPropSet, *mrModel.mxShapeProp, getFilter().getGraphicHelper());
+ uno::Reference<lang::XMultiServiceFactory> xFactory(getChartDocument(), uno::UNO_QUERY);
+ ModelObjectHelper& rHelper = getFilter().getModelObjectHelperForModel(xFactory);
+ importFillProperties(aPropSet, *mrModel.mxShapeProp, getFilter().getGraphicHelper(),
+ rHelper);
+ }
+ }
+ // import leaderline of data labels
+ if( !mrModel.mbShowLeaderLines )
+ aPropSet.setProperty( PROP_ShowCustomLeaderLines, false );
+
+ // data point label settings
+ for (auto const& pointLabel : mrModel.maPointLabels)
+ {
+ if (pointLabel->maNumberFormat.maFormatCode.isEmpty())
+ pointLabel->maNumberFormat = mrModel.maNumberFormat;
+ InheritFromDataLabelsTextProps(mrModel, *pointLabel);
+
+ DataLabelConverter aLabelConv(*this, *pointLabel);
+ aLabelConv.convertFromModel( rxDataSeries, rTypeGroup );
+ }
+}
+
+ErrorBarConverter::ErrorBarConverter( const ConverterRoot& rParent, ErrorBarModel& rModel ) :
+ ConverterBase< ErrorBarModel >( rParent, rModel )
+{
+}
+
+ErrorBarConverter::~ErrorBarConverter()
+{
+}
+
+void ErrorBarConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries )
+{
+ bool bShowPos = (mrModel.mnTypeId == XML_plus) || (mrModel.mnTypeId == XML_both);
+ bool bShowNeg = (mrModel.mnTypeId == XML_minus) || (mrModel.mnTypeId == XML_both);
+ if( !(bShowPos || bShowNeg) )
+ return;
+
+ try
+ {
+ Reference< XPropertySet > xErrorBar( createInstance( "com.sun.star.chart2.ErrorBar" ), UNO_QUERY_THROW );
+ PropertySet aBarProp( xErrorBar );
+
+ // plus/minus bars
+ aBarProp.setProperty( PROP_ShowPositiveError, bShowPos );
+ aBarProp.setProperty( PROP_ShowNegativeError, bShowNeg );
+
+ // type of displayed error
+ namespace cssc = ::com::sun::star::chart;
+ switch( mrModel.mnValueType )
+ {
+ case XML_cust:
+ {
+ // #i87806# manual error bars
+ aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::FROM_DATA );
+ // attach data sequences to error bar
+ Reference< XDataSink > xDataSink( xErrorBar, UNO_QUERY );
+ if( xDataSink.is() )
+ {
+ // create vector of all value sequences
+ ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
+ // add positive values
+ if( bShowPos )
+ {
+ Reference< XLabeledDataSequence > xValueSeq = createLabeledDataSequence( ErrorBarModel::PLUS );
+ if( xValueSeq.is() )
+ aLabeledSeqVec.push_back( xValueSeq );
+ }
+ // add negative values
+ if( bShowNeg )
+ {
+ Reference< XLabeledDataSequence > xValueSeq = createLabeledDataSequence( ErrorBarModel::MINUS );
+ if( xValueSeq.is() )
+ aLabeledSeqVec.push_back( xValueSeq );
+ }
+ // attach labeled data sequences to series
+ if( aLabeledSeqVec.empty() )
+ xErrorBar.clear();
+ else
+ xDataSink->setData( comphelper::containerToSequence( aLabeledSeqVec ) );
+ }
+ }
+ break;
+ case XML_fixedVal:
+ aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::ABSOLUTE );
+ aBarProp.setProperty( PROP_PositiveError, mrModel.mfValue );
+ aBarProp.setProperty( PROP_NegativeError, mrModel.mfValue );
+ break;
+ case XML_percentage:
+ aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::RELATIVE );
+ aBarProp.setProperty( PROP_PositiveError, mrModel.mfValue );
+ aBarProp.setProperty( PROP_NegativeError, mrModel.mfValue );
+ break;
+ case XML_stdDev:
+ aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::STANDARD_DEVIATION );
+ aBarProp.setProperty( PROP_Weight, mrModel.mfValue );
+ break;
+ case XML_stdErr:
+ aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::STANDARD_ERROR );
+ break;
+ default:
+ OSL_FAIL( "ErrorBarConverter::convertFromModel - unknown error bar type" );
+ xErrorBar.clear();
+ }
+
+ // error bar formatting
+ getFormatter().convertFrameFormatting( aBarProp, mrModel.mxShapeProp, OBJECTTYPE_ERRORBAR );
+
+ if( xErrorBar.is() )
+ {
+ PropertySet aSeriesProp( rxDataSeries );
+ switch( mrModel.mnDirection )
+ {
+ case XML_x: aSeriesProp.setProperty( PROP_ErrorBarX, xErrorBar ); break;
+ case XML_y: aSeriesProp.setProperty( PROP_ErrorBarY, xErrorBar ); break;
+ default: OSL_FAIL( "ErrorBarConverter::convertFromModel - invalid error bar direction" );
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "ErrorBarConverter::convertFromModel - error while creating error bars" );
+ }
+}
+
+Reference< XLabeledDataSequence > ErrorBarConverter::createLabeledDataSequence( ErrorBarModel::SourceType eSourceType )
+{
+ OUString aRole;
+ switch( eSourceType )
+ {
+ case ErrorBarModel::PLUS:
+ switch( mrModel.mnDirection )
+ {
+ case XML_x: aRole = "error-bars-x-positive"; break;
+ case XML_y: aRole = "error-bars-y-positive"; break;
+ }
+ break;
+ case ErrorBarModel::MINUS:
+ switch( mrModel.mnDirection )
+ {
+ case XML_x: aRole = "error-bars-x-negative"; break;
+ case XML_y: aRole = "error-bars-y-negative"; break;
+ }
+ break;
+ }
+ OSL_ENSURE( !aRole.isEmpty(), "ErrorBarConverter::createLabeledDataSequence - invalid error bar direction" );
+ return lclCreateLabeledDataSequence( *this, mrModel.maSources.get( eSourceType ).get(), aRole );
+}
+
+TrendlineLabelConverter::TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel ) :
+ ConverterBase< TrendlineLabelModel >( rParent, rModel )
+{
+}
+
+TrendlineLabelConverter::~TrendlineLabelConverter()
+{
+}
+
+void TrendlineLabelConverter::convertFromModel( PropertySet& rPropSet )
+{
+ // formatting
+ getFormatter().convertFormatting( rPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_TRENDLINELABEL );
+}
+
+TrendlineConverter::TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel ) :
+ ConverterBase< TrendlineModel >( rParent, rModel )
+{
+}
+
+TrendlineConverter::~TrendlineConverter()
+{
+}
+
+void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries )
+{
+ try
+ {
+ // trend line type
+ OUString aServiceName;
+ switch( mrModel.mnTypeId )
+ {
+ case XML_exp:
+ aServiceName = "com.sun.star.chart2.ExponentialRegressionCurve";
+ break;
+ case XML_linear:
+ aServiceName = "com.sun.star.chart2.LinearRegressionCurve";
+ break;
+ case XML_log:
+ aServiceName = "com.sun.star.chart2.LogarithmicRegressionCurve";
+ break;
+ case XML_movingAvg:
+ aServiceName = "com.sun.star.chart2.MovingAverageRegressionCurve";
+ break;
+ case XML_poly:
+ aServiceName = "com.sun.star.chart2.PolynomialRegressionCurve";
+ break;
+ case XML_power:
+ aServiceName = "com.sun.star.chart2.PotentialRegressionCurve";
+ break;
+ default:
+ OSL_FAIL( "TrendlineConverter::convertFromModel - unknown trendline type" );
+ }
+ if( !aServiceName.isEmpty() )
+ {
+ Reference< XRegressionCurve > xRegCurve( createInstance( aServiceName ), UNO_QUERY_THROW );
+ PropertySet aPropSet( xRegCurve );
+
+ // Name
+ aPropSet.setProperty( PROP_CurveName, mrModel.maName );
+ aPropSet.setProperty( PROP_PolynomialDegree, mrModel.mnOrder );
+ aPropSet.setProperty( PROP_MovingAveragePeriod, mrModel.mnPeriod );
+
+ // Intercept
+ bool hasIntercept = mrModel.mfIntercept.has();
+ aPropSet.setProperty( PROP_ForceIntercept, hasIntercept);
+ if (hasIntercept)
+ aPropSet.setProperty( PROP_InterceptValue, mrModel.mfIntercept.get());
+
+ // Extrapolation
+ if (mrModel.mfForward.has())
+ aPropSet.setProperty( PROP_ExtrapolateForward, mrModel.mfForward.get() );
+ if (mrModel.mfBackward.has())
+ aPropSet.setProperty( PROP_ExtrapolateBackward, mrModel.mfBackward.get() );
+
+ // trendline formatting
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_TRENDLINE );
+
+ // #i83100# show equation and correlation coefficient
+ PropertySet aLabelProp( xRegCurve->getEquationProperties() );
+ aLabelProp.setProperty( PROP_ShowEquation, mrModel.mbDispEquation );
+ aLabelProp.setProperty( PROP_ShowCorrelationCoefficient, mrModel.mbDispRSquared );
+
+ // #i83100# formatting of the equation text box
+ if( mrModel.mbDispEquation || mrModel.mbDispRSquared )
+ {
+ TrendlineLabelConverter aLabelConv( *this, mrModel.mxLabel.getOrCreate() );
+ aLabelConv.convertFromModel( aLabelProp );
+ }
+
+ // unsupported: #i5085# manual trendline size
+ // unsupported: #i34093# manual crossing point
+
+ Reference< XRegressionCurveContainer > xRegCurveCont( rxDataSeries, UNO_QUERY_THROW );
+ xRegCurveCont->addRegressionCurve( xRegCurve );
+ }
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "TrendlineConverter::convertFromModel - error while creating trendline" );
+ }
+}
+
+DataPointConverter::DataPointConverter( const ConverterRoot& rParent, DataPointModel& rModel ) :
+ ConverterBase< DataPointModel >( rParent, rModel )
+{
+}
+
+DataPointConverter::~DataPointConverter()
+{
+}
+
+void DataPointConverter::convertFromModel( const Reference< XDataSeries >& rxDataSeries,
+ const TypeGroupConverter& rTypeGroup, const SeriesModel& rSeries )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ try
+ {
+ PropertySet aPropSet( rxDataSeries->getDataPointByIndex( mrModel.mnIndex ) );
+
+ // data point marker
+ if( mrModel.monMarkerSymbol.differsFrom( rSeries.mnMarkerSymbol ) || mrModel.monMarkerSize.differsFrom( rSeries.mnMarkerSize ) )
+ rTypeGroup.convertMarker( aPropSet, mrModel.monMarkerSymbol.get( rSeries.mnMarkerSymbol ),
+ mrModel.monMarkerSize.get( rSeries.mnMarkerSize ), mrModel.mxMarkerProp );
+
+ // data point pie explosion
+ if( mrModel.monExplosion.differsFrom( rSeries.mnExplosion ) )
+ rTypeGroup.convertPieExplosion( aPropSet, mrModel.monExplosion.get() );
+
+ // point formatting
+ if( mrModel.mxShapeProp.is() )
+ {
+ if( rTypeGroup.getTypeInfo().mbPictureOptions )
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
+ else
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
+ }
+ else if (rSeries.mxShapeProp.is())
+ {
+ getFormatter().convertFrameFormatting( aPropSet, rSeries.mxShapeProp, rTypeGroup.getSeriesObjectType(), rSeries.mnIndex );
+ }
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+SeriesConverter::SeriesConverter( const ConverterRoot& rParent, SeriesModel& rModel ) :
+ ConverterBase< SeriesModel >( rParent, rModel )
+{
+}
+
+SeriesConverter::~SeriesConverter()
+{
+}
+
+Reference< XLabeledDataSequence > SeriesConverter::createCategorySequence( const OUString& rRole )
+{
+ return createLabeledDataSequence(SeriesModel::CATEGORIES, rRole, false);
+}
+
+Reference< XLabeledDataSequence > SeriesConverter::createValueSequence( const OUString& rRole )
+{
+ return createLabeledDataSequence( SeriesModel::VALUES, rRole, true );
+}
+
+Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConverter& rTypeGroup, bool bVaryColorsByPoint )
+{
+ const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo();
+
+ // create the data series object
+ Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY );
+ PropertySet aSeriesProp( xDataSeries );
+
+ // attach data and title sequences to series
+ sal_Int32 nDataPointCount = 0;
+ Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY );
+ if( xDataSink.is() )
+ {
+ // create vector of all value sequences
+ ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
+ // add Y values
+ Reference< XLabeledDataSequence > xYValueSeq = createValueSequence( "values-y" );
+ if( xYValueSeq.is() )
+ {
+ aLabeledSeqVec.push_back( xYValueSeq );
+ Reference< XDataSequence > xValues = xYValueSeq->getValues();
+ if( xValues.is() )
+ nDataPointCount = xValues->getData().getLength();
+
+ if (!nDataPointCount)
+ // No values present. Don't create a data series.
+ return Reference<XDataSeries>();
+ }
+ // add X values of scatter and bubble charts
+ if( !rTypeInfo.mbCategoryAxis )
+ {
+ Reference< XLabeledDataSequence > xXValueSeq = createCategorySequence( "values-x" );
+ if( xXValueSeq.is() )
+ aLabeledSeqVec.push_back( xXValueSeq );
+ // add size values of bubble charts
+ if( rTypeInfo.meTypeId == TYPEID_BUBBLE )
+ {
+ Reference< XLabeledDataSequence > xSizeValueSeq = createLabeledDataSequence( SeriesModel::POINTS, "values-size", true );
+ if( xSizeValueSeq.is() )
+ aLabeledSeqVec.push_back( xSizeValueSeq );
+ }
+ }
+ // attach labeled data sequences to series
+ if( !aLabeledSeqVec.empty() )
+ xDataSink->setData( comphelper::containerToSequence( aLabeledSeqVec ) );
+ }
+
+ // error bars
+ for (auto const& errorBar : mrModel.maErrorBars)
+ {
+ ErrorBarConverter aErrorBarConv(*this, *errorBar);
+ aErrorBarConv.convertFromModel( xDataSeries );
+ }
+
+ // trendlines
+ for (auto const& trendLine : mrModel.maTrendlines)
+ {
+ TrendlineConverter aTrendlineConv(*this, *trendLine);
+ aTrendlineConv.convertFromModel( xDataSeries );
+ }
+
+ // data point markers
+ rTypeGroup.convertMarker( aSeriesProp, mrModel.mnMarkerSymbol, mrModel.mnMarkerSize, mrModel.mxMarkerProp );
+#if OOX_CHART_SMOOTHED_PER_SERIES
+ // #i66858# smoothed series lines
+ rTypeGroup.convertLineSmooth( aSeriesProp, mrModel.mbSmooth );
+#endif
+ // 3D bar style (not possible to set at chart type -> set at all series)
+ rTypeGroup.convertBarGeometry( aSeriesProp, mrModel.monShape.get( rTypeGroup.getModel().mnShape ) );
+ // pie explosion (restricted to [0%,100%] in Chart2)
+ rTypeGroup.convertPieExplosion( aSeriesProp, mrModel.mnExplosion );
+
+ // series formatting
+ ObjectFormatter& rFormatter = getFormatter();
+ ObjectType eObjType = rTypeGroup.getSeriesObjectType();
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( rTypeInfo.mbPictureOptions )
+ rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(bMSO2007Doc), eObjType, mrModel.mnIndex );
+ else
+ rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, eObjType, mrModel.mnIndex );
+
+ // set the (unused) property default value used by the Chart2 templates (true for pie/doughnut charts)
+ bool bIsPie = rTypeInfo.meTypeCategory == TYPECATEGORY_PIE;
+ aSeriesProp.setProperty( PROP_VaryColorsByPoint, bVaryColorsByPoint );
+
+ // own area formatting for every data point (TODO: varying line color not supported)
+ // #i91271# always set area formatting for every point in pie/doughnut charts to override their automatic point formatting
+ if( bIsPie || (bVaryColorsByPoint && rTypeGroup.isSeriesFrameFormat() && ObjectFormatter::isAutomaticFill( mrModel.mxShapeProp )) )
+ {
+ /* Set the series point number as color cycle size at the object
+ formatter to get correct start-shade/end-tint. TODO: in doughnut
+ charts, the sizes of the series may vary, need to use the maximum
+ point count of all series. */
+ sal_Int32 nOldMax = rFormatter.getMaxSeriesIndex();
+ if( bVaryColorsByPoint )
+ rFormatter.setMaxSeriesIndex( nDataPointCount - 1 );
+ for( sal_Int32 nIndex = 0; nIndex < nDataPointCount; ++nIndex )
+ {
+ try
+ {
+ PropertySet aPointProp( xDataSeries->getDataPointByIndex( nIndex ) );
+ rFormatter.convertAutomaticFill( aPointProp, eObjType, bVaryColorsByPoint ? nIndex : mrModel.mnIndex );
+ }
+ catch( Exception& )
+ {
+ }
+ }
+ rFormatter.setMaxSeriesIndex( nOldMax );
+ }
+
+ // data point settings
+ for (auto const& point : mrModel.maPoints)
+ {
+ DataPointConverter aPointConv(*this, *point);
+ aPointConv.convertFromModel( xDataSeries, rTypeGroup, mrModel );
+ }
+
+ /* Series data label settings. If and only if the series does not contain
+ a c:dLbls element, then the c:dLbls element of the parent chart type is
+ used (data label settings of the parent chart type are *not* merged
+ into own existing data label settings). */
+ ModelRef< DataLabelsModel > xLabels = mrModel.mxLabels.is() ? mrModel.mxLabels : rTypeGroup.getModel().mxLabels;
+ if( xLabels.is() )
+ {
+ if( xLabels->maNumberFormat.maFormatCode.isEmpty() )
+ {
+ // Use number format code from Value series
+ DataSourceModel* pValues = mrModel.maSources.get( SeriesModel::VALUES ).get();
+ if( pValues )
+ xLabels->maNumberFormat.maFormatCode = pValues->mxDataSeq->maFormatCode;
+ }
+ DataLabelsConverter aLabelsConv( *this, *xLabels );
+ aLabelsConv.convertFromModel( xDataSeries, rTypeGroup );
+ }
+
+ return xDataSeries;
+}
+
+// private --------------------------------------------------------------------
+
+Reference< XLabeledDataSequence > SeriesConverter::createLabeledDataSequence(
+ SeriesModel::SourceType eSourceType, const OUString& rRole, bool bUseTextLabel )
+{
+ DataSourceModel* pValues = mrModel.maSources.get( eSourceType ).get();
+ TextModel* pTitle = bUseTextLabel ? mrModel.mxText.get() : nullptr;
+ return lclCreateLabeledDataSequence( *this, pValues, rRole, pTitle );
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/seriesmodel.cxx b/oox/source/drawingml/chart/seriesmodel.cxx
new file mode 100644
index 000000000..95b0deb22
--- /dev/null
+++ b/oox/source/drawingml/chart/seriesmodel.cxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/seriesmodel.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+DataLabelModelBase::DataLabelModelBase(bool bMSO2007Doc) :
+ mbDeleted( !bMSO2007Doc )
+{
+}
+
+DataLabelModelBase::~DataLabelModelBase()
+{
+}
+
+DataLabelModel::DataLabelModel(const DataLabelsModel& rParent, bool bMSO2007Doc) :
+ DataLabelModelBase(bMSO2007Doc),
+ mrParent( rParent ),
+ mnIndex( -1 )
+{
+}
+
+DataLabelModel::~DataLabelModel()
+{
+}
+
+DataLabelsModel::DataLabelsModel(bool bMSO2007Doc) :
+ DataLabelModelBase(bMSO2007Doc),
+ mpLabelsSource( nullptr ),
+ mbShowLeaderLines( !bMSO2007Doc )
+{
+}
+
+DataLabelsModel::~DataLabelsModel()
+{
+}
+
+PictureOptionsModel::PictureOptionsModel(bool bMSO2007Doc) :
+ mfStackUnit( 1.0 ),
+ mnPictureFormat( XML_stretch ),
+ mbApplyToFront( !bMSO2007Doc ),
+ mbApplyToSides( !bMSO2007Doc ),
+ mbApplyToEnd( !bMSO2007Doc )
+{
+}
+
+ErrorBarModel::ErrorBarModel(bool bMSO2007Doc) :
+ mfValue( 0.0 ),
+ mnDirection( XML_y ),
+ mnTypeId( XML_both ),
+ mnValueType( XML_fixedVal ),
+ mbNoEndCap( !bMSO2007Doc )
+{
+}
+
+ErrorBarModel::~ErrorBarModel()
+{
+}
+
+TrendlineLabelModel::TrendlineLabelModel()
+{
+}
+
+TrendlineLabelModel::~TrendlineLabelModel()
+{
+}
+
+TrendlineModel::TrendlineModel(bool bMSO2007Doc) :
+ mnOrder( 2 ),
+ mnPeriod( 2 ),
+ mnTypeId( XML_linear ),
+ mbDispEquation( !bMSO2007Doc ),
+ mbDispRSquared( !bMSO2007Doc )
+{
+}
+
+TrendlineModel::~TrendlineModel()
+{
+}
+
+DataPointModel::DataPointModel(bool bMSO2007Doc) :
+ mnIndex( -1 ),
+ mbInvertNeg( !bMSO2007Doc )
+{
+}
+
+DataPointModel::~DataPointModel()
+{
+}
+
+SeriesModel::SeriesModel(bool bMSO2007Doc) :
+ mnExplosion( 0 ),
+ mnIndex( -1 ),
+ mnMarkerSize( 5 ),
+ mnMarkerSymbol( XML_auto ),
+ mnOrder( -1 ),
+ mbBubble3d( !bMSO2007Doc ),
+ mbInvertNeg( !bMSO2007Doc ),
+ mbSmooth( !bMSO2007Doc )
+{
+}
+
+SeriesModel::~SeriesModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx
new file mode 100644
index 000000000..04a4ea706
--- /dev/null
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/titlecontext.hxx>
+
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/chart/datasourcecontext.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <osl/diagnose.h>
+
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+TextContext::TextContext( ContextHandler2Helper& rParent, TextModel& rModel ) :
+ ContextBase< TextModel >( rParent, rModel )
+{
+}
+
+TextContext::~TextContext()
+{
+}
+
+ContextHandlerRef TextContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
+{
+ // this context handler is used for <c:tx> and embedded <c:v> elements
+ if( isCurrentElement( C_TOKEN( tx ) ) ) switch( nElement )
+ {
+ case C_TOKEN( rich ):
+ return new TextBodyContext( *this, mrModel.mxTextBody.create() );
+
+ case C_TOKEN( strRef ):
+ OSL_ENSURE( !mrModel.mxDataSeq, "TextContext::onCreateContext - multiple data sequences" );
+ return new StringSequenceContext( *this, mrModel.mxDataSeq.create() );
+
+ case C_TOKEN( v ):
+ OSL_ENSURE( !mrModel.mxDataSeq, "TextContext::onCreateContext - multiple data sequences" );
+ return this; // collect value in onCharacters()
+ }
+ return nullptr;
+}
+
+void TextContext::onCharacters( const OUString& rChars )
+{
+ if( isCurrentElement( C_TOKEN( v ) ) )
+ {
+ // Static text is stored as a single string formula token for Excel document.
+ mrModel.mxDataSeq.create().maFormula = "\"" + rChars + "\"";
+
+ // Also store it as a single element type for non-Excel document.
+ mrModel.mxDataSeq->maData[0] <<= rChars;
+ mrModel.mxDataSeq->mnPointCount = 1;
+ }
+}
+
+TitleContext::TitleContext( ContextHandler2Helper& rParent, TitleModel& rModel ) :
+ ContextBase< TitleModel >( rParent, rModel )
+{
+}
+
+TitleContext::~TitleContext()
+{
+}
+
+ContextHandlerRef TitleContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // this context handler is used for <c:title> only
+ switch( nElement )
+ {
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+
+ case C_TOKEN( overlay ):
+ mrModel.mbOverlay = rAttribs.getBool( XML_val, true );
+ return nullptr;
+
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+
+ case C_TOKEN( tx ):
+ return new TextContext( *this, mrModel.mxText.create() );
+
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ }
+ return nullptr;
+}
+
+LegendEntryContext::LegendEntryContext( ContextHandler2Helper& rParent, LegendEntryModel& rModel ) :
+ ContextBase< LegendEntryModel >( rParent, rModel )
+{
+}
+
+LegendEntryContext::~LegendEntryContext()
+{
+}
+
+ContextHandlerRef LegendEntryContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // this context handler is used for <c:legendEntry> only
+ switch( nElement )
+ {
+ case C_TOKEN( idx ):
+ mrModel.mnLegendEntryIdx = rAttribs.getInteger( XML_val, -1 );
+ return nullptr;
+
+ case C_TOKEN( delete ):
+ mrModel.mbLabelDeleted = rAttribs.getBool( XML_val, true );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+LegendContext::LegendContext( ContextHandler2Helper& rParent, LegendModel& rModel ) :
+ ContextBase< LegendModel >( rParent, rModel )
+{
+}
+
+LegendContext::~LegendContext()
+{
+}
+
+ContextHandlerRef LegendContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // this context handler is used for <c:legend> only
+ switch( nElement )
+ {
+ case C_TOKEN( layout ):
+ return new LayoutContext( *this, mrModel.mxLayout.create() );
+
+ case C_TOKEN( legendPos ):
+ mrModel.mnPosition = rAttribs.getToken( XML_val, XML_r );
+ return nullptr;
+
+ case C_TOKEN( legendEntry ):
+ return new LegendEntryContext( *this, mrModel.maLegendEntries.create() );
+
+ case C_TOKEN( overlay ):
+ mrModel.mbOverlay = rAttribs.getBool( XML_val, true );
+ return nullptr;
+
+ case C_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
+
+ case C_TOKEN( txPr ):
+ return new TextBodyContext( *this, mrModel.mxTextProp.create() );
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
new file mode 100644
index 000000000..91684393c
--- /dev/null
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -0,0 +1,363 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/titleconverter.hxx>
+
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
+#include <com/sun/star/chart2/FormattedString.hpp>
+#include <com/sun/star/chart2/LegendPosition.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/chart2/XLegend.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+
+#include <comphelper/sequence.hxx>
+#include <osl/diagnose.h>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/chart/datasourceconverter.hxx>
+#include <drawingml/chart/titlemodel.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/drawing/Alignment.hpp>
+
+#include <oox/drawingml/chart/modelbase.hxx>
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+
+
+TextConverter::TextConverter( const ConverterRoot& rParent, TextModel& rModel ) :
+ ConverterBase< TextModel >( rParent, rModel )
+{
+}
+
+TextConverter::~TextConverter()
+{
+}
+
+Reference< XDataSequence > TextConverter::createDataSequence( const OUString& rRole )
+{
+ Reference< XDataSequence > xDataSeq;
+ if( mrModel.mxDataSeq.is() )
+ {
+ DataSequenceConverter aDataSeqConv( *this, *mrModel.mxDataSeq );
+ xDataSeq = aDataSeqConv.createDataSequence( rRole );
+ }
+ return xDataSeq;
+}
+
+Sequence< Reference< XFormattedString > > TextConverter::createStringSequence(
+ const OUString& rDefaultText, const ModelRef< TextBody >& rxTextProp, ObjectType eObjType )
+{
+ OSL_ENSURE( !mrModel.mxDataSeq || !mrModel.mxTextBody, "TextConverter::createStringSequence - linked string and rich text found" );
+ ::std::vector< Reference< XFormattedString > > aStringVec;
+ if( mrModel.mxTextBody.is() )
+ {
+ // rich-formatted text objects can be created, but currently Chart2 is not able to show them
+ const TextParagraphVector& rTextParas = mrModel.mxTextBody->getParagraphs();
+ for( TextParagraphVector::const_iterator aPIt = rTextParas.begin(), aPEnd = rTextParas.end(); aPIt != aPEnd; ++aPIt )
+ {
+ const TextParagraph& rTextPara = **aPIt;
+ const TextCharacterProperties& rParaProps = rTextPara.getProperties().getTextCharacterProperties();
+ for( TextRunVector::const_iterator aRIt = rTextPara.getRuns().begin(), aREnd = rTextPara.getRuns().end(); aRIt != aREnd; ++aRIt )
+ {
+ const TextRun& rTextRun = **aRIt;
+ bool bAddNewLine = ((aRIt + 1 == aREnd) && (aPIt + 1 != aPEnd)) || rTextRun.isLineBreak();
+ Reference< XFormattedString > xFmtStr = appendFormattedString( aStringVec, rTextRun.getText(), bAddNewLine );
+ PropertySet aPropSet( xFmtStr );
+ TextCharacterProperties aRunProps( rParaProps );
+ aRunProps.assignUsed( rTextRun.getTextCharacterProperties() );
+ getFormatter().convertTextFormatting( aPropSet, aRunProps, eObjType );
+ }
+ }
+ }
+ else
+ {
+ OUString aString;
+ // try to create string from linked data
+ if( mrModel.mxDataSeq.is() && !mrModel.mxDataSeq->maData.empty() )
+ mrModel.mxDataSeq->maData.begin()->second >>= aString;
+ // no linked string -> fall back to default string
+ if( aString.isEmpty() )
+ aString = rDefaultText;
+
+ // create formatted string object
+ if( !aString.isEmpty() )
+ {
+ Reference< XFormattedString > xFmtStr = appendFormattedString( aStringVec, aString, false );
+ PropertySet aPropSet( xFmtStr );
+ getFormatter().convertTextFormatting( aPropSet, rxTextProp, eObjType );
+ }
+ }
+
+ return comphelper::containerToSequence( aStringVec );
+}
+
+Reference< XFormattedString > TextConverter::appendFormattedString(
+ ::std::vector< Reference< XFormattedString > >& orStringVec, const OUString& rString, bool bAddNewLine ) const
+{
+ Reference< XFormattedString2 > xFmtStr;
+ try
+ {
+ xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
+ xFmtStr->setString( bAddNewLine ? (rString + "\n") : rString );
+ orStringVec.emplace_back(xFmtStr );
+ }
+ catch( Exception& )
+ {
+ }
+ return xFmtStr;
+}
+
+TitleConverter::TitleConverter( const ConverterRoot& rParent, TitleModel& rModel ) :
+ ConverterBase< TitleModel >( rParent, rModel )
+{
+}
+
+TitleConverter::~TitleConverter()
+{
+}
+
+void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, const OUString& rAutoTitle, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx )
+{
+ if( !rxTitled.is() )
+ return;
+
+ // create the formatted strings
+ TextModel& rText = mrModel.mxText.getOrCreate();
+ TextConverter aTextConv( *this, rText );
+ Sequence< Reference< XFormattedString > > aStringSeq = aTextConv.createStringSequence( rAutoTitle, mrModel.mxTextProp, eObjType );
+ if( !aStringSeq.hasElements() )
+ return;
+
+ try
+ {
+ // create the title object and set the string data
+ Reference< XTitle > xTitle( createInstance( "com.sun.star.chart2.Title" ), UNO_QUERY_THROW );
+ xTitle->setText( aStringSeq );
+ rxTitled->setTitleObject( xTitle );
+
+ // frame formatting (text formatting already done in TextConverter::createStringSequence())
+ PropertySet aPropSet( xTitle );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, eObjType );
+
+ // frame rotation
+ OSL_ENSURE( !mrModel.mxTextProp || !rText.mxTextBody, "TitleConverter::convertFromModel - multiple text properties" );
+ ModelRef< TextBody > xTextProp = mrModel.mxTextProp.is() ? mrModel.mxTextProp : rText.mxTextBody;
+ ObjectFormatter::convertTextRotation( aPropSet, xTextProp, true, mrModel.mnDefaultRotation );
+
+ // register the title and layout data for conversion of position
+ registerTitleLayout( xTitle, mrModel.mxLayout, eObjType, nMainIdx, nSubIdx );
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+LegendConverter::LegendConverter( const ConverterRoot& rParent, LegendModel& rModel ) :
+ ConverterBase< LegendModel >( rParent, rModel )
+{
+}
+
+LegendConverter::~LegendConverter()
+{
+}
+
+void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
+{
+ if( !rxDiagram.is() )
+ return;
+
+ try
+ {
+ namespace cssc = ::com::sun::star::chart;
+ namespace cssc2 = ::com::sun::star::chart2;
+
+ // create the legend
+ Reference< XLegend > xLegend( createInstance( "com.sun.star.chart2.Legend" ), UNO_QUERY_THROW );
+ rxDiagram->setLegend( xLegend );
+ PropertySet aPropSet( xLegend );
+ aPropSet.setProperty( PROP_Show, true );
+
+ // legend formatting
+ getFormatter().convertFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_LEGEND );
+
+ // predefined legend position and expansion
+ cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_LINE_END;
+ cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
+ RelativePosition eRelPos;
+ bool bTopRight=false;
+ switch( mrModel.mnPosition )
+ {
+ case XML_l:
+ eLegendPos = cssc2::LegendPosition_LINE_START;
+ eLegendExpand = cssc::ChartLegendExpansion_HIGH;
+ break;
+ case XML_r:
+ eLegendPos = cssc2::LegendPosition_LINE_END;
+ eLegendExpand = cssc::ChartLegendExpansion_HIGH;
+ break;
+ case XML_tr: // top-right not supported
+ eRelPos.Primary = 1;
+ eRelPos.Secondary =0;
+ eRelPos.Anchor = Alignment_TOP_RIGHT;
+ bTopRight=true;
+ break;
+ case XML_t:
+ eLegendPos = cssc2::LegendPosition_PAGE_START;
+ eLegendExpand = cssc::ChartLegendExpansion_WIDE;
+ break;
+ case XML_b:
+ eLegendPos = cssc2::LegendPosition_PAGE_END;
+ eLegendExpand = cssc::ChartLegendExpansion_WIDE;
+ break;
+ }
+ bool bManualLayout=false;
+ // manual positioning and size
+ if( mrModel.mxLayout )
+ {
+ LayoutConverter aLayoutConv( *this, *mrModel.mxLayout );
+ // manual size needs ChartLegendExpansion_CUSTOM
+ if( aLayoutConv.convertFromModel( aPropSet ) )
+ {
+ eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
+ }
+ bManualLayout = !aLayoutConv.getAutoLayout();
+ }
+
+ // set position and expansion properties
+ aPropSet.setProperty( PROP_AnchorPosition, eLegendPos );
+ aPropSet.setProperty( PROP_Expansion, eLegendExpand );
+
+ if (bTopRight && !bManualLayout)
+ aPropSet.setProperty( PROP_RelativePosition , Any(eRelPos));
+
+ aPropSet.setProperty(PROP_Overlay, mrModel.mbOverlay);
+
+ if (mrModel.maLegendEntries.size() > 0)
+ legendEntriesFormatting(rxDiagram);
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+void LegendConverter::legendEntriesFormatting(const Reference<XDiagram>& rxDiagram)
+{
+ Reference<XCoordinateSystemContainer> xCooSysContainer(rxDiagram, UNO_QUERY_THROW);
+ const Sequence<Reference<XCoordinateSystem>> xCooSysSequence(xCooSysContainer->getCoordinateSystems());
+ if (!xCooSysSequence.hasElements())
+ return;
+
+ sal_Int32 nIndex = 0;
+ for (const auto& rCooSys : xCooSysSequence)
+ {
+ PropertySet aCooSysProp(rCooSys);
+ bool bSwapXAndY = aCooSysProp.getBoolProperty(PROP_SwapXAndYAxis);
+
+ Reference<XChartTypeContainer> xChartTypeContainer(rCooSys, UNO_QUERY_THROW);
+ const Sequence<Reference<XChartType>> xChartTypeSequence(xChartTypeContainer->getChartTypes());
+ if (!xChartTypeSequence.hasElements())
+ continue;
+
+ for (const auto& rCT : xChartTypeSequence)
+ {
+ Reference<XDataSeriesContainer> xDSCont(rCT, UNO_QUERY);
+ if (!xDSCont.is())
+ continue;
+
+ bool bIsPie
+ = rCT->getChartType().equalsIgnoreAsciiCase("com.sun.star.chart2.PieChartType");
+ if (bIsPie)
+ {
+ PropertySet xChartTypeProp(rCT);
+ bIsPie = !xChartTypeProp.getBoolProperty(PROP_UseRings);
+ }
+ const Sequence<Reference<XDataSeries>> aDataSeriesSeq = xDSCont->getDataSeries();
+ if (bSwapXAndY)
+ nIndex += aDataSeriesSeq.getLength() - 1;
+ for (const auto& rDataSeries : aDataSeriesSeq)
+ {
+ PropertySet aSeriesProp(rDataSeries);
+ bool bVaryColorsByPoint = aSeriesProp.getBoolProperty(PROP_VaryColorsByPoint);
+
+ if (bVaryColorsByPoint || bIsPie)
+ {
+ Reference<XDataSource> xDSrc(rDataSeries, UNO_QUERY);
+ if (!xDSrc.is())
+ continue;
+
+ const Sequence<Reference<XLabeledDataSequence> > aDataSeqs = xDSrc->getDataSequences();
+ std::vector<sal_Int32> deletedLegendEntries;
+ sal_Int32 j = 0;
+ for (const auto& rDataSeq : aDataSeqs)
+ {
+ Reference<XDataSequence> xValues = rDataSeq->getValues();
+ if (!xValues.is())
+ continue;
+
+ sal_Int32 nDataSeqSize = xValues->getData().getLength();
+ for (sal_Int32 i = 0; i < nDataSeqSize; ++i)
+ {
+ for (const auto& rLegendEntry : mrModel.maLegendEntries)
+ {
+ if (nIndex == rLegendEntry->mnLegendEntryIdx && rLegendEntry->mbLabelDeleted)
+ {
+ deletedLegendEntries.push_back(j + i);
+ break;
+ }
+ }
+ nIndex++;
+ }
+ j += nDataSeqSize;
+ }
+ if (deletedLegendEntries.size() > 0)
+ aSeriesProp.setProperty(PROP_DeletedLegendEntries, comphelper::containerToSequence(deletedLegendEntries));
+ }
+ else
+ {
+ for (const auto& rLegendEntry : mrModel.maLegendEntries)
+ {
+ if (nIndex == rLegendEntry->mnLegendEntryIdx)
+ {
+ aSeriesProp.setProperty(PROP_ShowLegendEntry, !rLegendEntry->mbLabelDeleted);
+ break;
+ }
+ }
+ bSwapXAndY ? nIndex-- : nIndex++;
+ }
+ }
+ if (bSwapXAndY)
+ nIndex += aDataSeriesSeq.getLength() + 1;
+ }
+ }
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/titlemodel.cxx b/oox/source/drawingml/chart/titlemodel.cxx
new file mode 100644
index 000000000..0bbaa7ee6
--- /dev/null
+++ b/oox/source/drawingml/chart/titlemodel.cxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/titlemodel.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+TextModel::TextModel()
+{
+}
+
+TextModel::~TextModel()
+{
+}
+
+TitleModel::TitleModel(sal_Int32 nDefaultRotation) :
+ mbOverlay( false ),
+ mnDefaultRotation(nDefaultRotation)
+{
+}
+
+TitleModel::~TitleModel()
+{
+}
+
+LegendEntryModel::LegendEntryModel() :
+ mnLegendEntryIdx( -1 ),
+ mbLabelDeleted( false )
+{
+}
+
+LegendModel::LegendModel() :
+ mnPosition( XML_r ),
+ mbOverlay( false )
+{
+}
+
+LegendModel::~LegendModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx
new file mode 100644
index 000000000..96c4d6fc2
--- /dev/null
+++ b/oox/source/drawingml/chart/typegroupcontext.cxx
@@ -0,0 +1,371 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/typegroupcontext.hxx>
+
+#include <drawingml/chart/seriescontext.hxx>
+#include <drawingml/chart/typegroupmodel.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+UpDownBarsContext::UpDownBarsContext( ContextHandler2Helper& rParent, UpDownBarsModel& rModel ) :
+ ContextBase< UpDownBarsModel >( rParent, rModel )
+{
+}
+
+UpDownBarsContext::~UpDownBarsContext()
+{
+}
+
+ContextHandlerRef UpDownBarsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case C_TOKEN( upDownBars ):
+ switch( nElement )
+ {
+ case C_TOKEN( downBars ):
+ return new ShapePrWrapperContext( *this, mrModel.mxDownBars.create() );
+ case C_TOKEN( gapWidth ):
+ mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( upBars ):
+ return new ShapePrWrapperContext( *this, mrModel.mxUpBars.create() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+AreaTypeGroupContext::AreaTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+AreaTypeGroupContext::~AreaTypeGroupContext()
+{
+}
+
+ContextHandlerRef AreaTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dropLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() );
+ case C_TOKEN( gapDepth ):
+ mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( grouping ):
+ mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new AreaSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+BarTypeGroupContext::BarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+BarTypeGroupContext::~BarTypeGroupContext()
+{
+}
+
+ContextHandlerRef BarTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( barDir ):
+ mrModel.mnBarDir = rAttribs.getToken( XML_val, XML_col );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( gapDepth ):
+ mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( gapWidth ):
+ mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( grouping ):
+ mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered );
+ return nullptr;
+ case C_TOKEN( overlap ):
+ mrModel.mnOverlap = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new BarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( serLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() );
+ case C_TOKEN( shape ):
+ mrModel.mnShape = rAttribs.getToken( XML_val, XML_box );
+ return nullptr;
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+BubbleTypeGroupContext::BubbleTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+BubbleTypeGroupContext::~BubbleTypeGroupContext()
+{
+}
+
+ContextHandlerRef BubbleTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( bubble3D ):
+ mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( bubbleScale ):
+ mrModel.mnBubbleScale = rAttribs.getInteger( XML_val, 100 );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( ser ):
+ return new BubbleSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( showNegBubbles ):
+ mrModel.mbShowNegBubbles = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( sizeRepresents ):
+ mrModel.mnSizeRepresents = rAttribs.getToken( XML_val, XML_area );
+ return nullptr;
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+LineTypeGroupContext::LineTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+LineTypeGroupContext::~LineTypeGroupContext()
+{
+}
+
+ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( dropLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() );
+ case C_TOKEN( gapDepth ):
+ mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( grouping ):
+ mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered );
+ return nullptr;
+ case C_TOKEN( hiLowLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxHiLowLines.create() );
+ case C_TOKEN( marker ):
+ mrModel.mbShowMarker = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new LineSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( smooth ):
+ mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ case C_TOKEN( upDownBars ):
+ return new UpDownBarsContext( *this, mrModel.mxUpDownBars.create() );
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+PieTypeGroupContext::PieTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+PieTypeGroupContext::~PieTypeGroupContext()
+{
+}
+
+ContextHandlerRef PieTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( firstSliceAng ):
+ mrModel.mnFirstAngle = rAttribs.getInteger( XML_val, 0 );
+ return nullptr;
+ case C_TOKEN( gapWidth ):
+ mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 );
+ return nullptr;
+ case C_TOKEN( holeSize ):
+ mrModel.mnHoleSize = rAttribs.getInteger( XML_val, 10 );
+ return nullptr;
+ case C_TOKEN( ofPieType ):
+ mrModel.mnOfPieType = rAttribs.getToken( XML_val, XML_pie );
+ return nullptr;
+ case C_TOKEN( secondPieSize ):
+ mrModel.mnSecondPieSize = rAttribs.getInteger( XML_val, 75 );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new PieSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( serLines ):
+ return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() );
+ case C_TOKEN( splitPos ):
+ mrModel.mfSplitPos = rAttribs.getDouble( XML_val, 0.0 );
+ return nullptr;
+ case C_TOKEN( splitType ):
+ mrModel.mnSplitType = rAttribs.getToken( XML_val, XML_auto );
+ return nullptr;
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+RadarTypeGroupContext::RadarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+RadarTypeGroupContext::~RadarTypeGroupContext()
+{
+}
+
+ContextHandlerRef RadarTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( radarStyle ):
+ mrModel.mnRadarStyle = rAttribs.getToken( XML_val, XML_standard );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new RadarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+ScatterTypeGroupContext::ScatterTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+ScatterTypeGroupContext::~ScatterTypeGroupContext()
+{
+}
+
+ContextHandlerRef ScatterTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( dLbls ):
+ return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) );
+ case C_TOKEN( scatterStyle ):
+ mrModel.mnScatterStyle = rAttribs.getInteger( XML_val, XML_marker );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new ScatterSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( varyColors ):
+ mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+SurfaceTypeGroupContext::SurfaceTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) :
+ TypeGroupContextBase( rParent, rModel )
+{
+}
+
+SurfaceTypeGroupContext::~SurfaceTypeGroupContext()
+{
+}
+
+ContextHandlerRef SurfaceTypeGroupContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
+ if( isRootElement() ) switch( nElement )
+ {
+ case C_TOKEN( axId ):
+ mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) );
+ return nullptr;
+ case C_TOKEN( ser ):
+ return new SurfaceSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) );
+ case C_TOKEN( wireframe ):
+ mrModel.mbWireframe = rAttribs.getBool( XML_val, !bMSO2007Doc );
+ return nullptr;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
new file mode 100644
index 000000000..e8d8bb47b
--- /dev/null
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -0,0 +1,605 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/typegroupconverter.hxx>
+
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart2/CartesianCoordinateSystem2d.hpp>
+#include <com/sun/star/chart2/CartesianCoordinateSystem3d.hpp>
+#include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
+#include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
+#include <com/sun/star/chart2/CurveStyle.hpp>
+#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
+#include <com/sun/star/chart2/StackingDirection.hpp>
+#include <com/sun/star/chart2/Symbol.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+
+#include <comphelper/sequence.hxx>
+#include <osl/diagnose.h>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/chart/seriesconverter.hxx>
+#include <drawingml/chart/typegroupmodel.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/UnitConversion.hxx>
+
+namespace oox::drawingml::chart {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::chart2;
+using namespace ::com::sun::star::chart2::data;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+// chart type service names
+const char SERVICE_CHART2_AREA[] = "com.sun.star.chart2.AreaChartType";
+const char SERVICE_CHART2_CANDLE[] = "com.sun.star.chart2.CandleStickChartType";
+const char SERVICE_CHART2_COLUMN[] = "com.sun.star.chart2.ColumnChartType";
+const char SERVICE_CHART2_LINE[] = "com.sun.star.chart2.LineChartType";
+const char SERVICE_CHART2_NET[] = "com.sun.star.chart2.NetChartType";
+const char SERVICE_CHART2_FILLEDNET[] = "com.sun.star.chart2.FilledNetChartType";
+const char SERVICE_CHART2_PIE[] = "com.sun.star.chart2.PieChartType";
+const char SERVICE_CHART2_SCATTER[] = "com.sun.star.chart2.ScatterChartType";
+const char SERVICE_CHART2_BUBBLE[] = "com.sun.star.chart2.BubbleChartType";
+const char SERVICE_CHART2_SURFACE[] = "com.sun.star.chart2.ColumnChartType"; // Todo
+
+namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
+
+const TypeGroupInfo spTypeInfos[] =
+{
+ // type-id type-category service varied-point-color default label pos polar area2d 1stvis xcateg swap stack picopt
+ { TYPEID_BAR, TYPECATEGORY_BAR, SERVICE_CHART2_COLUMN, VARPOINTMODE_SINGLE, csscd::OUTSIDE, false, true, false, true, false, true, true },
+ { TYPEID_HORBAR, TYPECATEGORY_BAR, SERVICE_CHART2_COLUMN, VARPOINTMODE_SINGLE, csscd::OUTSIDE, false, true, false, true, true, true, true },
+ { TYPEID_LINE, TYPECATEGORY_LINE, SERVICE_CHART2_LINE, VARPOINTMODE_SINGLE, csscd::RIGHT, false, false, false, true, false, true, false },
+ { TYPEID_AREA, TYPECATEGORY_LINE, SERVICE_CHART2_AREA, VARPOINTMODE_NONE, csscd::CENTER, false, true, false, true, false, true, false },
+ { TYPEID_STOCK, TYPECATEGORY_LINE, SERVICE_CHART2_CANDLE, VARPOINTMODE_NONE, csscd::RIGHT, false, false, false, true, false, true, false },
+ { TYPEID_RADARLINE, TYPECATEGORY_RADAR, SERVICE_CHART2_NET, VARPOINTMODE_SINGLE, csscd::OUTSIDE, true, false, false, true, false, false, false },
+ { TYPEID_RADARAREA, TYPECATEGORY_RADAR, SERVICE_CHART2_FILLEDNET, VARPOINTMODE_NONE, csscd::OUTSIDE, true, true, false, true, false, false, false },
+ { TYPEID_PIE, TYPECATEGORY_PIE, SERVICE_CHART2_PIE, VARPOINTMODE_MULTI, csscd::AVOID_OVERLAP, true, true, true, true, false, false, false },
+ { TYPEID_DOUGHNUT, TYPECATEGORY_PIE, SERVICE_CHART2_PIE, VARPOINTMODE_MULTI, csscd::AVOID_OVERLAP, true, true, false, true, false, false, false },
+ { TYPEID_OFPIE, TYPECATEGORY_PIE, SERVICE_CHART2_PIE, VARPOINTMODE_MULTI, csscd::AVOID_OVERLAP, true, true, true, true, false, false, false },
+ { TYPEID_SCATTER, TYPECATEGORY_SCATTER, SERVICE_CHART2_SCATTER, VARPOINTMODE_SINGLE, csscd::RIGHT, false, false, false, false, false, false, false },
+ { TYPEID_BUBBLE, TYPECATEGORY_SCATTER, SERVICE_CHART2_BUBBLE, VARPOINTMODE_SINGLE, csscd::RIGHT, false, true, false, false, false, false, false },
+ { TYPEID_SURFACE, TYPECATEGORY_SURFACE, SERVICE_CHART2_SURFACE, VARPOINTMODE_NONE, csscd::RIGHT, false, true, false, true, false, false, false }
+};
+
+const TypeGroupInfo saUnknownTypeInfo =
+ { TYPEID_UNKNOWN, TYPECATEGORY_BAR, SERVICE_CHART2_COLUMN, VARPOINTMODE_SINGLE, csscd::OUTSIDE, false, true, false, true, false, true, true };
+
+const TypeGroupInfo& lclGetTypeInfoFromTypeId( TypeId eTypeId )
+{
+ for( auto const &rIt : spTypeInfos)
+ {
+ if( rIt.meTypeId == eTypeId )
+ return rIt;
+ }
+ OSL_ENSURE( eTypeId == TYPEID_UNKNOWN, "lclGetTypeInfoFromTypeId - unexpected chart type identifier" );
+ return saUnknownTypeInfo;
+}
+
+} // namespace
+
+const TypeGroupInfo& GetTypeGroupInfo( TypeId eType )
+{
+ return lclGetTypeInfoFromTypeId(eType);
+}
+
+UpDownBarsConverter::UpDownBarsConverter( const ConverterRoot& rParent, UpDownBarsModel& rModel ) :
+ ConverterBase< UpDownBarsModel >( rParent, rModel )
+{
+}
+
+UpDownBarsConverter::~UpDownBarsConverter()
+{
+}
+
+void UpDownBarsConverter::convertFromModel( const Reference< XChartType >& rxChartType )
+{
+ PropertySet aTypeProp( rxChartType );
+
+ // upbar format
+ Reference< XPropertySet > xWhitePropSet;
+ if( aTypeProp.getProperty( xWhitePropSet, PROP_WhiteDay ) )
+ {
+ PropertySet aPropSet( xWhitePropSet );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxUpBars, OBJECTTYPE_UPBAR );
+ }
+
+ // downbar format
+ Reference< XPropertySet > xBlackPropSet;
+ if( aTypeProp.getProperty( xBlackPropSet, PROP_BlackDay ) )
+ {
+ PropertySet aPropSet( xBlackPropSet );
+ getFormatter().convertFrameFormatting( aPropSet, mrModel.mxDownBars, OBJECTTYPE_DOWNBAR );
+ }
+}
+
+TypeGroupConverter::TypeGroupConverter( const ConverterRoot& rParent, TypeGroupModel& rModel ) :
+ ConverterBase< TypeGroupModel >( rParent, rModel ),
+ mb3dChart( false )
+{
+ TypeId eTypeId = TYPEID_UNKNOWN;
+ switch( mrModel.mnTypeId )
+ {
+#define ENSURE_AXESCOUNT( min, max ) OSL_ENSURE( (min <= static_cast<int>(mrModel.maAxisIds.size())) && (static_cast<int>(mrModel.maAxisIds.size()) <= max), "TypeGroupConverter::TypeGroupConverter - invalid axes count" )
+ case C_TOKEN( area3DChart ): ENSURE_AXESCOUNT( 2, 3 ); eTypeId = TYPEID_AREA; mb3dChart = true; break;
+ case C_TOKEN( areaChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_AREA; mb3dChart = false; break;
+ case C_TOKEN( bar3DChart ): ENSURE_AXESCOUNT( 2, 3 ); eTypeId = TYPEID_BAR; mb3dChart = true; break;
+ case C_TOKEN( barChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_BAR; mb3dChart = false; break;
+ case C_TOKEN( bubbleChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_BUBBLE; mb3dChart = false; break;
+ case C_TOKEN( doughnutChart ): ENSURE_AXESCOUNT( 0, 0 ); eTypeId = TYPEID_DOUGHNUT; mb3dChart = false; break;
+ case C_TOKEN( line3DChart ): ENSURE_AXESCOUNT( 3, 3 ); eTypeId = TYPEID_LINE; mb3dChart = true; break;
+ case C_TOKEN( lineChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_LINE; mb3dChart = false; break;
+ case C_TOKEN( ofPieChart ): ENSURE_AXESCOUNT( 0, 0 ); eTypeId = TYPEID_OFPIE; mb3dChart = false; break;
+ case C_TOKEN( pie3DChart ): ENSURE_AXESCOUNT( 0, 0 ); eTypeId = TYPEID_PIE; mb3dChart = true; break;
+ case C_TOKEN( pieChart ): ENSURE_AXESCOUNT( 0, 0 ); eTypeId = TYPEID_PIE; mb3dChart = false; break;
+ case C_TOKEN( radarChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_RADARLINE; mb3dChart = false; break;
+ case C_TOKEN( scatterChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_SCATTER; mb3dChart = false; break;
+ case C_TOKEN( stockChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_STOCK; mb3dChart = false; break;
+ case C_TOKEN( surface3DChart ): ENSURE_AXESCOUNT( 3, 3 ); eTypeId = TYPEID_SURFACE; mb3dChart = true; break;
+ case C_TOKEN( surfaceChart ): ENSURE_AXESCOUNT( 2, 3 ); eTypeId = TYPEID_SURFACE; mb3dChart = true; break; // 3D bar chart from all surface charts
+ default: OSL_FAIL( "TypeGroupConverter::TypeGroupConverter - unknown chart type" );
+#undef ENSURE_AXESCOUNT
+ }
+
+ // special handling for some chart types
+ switch( eTypeId )
+ {
+ case TYPEID_BAR:
+ if( mrModel.mnBarDir == XML_bar )
+ eTypeId = TYPEID_HORBAR;
+ break;
+ case TYPEID_RADARLINE:
+ if( mrModel.mnRadarStyle == XML_filled )
+ eTypeId = TYPEID_RADARAREA;
+ break;
+ case TYPEID_SURFACE:
+ // create a deep 3D bar chart from surface charts
+ mrModel.mnGrouping = XML_standard;
+ break;
+ default:;
+ }
+
+ // set the chart type info struct for the current chart type
+ maTypeInfo = lclGetTypeInfoFromTypeId( eTypeId );
+}
+
+TypeGroupConverter::~TypeGroupConverter()
+{
+}
+
+bool TypeGroupConverter::isStacked() const
+{
+ return maTypeInfo.mbSupportsStacking && (mrModel.mnGrouping == XML_stacked);
+}
+
+bool TypeGroupConverter::isPercent() const
+{
+ return maTypeInfo.mbSupportsStacking && (mrModel.mnGrouping == XML_percentStacked);
+}
+
+bool TypeGroupConverter::isWall3dChart() const
+{
+ return mb3dChart && (maTypeInfo.meTypeCategory != TYPECATEGORY_PIE);
+}
+
+bool TypeGroupConverter::isDeep3dChart() const
+{
+ return isWall3dChart() && (mrModel.mnGrouping == XML_standard);
+}
+
+bool TypeGroupConverter::isSeriesFrameFormat() const
+{
+ return mb3dChart || maTypeInfo.mbSeriesIsFrame2d;
+}
+
+ObjectType TypeGroupConverter::getSeriesObjectType() const
+{
+ return mb3dChart ? OBJECTTYPE_FILLEDSERIES3D :
+ (maTypeInfo.mbSeriesIsFrame2d ? OBJECTTYPE_FILLEDSERIES2D : OBJECTTYPE_LINEARSERIES2D);
+}
+
+OUString TypeGroupConverter::getSingleSeriesTitle() const
+{
+ OUString aSeriesTitle;
+ if( !mrModel.maSeries.empty() && (maTypeInfo.mbSingleSeriesVis || (mrModel.maSeries.size() == 1)) )
+ if( const TextModel* pText = mrModel.maSeries.front()->mxText.get() )
+ if( const DataSequenceModel* pDataSeq = pText->mxDataSeq.get() )
+ if( !pDataSeq->maData.empty() )
+ pDataSeq->maData.begin()->second >>= aSeriesTitle;
+ return aSeriesTitle;
+}
+
+Reference< XCoordinateSystem > TypeGroupConverter::createCoordinateSystem()
+{
+ // create the coordinate system object
+ Reference< css::uno::XComponentContext > xContext = getComponentContext();
+ Reference< XCoordinateSystem > xCoordSystem;
+ if( maTypeInfo.mbPolarCoordSystem )
+ {
+ if( mb3dChart )
+ xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext);
+ else
+ xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext);
+ }
+ else
+ {
+ if( mb3dChart )
+ xCoordSystem = css::chart2::CartesianCoordinateSystem3d::create(xContext);
+ else
+ xCoordSystem = css::chart2::CartesianCoordinateSystem2d::create(xContext);
+ }
+
+ // swap X and Y axis
+ if( maTypeInfo.mbSwappedAxesSet )
+ {
+ PropertySet aPropSet( xCoordSystem );
+ aPropSet.setProperty( PROP_SwapXAndYAxis, true );
+ }
+
+ return xCoordSystem;
+}
+
+Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence()
+{
+ sal_Int32 nMaxValues = 0;
+ Reference< XLabeledDataSequence > xLabeledSeq;
+ /* Find first existing category sequence. The behaviour of Excel 2007 is
+ different to Excel 2003, which always used the category sequence of the
+ first series, even if it was empty. */
+ for (auto const& elem : mrModel.maSeries)
+ {
+ if( elem->maSources.has( SeriesModel::CATEGORIES ) )
+ {
+ SeriesConverter aSeriesConv(*this, *elem);
+ xLabeledSeq = aSeriesConv.createCategorySequence( "categories" );
+ if (xLabeledSeq.is())
+ break;
+ }
+ else if( nMaxValues <= 0 && elem->maSources.has( SeriesModel::VALUES ) )
+ {
+ DataSourceModel *pValues = elem->maSources.get( SeriesModel::VALUES ).get();
+ if( pValues->mxDataSeq.is() )
+ nMaxValues = pValues->mxDataSeq->maData.size();
+ }
+ }
+ /* n#839727 Create Category Sequence when none are found */
+ if( !xLabeledSeq.is() && !mrModel.maSeries.empty() ) {
+ if( nMaxValues < 0 )
+ nMaxValues = 2;
+ SeriesModel &aModel = *mrModel.maSeries.get(0);
+ if (!aModel.maSources.has(SeriesModel::CATEGORIES))
+ {
+ DataSourceModel &aSrc = aModel.maSources.create( SeriesModel::CATEGORIES );
+ DataSequenceModel &aSeq = aSrc.mxDataSeq.create();
+ aSeq.mnPointCount = nMaxValues;
+ for( sal_Int32 i = 0; i < nMaxValues; i++ )
+ aSeq.maData[ i ] <<= OUString::number( i + 1 );
+ }
+ SeriesConverter aSeriesConv( *this, aModel );
+ xLabeledSeq = aSeriesConv.createCategorySequence( "categories" );
+ }
+ return xLabeledSeq;
+}
+
+void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagram,
+ const Reference< XCoordinateSystem >& rxCoordSystem,
+ sal_Int32 nAxesSetIdx, bool bSupportsVaryColorsByPoint )
+{
+ try
+ {
+ // create the chart type object
+ OUString aService = OUString::createFromAscii( maTypeInfo.mpcServiceName );
+ Reference< XChartType > xChartType( createInstance( aService ), UNO_QUERY_THROW );
+
+ Reference< XChartTypeContainer > xChartTypeContOld( rxCoordSystem, UNO_QUERY_THROW );
+ Sequence< Reference< XChartType > > xOldChartTypes( xChartTypeContOld->getChartTypes() );
+ sal_Int32 nOldChartTypeIdx = -1;
+
+ // additional properties
+ PropertySet aDiaProp( rxDiagram );
+ PropertySet aTypeProp( xChartType );
+ switch( maTypeInfo.meTypeCategory )
+ {
+ case TYPECATEGORY_BAR:
+ {
+ Sequence< sal_Int32 > aInt32Seq{ mrModel.mnOverlap, mrModel.mnOverlap };
+ aTypeProp.setProperty( PROP_OverlapSequence, aInt32Seq );
+ aInt32Seq = { mrModel.mnGapWidth, mrModel.mnGapWidth };
+ aTypeProp.setProperty( PROP_GapwidthSequence, aInt32Seq );
+ }
+ break;
+ case TYPECATEGORY_PIE:
+ {
+ aTypeProp.setProperty( PROP_UseRings, maTypeInfo.meTypeId == TYPEID_DOUGHNUT );
+ /* #i85166# starting angle of first pie slice. 3D pie charts
+ use Y rotation setting in view3D element. Of-pie charts do
+ not support pie rotation. */
+ if( !is3dChart() && (maTypeInfo.meTypeId != TYPEID_OFPIE) )
+ convertPieRotation( aDiaProp, mrModel.mnFirstAngle );
+ }
+ break;
+ default:;
+ }
+
+ // create converter objects for all series models
+ typedef RefVector< SeriesConverter > SeriesConvVector;
+ SeriesConvVector aSeries;
+ for (auto const& elemSeries : mrModel.maSeries)
+ aSeries.push_back( std::make_shared<SeriesConverter>(*this, *elemSeries) );
+
+ // decide whether to use varying colors for each data point
+ bool bVaryColorsByPoint = bSupportsVaryColorsByPoint && mrModel.mbVaryColors;
+ switch( maTypeInfo.meVarPointMode )
+ {
+ case VARPOINTMODE_NONE: bVaryColorsByPoint = false; break;
+ case VARPOINTMODE_SINGLE: bVaryColorsByPoint &= (mrModel.maSeries.size() == 1); break;
+ case VARPOINTMODE_MULTI: break;
+ }
+
+ /* Stock chart needs special processing. Create one 'big' series with
+ data sequences of different roles. */
+ if( maTypeInfo.meTypeId == TYPEID_STOCK )
+ {
+ // create the data series object
+ Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY );
+ Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY );
+ if( xDataSink.is() )
+ {
+ // create a list of data sequences from all series
+ ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
+ OSL_ENSURE( aSeries.size() >= 3, "TypeGroupConverter::convertFromModel - too few stock chart series" );
+ int nRoleIdx = (aSeries.size() == 3) ? 1 : 0;
+ for( auto& rxSeriesConv : aSeries )
+ {
+ // create a data sequence with a specific role
+ OUString aRole;
+ switch( nRoleIdx )
+ {
+ case 0: aRole = "values-first"; break;
+ case 1: aRole = "values-max"; break;
+ case 2: aRole = "values-min"; break;
+ case 3: aRole = "values-last"; break;
+ }
+ Reference< XLabeledDataSequence > xDataSeq = rxSeriesConv->createValueSequence( aRole );
+ if( xDataSeq.is() )
+ aLabeledSeqVec.push_back( xDataSeq );
+
+ ++nRoleIdx;
+ if (nRoleIdx >= 4)
+ break;
+ }
+
+ // attach labeled data sequences to series and insert series into chart type
+ xDataSink->setData( comphelper::containerToSequence( aLabeledSeqVec ) );
+
+ // formatting of high/low lines
+ aTypeProp.setProperty( PROP_ShowHighLow, true );
+ PropertySet aSeriesProp( xDataSeries );
+ if( mrModel.mxHiLowLines.is() )
+ getFormatter().convertFrameFormatting( aSeriesProp, mrModel.mxHiLowLines, OBJECTTYPE_HILOLINE );
+ else
+ // hi/low-lines cannot be switched off via "ShowHighLow" property (?)
+ aSeriesProp.setProperty( PROP_LineStyle, css::drawing::LineStyle_NONE );
+
+ // formatting of up/down bars
+ bool bUpDownBars = mrModel.mxUpDownBars.is();
+ aTypeProp.setProperty( PROP_Japanese, bUpDownBars );
+ aTypeProp.setProperty( PROP_ShowFirst, bUpDownBars );
+ if( bUpDownBars )
+ {
+ UpDownBarsConverter aUpDownConv( *this, *mrModel.mxUpDownBars );
+ aUpDownConv.convertFromModel( xChartType );
+ }
+
+ // insert the series into the chart type object
+ insertDataSeries( xChartType, xDataSeries, nAxesSetIdx );
+ }
+ }
+ else
+ {
+ for( sal_Int32 nCTIdx=0; nCTIdx<xOldChartTypes.getLength(); ++nCTIdx )
+ {
+ if ( xChartType->getChartType() == xOldChartTypes[nCTIdx]->getChartType() )
+ {
+ nOldChartTypeIdx = nCTIdx;
+ }
+ }
+
+ for (auto const& elem : aSeries)
+ {
+ SeriesConverter& rSeriesConv = *elem;
+ Reference< XDataSeries > xDataSeries = rSeriesConv.createDataSeries( *this, bVaryColorsByPoint );
+ insertDataSeries( nOldChartTypeIdx == -1 ? xChartType : xOldChartTypes[nOldChartTypeIdx], xDataSeries, nAxesSetIdx );
+
+ /* Excel does not use the value of the c:smooth element of the
+ chart type to set a default line smoothing for the data
+ series. Line smoothing is always controlled by the c:smooth
+ element of the respective data series. If the element in the
+ data series is missing, line smoothing is off, regardless of
+ the c:smooth element of the chart type. */
+#if !OOX_CHART_SMOOTHED_PER_SERIES
+ if( rSeriesConv.getModel().mbSmooth )
+ convertLineSmooth( aTypeProp, true );
+#endif
+ }
+ }
+
+ // add chart type object to coordinate system
+ Reference< XChartTypeContainer > xChartTypeCont( rxCoordSystem, UNO_QUERY_THROW );
+ if (nOldChartTypeIdx == -1)
+ {
+ xChartTypeCont->addChartType(xChartType);
+ }
+
+ // set existence of bar connector lines at diagram (only in stacked 2D bar charts)
+ if( mrModel.mxSerLines.is() && !mb3dChart && (maTypeInfo.meTypeCategory == TYPECATEGORY_BAR) && (isStacked() || isPercent()) )
+ aDiaProp.setProperty( PROP_ConnectBars, true );
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "TypeGroupConverter::convertFromModel - cannot add chart type" );
+ }
+}
+
+void TypeGroupConverter::convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize,
+ const ModelRef< Shape >& xShapeProps ) const
+{
+ if( isSeriesFrameFormat() )
+ return;
+
+ namespace cssc = ::com::sun::star::chart2;
+
+ // symbol style
+ cssc::Symbol aSymbol;
+ aSymbol.Style = cssc::SymbolStyle_STANDARD;
+ switch( nOoxSymbol ) // compare with XclChPropSetHelper::WriteMarkerProperties in xlchart.cxx
+ {
+ case XML_auto: aSymbol.Style = cssc::SymbolStyle_AUTO; break;
+ case XML_none: aSymbol.Style = cssc::SymbolStyle_NONE; break;
+ case XML_square: aSymbol.StandardSymbol = 0; break; // square
+ case XML_diamond: aSymbol.StandardSymbol = 1; break; // diamond
+ case XML_triangle: aSymbol.StandardSymbol = 3; break; // arrow up
+ case XML_x: aSymbol.StandardSymbol = 10; break; // X, legacy bow tie
+ case XML_star: aSymbol.StandardSymbol = 12; break; // asterisk, legacy sand glass
+ case XML_dot: aSymbol.StandardSymbol = 4; break; // arrow right
+ case XML_dash: aSymbol.StandardSymbol = 13; break; // horizontal bar, legacy arrow down
+ case XML_circle: aSymbol.StandardSymbol = 8; break; // circle, legacy arrow right
+ case XML_plus: aSymbol.StandardSymbol = 11; break; // plus, legacy arrow left
+ }
+
+ // symbol size (points in OOXML, 1/100 mm in Chart2)
+ sal_Int32 nSize = convertPointToMm100(nOoxSize);
+ aSymbol.Size.Width = aSymbol.Size.Height = nSize;
+
+ if(xShapeProps.is())
+ {
+ Color aFillColor = xShapeProps->getFillProperties().maFillColor;
+ aSymbol.FillColor = sal_Int32(aFillColor.getColor(getFilter().getGraphicHelper()));
+ // tdf#124817: if there is no fill color, use line color of the symbol
+ if( aSymbol.FillColor < 0 )
+ {
+ Color aLineColor = xShapeProps->getLineProperties().maLineFill.maFillColor;
+ aSymbol.BorderColor = sal_Int32(aLineColor.getColor(getFilter().getGraphicHelper()));
+ rPropSet.setProperty(PROP_Color, aSymbol.BorderColor);
+ }
+ else
+ rPropSet.setProperty(PROP_Color, aSymbol.FillColor);
+ }
+
+ // set the property
+ rPropSet.setProperty( PROP_Symbol, aSymbol );
+}
+
+void TypeGroupConverter::convertLineSmooth( PropertySet& rPropSet, bool bOoxSmooth ) const
+{
+ if( !isSeriesFrameFormat() && (maTypeInfo.meTypeCategory != TYPECATEGORY_RADAR) )
+ {
+ namespace cssc = ::com::sun::star::chart2;
+ cssc::CurveStyle eCurveStyle = bOoxSmooth ? cssc::CurveStyle_CUBIC_SPLINES : cssc::CurveStyle_LINES;
+ rPropSet.setProperty( PROP_CurveStyle, eCurveStyle );
+ }
+}
+
+void TypeGroupConverter::convertBarGeometry( PropertySet& rPropSet, sal_Int32 nOoxShape ) const
+{
+ if( !(mb3dChart && (maTypeInfo.meTypeCategory == TYPECATEGORY_BAR)) )
+ return;
+
+ namespace cssc = ::com::sun::star::chart2;
+
+ sal_Int32 nGeom3d = cssc::DataPointGeometry3D::CUBOID;
+ switch( nOoxShape )
+ {
+ case XML_box: nGeom3d = cssc::DataPointGeometry3D::CUBOID; break;
+ case XML_cone: nGeom3d = cssc::DataPointGeometry3D::CONE; break;
+ case XML_coneToMax: nGeom3d = cssc::DataPointGeometry3D::CONE; break;
+ case XML_cylinder: nGeom3d = cssc::DataPointGeometry3D::CYLINDER; break;
+ case XML_pyramid: nGeom3d = cssc::DataPointGeometry3D::PYRAMID; break;
+ case XML_pyramidToMax: nGeom3d = cssc::DataPointGeometry3D::PYRAMID; break;
+ default: OSL_FAIL( "TypeGroupConverter::convertBarGeometry - unknown 3D bar shape type" );
+ }
+ rPropSet.setProperty( PROP_Geometry3D, nGeom3d );
+}
+
+void TypeGroupConverter::convertPieRotation( PropertySet& rPropSet, sal_Int32 nOoxAngle ) const
+{
+ if( maTypeInfo.meTypeCategory == TYPECATEGORY_PIE )
+ {
+ // map OOXML [0,360] clockwise (0deg top) to Chart2 counterclockwise (0deg left)
+ sal_Int32 nAngle = (450 - nOoxAngle) % 360;
+ rPropSet.setProperty( PROP_StartingAngle, nAngle );
+ }
+}
+
+void TypeGroupConverter::convertPieExplosion( PropertySet& rPropSet, sal_Int32 nOoxExplosion ) const
+{
+ if( maTypeInfo.meTypeCategory == TYPECATEGORY_PIE )
+ {
+ // pie explosion restricted to 100% in Chart2, set as double in range [0,1]
+ double fOffset = getLimitedValue< double >( nOoxExplosion / 100.0, 0.0, 1.0 );
+ rPropSet.setProperty( PROP_Offset, fOffset );
+ }
+}
+
+// private --------------------------------------------------------------------
+
+void TypeGroupConverter::insertDataSeries( const Reference< XChartType >& rxChartType, const Reference< XDataSeries >& rxSeries, sal_Int32 nAxesSetIdx )
+{
+ if( !rxSeries.is() )
+ return;
+
+ PropertySet aSeriesProp( rxSeries );
+
+ // series stacking mode
+ namespace cssc = ::com::sun::star::chart2;
+ cssc::StackingDirection eStacking = cssc::StackingDirection_NO_STACKING;
+ // stacked overrides deep-3d
+ if( isStacked() || isPercent() )
+ eStacking = cssc::StackingDirection_Y_STACKING;
+ else if( isDeep3dChart() )
+ eStacking = cssc::StackingDirection_Z_STACKING;
+ aSeriesProp.setProperty( PROP_StackingDirection, eStacking );
+
+ // additional series properties
+ aSeriesProp.setProperty( PROP_AttachedAxisIndex, nAxesSetIdx );
+
+ // insert series into container
+ try
+ {
+ Reference< XDataSeriesContainer > xSeriesCont( rxChartType, UNO_QUERY_THROW );
+ xSeriesCont->addDataSeries( rxSeries );
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "TypeGroupConverter::insertDataSeries - cannot add data series" );
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/typegroupmodel.cxx b/oox/source/drawingml/chart/typegroupmodel.cxx
new file mode 100644
index 000000000..9479f93c4
--- /dev/null
+++ b/oox/source/drawingml/chart/typegroupmodel.cxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/typegroupmodel.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart {
+
+UpDownBarsModel::UpDownBarsModel() :
+ mnGapWidth( 150 )
+{
+}
+
+UpDownBarsModel::~UpDownBarsModel()
+{
+}
+
+TypeGroupModel::TypeGroupModel( sal_Int32 nTypeId, bool bMSO2007Doc ) :
+ mfSplitPos( 0.0 ),
+ mnBarDir( XML_col ),
+ mnBubbleScale( 100 ),
+ mnFirstAngle( 0 ),
+ mnGapDepth( 150 ),
+ mnGapWidth( 150 ),
+ mnGrouping( bMSO2007Doc ? XML_standard : XML_clustered ),
+ mnHoleSize( 10 ),
+ mnOfPieType( XML_pie ),
+ mnOverlap( 0 ),
+ mnRadarStyle( XML_standard ),
+ mnScatterStyle( XML_marker ),
+ mnSecondPieSize( 75 ),
+ mnShape( XML_box ),
+ mnSizeRepresents( XML_area ),
+ mnSplitType( XML_auto ),
+ mnTypeId( nTypeId ),
+ mbBubble3d( !bMSO2007Doc ),
+ mbShowMarker( !bMSO2007Doc ),
+ mbShowNegBubbles( !bMSO2007Doc ),
+ mbSmooth( !bMSO2007Doc ),
+ mbVaryColors( false ),
+ mbWireframe( !bMSO2007Doc )
+{
+}
+
+TypeGroupModel::~TypeGroupModel()
+{
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx
new file mode 100644
index 000000000..19c0afd44
--- /dev/null
+++ b/oox/source/drawingml/clrscheme.cxx
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <algorithm>
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/Color.hpp>
+
+#include <osl/diagnose.h>
+#include <oox/drawingml/clrscheme.hxx>
+#include <oox/token/tokens.hxx>
+#include <comphelper/sequence.hxx>
+
+using namespace com::sun::star;
+
+namespace oox::drawingml {
+
+bool ClrMap::getColorMap( sal_Int32& nClrToken )
+{
+ sal_Int32 nMapped = 0;
+ std::map < sal_Int32, sal_Int32 >::const_iterator aIter( maClrMap.find( nClrToken ) );
+ if ( aIter != maClrMap.end() )
+ nMapped = (*aIter).second;
+ if ( nMapped )
+ {
+ nClrToken = nMapped;
+ return true;
+ }
+ else
+ return false;
+}
+
+void ClrMap::setColorMap( sal_Int32 nClrToken, sal_Int32 nMappedClrToken )
+{
+ maClrMap[ nClrToken ] = nMappedClrToken;
+}
+
+namespace {
+
+struct find_by_token
+{
+ explicit find_by_token(sal_Int32 token):
+ m_token(token)
+ {
+ }
+
+ bool operator()(const std::pair<sal_Int32, ::Color>& r)
+ {
+ return r.first == m_token;
+ }
+
+private:
+ sal_Int32 m_token;
+};
+
+}
+
+bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, ::Color& rColor ) const
+{
+ OSL_ASSERT((nSchemeClrToken & sal_Int32(0xFFFF0000))==0);
+ switch( nSchemeClrToken )
+ {
+ case XML_bg1 : nSchemeClrToken = XML_lt1; break;
+ case XML_bg2 : nSchemeClrToken = XML_lt2; break;
+ case XML_tx1 : nSchemeClrToken = XML_dk1; break;
+ case XML_tx2 : nSchemeClrToken = XML_dk2; break;
+ }
+
+ auto aIter = std::find_if(maClrScheme.begin(), maClrScheme.end(), find_by_token(nSchemeClrToken) );
+
+ if ( aIter != maClrScheme.end() )
+ rColor = aIter->second;
+
+ return aIter != maClrScheme.end();
+}
+
+void ClrScheme::setColor( sal_Int32 nSchemeClrToken, ::Color nColor )
+{
+ const auto aIter = std::find_if(maClrScheme.begin(), maClrScheme.end(), find_by_token(nSchemeClrToken) );
+ if ( aIter != maClrScheme.end() )
+ aIter->second = nColor;
+ else
+ maClrScheme.emplace_back(nSchemeClrToken, nColor);
+}
+
+bool ClrScheme::getColorByIndex(size_t nIndex, ::Color& rColor) const
+{
+ if (nIndex >= maClrScheme.size())
+ return false;
+
+ rColor = maClrScheme[nIndex].second;
+ return true;
+}
+
+void ClrScheme::ToAny(css::uno::Any& rVal) const
+{
+ std::vector<util::Color> aRet;
+
+ for (const auto& rIndexAndColor : maClrScheme)
+ {
+ aRet.push_back(static_cast<sal_Int32>(rIndexAndColor.second));
+ }
+
+ rVal <<= comphelper::containerToSequence(aRet);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/clrschemecontext.cxx b/oox/source/drawingml/clrschemecontext.cxx
new file mode 100644
index 000000000..e8850974c
--- /dev/null
+++ b/oox/source/drawingml/clrschemecontext.cxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/clrschemecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+static void setClrMap( const ::oox::AttributeList& rAttributes,
+ ClrMap& rClrMap, sal_Int32 nToken )
+{
+ if ( rAttributes.hasAttribute( nToken ) )
+ {
+ sal_Int32 nMappedToken = rAttributes.getToken( nToken, 0 );
+ rClrMap.setColorMap( nToken, nMappedToken );
+ }
+}
+
+clrMapContext::clrMapContext( ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttributes, ClrMap& rClrMap )
+: ContextHandler2( rParent )
+{
+ setClrMap( rAttributes, rClrMap, XML_bg1 );
+ setClrMap( rAttributes, rClrMap, XML_tx1 );
+ setClrMap( rAttributes, rClrMap, XML_bg2 );
+ setClrMap( rAttributes, rClrMap, XML_tx2 );
+ setClrMap( rAttributes, rClrMap, XML_accent1 );
+ setClrMap( rAttributes, rClrMap, XML_accent2 );
+ setClrMap( rAttributes, rClrMap, XML_accent3 );
+ setClrMap( rAttributes, rClrMap, XML_accent4 );
+ setClrMap( rAttributes, rClrMap, XML_accent5 );
+ setClrMap( rAttributes, rClrMap, XML_accent6 );
+ setClrMap( rAttributes, rClrMap, XML_hlink );
+ setClrMap( rAttributes, rClrMap, XML_folHlink );
+}
+
+clrSchemeColorContext::clrSchemeColorContext( ContextHandler2Helper const & rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken ) :
+ ColorContext( rParent, *this ),
+ mrClrScheme( rClrScheme ),
+ mnColorToken( nColorToken )
+{
+}
+
+clrSchemeColorContext::~clrSchemeColorContext()
+{
+ mrClrScheme.setColor( mnColorToken, getColor( getFilter().getGraphicHelper() ) );
+}
+
+clrSchemeContext::clrSchemeContext( ContextHandler2Helper const & rParent, ClrScheme& rClrScheme ) :
+ ContextHandler2( rParent ),
+ mrClrScheme( rClrScheme )
+{
+}
+
+ContextHandlerRef clrSchemeContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( dk1 ):
+ case A_TOKEN( lt1 ):
+ case A_TOKEN( dk2 ):
+ case A_TOKEN( lt2 ):
+ case A_TOKEN( accent1 ):
+ case A_TOKEN( accent2 ):
+ case A_TOKEN( accent3 ):
+ case A_TOKEN( accent4 ):
+ case A_TOKEN( accent5 ):
+ case A_TOKEN( accent6 ):
+ case A_TOKEN( hlink ):
+ case A_TOKEN( folHlink ):
+ return new clrSchemeColorContext( *this, mrClrScheme, getBaseToken( nElement ) );
+ }
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
new file mode 100644
index 000000000..f810deecf
--- /dev/null
+++ b/oox/source/drawingml/color.cxx
@@ -0,0 +1,873 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/color.hxx>
+#include <algorithm>
+#include <math.h>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml {
+
+namespace {
+
+/** Global storage for predefined color values used in OOXML file formats. */
+struct PresetColorsPool
+{
+ typedef ::std::vector< ::Color > ColorVector;
+
+ ColorVector maDmlColors; /// Predefined colors in DrawingML, indexed by XML token.
+ ColorVector maVmlColors; /// Predefined colors in VML, indexed by XML token.
+ ColorVector maHighlightColors; /// Predefined colors in DrawingML for highlight, indexed by XML token.
+
+ explicit PresetColorsPool();
+};
+
+PresetColorsPool::PresetColorsPool() :
+ maDmlColors( static_cast< size_t >( XML_TOKEN_COUNT ), API_RGB_TRANSPARENT ),
+ maVmlColors( static_cast< size_t >( XML_TOKEN_COUNT ), API_RGB_TRANSPARENT ),
+ maHighlightColors( static_cast<size_t>(XML_TOKEN_COUNT), API_RGB_TRANSPARENT )
+{
+ // predefined colors in DrawingML (map XML token identifiers to RGB values)
+ static const std::pair<sal_Int32, ::Color> spnDmlColors[] =
+ {
+ {XML_aliceBlue, ::Color(0xF0F8FF)}, {XML_antiqueWhite, ::Color(0xFAEBD7)},
+ {XML_aqua, ::Color(0x00FFFF)}, {XML_aquamarine, ::Color(0x7FFFD4)},
+ {XML_azure, ::Color(0xF0FFFF)}, {XML_beige, ::Color(0xF5F5DC)},
+ {XML_bisque, ::Color(0xFFE4C4)}, {XML_black, ::Color(0x000000)},
+ {XML_blanchedAlmond, ::Color(0xFFEBCD)}, {XML_blue, ::Color(0x0000FF)},
+ {XML_blueViolet, ::Color(0x8A2BE2)}, {XML_brown, ::Color(0xA52A2A)},
+ {XML_burlyWood, ::Color(0xDEB887)}, {XML_cadetBlue, ::Color(0x5F9EA0)},
+ {XML_chartreuse, ::Color(0x7FFF00)}, {XML_chocolate, ::Color(0xD2691E)},
+ {XML_coral, ::Color(0xFF7F50)}, {XML_cornflowerBlue, ::Color(0x6495ED)},
+ {XML_cornsilk, ::Color(0xFFF8DC)}, {XML_crimson, ::Color(0xDC143C)},
+ {XML_cyan, ::Color(0x00FFFF)}, {XML_deepPink, ::Color(0xFF1493)},
+ {XML_deepSkyBlue, ::Color(0x00BFFF)}, {XML_dimGray, ::Color(0x696969)},
+ {XML_dkBlue, ::Color(0x00008B)}, {XML_dkCyan, ::Color(0x008B8B)},
+ {XML_dkGoldenrod, ::Color(0xB8860B)}, {XML_dkGray, ::Color(0xA9A9A9)},
+ {XML_dkGreen, ::Color(0x006400)}, {XML_dkKhaki, ::Color(0xBDB76B)},
+ {XML_dkMagenta, ::Color(0x8B008B)}, {XML_dkOliveGreen, ::Color(0x556B2F)},
+ {XML_dkOrange, ::Color(0xFF8C00)}, {XML_dkOrchid, ::Color(0x9932CC)},
+ {XML_dkRed, ::Color(0x8B0000)}, {XML_dkSalmon, ::Color(0xE9967A)},
+ {XML_dkSeaGreen, ::Color(0x8FBC8B)}, {XML_dkSlateBlue, ::Color(0x483D8B)},
+ {XML_dkSlateGray, ::Color(0x2F4F4F)}, {XML_dkTurquoise, ::Color(0x00CED1)},
+ {XML_dkViolet, ::Color(0x9400D3)}, {XML_dodgerBlue, ::Color(0x1E90FF)},
+ {XML_firebrick, ::Color(0xB22222)}, {XML_floralWhite, ::Color(0xFFFAF0)},
+ {XML_forestGreen, ::Color(0x228B22)}, {XML_fuchsia, ::Color(0xFF00FF)},
+ {XML_gainsboro, ::Color(0xDCDCDC)}, {XML_ghostWhite, ::Color(0xF8F8FF)},
+ {XML_gold, ::Color(0xFFD700)}, {XML_goldenrod, ::Color(0xDAA520)},
+ {XML_gray, ::Color(0x808080)}, {XML_green, ::Color(0x008000)},
+ {XML_greenYellow, ::Color(0xADFF2F)}, {XML_honeydew, ::Color(0xF0FFF0)},
+ {XML_hotPink, ::Color(0xFF69B4)}, {XML_indianRed, ::Color(0xCD5C5C)},
+ {XML_indigo, ::Color(0x4B0082)}, {XML_ivory, ::Color(0xFFFFF0)},
+ {XML_khaki, ::Color(0xF0E68C)}, {XML_lavender, ::Color(0xE6E6FA)},
+ {XML_lavenderBlush, ::Color(0xFFF0F5)}, {XML_lawnGreen, ::Color(0x7CFC00)},
+ {XML_lemonChiffon, ::Color(0xFFFACD)}, {XML_lime, ::Color(0x00FF00)},
+ {XML_limeGreen, ::Color(0x32CD32)}, {XML_linen, ::Color(0xFAF0E6)},
+ {XML_ltBlue, ::Color(0xADD8E6)}, {XML_ltCoral, ::Color(0xF08080)},
+ {XML_ltCyan, ::Color(0xE0FFFF)}, {XML_ltGoldenrodYellow, ::Color(0xFAFA78)},
+ {XML_ltGray, ::Color(0xD3D3D3)}, {XML_ltGreen, ::Color(0x90EE90)},
+ {XML_ltPink, ::Color(0xFFB6C1)}, {XML_ltSalmon, ::Color(0xFFA07A)},
+ {XML_ltSeaGreen, ::Color(0x20B2AA)}, {XML_ltSkyBlue, ::Color(0x87CEFA)},
+ {XML_ltSlateGray, ::Color(0x778899)}, {XML_ltSteelBlue, ::Color(0xB0C4DE)},
+ {XML_ltYellow, ::Color(0xFFFFE0)}, {XML_magenta, ::Color(0xFF00FF)},
+ {XML_maroon, ::Color(0x800000)}, {XML_medAquamarine, ::Color(0x66CDAA)},
+ {XML_medBlue, ::Color(0x0000CD)}, {XML_medOrchid, ::Color(0xBA55D3)},
+ {XML_medPurple, ::Color(0x9370DB)}, {XML_medSeaGreen, ::Color(0x3CB371)},
+ {XML_medSlateBlue, ::Color(0x7B68EE)}, {XML_medSpringGreen, ::Color(0x00FA9A)},
+ {XML_medTurquoise, ::Color(0x48D1CC)}, {XML_medVioletRed, ::Color(0xC71585)},
+ {XML_midnightBlue, ::Color(0x191970)}, {XML_mintCream, ::Color(0xF5FFFA)},
+ {XML_mistyRose, ::Color(0xFFE4E1)}, {XML_moccasin, ::Color(0xFFE4B5)},
+ {XML_navajoWhite, ::Color(0xFFDEAD)}, {XML_navy, ::Color(0x000080)},
+ {XML_oldLace, ::Color(0xFDF5E6)}, {XML_olive, ::Color(0x808000)},
+ {XML_oliveDrab, ::Color(0x6B8E23)}, {XML_orange, ::Color(0xFFA500)},
+ {XML_orangeRed, ::Color(0xFF4500)}, {XML_orchid, ::Color(0xDA70D6)},
+ {XML_paleGoldenrod, ::Color(0xEEE8AA)}, {XML_paleGreen, ::Color(0x98FB98)},
+ {XML_paleTurquoise, ::Color(0xAFEEEE)}, {XML_paleVioletRed, ::Color(0xDB7093)},
+ {XML_papayaWhip, ::Color(0xFFEFD5)}, {XML_peachPuff, ::Color(0xFFDAB9)},
+ {XML_peru, ::Color(0xCD853F)}, {XML_pink, ::Color(0xFFC0CB)},
+ {XML_plum, ::Color(0xDDA0DD)}, {XML_powderBlue, ::Color(0xB0E0E6)},
+ {XML_purple, ::Color(0x800080)}, {XML_red, ::Color(0xFF0000)},
+ {XML_rosyBrown, ::Color(0xBC8F8F)}, {XML_royalBlue, ::Color(0x4169E1)},
+ {XML_saddleBrown, ::Color(0x8B4513)}, {XML_salmon, ::Color(0xFA8072)},
+ {XML_sandyBrown, ::Color(0xF4A460)}, {XML_seaGreen, ::Color(0x2E8B57)},
+ {XML_seaShell, ::Color(0xFFF5EE)}, {XML_sienna, ::Color(0xA0522D)},
+ {XML_silver, ::Color(0xC0C0C0)}, {XML_skyBlue, ::Color(0x87CEEB)},
+ {XML_slateBlue, ::Color(0x6A5ACD)}, {XML_slateGray, ::Color(0x708090)},
+ {XML_snow, ::Color(0xFFFAFA)}, {XML_springGreen, ::Color(0x00FF7F)},
+ {XML_steelBlue, ::Color(0x4682B4)}, {XML_tan, ::Color(0xD2B48C)},
+ {XML_teal, ::Color(0x008080)}, {XML_thistle, ::Color(0xD8BFD8)},
+ {XML_tomato, ::Color(0xFF6347)}, {XML_turquoise, ::Color(0x40E0D0)},
+ {XML_violet, ::Color(0xEE82EE)}, {XML_wheat, ::Color(0xF5DEB3)},
+ {XML_white, ::Color(0xFFFFFF)}, {XML_whiteSmoke, ::Color(0xF5F5F5)},
+ {XML_yellow, ::Color(0xFFFF00)}, {XML_yellowGreen, ::Color(0x9ACD32)}
+ };
+ for(auto const& nEntry : spnDmlColors)
+ maDmlColors[ static_cast< size_t >(nEntry.first) ] = nEntry.second;
+
+ // predefined colors in VML (map XML token identifiers to RGB values)
+ static const std::pair<sal_Int32, ::Color> spnVmlColors[] =
+ {
+ {XML_aqua, ::Color(0x00FFFF)}, {XML_black, ::Color(0x000000)},
+ {XML_blue, ::Color(0x0000FF)}, {XML_fuchsia, ::Color(0xFF00FF)},
+ {XML_gray, ::Color(0x808080)}, {XML_green, ::Color(0x008000)},
+ {XML_lime, ::Color(0x00FF00)}, {XML_maroon, ::Color(0x800000)},
+ {XML_navy, ::Color(0x000080)}, {XML_olive, ::Color(0x808000)},
+ {XML_purple, ::Color(0x800080)}, {XML_red, ::Color(0xFF0000)},
+ {XML_silver, ::Color(0xC0C0C0)}, {XML_teal, ::Color(0x008080)},
+ {XML_white, ::Color(0xFFFFFF)}, {XML_yellow, ::Color(0xFFFF00)}
+ };
+ for(auto const& nEntry : spnVmlColors)
+ maVmlColors[ static_cast< size_t >(nEntry.first) ] = nEntry.second;
+
+ // predefined highlight colors in DML (map XML token identifiers to RGB values)
+ static const std::pair<sal_Int32, ::Color> spnHighlightColors[] =
+ {
+ // tdf#131841 Predefined color for OOXML highlight.
+ {XML_black, ::Color(0x000000)}, {XML_blue, ::Color(0x0000FF)},
+ {XML_cyan, ::Color(0x00FFFF)}, {XML_darkBlue, ::Color(0x00008B)},
+ {XML_darkCyan, ::Color(0x008B8B)}, {XML_darkGray, ::Color(0xA9A9A9)},
+ {XML_darkGreen, ::Color(0x006400)}, {XML_darkMagenta, ::Color(0x800080)},
+ {XML_darkRed, ::Color(0x8B0000)}, {XML_darkYellow, ::Color(0x808000)},
+ {XML_green, ::Color(0x00FF00)}, {XML_lightGray, ::Color(0xD3D3D3)},
+ {XML_magenta, ::Color(0xFF00FF)}, {XML_red, ::Color(0xFF0000)},
+ {XML_white, ::Color(0xFFFFFF)}, {XML_yellow, ::Color(0xFFFF00)}
+ };
+ for (auto const& nEntry : spnHighlightColors)
+ maHighlightColors[static_cast<size_t>(nEntry.first)] = nEntry.second;
+}
+
+struct StaticPresetColorsPool : public ::rtl::Static< PresetColorsPool, StaticPresetColorsPool > {};
+
+const double DEC_GAMMA = 2.3;
+const double INC_GAMMA = 1.0 / DEC_GAMMA;
+
+void lclRgbToRgbComponents( sal_Int32& ornR, sal_Int32& ornG, sal_Int32& ornB, ::Color nRgb )
+{
+ ornR = nRgb.GetRed();
+ ornG = nRgb.GetGreen();
+ ornB = nRgb.GetBlue();
+}
+
+sal_Int32 lclRgbComponentsToRgb( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB )
+{
+ return static_cast< sal_Int32 >( (nR << 16) | (nG << 8) | nB );
+}
+
+sal_Int32 lclRgbCompToCrgbComp( sal_Int32 nRgbComp )
+{
+ return static_cast< sal_Int32 >( nRgbComp * MAX_PERCENT / 255 );
+}
+
+sal_Int32 lclCrgbCompToRgbComp( sal_Int32 nCrgbComp )
+{
+ return static_cast< sal_Int32 >( nCrgbComp * 255 / MAX_PERCENT );
+}
+
+sal_Int32 lclGamma( sal_Int32 nComp, double fGamma )
+{
+ return static_cast< sal_Int32 >( pow( static_cast< double >( nComp ) / MAX_PERCENT, fGamma ) * MAX_PERCENT + 0.5 );
+}
+
+void lclSetValue( sal_Int32& ornValue, sal_Int32 nNew, sal_Int32 nMax = MAX_PERCENT )
+{
+ OSL_ENSURE( (0 <= nNew) && (nNew <= nMax), "lclSetValue - invalid value" );
+ if( (0 <= nNew) && (nNew <= nMax) )
+ ornValue = nNew;
+}
+
+void lclModValue( sal_Int32& ornValue, sal_Int32 nMod, sal_Int32 nMax = MAX_PERCENT )
+{
+ OSL_ENSURE( (0 <= nMod), "lclModValue - invalid modificator" );
+ ornValue = getLimitedValue< sal_Int32, double >( static_cast< double >( ornValue ) * nMod / MAX_PERCENT, 0, nMax );
+}
+
+void lclOffValue( sal_Int32& ornValue, sal_Int32 nOff, sal_Int32 nMax = MAX_PERCENT )
+{
+ OSL_ENSURE( (-nMax <= nOff) && (nOff <= nMax), "lclOffValue - invalid offset" );
+ ornValue = getLimitedValue< sal_Int32, sal_Int32 >( ornValue + nOff, 0, nMax );
+}
+
+} // namespace
+
+Color::Color() :
+ meMode( COLOR_UNUSED ),
+ mnC1( 0 ),
+ mnC2( 0 ),
+ mnC3( 0 ),
+ mnAlpha( MAX_PERCENT )
+{
+}
+
+::Color Color::getDmlPresetColor( sal_Int32 nToken, ::Color nDefaultRgb )
+{
+ /* Do not pass nDefaultRgb to ContainerHelper::getVectorElement(), to be
+ able to catch the existing vector entries without corresponding XML
+ token identifier. */
+ ::Color nRgbValue = ContainerHelper::getVectorElement( StaticPresetColorsPool::get().maDmlColors, nToken, API_RGB_TRANSPARENT );
+ return (sal_Int32(nRgbValue) >= 0) ? nRgbValue : nDefaultRgb;
+}
+
+::Color Color::getVmlPresetColor( sal_Int32 nToken, ::Color nDefaultRgb )
+{
+ /* Do not pass nDefaultRgb to ContainerHelper::getVectorElement(), to be
+ able to catch the existing vector entries without corresponding XML
+ token identifier. */
+ ::Color nRgbValue = ContainerHelper::getVectorElement( StaticPresetColorsPool::get().maVmlColors, nToken, API_RGB_TRANSPARENT );
+ return (sal_Int32(nRgbValue) >= 0) ? nRgbValue : nDefaultRgb;
+}
+
+::Color Color::getHighlightColor(sal_Int32 nToken, ::Color nDefaultRgb)
+{
+ /* Do not pass nDefaultRgb to ContainerHelper::getVectorElement(), to be
+ able to catch the existing vector entries without corresponding XML
+ token identifier. */
+ ::Color nRgbValue = ContainerHelper::getVectorElement( StaticPresetColorsPool::get().maHighlightColors, nToken, API_RGB_TRANSPARENT );
+ return (sal_Int32(nRgbValue) >= 0) ? nRgbValue : nDefaultRgb;
+}
+
+void Color::setUnused()
+{
+ meMode = COLOR_UNUSED;
+}
+
+void Color::setSrgbClr( ::Color nRgb )
+{
+ setSrgbClr(sal_Int32(nRgb));
+}
+
+void Color::setSrgbClr( sal_Int32 nRgb )
+{
+ OSL_ENSURE( (0 <= nRgb) && (nRgb <= 0xFFFFFF), "Color::setSrgbClr - invalid RGB value" );
+ meMode = COLOR_RGB;
+ lclRgbToRgbComponents( mnC1, mnC2, mnC3, ::Color(ColorTransparency, nRgb) );
+}
+
+void Color::setScrgbClr( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB )
+{
+ OSL_ENSURE( (0 <= nR) && (nR <= MAX_PERCENT), "Color::setScrgbClr - invalid red value" );
+ OSL_ENSURE( (0 <= nG) && (nG <= MAX_PERCENT), "Color::setScrgbClr - invalid green value" );
+ OSL_ENSURE( (0 <= nB) && (nB <= MAX_PERCENT), "Color::setScrgbClr - invalid blue value" );
+ meMode = COLOR_CRGB;
+ mnC1 = getLimitedValue< sal_Int32, sal_Int32 >( nR, 0, MAX_PERCENT );
+ mnC2 = getLimitedValue< sal_Int32, sal_Int32 >( nG, 0, MAX_PERCENT );
+ mnC3 = getLimitedValue< sal_Int32, sal_Int32 >( nB, 0, MAX_PERCENT );
+}
+
+void Color::setHslClr( sal_Int32 nHue, sal_Int32 nSat, sal_Int32 nLum )
+{
+ OSL_ENSURE( (0 <= nHue) && (nHue <= MAX_DEGREE), "Color::setHslClr - invalid hue value" );
+ OSL_ENSURE( (0 <= nSat) && (nSat <= MAX_PERCENT), "Color::setHslClr - invalid saturation value" );
+ OSL_ENSURE( (0 <= nLum) && (nLum <= MAX_PERCENT), "Color::setHslClr - invalid luminance value" );
+ meMode = COLOR_HSL;
+ mnC1 = getLimitedValue< sal_Int32, sal_Int32 >( nHue, 0, MAX_DEGREE );
+ mnC2 = getLimitedValue< sal_Int32, sal_Int32 >( nSat, 0, MAX_PERCENT );
+ mnC3 = getLimitedValue< sal_Int32, sal_Int32 >( nLum, 0, MAX_PERCENT );
+}
+
+void Color::setPrstClr( sal_Int32 nToken )
+{
+ ::Color nRgbValue = getDmlPresetColor( nToken, API_RGB_TRANSPARENT );
+ OSL_ENSURE( sal_Int32(nRgbValue) >= 0, "Color::setPrstClr - invalid preset color token" );
+ if( sal_Int32(nRgbValue) >= 0 )
+ setSrgbClr( nRgbValue );
+}
+
+void Color::setHighlight(sal_Int32 nToken)
+{
+ ::Color nRgbValue = getHighlightColor(nToken, API_RGB_TRANSPARENT);
+ OSL_ENSURE( sal_Int32(nRgbValue) >= 0, "Color::setPrstClr - invalid preset color token" );
+ if ( sal_Int32(nRgbValue) >= 0 )
+ setSrgbClr( nRgbValue );
+}
+
+void Color::setSchemeClr( sal_Int32 nToken )
+{
+ OSL_ENSURE( nToken != XML_TOKEN_INVALID, "Color::setSchemeClr - invalid color token" );
+ meMode = (nToken == XML_phClr) ? COLOR_PH : COLOR_SCHEME;
+ mnC1 = nToken;
+}
+
+void Color::setPaletteClr( sal_Int32 nPaletteIdx )
+{
+ OSL_ENSURE( nPaletteIdx >= 0, "Color::setPaletteClr - invalid palette index" );
+ meMode = COLOR_PALETTE;
+ mnC1 = nPaletteIdx;
+}
+
+void Color::setSysClr( sal_Int32 nToken, sal_Int32 nLastRgb )
+{
+ OSL_ENSURE( (-1 <= nLastRgb) && (nLastRgb <= 0xFFFFFF), "Color::setSysClr - invalid RGB value" );
+ meMode = COLOR_SYSTEM;
+ mnC1 = nToken;
+ mnC2 = nLastRgb;
+}
+
+void Color::addTransformation( sal_Int32 nElement, sal_Int32 nValue )
+{
+ /* Execute alpha transformations directly, store other transformations in
+ a vector, they may depend on a scheme base color which will be resolved
+ in Color::getColor(). */
+ sal_Int32 nToken = getBaseToken( nElement );
+ switch( nToken )
+ {
+ case XML_alpha: lclSetValue( mnAlpha, nValue ); break;
+ case XML_alphaMod: lclModValue( mnAlpha, nValue ); break;
+ case XML_alphaOff: lclOffValue( mnAlpha, nValue ); break;
+ default: maTransforms.emplace_back( nToken, nValue );
+ }
+ sal_Int32 nSize = maInteropTransformations.getLength();
+ maInteropTransformations.realloc(nSize + 1);
+ auto pInteropTransformations = maInteropTransformations.getArray();
+ pInteropTransformations[nSize].Name = getColorTransformationName( nToken );
+ pInteropTransformations[nSize].Value <<= nValue;
+}
+
+void Color::addChartTintTransformation( double fTint )
+{
+ sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT );
+ if( nValue < 0 )
+ maTransforms.emplace_back( XML_shade, nValue + MAX_PERCENT );
+ else if( nValue > 0 )
+ maTransforms.emplace_back( XML_tint, MAX_PERCENT - nValue );
+}
+
+void Color::addExcelTintTransformation( double fTint )
+{
+ sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT );
+ maTransforms.emplace_back( XLS_TOKEN( tint ), nValue );
+}
+
+void Color::clearTransformations()
+{
+ maTransforms.clear();
+ maInteropTransformations.realloc(0);
+ clearTransparence();
+}
+
+OUString Color::getColorTransformationName( sal_Int32 nElement )
+{
+ switch( nElement )
+ {
+ case XML_red: return "red";
+ case XML_redMod: return "redMod";
+ case XML_redOff: return "redOff";
+ case XML_green: return "green";
+ case XML_greenMod: return "greenMod";
+ case XML_greenOff: return "greenOff";
+ case XML_blue: return "blue";
+ case XML_blueMod: return "blueMod";
+ case XML_blueOff: return "blueOff";
+ case XML_alpha: return "alpha";
+ case XML_alphaMod: return "alphaMod";
+ case XML_alphaOff: return "alphaOff";
+ case XML_hue: return "hue";
+ case XML_hueMod: return "hueMod";
+ case XML_hueOff: return "hueOff";
+ case XML_sat: return "sat";
+ case XML_satMod: return "satMod";
+ case XML_satOff: return "satOff";
+ case XML_lum: return "lum";
+ case XML_lumMod: return "lumMod";
+ case XML_lumOff: return "lumOff";
+ case XML_shade: return "shade";
+ case XML_tint: return "tint";
+ case XML_gray: return "gray";
+ case XML_comp: return "comp";
+ case XML_inv: return "inv";
+ case XML_gamma: return "gamma";
+ case XML_invGamma: return "invGamma";
+ }
+ SAL_WARN( "oox.drawingml", "Color::getColorTransformationName - unexpected transformation type" );
+ return OUString();
+}
+
+sal_Int32 Color::getColorTransformationToken( std::u16string_view sName )
+{
+ if( sName == u"red" )
+ return XML_red;
+ else if( sName == u"redMod" )
+ return XML_redMod;
+ else if( sName == u"redOff" )
+ return XML_redOff;
+ else if( sName == u"green" )
+ return XML_green;
+ else if( sName == u"greenMod" )
+ return XML_greenMod;
+ else if( sName == u"greenOff" )
+ return XML_greenOff;
+ else if( sName == u"blue" )
+ return XML_blue;
+ else if( sName == u"blueMod" )
+ return XML_blueMod;
+ else if( sName == u"blueOff" )
+ return XML_blueOff;
+ else if( sName == u"alpha" )
+ return XML_alpha;
+ else if( sName == u"alphaMod" )
+ return XML_alphaMod;
+ else if( sName == u"alphaOff" )
+ return XML_alphaOff;
+ else if( sName == u"hue" )
+ return XML_hue;
+ else if( sName == u"hueMod" )
+ return XML_hueMod;
+ else if( sName == u"hueOff" )
+ return XML_hueOff;
+ else if( sName == u"sat" )
+ return XML_sat;
+ else if( sName == u"satMod" )
+ return XML_satMod;
+ else if( sName == u"satOff" )
+ return XML_satOff;
+ else if( sName == u"lum" )
+ return XML_lum;
+ else if( sName == u"lumMod" )
+ return XML_lumMod;
+ else if( sName == u"lumOff" )
+ return XML_lumOff;
+ else if( sName == u"shade" )
+ return XML_shade;
+ else if( sName == u"tint" )
+ return XML_tint;
+ else if( sName == u"gray" )
+ return XML_gray;
+ else if( sName == u"comp" )
+ return XML_comp;
+ else if( sName == u"inv" )
+ return XML_inv;
+ else if( sName == u"gamma" )
+ return XML_gamma;
+ else if( sName == u"invGamma" )
+ return XML_invGamma;
+
+ SAL_WARN( "oox.drawingml", "Color::getColorTransformationToken - unexpected transformation type" );
+ return XML_TOKEN_INVALID;
+}
+
+bool Color::equals(const Color& rOther, const GraphicHelper& rGraphicHelper, ::Color nPhClr) const
+{
+ if (getColor(rGraphicHelper, nPhClr) != rOther.getColor(rGraphicHelper, nPhClr))
+ return false;
+
+ return getTransparency() == rOther.getTransparency();
+}
+
+void Color::clearTransparence()
+{
+ mnAlpha = MAX_PERCENT;
+}
+
+sal_Int16 Color::getTintOrShade() const
+{
+ for(auto const& aTransform : maTransforms)
+ {
+ switch(aTransform.mnToken)
+ {
+ case XML_tint:
+ // from 1000th percent to 100th percent...
+ return aTransform.mnValue/10;
+ case XML_shade:
+ // from 1000th percent to 100th percent...
+ return -aTransform.mnValue/10;
+ }
+ }
+ return 0;
+}
+
+sal_Int16 Color::getLumMod() const
+{
+ for (const auto& rTransform : maTransforms)
+ {
+ if (rTransform.mnToken != XML_lumMod)
+ {
+ continue;
+ }
+
+ // From 1000th percent to 100th percent.
+ return rTransform.mnValue / 10;
+ }
+
+ return 10000;
+}
+
+sal_Int16 Color::getLumOff() const
+{
+ for (const auto& rTransform : maTransforms)
+ {
+ if (rTransform.mnToken != XML_lumOff)
+ {
+ continue;
+ }
+
+ // From 1000th percent to 100th percent.
+ return rTransform.mnValue / 10;
+ }
+
+ return 0;
+}
+
+::Color Color::getColor( const GraphicHelper& rGraphicHelper, ::Color nPhClr ) const
+{
+ const sal_Int32 nTempC1 = mnC1;
+ const sal_Int32 nTempC2 = mnC2;
+ const sal_Int32 nTempC3 = mnC3;
+ const ColorMode eTempMode = meMode;
+
+ switch( meMode )
+ {
+ case COLOR_UNUSED: mnC1 = sal_Int32(API_RGB_TRANSPARENT); break;
+
+ case COLOR_RGB: break; // nothing to do
+ case COLOR_CRGB: break; // nothing to do
+ case COLOR_HSL: break; // nothing to do
+
+ case COLOR_SCHEME: setResolvedRgb( rGraphicHelper.getSchemeColor( mnC1 ) ); break;
+ case COLOR_PALETTE: setResolvedRgb( rGraphicHelper.getPaletteColor( mnC1 ) ); break;
+ case COLOR_SYSTEM: setResolvedRgb( rGraphicHelper.getSystemColor( mnC1, ::Color(ColorTransparency, mnC2) ) ); break;
+ case COLOR_PH: setResolvedRgb( nPhClr ); break;
+
+ case COLOR_FINAL: return ::Color(ColorTransparency, mnC1);
+ }
+
+ // if color is UNUSED or turns to UNUSED in setResolvedRgb, do not perform transformations
+ if( meMode != COLOR_UNUSED )
+ {
+ for (auto const& transform : maTransforms)
+ {
+ switch( transform.mnToken )
+ {
+ case XML_red: toCrgb(); lclSetValue( mnC1, transform.mnValue ); break;
+ case XML_redMod: toCrgb(); lclModValue( mnC1, transform.mnValue ); break;
+ case XML_redOff: toCrgb(); lclOffValue( mnC1, transform.mnValue ); break;
+ case XML_green: toCrgb(); lclSetValue( mnC2, transform.mnValue ); break;
+ case XML_greenMod: toCrgb(); lclModValue( mnC2, transform.mnValue ); break;
+ case XML_greenOff: toCrgb(); lclOffValue( mnC2, transform.mnValue ); break;
+ case XML_blue: toCrgb(); lclSetValue( mnC3, transform.mnValue ); break;
+ case XML_blueMod: toCrgb(); lclModValue( mnC3, transform.mnValue ); break;
+ case XML_blueOff: toCrgb(); lclOffValue( mnC3, transform.mnValue ); break;
+
+ case XML_hue: toHsl(); lclSetValue( mnC1, transform.mnValue, MAX_DEGREE ); break;
+ case XML_hueMod: toHsl(); lclModValue( mnC1, transform.mnValue, MAX_DEGREE ); break;
+ case XML_hueOff: toHsl(); lclOffValue( mnC1, transform.mnValue, MAX_DEGREE ); break;
+ case XML_sat: toHsl(); lclSetValue( mnC2, transform.mnValue ); break;
+ case XML_satMod: toHsl(); lclModValue( mnC2, transform.mnValue ); break;
+ case XML_satOff: toHsl(); lclOffValue( mnC2, transform.mnValue ); break;
+
+ case XML_lum:
+ toHsl();
+ lclSetValue( mnC3, transform.mnValue );
+ // if color changes to black or white, it will stay gray if luminance changes again
+ if( (mnC3 == 0) || (mnC3 == MAX_PERCENT) ) mnC2 = 0;
+ break;
+ case XML_lumMod:
+ toHsl();
+ lclModValue( mnC3, transform.mnValue );
+ // if color changes to black or white, it will stay gray if luminance changes again
+ if( (mnC3 == 0) || (mnC3 == MAX_PERCENT) ) mnC2 = 0;
+ break;
+ case XML_lumOff:
+ toHsl();
+ lclOffValue( mnC3, transform.mnValue );
+ // if color changes to black or white, it will stay gray if luminance changes again
+ if( (mnC3 == 0) || (mnC3 == MAX_PERCENT) ) mnC2 = 0;
+ break;
+
+ case XML_shade:
+ // shade: 0% = black, 100% = original color
+ toCrgb();
+ OSL_ENSURE( (0 <= transform.mnValue) && (transform.mnValue <= MAX_PERCENT), "Color::getColor - invalid shade value" );
+ if( (0 <= transform.mnValue) && (transform.mnValue <= MAX_PERCENT) )
+ {
+ double fFactor = static_cast< double >( transform.mnValue ) / MAX_PERCENT;
+ mnC1 = static_cast< sal_Int32 >( mnC1 * fFactor );
+ mnC2 = static_cast< sal_Int32 >( mnC2 * fFactor );
+ mnC3 = static_cast< sal_Int32 >( mnC3 * fFactor );
+ }
+ break;
+ case XML_tint:
+ // tint: 0% = white, 100% = original color
+ toCrgb();
+ OSL_ENSURE( (0 <= transform.mnValue) && (transform.mnValue <= MAX_PERCENT), "Color::getColor - invalid tint value" );
+ if( (0 <= transform.mnValue) && (transform.mnValue <= MAX_PERCENT) )
+ {
+ double fFactor = static_cast< double >( transform.mnValue ) / MAX_PERCENT;
+ mnC1 = static_cast< sal_Int32 >( MAX_PERCENT - (MAX_PERCENT - mnC1) * fFactor );
+ mnC2 = static_cast< sal_Int32 >( MAX_PERCENT - (MAX_PERCENT - mnC2) * fFactor );
+ mnC3 = static_cast< sal_Int32 >( MAX_PERCENT - (MAX_PERCENT - mnC3) * fFactor );
+ }
+ break;
+ case XLS_TOKEN( tint ):
+ // Excel tint: move luminance relative to current value
+ toHsl();
+ OSL_ENSURE( (-MAX_PERCENT <= transform.mnValue) && (transform.mnValue <= MAX_PERCENT), "Color::getColor - invalid tint value" );
+ if( (-MAX_PERCENT <= transform.mnValue) && (transform.mnValue < 0) )
+ {
+ // negative: luminance towards 0% (black)
+ lclModValue( mnC3, transform.mnValue + MAX_PERCENT );
+ }
+ else if( (0 < transform.mnValue) && (transform.mnValue <= MAX_PERCENT) )
+ {
+ // positive: luminance towards 100% (white)
+ mnC3 = MAX_PERCENT - mnC3;
+ lclModValue( mnC3, MAX_PERCENT - transform.mnValue );
+ mnC3 = MAX_PERCENT - mnC3;
+ }
+ break;
+
+ case XML_gray:
+ // change color to gray, weighted RGB: 22% red, 72% green, 6% blue
+ toRgb();
+ mnC1 = mnC2 = mnC3 = (mnC1 * 22 + mnC2 * 72 + mnC3 * 6) / 100;
+ break;
+
+ case XML_comp:
+ // comp: rotate hue by 180 degrees, do not change lum/sat
+ toHsl();
+ mnC1 = (mnC1 + (180 * PER_DEGREE)) % MAX_DEGREE;
+ break;
+ case XML_inv:
+ // invert percentual RGB values
+ toCrgb();
+ mnC1 = MAX_PERCENT - mnC1;
+ mnC2 = MAX_PERCENT - mnC2;
+ mnC3 = MAX_PERCENT - mnC3;
+ break;
+
+ case XML_gamma:
+ // increase gamma of color
+ toCrgb();
+ mnC1 = lclGamma( mnC1, INC_GAMMA );
+ mnC2 = lclGamma( mnC2, INC_GAMMA );
+ mnC3 = lclGamma( mnC3, INC_GAMMA );
+ break;
+ case XML_invGamma:
+ // decrease gamma of color
+ toCrgb();
+ mnC1 = lclGamma( mnC1, DEC_GAMMA );
+ mnC2 = lclGamma( mnC2, DEC_GAMMA );
+ mnC3 = lclGamma( mnC3, DEC_GAMMA );
+ break;
+ }
+ }
+
+ // store resulting RGB value in mnC1
+ toRgb();
+ mnC1 = lclRgbComponentsToRgb( mnC1, mnC2, mnC3 );
+ }
+ else // if( meMode != COLOR_UNUSED )
+ {
+ mnC1 = sal_Int32(API_RGB_TRANSPARENT);
+ }
+
+ sal_Int32 nRet = mnC1;
+ // Restore the original values when the color depends on one of the input
+ // parameters (rGraphicHelper or nPhClr)
+ if( eTempMode >= COLOR_SCHEME && eTempMode <= COLOR_PH )
+ {
+ mnC1 = nTempC1;
+ mnC2 = nTempC2;
+ mnC3 = nTempC3;
+ meMode = eTempMode;
+ }
+ else
+ {
+ meMode = COLOR_FINAL;
+ }
+ if( meMode == COLOR_FINAL )
+ maTransforms.clear();
+ return ::Color(ColorTransparency, nRet);
+}
+
+bool Color::hasTransparency() const
+{
+ return mnAlpha < MAX_PERCENT;
+}
+
+sal_Int16 Color::getTransparency() const
+{
+ return sal_Int16(std::round( (1.0 * (MAX_PERCENT - mnAlpha)) / PER_PERCENT) );
+}
+
+sal_Int16 Color::getSchemeColorIndex() const
+{
+ static std::map<OUString, sal_Int32> const aSchemeColorNameToIndex{
+ { "dk1", 0 }, { "lt1", 1 }, { "dk2", 2 }, { "lt2", 3 },
+ { "accent1", 4 }, { "accent2", 5 }, { "accent3", 6 }, { "accent4", 7 },
+ { "accent5", 8 }, { "accent6", 9 }, { "hlink", 10 }, { "folHlink", 11 }
+ };
+
+ auto aIt = aSchemeColorNameToIndex.find(msSchemeName);
+ if( aIt == aSchemeColorNameToIndex.end() )
+ return -1;
+ else
+ return aIt->second;
+}
+
+// private --------------------------------------------------------------------
+
+void Color::setResolvedRgb( ::Color nRgb ) const
+{
+ meMode = (sal_Int32(nRgb) < 0) ? COLOR_UNUSED : COLOR_RGB;
+ lclRgbToRgbComponents( mnC1, mnC2, mnC3, nRgb );
+}
+
+void Color::toRgb() const
+{
+ switch( meMode )
+ {
+ case COLOR_RGB:
+ // nothing to do
+ break;
+ case COLOR_CRGB:
+ meMode = COLOR_RGB;
+ mnC1 = lclCrgbCompToRgbComp( lclGamma( mnC1, INC_GAMMA ) );
+ mnC2 = lclCrgbCompToRgbComp( lclGamma( mnC2, INC_GAMMA ) );
+ mnC3 = lclCrgbCompToRgbComp( lclGamma( mnC3, INC_GAMMA ) );
+ break;
+ case COLOR_HSL:
+ {
+ meMode = COLOR_RGB;
+ double fR = 0.0, fG = 0.0, fB = 0.0;
+ if( (mnC2 == 0) || (mnC3 == MAX_PERCENT) )
+ {
+ fR = fG = fB = static_cast< double >( mnC3 ) / MAX_PERCENT;
+ }
+ else if( mnC3 > 0 )
+ {
+ // base color from hue
+ double fHue = static_cast< double >( mnC1 ) / MAX_DEGREE * 6.0; // interval [0.0, 6.0)
+ if( fHue <= 1.0 ) { fR = 1.0; fG = fHue; } // red...yellow
+ else if( fHue <= 2.0 ) { fR = 2.0 - fHue; fG = 1.0; } // yellow...green
+ else if( fHue <= 3.0 ) { fG = 1.0; fB = fHue - 2.0; } // green...cyan
+ else if( fHue <= 4.0 ) { fG = 4.0 - fHue; fB = 1.0; } // cyan...blue
+ else if( fHue <= 5.0 ) { fR = fHue - 4.0; fB = 1.0; } // blue...magenta
+ else { fR = 1.0; fB = 6.0 - fHue; } // magenta...red
+
+ // apply saturation
+ double fSat = static_cast< double >( mnC2 ) / MAX_PERCENT;
+ fR = (fR - 0.5) * fSat + 0.5;
+ fG = (fG - 0.5) * fSat + 0.5;
+ fB = (fB - 0.5) * fSat + 0.5;
+
+ // apply luminance
+ double fLum = 2.0 * static_cast< double >( mnC3 ) / MAX_PERCENT - 1.0; // interval [-1.0, 1.0]
+ if( fLum < 0.0 )
+ {
+ double fShade = fLum + 1.0; // interval [0.0, 1.0] (black...full color)
+ fR *= fShade;
+ fG *= fShade;
+ fB *= fShade;
+ }
+ else if( fLum > 0.0 )
+ {
+ double fTint = 1.0 - fLum; // interval [0.0, 1.0] (white...full color)
+ fR = 1.0 - ((1.0 - fR) * fTint);
+ fG = 1.0 - ((1.0 - fG) * fTint);
+ fB = 1.0 - ((1.0 - fB) * fTint);
+ }
+ }
+ mnC1 = static_cast< sal_Int32 >( fR * 255.0 + 0.5 );
+ mnC2 = static_cast< sal_Int32 >( fG * 255.0 + 0.5 );
+ mnC3 = static_cast< sal_Int32 >( fB * 255.0 + 0.5 );
+ }
+ break;
+ default:
+ OSL_FAIL( "Color::toRgb - unexpected color mode" );
+ }
+}
+
+void Color::toCrgb() const
+{
+ switch( meMode )
+ {
+ case COLOR_HSL:
+ toRgb();
+ [[fallthrough]];
+ case COLOR_RGB:
+ meMode = COLOR_CRGB;
+ mnC1 = lclGamma( lclRgbCompToCrgbComp( mnC1 ), DEC_GAMMA );
+ mnC2 = lclGamma( lclRgbCompToCrgbComp( mnC2 ), DEC_GAMMA );
+ mnC3 = lclGamma( lclRgbCompToCrgbComp( mnC3 ), DEC_GAMMA );
+ break;
+ case COLOR_CRGB:
+ // nothing to do
+ break;
+ default:
+ OSL_FAIL( "Color::toCrgb - unexpected color mode" );
+ }
+}
+
+void Color::toHsl() const
+{
+ switch( meMode )
+ {
+ case COLOR_CRGB:
+ toRgb();
+ [[fallthrough]];
+ case COLOR_RGB:
+ {
+ meMode = COLOR_HSL;
+ double fR = static_cast< double >( mnC1 ) / 255.0; // red [0.0, 1.0]
+ double fG = static_cast< double >( mnC2 ) / 255.0; // green [0.0, 1.0]
+ double fB = static_cast< double >( mnC3 ) / 255.0; // blue [0.0, 1.0]
+ double fMin = ::std::min( ::std::min( fR, fG ), fB );
+ double fMax = ::std::max( ::std::max( fR, fG ), fB );
+ double fD = fMax - fMin;
+
+ using ::rtl::math::approxEqual;
+
+ // hue: 0deg = red, 120deg = green, 240deg = blue
+ if( fD == 0.0 ) // black/gray/white
+ mnC1 = 0;
+ else if( approxEqual(fMax, fR, 64) ) // magenta...red...yellow
+ mnC1 = static_cast< sal_Int32 >( ((fG - fB) / fD * 60.0 + 360.0) * PER_DEGREE + 0.5 ) % MAX_DEGREE;
+ else if( approxEqual(fMax, fG, 64) ) // yellow...green...cyan
+ mnC1 = static_cast< sal_Int32 >( ((fB - fR) / fD * 60.0 + 120.0) * PER_DEGREE + 0.5 );
+ else // cyan...blue...magenta
+ mnC1 = static_cast< sal_Int32 >( ((fR - fG) / fD * 60.0 + 240.0) * PER_DEGREE + 0.5 );
+
+ // luminance: 0% = black, 50% = full color, 100% = white
+ mnC3 = static_cast< sal_Int32 >( (fMin + fMax) / 2.0 * MAX_PERCENT + 0.5 );
+
+ // saturation: 0% = gray, 100% = full color
+ if( (mnC3 == 0) || (mnC3 == MAX_PERCENT) ) // black/white
+ mnC2 = 0;
+ else if( mnC3 <= 50 * PER_PERCENT ) // dark...full color
+ mnC2 = static_cast< sal_Int32 >( fD / (fMin + fMax) * MAX_PERCENT + 0.5 );
+ else // full color...light
+ mnC2 = static_cast< sal_Int32 >( fD / (2.0 - fMax - fMin) * MAX_PERCENT + 0.5 );
+ }
+ break;
+ case COLOR_HSL:
+ // nothing to do
+ break;
+ default:
+ OSL_FAIL( "Color::toHsl - unexpected color mode" );
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx
new file mode 100644
index 000000000..fc93b460a
--- /dev/null
+++ b/oox/source/drawingml/colorchoicecontext.cxx
@@ -0,0 +1,178 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/drawingml/color.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml {
+
+ColorValueContext::ColorValueContext( ContextHandler2Helper const & rParent, Color& rColor ) :
+ ContextHandler2( rParent ),
+ mrColor( rColor )
+{
+}
+
+void ColorValueContext::onStartElement( const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case A_TOKEN( scrgbClr ):
+ mrColor.setScrgbClr(
+ rAttribs.getInteger( XML_r, 0 ),
+ rAttribs.getInteger( XML_g, 0 ),
+ rAttribs.getInteger( XML_b, 0 ) );
+ break;
+
+ case A_TOKEN( srgbClr ):
+ mrColor.setSrgbClr( rAttribs.getIntegerHex( XML_val, 0 ) );
+ break;
+
+ case A_TOKEN( hslClr ):
+ mrColor.setHslClr(
+ rAttribs.getInteger( XML_hue, 0 ),
+ rAttribs.getInteger( XML_sat, 0 ),
+ rAttribs.getInteger( XML_lum, 0 ) );
+ break;
+
+ case A_TOKEN( sysClr ):
+ mrColor.setSysClr(
+ rAttribs.getToken( XML_val, XML_TOKEN_INVALID ),
+ rAttribs.getIntegerHex( XML_lastClr, -1 ) );
+ break;
+
+ case A_TOKEN( schemeClr ):
+ {
+ mrColor.setSchemeClr( rAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
+ oox::OptValue<OUString> sSchemeName = rAttribs.getString( XML_val );
+ if( sSchemeName.has() )
+ mrColor.setSchemeName( sSchemeName.use() );
+ }
+ break;
+
+ case A_TOKEN( prstClr ):
+ mrColor.setPrstClr( rAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
+ break;
+ }
+}
+
+::oox::core::ContextHandlerRef ColorValueContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( alpha ):
+ case A_TOKEN( alphaMod ):
+ case A_TOKEN( alphaOff ):
+ case A_TOKEN( blue ):
+ case A_TOKEN( blueMod ):
+ case A_TOKEN( blueOff ):
+ case A_TOKEN( hue ):
+ case A_TOKEN( hueMod ):
+ case A_TOKEN( hueOff ):
+ case A_TOKEN( lum ):
+ case A_TOKEN( lumMod ):
+ case A_TOKEN( lumOff ):
+ case A_TOKEN( green ):
+ case A_TOKEN( greenMod ):
+ case A_TOKEN( greenOff ):
+ case A_TOKEN( red ):
+ case A_TOKEN( redMod ):
+ case A_TOKEN( redOff ):
+ case A_TOKEN( sat ):
+ case A_TOKEN( satMod ):
+ case A_TOKEN( satOff ):
+ case A_TOKEN( shade ):
+ case A_TOKEN( tint ):
+ {
+ OUString aValue = rAttribs.getString( XML_val, OUString() );
+ sal_Int32 nVal = 0;
+ if (aValue.endsWith("%"))
+ {
+ nVal = aValue.toDouble() * PER_PERCENT;
+ }
+ else
+ nVal = rAttribs.getInteger(XML_val, 0);
+ mrColor.addTransformation( nElement, nVal );
+ }
+ break;
+ case A_TOKEN( comp ):
+ case A_TOKEN( gamma ):
+ case A_TOKEN( gray ):
+ case A_TOKEN( inv ):
+ case A_TOKEN( invGamma ):
+ mrColor.addTransformation( nElement );
+ break;
+ }
+ return nullptr;
+}
+
+ColorContext::ColorContext( ContextHandler2Helper const & rParent, Color& rColor ) :
+ ContextHandler2( rParent ),
+ mrColor( rColor )
+{
+}
+
+::oox::core::ContextHandlerRef ColorContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( scrgbClr ):
+ case A_TOKEN( srgbClr ):
+ case A_TOKEN( hslClr ):
+ case A_TOKEN( sysClr ):
+ case A_TOKEN( schemeClr ):
+ case A_TOKEN( prstClr ):
+ return new ColorValueContext( *this, mrColor );
+ }
+ return nullptr;
+}
+
+ColorsContext::ColorsContext(ContextHandler2Helper const& rParent, std::vector<Color>& rColors)
+ : ContextHandler2(rParent)
+ , mrColors(rColors)
+{
+}
+
+::oox::core::ContextHandlerRef ColorsContext::onCreateContext(sal_Int32 nElement,
+ const AttributeList&)
+{
+ switch (nElement)
+ {
+ case A_TOKEN(scrgbClr):
+ case A_TOKEN(srgbClr):
+ case A_TOKEN(hslClr):
+ case A_TOKEN(sysClr):
+ case A_TOKEN(schemeClr):
+ case A_TOKEN(prstClr):
+ {
+ mrColors.emplace_back();
+ return new ColorValueContext(*this, mrColors.back());
+ }
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/connectorshapecontext.cxx b/oox/source/drawingml/connectorshapecontext.cxx
new file mode 100644
index 000000000..b1ea90c35
--- /dev/null
+++ b/oox/source/drawingml/connectorshapecontext.cxx
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/xml/sax/FastToken.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+
+#include <oox/drawingml/connectorshapecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+namespace
+{
+class ConnectorShapePropertiesContext : public ::oox::core::ContextHandler2
+{
+ std::vector<ConnectorShapeProperties>& mrConnectorShapePropertiesList;
+ ShapePtr mpConnectorShapePtr;
+
+public:
+ ConnectorShapePropertiesContext(
+ ::oox::core::ContextHandler2Helper const& rParent, ShapePtr& pShapePtr,
+ std::vector<ConnectorShapeProperties>& rConnectorShapePropertiesList);
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 aElementToken,
+ const AttributeList& rAttribs) override;
+};
+}
+
+ConnectorShapePropertiesContext::ConnectorShapePropertiesContext(
+ ContextHandler2Helper const& rParent, ShapePtr& pShapePtr,
+ std::vector<ConnectorShapeProperties>& rConnectorShapePropertiesList)
+ : ContextHandler2(rParent)
+ , mrConnectorShapePropertiesList(rConnectorShapePropertiesList)
+ , mpConnectorShapePtr(pShapePtr)
+{
+ mpConnectorShapePtr->setConnectorShape(true);
+}
+
+::oox::core::ContextHandlerRef
+ConnectorShapePropertiesContext::onCreateContext(sal_Int32 aElementToken,
+ const AttributeList& rAttribs)
+{
+ switch (getBaseToken(aElementToken))
+ {
+ case XML_cNvPr:
+ mpConnectorShapePtr->setId(rAttribs.getString(XML_id).get());
+ mpConnectorShapePtr->setName(rAttribs.getString(XML_name).get());
+ break;
+ case XML_stCxn:
+ {
+ ConnectorShapeProperties aConnectorShapeProps;
+ aConnectorShapeProps.mbStartShape = true;
+ aConnectorShapeProps.maDestShapeId = rAttribs.getString(XML_id).get();
+ aConnectorShapeProps.mnDestGlueId = rAttribs.getInteger(XML_idx).get();
+ mrConnectorShapePropertiesList.push_back(aConnectorShapeProps);
+ break;
+ }
+ case XML_endCxn:
+ {
+ ConnectorShapeProperties aConnectorShapeProps;
+ aConnectorShapeProps.mbStartShape = false;
+ aConnectorShapeProps.maDestShapeId = rAttribs.getString(XML_id).get();
+ aConnectorShapeProps.mnDestGlueId = rAttribs.getInteger(XML_idx).get();
+ mrConnectorShapePropertiesList.push_back(aConnectorShapeProps);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return this;
+}
+
+ConnectorShapeContext::ConnectorShapeContext(
+ ContextHandler2Helper const& rParent, const ShapePtr& pMasterShapePtr,
+ const ShapePtr& pGroupShapePtr,
+ std::vector<ConnectorShapeProperties>& rConnectorShapePropertiesList)
+ : ShapeContext(rParent, pMasterShapePtr, pGroupShapePtr)
+ , mrConnectorShapePropertiesList(rConnectorShapePropertiesList)
+ , mpConnectorShapePtr(pGroupShapePtr)
+{
+}
+
+ConnectorShapeContext::~ConnectorShapeContext() {}
+
+ContextHandlerRef ConnectorShapeContext::onCreateContext(sal_Int32 aElementToken,
+ const AttributeList& rAttribs)
+{
+ switch (getBaseToken(aElementToken))
+ {
+ case XML_nvCxnSpPr:
+ return new ConnectorShapePropertiesContext(*this, mpConnectorShapePtr,
+ mrConnectorShapePropertiesList);
+ }
+
+ return ShapeContext::onCreateContext(aElementToken, rAttribs);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
new file mode 100644
index 000000000..2f508382c
--- /dev/null
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -0,0 +1,1296 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/customshapegeometry.hxx>
+#include <drawingml/customshapeproperties.hxx>
+
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
+#include <com/sun/star/xml/sax/FastToken.hpp>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <unordered_map>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+namespace {
+
+enum FormulaCommand
+{
+ FC_MULDIV = 0,
+ FC_PLUSMINUS,
+ FC_PLUSDIV,
+ FC_IFELSE,
+ FC_IFELSE1,
+ FC_ABS,
+ FC_AT2,
+ FC_CAT2,
+ FC_COS,
+ FC_MAX,
+ FC_MIN,
+ FC_MOD,
+ FC_PIN,
+ FC_SAT2,
+ FC_SIN,
+ FC_SQRT,
+ FC_TAN,
+ FC_VAL
+};
+
+struct FormulaCommandNameTable
+{
+ const char* pS;
+ FormulaCommand pE;
+};
+
+}
+
+const FormulaCommandNameTable pFormulaCommandNameTable[] =
+{
+ { "*/", FC_MULDIV },
+ { "+-", FC_PLUSMINUS },
+ { "+/", FC_PLUSDIV },
+ { "ifelse", FC_IFELSE },
+ { "?:", FC_IFELSE1 },
+ { "abs", FC_ABS },
+ { "at2", FC_AT2 },
+ { "cat2", FC_CAT2 },
+ { "cos", FC_COS },
+ { "max", FC_MAX },
+ { "min", FC_MIN },
+ { "mod", FC_MOD },
+ { "pin", FC_PIN },
+ { "sat2", FC_SAT2 },
+ { "sin", FC_SIN },
+ { "sqrt", FC_SQRT },
+ { "tan", FC_TAN },
+ { "val", FC_VAL }
+
+};
+typedef std::unordered_map< OUString, FormulaCommand > FormulaCommandHMap;
+
+static const FormulaCommandHMap* pCommandHashMap;
+
+static OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
+{
+ OUString aRet;
+ switch( rParameter.Type )
+ {
+ case EnhancedCustomShapeParameterType::NORMAL :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_DOUBLE )
+ {
+ double fValue = 0.0;
+ if ( rParameter.Value >>= fValue )
+ aRet = OUString::number( fValue );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if ( rParameter.Value >>= nValue )
+ aRet = OUString::number( nValue );
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::EQUATION :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG )
+ {
+ sal_Int32 nFormulaIndex;
+ if ( rParameter.Value >>= nFormulaIndex )
+ {
+ aRet = "?"
+ + OUString::number( nFormulaIndex )
+ + " ";
+ }
+ }
+ else
+ {
+ // ups... we should have an index here and not the formula name
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::ADJUSTMENT :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG )
+ {
+ sal_Int32 nAdjustmentIndex;
+ if ( rParameter.Value >>= nAdjustmentIndex )
+ {
+ aRet = "$"
+ + OUString::number( nAdjustmentIndex )
+ + " ";
+ }
+ }
+ else
+ {
+ // ups... we should have an index here and not the formula name
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::LEFT :
+ aRet = "left";
+ break;
+ case EnhancedCustomShapeParameterType::TOP :
+ aRet = "top";
+ break;
+ case EnhancedCustomShapeParameterType::RIGHT :
+ aRet = "right";
+ break;
+ case EnhancedCustomShapeParameterType::BOTTOM :
+ aRet = "bottom";
+ break;
+ case EnhancedCustomShapeParameterType::XSTRETCH :
+ aRet = "xstretch";
+ break;
+ case EnhancedCustomShapeParameterType::YSTRETCH :
+ aRet = "ystretch";
+ break;
+ case EnhancedCustomShapeParameterType::HASSTROKE :
+ aRet = "hasstroke";
+ break;
+ case EnhancedCustomShapeParameterType::HASFILL :
+ aRet = "hasfill";
+ break;
+ case EnhancedCustomShapeParameterType::WIDTH :
+ aRet = "width";
+ break;
+ case EnhancedCustomShapeParameterType::HEIGHT :
+ aRet = "height";
+ break;
+ case EnhancedCustomShapeParameterType::LOGWIDTH :
+ aRet = "logwidth";
+ break;
+ case EnhancedCustomShapeParameterType::LOGHEIGHT :
+ aRet = "logheight";
+ break;
+ }
+ return aRet;
+}
+
+static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const OUString& rValue, bool bNoSymbols = true )
+{
+ css::drawing::EnhancedCustomShapeParameter aRet;
+ if ( !rValue.isEmpty() )
+ {
+ bool bConstant = true;
+ sal_Int32 nConstant = -1;
+ sal_Int32 nIntVal = 0;
+
+ // first check if it's a constant value
+ switch( AttributeConversion::decodeToken( rValue ) )
+ {
+ case XML_3cd4 : nConstant = 270 * 60000; break;
+ case XML_3cd8 : nConstant = 135 * 60000; break;
+ 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;
+
+ case XML_b : // variable height of the shape defined in spPr
+ case XML_h :
+ {
+ if ( bNoSymbols )
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "logheight" ;
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ aRet.Type = EnhancedCustomShapeParameterType::LOGHEIGHT; // TODO: HEIGHT needs to be implemented
+ }
+ break;
+
+ case XML_hd10 :
+ nIntVal += 2; // */ h 1.0 10.0
+ [[fallthrough]];
+ case XML_hd8 : // */ h 1.0 8.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_hd6 : // */ h 1.0 6.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_hd5 : // */ h 1.0 5.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_hd4 : // */ h 1.0 4.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_hd3 : // */ h 1.0 3.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_hd2 : // */ h 1.0 2.0
+ case XML_vc : // */ h 1.0 2.0
+ {
+ nIntVal += 2;
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "logheight/" + OUString::number( nIntVal );
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ case XML_t :
+ case XML_l :
+ {
+ nConstant = 0;
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ break;
+
+ case XML_ls : // longest side: max w h
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "max(logwidth,logheight)";
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+ case XML_ss : // shortest side: min w h
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "min(logwidth,logheight)";
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+ case XML_ssd32 : // */ ss 1.0 32.0
+ nIntVal += 16;
+ [[fallthrough]];
+ case XML_ssd16 : // */ ss 1.0 16.0
+ nIntVal += 8;
+ [[fallthrough]];
+ case XML_ssd8 : // */ ss 1.0 8.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_ssd6 : // */ ss 1.0 6.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_ssd4 : // */ ss 1.0 4.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_ssd2 : // */ ss 1.0 2.0
+ {
+ nIntVal += 2;
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "min(logwidth,logheight)/" + OUString::number( nIntVal );
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ case XML_r : // variable width of the shape defined in spPr
+ case XML_w :
+ {
+ if ( bNoSymbols )
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "logwidth" ;
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ aRet.Type = EnhancedCustomShapeParameterType::LOGWIDTH;
+ }
+ break;
+
+ case XML_wd32 : // */ w 1.0 32.0
+ nIntVal += 20;
+ [[fallthrough]];
+ case XML_wd12 : // */ w 1.0 12.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_wd10 : // */ w 1.0 10.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_wd8 : // */ w 1.0 8.0
+ nIntVal += 2;
+ [[fallthrough]];
+ case XML_wd6 : // */ w 1.0 6.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_wd5 : // */ w 1.0 5.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_wd4 : // */ w 1.0 4.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_wd3 : // */ w 1.0 3.0
+ nIntVal++;
+ [[fallthrough]];
+ case XML_hc : // */ w 1.0 2.0
+ case XML_wd2 : // */ w 1.0 2.0
+ {
+ nIntVal += 2;
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = "logwidth/" + OUString::number( nIntVal );
+
+ aRet.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ default:
+ bConstant = false;
+ break;
+ }
+ if ( bConstant )
+ {
+ if (nConstant != -1) {
+ aRet.Value <<= nConstant;
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ }
+ else
+ {
+ sal_Unicode n = rValue[ 0 ];
+ if ( ( n == '+' ) || ( n == '-' ) )
+ {
+ if ( rValue.getLength() > 1 )
+ n = rValue[ 1 ];
+ }
+ if ( ( n >= '0' ) && ( n <= '9' ) )
+ { // seems to be a ST_Coordinate
+ aRet.Value <<= rValue.toInt32();
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ else
+ {
+ sal_Int32 nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getAdjustmentGuideList(), rValue );
+ if ( nGuideIndex >= 0 )
+ {
+ aRet.Value <<= nGuideIndex;
+ aRet.Type = EnhancedCustomShapeParameterType::ADJUSTMENT;
+ }
+ else
+ {
+ nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), rValue );
+ if ( nGuideIndex >= 0 )
+ {
+ aRet.Value <<= nGuideIndex;
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ {
+ SAL_WARN("oox", "error: unhandled value " << rValue);
+ aRet.Value <<= rValue;
+ }
+ }
+ }
+ }
+ }
+ return aRet;
+}
+
+namespace {
+
+// CT_GeomGuideList
+class GeomGuideListContext : public ContextHandler2
+{
+public:
+ GeomGuideListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ std::vector< CustomShapeGuide >& mrGuideList;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+GeomGuideListContext::GeomGuideListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList )
+: ContextHandler2( rParent )
+, mrGuideList( rGuideList )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+static OUString convertToOOEquation( CustomShapeProperties& rCustomShapeProperties, std::u16string_view rSource )
+{
+ if ( !pCommandHashMap )
+ {
+ FormulaCommandHMap* pHM = new FormulaCommandHMap;
+ for(const FormulaCommandNameTable& i : pFormulaCommandNameTable)
+ (*pHM)[ OUString::createFromAscii( i.pS ) ] = i.pE;
+ pCommandHashMap = pHM;
+ }
+
+ std::vector< OUString > aTokens;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ OUString aToken( o3tl::getToken(rSource, 0, ' ', nIndex ) );
+ if ( !aToken.isEmpty() )
+ aTokens.push_back( aToken );
+ }
+ while ( nIndex >= 0 );
+
+ OUString aEquation;
+ if ( !aTokens.empty() )
+ {
+ sal_Int32 i, nParameters = aTokens.size() - 1;
+ if ( nParameters > 3 )
+ nParameters = 3;
+
+ OUString sParameters[ 3 ];
+
+ for ( i = 0; i < nParameters; i++ )
+ sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate( rCustomShapeProperties, aTokens[ i + 1 ], false ) );
+
+ const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find( aTokens[ 0 ] ) );
+ if ( aIter != pCommandHashMap->end() )
+ {
+ switch( aIter->second )
+ {
+ case FC_MULDIV :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + "*" + sParameters[ 1 ]
+ + "/" + sParameters[ 2 ];
+ }
+ break;
+ case FC_PLUSMINUS :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + "+" + sParameters[ 1 ]
+ + "-" + sParameters[ 2 ];
+ }
+ break;
+ case FC_PLUSDIV :
+ {
+ if ( nParameters == 3 )
+ aEquation = "(" + sParameters[ 0 ] + "+"
+ + sParameters[ 1 ] + ")/" + sParameters[ 2 ];
+ }
+ break;
+ case FC_IFELSE :
+ case FC_IFELSE1 :
+ {
+ if ( nParameters == 3 )
+ aEquation = "if(" + sParameters[ 0 ] + ","
+ + sParameters[ 1 ] + "," + sParameters[ 2 ] + ")";
+ }
+ break;
+ case FC_ABS :
+ {
+ if ( nParameters == 1 )
+ aEquation = "abs(" + sParameters[ 0 ] + ")";
+ }
+ break;
+ case FC_AT2 :
+ {
+ if ( nParameters == 2 )
+ aEquation = "(10800000*atan2(" + sParameters[ 1 ] + ","
+ + sParameters[ 0 ] + "))/pi";
+ }
+ break;
+ case FC_CAT2 :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + "*(cos(atan2(" +
+ sParameters[ 2 ] + "," + sParameters[ 1 ] + ")))";
+ }
+ break;
+ case FC_COS :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + "*cos(pi*(" +
+ sParameters[ 1 ] + ")/10800000)";
+ }
+ break;
+ case FC_MAX :
+ {
+ if ( nParameters == 2 )
+ aEquation = "max(" + sParameters[ 0 ] + "," +
+ sParameters[ 1 ] + ")";
+ }
+ break;
+ case FC_MIN :
+ {
+ if ( nParameters == 2 )
+ aEquation = "min(" + sParameters[ 0 ] + "," +
+ sParameters[ 1 ] + ")";
+ }
+ break;
+ case FC_MOD :
+ {
+ if ( nParameters == 3 )
+ aEquation = "sqrt("
+ + sParameters[ 0 ] + "*" + sParameters[ 0 ] + "+"
+ + sParameters[ 1 ] + "*" + sParameters[ 1 ] + "+"
+ + sParameters[ 2 ] + "*" + sParameters[ 2 ] + ")";
+ }
+ break;
+ case FC_PIN :
+ {
+ if ( nParameters == 3 ) // if(x-y,x,if(y-z,z,y))
+ aEquation = "if(" + sParameters[ 0 ] + "-" + sParameters[ 1 ]
+ + "," + sParameters[ 0 ] + ",if(" + sParameters[ 2 ]
+ + "-" + sParameters[ 1 ] + "," + sParameters[ 1 ]
+ + "," + sParameters[ 2 ] + "))";
+ }
+ break;
+ case FC_SAT2 :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + "*(sin(atan2(" +
+ sParameters[ 2 ] + "," + sParameters[ 1 ] + ")))";
+ }
+ break;
+ case FC_SIN :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + "*sin(pi*(" +
+ sParameters[ 1 ] + ")/10800000)";
+ }
+ break;
+ case FC_SQRT :
+ {
+ if ( nParameters == 1 )
+ aEquation = "sqrt(" + sParameters[ 0 ] + ")";
+ }
+ break;
+ case FC_TAN :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + "*tan(pi*(" +
+ sParameters[ 1 ] + ")/10800000)";
+ }
+ break;
+ case FC_VAL :
+ {
+ if ( nParameters == 1 )
+ aEquation = sParameters[ 0 ];
+ }
+ break;
+ default :
+ break;
+ }
+ }
+ }
+ return aEquation;
+}
+
+ContextHandlerRef GeomGuideListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( gd ) ) // CT_GeomGuide
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rAttribs.getString( XML_name ).get();
+ aGuide.maFormula = convertToOOEquation( mrCustomShapeProperties, rAttribs.getString( XML_fmla ).get() );
+ mrGuideList.push_back( aGuide );
+ }
+ return this;
+}
+
+static const OUString& GetGeomGuideName( const OUString& rValue )
+{
+ return rValue;
+}
+
+namespace {
+
+// CT_AdjPoint2D
+class AdjPoint2DContext : public ContextHandler2
+{
+public:
+ AdjPoint2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+};
+
+}
+
+AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
+{
+ rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get() );
+ rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get() );
+}
+
+namespace {
+
+// CT_XYAdjustHandle
+class XYAdjustHandleContext : public ContextHandler2
+{
+public:
+ XYAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ AdjustHandle& mrAdjustHandle;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
+: ContextHandler2( rParent )
+, mrAdjustHandle( rAdjustHandle )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ if ( rAttribs.hasAttribute( XML_gdRefX ) )
+ {
+ mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefX, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_minX ) )
+ {
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_maxX ) )
+ {
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_gdRefY ) )
+ {
+ mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefY, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_minY ) )
+ {
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_maxY ) )
+ {
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, "" ) );
+ }
+}
+
+ContextHandlerRef XYAdjustHandleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pos ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_PolarAdjustHandle
+class PolarAdjustHandleContext : public ContextHandler2
+{
+public:
+ PolarAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ AdjustHandle& mrAdjustHandle;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
+: ContextHandler2( rParent )
+, mrAdjustHandle( rAdjustHandle )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ if ( rAttribs.hasAttribute( XML_gdRefR ) )
+ {
+ mrAdjustHandle.polar = true ;
+ mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefR, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_minR ) )
+ {
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_maxR ) )
+ {
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_gdRefAng ) )
+ {
+ mrAdjustHandle.polar = true ;
+ mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefAng, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_minAng ) )
+ {
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minAng, "" ) );
+ }
+ if ( rAttribs.hasAttribute( XML_maxAng ) )
+ {
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxAng, "" ) );
+ }
+}
+
+ContextHandlerRef PolarAdjustHandleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ // mrAdjustHandle.pos uses planar coordinates.
+ if ( aElementToken == A_TOKEN( pos ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_AdjustHandleList
+class AdjustHandleListContext : public ContextHandler2
+{
+public:
+ AdjustHandleListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ std::vector< AdjustHandle >& mrAdjustHandleList;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+AdjustHandleListContext::AdjustHandleListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList )
+: ContextHandler2( rParent )
+, mrAdjustHandleList( rAdjustHandleList )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+ContextHandlerRef AdjustHandleListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( ahXY ) ) // CT_XYAdjustHandle
+ {
+ AdjustHandle aAdjustHandle( false );
+ mrAdjustHandleList.push_back( aAdjustHandle );
+ return new XYAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+ }
+ else if ( aElementToken == A_TOKEN( ahPolar ) ) // CT_PolarAdjustHandle
+ {
+ AdjustHandle aAdjustHandle( true );
+ mrAdjustHandleList.push_back( aAdjustHandle );
+ return new PolarAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+ }
+ return nullptr;
+}
+
+namespace {
+
+// CT_ConnectionSite
+class ConnectionSiteContext : public ContextHandler2
+{
+public:
+ ConnectionSiteContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ ConnectionSite& mrConnectionSite;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+ConnectionSiteContext::ConnectionSiteContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite )
+: ContextHandler2( rParent )
+, mrConnectionSite( rConnectionSite )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ mrConnectionSite.ang = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_ang ).get() );
+}
+
+ContextHandlerRef ConnectionSiteContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pos ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DMoveTo
+class Path2DMoveToContext : public ContextHandler2
+{
+public:
+ Path2DMoveToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ EnhancedCustomShapeParameterPair& mrAdjPoint2D;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+Path2DMoveToContext::Path2DMoveToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
+, mrAdjPoint2D( rAdjPoint2D )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+ContextHandlerRef Path2DMoveToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pt ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DLineTo
+class Path2DLineToContext : public ContextHandler2
+{
+public:
+ Path2DLineToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ EnhancedCustomShapeParameterPair& mrAdjPoint2D;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+Path2DLineToContext::Path2DLineToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
+, mrAdjPoint2D( rAdjPoint2D )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+ContextHandlerRef Path2DLineToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pt ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DQuadBezierTo
+class Path2DQuadBezierToContext : public ContextHandler2
+{
+public:
+ Path2DQuadBezierToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rPt1, EnhancedCustomShapeParameterPair& rPt2 );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ EnhancedCustomShapeParameterPair& mrPt1;
+ EnhancedCustomShapeParameterPair& mrPt2;
+ int nCount;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler2Helper const & rParent,
+ CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair& rPt1,
+ EnhancedCustomShapeParameterPair& rPt2 )
+: ContextHandler2( rParent )
+, mrPt1( rPt1 )
+, mrPt2( rPt2 )
+, nCount( 0 )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+ContextHandlerRef Path2DQuadBezierToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pt ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DCubicBezierTo
+class Path2DCubicBezierToContext : public ContextHandler2
+{
+public:
+ Path2DCubicBezierToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair& );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ CustomShapeProperties& mrCustomShapeProperties;
+ EnhancedCustomShapeParameterPair& mrControlPt1;
+ EnhancedCustomShapeParameterPair& mrControlPt2;
+ EnhancedCustomShapeParameterPair& mrEndPt;
+ int nCount;
+};
+
+}
+
+Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair& rControlPt1,
+ EnhancedCustomShapeParameterPair& rControlPt2,
+ EnhancedCustomShapeParameterPair& rEndPt )
+: ContextHandler2( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+, mrControlPt1( rControlPt1 )
+, mrControlPt2( rControlPt2 )
+, mrEndPt( rEndPt )
+, nCount( 0 )
+{
+}
+
+ContextHandlerRef Path2DCubicBezierToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( pt ) )
+ return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties,
+ nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 ); // CT_AdjPoint2D
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DContext
+class Path2DContext : public ContextHandler2
+{
+public:
+ Path2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< css::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D );
+ virtual void onEndElement() override;
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+ Path2D& mrPath2D;
+ std::vector< css::drawing::EnhancedCustomShapeSegment >& mrSegments;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+}
+
+Path2DContext::Path2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< css::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D )
+: ContextHandler2( rParent )
+, mrPath2D( rPath2D )
+, mrSegments( rSegments )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ rPath2D.w = rAttribs.getString( XML_w, "" ).toInt64();
+ rPath2D.h = rAttribs.getString( XML_h, "" ).toInt64();
+ rPath2D.fill = rAttribs.getToken( XML_fill, XML_norm );
+ rPath2D.stroke = rAttribs.getBool( XML_stroke, true );
+ rPath2D.extrusionOk = rAttribs.getBool( XML_extrusionOk, true );
+}
+
+void Path2DContext::onEndElement()
+{
+ EnhancedCustomShapeSegment aNewSegment;
+ switch ( mrPath2D.fill )
+ {
+ case XML_none:
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::NOFILL;
+ break;
+ case XML_darken:
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::DARKEN;
+ break;
+ case XML_darkenLess:
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::DARKENLESS;
+ break;
+ case XML_lighten:
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::LIGHTEN;
+ break;
+ case XML_lightenLess:
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::LIGHTENLESS;
+ break;
+ }
+ if (mrPath2D.fill != XML_norm) {
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+ }
+ if ( !mrPath2D.stroke )
+ {
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::NOSTROKE;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+ }
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::ENDSUBPATH;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+}
+
+
+ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( close ) :
+ {
+ // ignore close after move to (ppt does seems to do the same, see accentCallout2 preset for example)
+ if ( mrSegments.empty() || ( mrSegments.back().Command != EnhancedCustomShapeSegmentCommand::MOVETO ) ) {
+ EnhancedCustomShapeSegment aNewSegment;
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+ }
+ }
+ break;
+ case A_TOKEN( moveTo ) :
+ {
+ EnhancedCustomShapeSegment aNewSegment;
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::MOVETO;
+ aNewSegment.Count = 1;
+ mrSegments.push_back( aNewSegment );
+
+ EnhancedCustomShapeParameterPair aAdjPoint2D;
+ mrPath2D.parameter.push_back( aAdjPoint2D );
+ return new Path2DMoveToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() );
+ }
+ break;
+ case A_TOKEN( lnTo ) :
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::LINETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aAdjPoint2D;
+ mrPath2D.parameter.push_back( aAdjPoint2D );
+ return new Path2DLineToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() );
+ }
+ break;
+ case A_TOKEN( arcTo ) : // CT_Path2DArcTo
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::ARCANGLETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::ARCANGLETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+
+ EnhancedCustomShapeParameterPair aScale;
+ EnhancedCustomShapeParameterPair aAngles;
+
+ aScale.First = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_wR ).get() );
+ aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_hR ).get() );
+
+ CustomShapeGuide aGuide;
+ sal_Int32 nArcNum = mrCustomShapeProperties.getArcNum();
+
+ // start angle
+ aGuide.maName = "arctosa" + OUString::number( nArcNum );
+ aGuide.maFormula = "("
+ + GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_stAng ).get() ) )
+ + ")/60000.0";
+ aAngles.First.Value <<= CustomShapeProperties::SetCustomShapeGuideValue( mrCustomShapeProperties.getGuideList(), aGuide );
+ aAngles.First.Type = EnhancedCustomShapeParameterType::EQUATION;
+
+ // swing angle
+ aGuide.maName = "arctosw" + OUString::number( nArcNum );
+ aGuide.maFormula = "("
+ + GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_swAng ).get() ) )
+ + ")/60000.0";
+ aAngles.Second.Value <<= 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 ) :
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aPt1;
+ EnhancedCustomShapeParameterPair aPt2;
+ mrPath2D.parameter.push_back( aPt1 );
+ mrPath2D.parameter.push_back( aPt2 );
+ return new Path2DQuadBezierToContext( *this, mrCustomShapeProperties,
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ],
+ mrPath2D.parameter.back() );
+ }
+ break;
+ case A_TOKEN( cubicBezTo ) :
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::CURVETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::CURVETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aControlPt1;
+ EnhancedCustomShapeParameterPair aControlPt2;
+ EnhancedCustomShapeParameterPair aEndPt;
+ mrPath2D.parameter.push_back( aControlPt1 );
+ mrPath2D.parameter.push_back( aControlPt2 );
+ mrPath2D.parameter.push_back( aEndPt );
+ return new Path2DCubicBezierToContext( *this, mrCustomShapeProperties,
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 3 ],
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ],
+ mrPath2D.parameter.back() );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+namespace {
+
+// CT_Path2DList
+class Path2DListContext : public ContextHandler2
+{
+public:
+ Path2DListContext( ContextHandler2Helper const & rParent, CustomShapeProperties & rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments,
+ std::vector< Path2D >& rPath2DList );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) override;
+
+protected:
+
+ CustomShapeProperties& mrCustomShapeProperties;
+ std::vector< css::drawing::EnhancedCustomShapeSegment >& mrSegments;
+ std::vector< Path2D >& mrPath2DList;
+};
+
+}
+
+Path2DListContext:: Path2DListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments,
+ std::vector< Path2D >& rPath2DList )
+: ContextHandler2( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+, mrSegments( rSegments )
+, mrPath2DList( rPath2DList )
+{
+}
+
+ContextHandlerRef Path2DListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if ( aElementToken == A_TOKEN( path ) )
+ {
+ Path2D aPath2D;
+ mrPath2DList.push_back( aPath2D );
+ return new Path2DContext( *this, rAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() );
+ }
+ return nullptr;
+}
+
+// CT_CustomGeometry2D
+CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties )
+: ContextHandler2( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+ContextHandlerRef CustomShapeGeometryContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( avLst ): // CT_GeomGuideList adjust value list
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
+ case A_TOKEN( gdLst ): // CT_GeomGuideList guide list
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getGuideList() );
+ case A_TOKEN( ahLst ): // CT_AdjustHandleList adjust handle list
+ return new AdjustHandleListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustHandleList() );
+ case A_TOKEN( cxnLst ): // CT_ConnectionSiteList connection site list
+ return this;
+ case A_TOKEN( rect ): // CT_GeomRectList geometry rect list
+ {
+ GeomRect aGeomRect;
+ aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_l ).get() );
+ aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_t ).get() );
+ aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_r ).get() );
+ aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_b ).get() );
+ mrCustomShapeProperties.getTextRect() = aGeomRect;
+ }
+ break;
+ case A_TOKEN( pathLst ): // CT_Path2DList 2d path list
+ return new Path2DListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getSegments(), mrCustomShapeProperties.getPath2DList() );
+
+ // from cxnLst:
+ case A_TOKEN( cxn ): // CT_ConnectionSite
+ {
+ ConnectionSite aConnectionSite;
+ mrCustomShapeProperties.getConnectionSiteList().push_back( aConnectionSite );
+ return new ConnectionSiteContext( *this, rAttribs, mrCustomShapeProperties, mrCustomShapeProperties.getConnectionSiteList().back() );
+ }
+ }
+ return nullptr;
+}
+
+// CT_PresetGeometry2D
+PresetShapeGeometryContext::PresetShapeGeometryContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties )
+: ContextHandler2( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ sal_Int32 nShapeType = rAttribs.getToken( XML_prst, FastToken::DONTKNOW );
+ OSL_ENSURE( nShapeType != FastToken::DONTKNOW, "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
+ mrCustomShapeProperties.setShapePresetType( nShapeType );
+}
+
+ContextHandlerRef PresetShapeGeometryContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& )
+{
+ if ( aElementToken == A_TOKEN( avLst ) )
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
+ else
+ return this;
+}
+
+// CT_PresetTextShape
+PresetTextShapeContext::PresetTextShapeContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties )
+: ContextHandler2( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ sal_Int32 nShapeType = rAttribs.getToken( XML_prst, FastToken::DONTKNOW );
+ OSL_ENSURE( nShapeType != FastToken::DONTKNOW, "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
+ mrCustomShapeProperties.setShapePresetType( nShapeType );
+}
+
+ContextHandlerRef PresetTextShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& )
+{
+ if ( aElementToken == A_TOKEN( avLst ) )
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
+ else
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
new file mode 100644
index 000000000..3215b9834
--- /dev/null
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -0,0 +1,974 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <config_folders.h>
+#include <rtl/bootstrap.hxx>
+#include <sal/log.hxx>
+#include <tools/stream.hxx>
+#include <comphelper/sequence.hxx>
+
+#include <drawingml/customshapeproperties.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokenmap.hxx>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <o3tl/string_view.hxx>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+// Parses a string like: Value = (any) { (long) 19098 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj"
+void lcl_parseAdjustmentValue(
+ std::vector<drawing::EnhancedCustomShapeAdjustmentValue>& rAdjustmentValues,
+ std::string_view rValue)
+{
+ sal_Int32 nIndex = 0;
+ drawing::EnhancedCustomShapeAdjustmentValue aAdjustmentValue;
+ do
+ {
+ OString aToken(o3tl::trim(o3tl::getToken(rValue, 0, ',', nIndex)));
+ static const char aNamePrefix[] = "Name = \"";
+ static const char aValuePrefix[] = "Value = (any) { (long) ";
+ if (o3tl::starts_with(aToken, aNamePrefix))
+ {
+ OString aName = aToken.copy(strlen(aNamePrefix),
+ aToken.getLength() - strlen(aNamePrefix) - strlen("\""));
+ aAdjustmentValue.Name = OUString::fromUtf8(aName);
+ }
+ else if (o3tl::starts_with(aToken, aValuePrefix))
+ {
+ OString aValue = aToken.copy(strlen(aValuePrefix),
+ aToken.getLength() - strlen(aValuePrefix) - strlen(" }"));
+ aAdjustmentValue.Value <<= aValue.toInt32();
+ }
+ else if (!o3tl::starts_with(aToken, "State = "))
+ SAL_WARN("oox", "lcl_parseAdjustmentValue: unexpected prefix: " << aToken);
+ } while (nIndex >= 0);
+ rAdjustmentValues.push_back(aAdjustmentValue);
+}
+
+// Parses a string like: { Value = (any) { (long) 19098 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = ..., State = ..., Name = ... }
+void lcl_parseAdjustmentValues(
+ std::vector<drawing::EnhancedCustomShapeAdjustmentValue>& rAdjustmentValues,
+ std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ {
+ lcl_parseAdjustmentValue(
+ rAdjustmentValues,
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },")));
+ }
+ }
+ }
+}
+
+drawing::EnhancedCustomShapeParameterPair
+lcl_parseEnhancedCustomShapeParameterPair(std::string_view rValue)
+{
+ drawing::EnhancedCustomShapeParameterPair aPair;
+ // We expect the following here: First.Value, First.Type, Second.Value, Second.Type
+ static const char aExpectedFVPrefix[]
+ = "First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) ";
+ assert(o3tl::starts_with(rValue, aExpectedFVPrefix));
+ sal_Int32 nIndex = strlen(aExpectedFVPrefix);
+ aPair.First.Value
+ <<= static_cast<sal_uInt32>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+
+ static const char aExpectedFTPrefix[] = ", Type = (short) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedFTPrefix));
+ nIndex += strlen(aExpectedFTPrefix);
+ aPair.First.Type
+ = static_cast<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+
+ static const char aExpectedSVPrefix[] = ", Second = "
+ "(com.sun.star.drawing.EnhancedCustomShapeParameter) { "
+ "Value = (any) { (long) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedSVPrefix));
+ nIndex += strlen(aExpectedSVPrefix);
+ aPair.Second.Value
+ <<= static_cast<sal_uInt32>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+
+ static const char aExpectedSTPrefix[] = ", Type = (short) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedSTPrefix));
+ nIndex += strlen(aExpectedSTPrefix);
+ aPair.Second.Type
+ = static_cast<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+ return aPair;
+}
+
+drawing::EnhancedCustomShapeSegment lcl_parseEnhancedCustomShapeSegment(std::string_view rValue)
+{
+ drawing::EnhancedCustomShapeSegment aSegment;
+ // We expect the following here: Command, Count
+ static const char aExpectedCommandPrefix[] = "Command = (short) ";
+ assert(o3tl::starts_with(rValue, aExpectedCommandPrefix));
+ sal_Int32 nIndex = strlen(aExpectedCommandPrefix);
+ aSegment.Command
+ = static_cast<sal_Int16>(o3tl::toInt32(o3tl::getToken(rValue, 0, ',', nIndex)));
+
+ static const char aExpectedCountPrefix[] = " Count = (short) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedCountPrefix));
+ nIndex += strlen(aExpectedCountPrefix);
+ aSegment.Count = static_cast<sal_Int16>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+ return aSegment;
+}
+
+awt::Rectangle lcl_parseRectangle(std::string_view rValue)
+{
+ awt::Rectangle aRectangle;
+ // We expect the following here: X, Y, Width, Height
+ static const char aExpectedXPrefix[] = "X = (long) ";
+ assert(o3tl::starts_with(rValue, aExpectedXPrefix));
+ sal_Int32 nIndex = strlen(aExpectedXPrefix);
+ aRectangle.X = o3tl::toInt32(o3tl::getToken(rValue, 0, ',', nIndex));
+
+ static const char aExpectedYPrefix[] = " Y = (long) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedYPrefix));
+ nIndex += strlen(aExpectedYPrefix);
+ aRectangle.Y = o3tl::toInt32(o3tl::getToken(rValue, 0, ',', nIndex));
+
+ static const char aExpectedWidthPrefix[] = " Width = (long) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedWidthPrefix));
+ nIndex += strlen(aExpectedWidthPrefix);
+ aRectangle.Width = o3tl::toInt32(o3tl::getToken(rValue, 0, ',', nIndex));
+
+ static const char aExpectedHeightPrefix[] = " Height = (long) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedHeightPrefix));
+ nIndex += strlen(aExpectedHeightPrefix);
+ aRectangle.Height = o3tl::toInt32(rValue.substr(nIndex));
+
+ return aRectangle;
+}
+
+awt::Size lcl_parseSize(std::string_view rValue)
+{
+ awt::Size aSize;
+ // We expect the following here: Width, Height
+ static const char aExpectedWidthPrefix[] = "Width = (long) ";
+ assert(o3tl::starts_with(rValue, aExpectedWidthPrefix));
+ sal_Int32 nIndex = strlen(aExpectedWidthPrefix);
+ aSize.Width = o3tl::toInt32(o3tl::getToken(rValue, 0, ',', nIndex));
+
+ static const char aExpectedHeightPrefix[] = " Height = (long) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedHeightPrefix));
+ nIndex += strlen(aExpectedHeightPrefix);
+ aSize.Height = o3tl::toInt32(rValue.substr(nIndex));
+
+ return aSize;
+}
+
+drawing::EnhancedCustomShapeTextFrame lcl_parseEnhancedCustomShapeTextFrame(std::string_view rValue)
+{
+ drawing::EnhancedCustomShapeTextFrame aTextFrame;
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" }"));
+ aTextFrame.TopLeft = lcl_parseEnhancedCustomShapeParameterPair(aToken);
+ }
+ else
+ SAL_WARN("oox",
+ "lcl_parseEnhancedCustomShapeTextFrame: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+
+ std::string_view aToken = rValue.substr(nStart);
+ static const char aExpectedPrefix[]
+ = "BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" }"));
+ aTextFrame.BottomRight = lcl_parseEnhancedCustomShapeParameterPair(aToken);
+ }
+ else
+ SAL_WARN("oox",
+ "lcl_parseEnhancedCustomShapeTextFrame: unexpected token at the end: " << aToken);
+
+ return aTextFrame;
+}
+
+// Parses a string like: Name = "Position", Handle = (long) 0, Value = (any) { ... }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+// where "{ ... }" may contain "," as well.
+void lcl_parseHandlePosition(std::vector<beans::PropertyValue>& rHandle, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "Position";
+ aPropertyValue.Value <<= lcl_parseEnhancedCustomShapeParameterPair(aToken);
+ rHandle.push_back(aPropertyValue);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parseHandlePosition: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+// Parses a string like: Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { ... }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+// where "{ ... }" may contain "," as well.
+void lcl_parseHandleRange(std::vector<beans::PropertyValue>& rHandle, std::string_view rValue,
+ const OUString& rName)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ static const char aExpectedPrefix[]
+ = "Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { ";
+ if (o3tl::starts_with(rValue.substr(nStart), aExpectedPrefix))
+ {
+ drawing::EnhancedCustomShapeParameter aParameter;
+ sal_Int32 nIndex{ nStart + static_cast<sal_Int32>(strlen(aExpectedPrefix)) };
+ // We expect the following here: Value and Type
+ static const char aExpectedVPrefix[] = "Value = (any) { (long) ";
+ assert(o3tl::starts_with(rValue.substr(nIndex), aExpectedVPrefix));
+ nIndex += strlen(aExpectedVPrefix);
+ aParameter.Value <<= o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex));
+
+ static const char aExpectedTPrefix[] = ", Type = (short) ";
+ assert(nIndex >= 0 && o3tl::starts_with(rValue.substr(nIndex), aExpectedTPrefix));
+ nIndex += strlen(aExpectedTPrefix);
+ aParameter.Type
+ = static_cast<sal_Int16>(o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex)));
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = rName;
+ aPropertyValue.Value <<= aParameter;
+ rHandle.push_back(aPropertyValue);
+ }
+ else if (!o3tl::starts_with(rValue.substr(nStart), "Name =")
+ && !o3tl::starts_with(rValue.substr(nStart), "Handle ="))
+ SAL_WARN("oox", "lcl_parseHandleRange: unexpected token: "
+ << rValue.substr(nStart, i - nStart));
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+// Parses a string like: Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+void lcl_parseHandleRef(std::vector<beans::PropertyValue>& rHandle, std::string_view rValue,
+ const OUString& rName)
+{
+ static constexpr std::string_view aPrefix = "\", Handle = (long) 0, Value = (any) { (long) ";
+ const sal_Int32 nStart = SAL_N_ELEMENTS("Name = \"") - 1 + rName.getLength();
+
+ if (rValue.substr(nStart, aPrefix.size()) == aPrefix)
+ {
+ sal_Int32 nIndex = nStart + aPrefix.size();
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = rName;
+ // We only expect a Value here
+ aPropertyValue.Value <<= o3tl::toInt32(o3tl::getToken(rValue, 0, '}', nIndex));
+ rHandle.push_back(aPropertyValue);
+ }
+ else
+ SAL_WARN("oox", "lcl_parseHandleRef: unexpected value: " << rValue);
+}
+
+uno::Sequence<beans::PropertyValue> lcl_parseHandle(std::string_view rValue)
+{
+ std::vector<beans::PropertyValue> aRet;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ {
+ std::string_view aToken
+ = rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"));
+ if (o3tl::starts_with(aToken, "Name = \"Position\""))
+ lcl_parseHandlePosition(aRet, aToken);
+ else if (o3tl::starts_with(aToken, "Name = \"RangeXMaximum\""))
+ lcl_parseHandleRange(aRet, aToken, "RangeXMaximum");
+ else if (o3tl::starts_with(aToken, "Name = \"RangeXMinimum\""))
+ lcl_parseHandleRange(aRet, aToken, "RangeXMinimum");
+ else if (o3tl::starts_with(aToken, "Name = \"RangeYMaximum\""))
+ lcl_parseHandleRange(aRet, aToken, "RangeYMaximum");
+ else if (o3tl::starts_with(aToken, "Name = \"RangeYMinimum\""))
+ lcl_parseHandleRange(aRet, aToken, "RangeYMinimum");
+ else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMaximum\""))
+ lcl_parseHandleRange(aRet, aToken, "RadiusRangeMaximum");
+ else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMinimum\""))
+ lcl_parseHandleRange(aRet, aToken, "RadiusRangeMinimum");
+ else if (o3tl::starts_with(aToken, "Name = \"RefX\""))
+ lcl_parseHandleRef(aRet, aToken, "RefX");
+ else if (o3tl::starts_with(aToken, "Name = \"RefY\""))
+ lcl_parseHandleRef(aRet, aToken, "RefY");
+ else if (o3tl::starts_with(aToken, "Name = \"RefR\""))
+ lcl_parseHandleRef(aRet, aToken, "RefR");
+ else if (o3tl::starts_with(aToken, "Name = \"RefAngle\""))
+ lcl_parseHandleRef(aRet, aToken, "RefAngle");
+ else
+ SAL_WARN("oox", "lcl_parseHandle: unexpected token: " << aToken);
+ }
+ }
+ }
+ return comphelper::containerToSequence(aRet);
+}
+
+void lcl_parseHandles(std::vector<uno::Sequence<beans::PropertyValue>>& rHandles,
+ std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ {
+ uno::Sequence<beans::PropertyValue> aHandle = lcl_parseHandle(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },")));
+ rHandles.push_back(aHandle);
+ }
+ }
+ }
+}
+
+void lcl_parseEquations(std::vector<OUString>& rEquations, std::string_view rValue)
+{
+ bool bInString = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '"' && !bInString)
+ {
+ nStart = i;
+ bInString = true;
+ }
+ else if (rValue[i] == '"' && bInString)
+ {
+ bInString = false;
+ rEquations.push_back(OUString::fromUtf8(
+ rValue.substr(nStart + strlen("\""), i - nStart - strlen("\""))));
+ }
+ }
+}
+
+void lcl_parsePathCoordinateValues(std::vector<beans::PropertyValue>& rPath,
+ std::string_view rValue)
+{
+ std::vector<drawing::EnhancedCustomShapeParameterPair> aPairs;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ aPairs.push_back(lcl_parseEnhancedCustomShapeParameterPair(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"))));
+ }
+ }
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "Coordinates";
+ aPropertyValue.Value <<= comphelper::containerToSequence(aPairs);
+ rPath.push_back(aPropertyValue);
+}
+
+// Parses a string like: Name = "Coordinates", Handle = (long) 0, Value = (any) { ... }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+// where "{ ... }" may contain "," as well.
+void lcl_parsePathCoordinates(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+ lcl_parsePathCoordinateValues(rPath, aToken);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parsePathCoordinates: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+void lcl_parsePathGluePointsValues(std::vector<beans::PropertyValue>& rPath,
+ std::string_view rValue)
+{
+ std::vector<drawing::EnhancedCustomShapeParameterPair> aPairs;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ aPairs.push_back(lcl_parseEnhancedCustomShapeParameterPair(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"))));
+ }
+ }
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "GluePoints";
+ aPropertyValue.Value <<= comphelper::containerToSequence(aPairs);
+ rPath.push_back(aPropertyValue);
+}
+
+void lcl_parsePathGluePoints(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+ lcl_parsePathGluePointsValues(rPath, aToken);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parsePathGluePoints: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+void lcl_parsePathSegmentValues(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ std::vector<drawing::EnhancedCustomShapeSegment> aSegments;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ aSegments.push_back(lcl_parseEnhancedCustomShapeSegment(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"))));
+ }
+ }
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "Segments";
+ aPropertyValue.Value <<= comphelper::containerToSequence(aSegments);
+ rPath.push_back(aPropertyValue);
+}
+
+// Parses a string like: Name = "Segments", Handle = (long) 0, Value = (any) { ... }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+// where "{ ... }" may contain "," as well.
+void lcl_parsePathSegments(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+ lcl_parsePathSegmentValues(rPath, aToken);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parsePathSegments: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+void lcl_parsePathTextFrameValues(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ std::vector<drawing::EnhancedCustomShapeTextFrame> aTextFrames;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ aTextFrames.push_back(lcl_parseEnhancedCustomShapeTextFrame(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"))));
+ }
+ }
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "TextFrames";
+ aPropertyValue.Value <<= comphelper::containerToSequence(aTextFrames);
+ rPath.push_back(aPropertyValue);
+}
+
+// Parses a string like: Name = "TextFrames", Handle = (long) 0, Value = (any) { ... }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE
+// where "{ ... }" may contain "," as well.
+void lcl_parsePathTextFrames(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[]
+ = "Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+ lcl_parsePathTextFrameValues(rPath, aToken);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parsePathTextFrames: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+void lcl_parsePathSubViewSizeValues(std::vector<beans::PropertyValue>& rPath,
+ std::string_view rValue)
+{
+ std::vector<awt::Size> aSizes;
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ aSizes.push_back(lcl_parseSize(
+ rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"))));
+ }
+ }
+
+ beans::PropertyValue aPropertyValue;
+ aPropertyValue.Name = "SubViewSize";
+ aPropertyValue.Value <<= comphelper::containerToSequence(aSizes);
+ rPath.push_back(aPropertyValue);
+}
+
+void lcl_parsePathSubViewSize(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ bool bIgnore = false;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ bIgnore = true;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ bIgnore = false;
+ }
+ else if (rValue[i] == ',' && !bIgnore)
+ {
+ std::string_view aToken = rValue.substr(nStart, i - nStart);
+ static const char aExpectedPrefix[] = "Value = (any) { ([]com.sun.star.awt.Size) { ";
+ if (o3tl::starts_with(aToken, aExpectedPrefix))
+ {
+ aToken = aToken.substr(strlen(aExpectedPrefix),
+ aToken.size() - strlen(aExpectedPrefix) - strlen(" } }"));
+ lcl_parsePathSubViewSizeValues(rPath, aToken);
+ }
+ else if (!o3tl::starts_with(aToken, "Name =") && !o3tl::starts_with(aToken, "Handle ="))
+ SAL_WARN("oox", "lcl_parsePathSubViewSize: unexpected token: " << aToken);
+ nStart = i + strlen(", ");
+ }
+ }
+}
+
+void lcl_parsePath(std::vector<beans::PropertyValue>& rPath, std::string_view rValue)
+{
+ sal_Int32 nLevel = 0;
+ sal_Int32 nStart = 0;
+ for (size_t i = 0; i < rValue.size(); ++i)
+ {
+ if (rValue[i] == '{')
+ {
+ if (!nLevel)
+ nStart = i;
+ nLevel++;
+ }
+ else if (rValue[i] == '}')
+ {
+ nLevel--;
+ if (!nLevel)
+ {
+ std::string_view aToken
+ = rValue.substr(nStart + strlen("{ "), i - nStart - strlen(" },"));
+ if (o3tl::starts_with(aToken, "Name = \"Coordinates\""))
+ lcl_parsePathCoordinates(rPath, aToken);
+ else if (o3tl::starts_with(aToken, "Name = \"GluePoints\""))
+ lcl_parsePathGluePoints(rPath, aToken);
+ else if (o3tl::starts_with(aToken, "Name = \"Segments\""))
+ lcl_parsePathSegments(rPath, aToken);
+ else if (o3tl::starts_with(aToken, "Name = \"TextFrames\""))
+ lcl_parsePathTextFrames(rPath, aToken);
+ else if (o3tl::starts_with(aToken, "Name = \"SubViewSize\""))
+ lcl_parsePathSubViewSize(rPath, aToken);
+ else
+ SAL_WARN("oox", "lcl_parsePath: unexpected token: " << aToken);
+ }
+ }
+ }
+}
+}
+
+namespace oox::drawingml
+{
+void CustomShapeProperties::initializePresetDataMap()
+{
+ OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets");
+ rtl::Bootstrap::expandMacros(aPath);
+ SvFileStream aStream(aPath, StreamMode::READ);
+ if (aStream.GetError() != ERRCODE_NONE)
+ SAL_WARN("oox", "failed to open oox-drawingml-cs-presets");
+ OStringBuffer aLine;
+ OUString aName;
+ bool bNotDone = aStream.ReadLine(aLine);
+ PropertyMap aPropertyMap;
+ bool bFirst = true;
+ while (bNotDone)
+ {
+ static const char aCommentPrefix[] = "/* ";
+ if (o3tl::starts_with(aLine, aCommentPrefix))
+ {
+ if (bFirst)
+ bFirst = false;
+ else
+ maPresetDataMap[TokenMap::getTokenFromUnicode(aName)] = aPropertyMap;
+ aName = OUString::fromUtf8(std::string_view(aLine).substr(
+ strlen(aCommentPrefix),
+ aLine.getLength() - strlen(aCommentPrefix) - strlen(" */")));
+ }
+ else
+ {
+ if (std::string_view(aLine) == "AdjustmentValues")
+ {
+ aStream.ReadLine(aLine);
+ if (std::string_view(aLine)
+ != "([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}")
+ {
+ std::vector<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
+ static constexpr std::string_view aExpectedPrefix(
+ "([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { ");
+ assert(o3tl::starts_with(aLine, aExpectedPrefix));
+
+ std::string_view aValue = std::string_view(aLine).substr(
+ aExpectedPrefix.size(),
+ aLine.getLength() - aExpectedPrefix.size() - strlen(" }"));
+ lcl_parseAdjustmentValues(aAdjustmentValues, aValue);
+ aPropertyMap.setProperty(PROP_AdjustmentValues,
+ comphelper::containerToSequence(aAdjustmentValues));
+ }
+ else
+ aPropertyMap.setProperty(PROP_AdjustmentValues, uno::Sequence<OUString>(0));
+ }
+ else if (std::string_view(aLine) == "Equations")
+ {
+ aStream.ReadLine(aLine);
+ if (std::string_view(aLine) != "([]string) {}")
+ {
+ std::vector<OUString> aEquations;
+ static constexpr std::string_view aExpectedPrefix("([]string) { ");
+ assert(o3tl::starts_with(aLine, aExpectedPrefix));
+
+ std::string_view aValue = std::string_view(aLine).substr(
+ aExpectedPrefix.size(),
+ aLine.getLength() - aExpectedPrefix.size() - strlen(" }"));
+ lcl_parseEquations(aEquations, aValue);
+ aPropertyMap.setProperty(PROP_Equations,
+ comphelper::containerToSequence(aEquations));
+ }
+ else
+ aPropertyMap.setProperty(PROP_Equations, uno::Sequence<OUString>(0));
+ }
+ else if (std::string_view(aLine) == "Handles")
+ {
+ aStream.ReadLine(aLine);
+ if (std::string_view(aLine) != "([][]com.sun.star.beans.PropertyValue) {}")
+ {
+ std::vector<uno::Sequence<beans::PropertyValue>> aHandles;
+ static constexpr std::string_view aExpectedPrefix(
+ "([][]com.sun.star.beans.PropertyValue) { ");
+ assert(o3tl::starts_with(aLine, aExpectedPrefix));
+
+ std::string_view aValue = std::string_view(aLine).substr(
+ aExpectedPrefix.size(),
+ aLine.getLength() - aExpectedPrefix.size() - strlen(" }"));
+ lcl_parseHandles(aHandles, aValue);
+ aPropertyMap.setProperty(PROP_Handles,
+ comphelper::containerToSequence(aHandles));
+ }
+ else
+ aPropertyMap.setProperty(PROP_Handles, uno::Sequence<OUString>(0));
+ }
+ else if (std::string_view(aLine) == "MirroredX")
+ {
+ aStream.ReadLine(aLine);
+ if (std::string_view(aLine) == "true" || std::string_view(aLine) == "false")
+ {
+ aPropertyMap.setProperty(PROP_MirroredX, std::string_view(aLine) == "true");
+ }
+ else
+ SAL_WARN("oox", "CustomShapeProperties::initializePresetDataMap: unexpected "
+ "MirroredX parameter");
+ }
+ else if (std::string_view(aLine) == "MirroredY")
+ {
+ aStream.ReadLine(aLine);
+ if (std::string_view(aLine) == "true" || std::string_view(aLine) == "false")
+ {
+ aPropertyMap.setProperty(PROP_MirroredY, std::string_view(aLine) == "true");
+ }
+ else
+ SAL_WARN("oox", "CustomShapeProperties::initializePresetDataMap: unexpected "
+ "MirroredY parameter");
+ }
+ else if (std::string_view(aLine) == "Path")
+ {
+ aStream.ReadLine(aLine);
+ static constexpr std::string_view aExpectedPrefix(
+ "([]com.sun.star.beans.PropertyValue) { ");
+ assert(o3tl::starts_with(aLine, aExpectedPrefix));
+
+ std::vector<beans::PropertyValue> aPathValue;
+ std::string_view aValue = std::string_view(aLine).substr(
+ aExpectedPrefix.size(),
+ aLine.getLength() - aExpectedPrefix.size() - strlen(" }"));
+ lcl_parsePath(aPathValue, aValue);
+ aPropertyMap.setProperty(PROP_Path, comphelper::containerToSequence(aPathValue));
+ }
+ else if (std::string_view(aLine) == "Type")
+ {
+ // Just ignore the line here, we already know the correct type.
+ aStream.ReadLine(aLine);
+ aPropertyMap.setProperty(PROP_Type, "ooxml-" + aName);
+ }
+ else if (std::string_view(aLine) == "ViewBox")
+ {
+ aStream.ReadLine(aLine);
+ static constexpr std::string_view aExpectedPrefix(
+ "(com.sun.star.awt.Rectangle) { ");
+ assert(o3tl::starts_with(aLine, aExpectedPrefix));
+
+ std::string_view aValue = std::string_view(aLine).substr(
+ aExpectedPrefix.size(),
+ aLine.getLength() - aExpectedPrefix.size() - strlen(" }"));
+ aPropertyMap.setProperty(PROP_ViewBox, lcl_parseRectangle(aValue));
+ }
+ else
+ SAL_WARN("oox", "CustomShapeProperties::initializePresetDataMap: unhandled line: "
+ << std::string_view(aLine));
+ }
+ bNotDone = aStream.ReadLine(aLine);
+ }
+ maPresetDataMap[TokenMap::getTokenFromUnicode(aName)] = aPropertyMap;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
new file mode 100644
index 000000000..f56b8bfb1
--- /dev/null
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -0,0 +1,364 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/customshapeproperties.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokenmap.hxx>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <comphelper/sequence.hxx>
+#include <o3tl/string_view.hxx>
+#include <sal/log.hxx>
+
+#include <algorithm>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
+
+namespace oox::drawingml {
+
+CustomShapeProperties::CustomShapeProperties()
+: mnShapePresetType ( -1 )
+, mbShapeTypeOverride(false)
+, mbMirroredX ( false )
+, mbMirroredY ( false )
+, mnTextRotateAngle ( 0 )
+, mnTextCameraZRotateAngle ( 0 )
+, mnArcNum ( 0 )
+{
+}
+
+uno::Sequence< sal_Int8 > const & CustomShapeProperties::getShapePresetTypeName() const
+{
+ return StaticTokenMap().getUtf8TokenName( mnShapePresetType );
+}
+
+sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide )
+{
+ std::vector<CustomShapeGuide>::size_type nIndex = 0;
+ for( ; nIndex < rGuideList.size(); nIndex++ )
+ {
+ if ( rGuideList[ nIndex ].maName == rGuide.maName )
+ break;
+ }
+ if ( nIndex == rGuideList.size() )
+ rGuideList.push_back( rGuide );
+ return static_cast< sal_Int32 >( nIndex );
+}
+
+// returns the index into the guidelist for a given formula name,
+// if the return value is < 0 then the guide value could not be found
+sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, std::u16string_view rFormulaName )
+{
+ // traverse the list from the end, because guide names can be reused
+ // and current is the last one
+ // see a1 guide in gear6 custom shape preset as example
+ sal_Int32 nIndex = static_cast< sal_Int32 >( rGuideList.size() ) - 1;
+ for( ; nIndex >= 0; nIndex-- )
+ {
+ if ( rGuideList[ nIndex ].maName == rFormulaName )
+ break;
+ }
+
+ return nIndex;
+}
+
+bool CustomShapeProperties::representsDefaultShape() const
+{
+ return !((getShapePresetType() >= 0 || maPath2DList.size() > 0) &&
+ getShapePresetType() != XML_Rect &&
+ getShapePresetType() != XML_rect);
+}
+
+CustomShapeProperties::PresetDataMap CustomShapeProperties::maPresetDataMap;
+
+void CustomShapeProperties::pushToPropSet(
+ const Reference < XPropertySet >& xPropSet, const awt::Size &aSize )
+{
+ if ( mnShapePresetType >= 0 )
+ {
+ SAL_INFO("oox.drawingml", "preset: " << mnShapePresetType);
+
+ if (maPresetDataMap.empty())
+ initializePresetDataMap();
+
+ PropertyMap aPropertyMap;
+ PropertySet aPropSet( xPropSet );
+
+ if (maPresetDataMap.find(mnShapePresetType) != maPresetDataMap.end())
+ {
+ SAL_INFO(
+ "oox.drawingml",
+ "found property map for preset: " << mnShapePresetType);
+
+ aPropertyMap = maPresetDataMap[mnShapePresetType];
+#ifdef DEBUG
+ aPropertyMap.dumpCode( aPropertyMap.makePropertySet() );
+#endif
+ }
+
+ aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX );
+ aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY );
+ aPropertyMap.setProperty( PROP_TextPreRotateAngle, mnTextRotateAngle );
+ aPropertyMap.setProperty( PROP_TextCameraZRotateAngle, mnTextCameraZRotateAngle );
+ Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+ aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+
+ if ( !maAdjustmentGuideList.empty() )
+ {
+ static const OUStringLiteral sCustomShapeGeometry(u"CustomShapeGeometry");
+ static const OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
+ uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
+ uno::Sequence< beans::PropertyValue > aGeoPropSeq;
+ if ( aGeoPropSet >>= aGeoPropSeq )
+ {
+ for ( auto& rGeoProp : asNonConstRange(aGeoPropSeq) )
+ {
+ if ( rGeoProp.Name == sAdjustmentValues )
+ {
+ uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
+ if ( rGeoProp.Value >>= aAdjustmentSeq )
+ {
+ auto aAdjustmentSeqRange = asNonConstRange(aAdjustmentSeq);
+ int nIndex=0;
+ for (auto const& adjustmentGuide : maAdjustmentGuideList)
+ {
+ if ( adjustmentGuide.maName.getLength() > 3 )
+ {
+ sal_Int32 nAdjustmentIndex = o3tl::toInt32(adjustmentGuide.maName.subView( 3 )) - 1;
+ if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) )
+ {
+ EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
+ aAdjustmentVal.Value <<= adjustmentGuide.maFormula.toInt32();
+ aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
+ aAdjustmentVal.Name = adjustmentGuide.maName;
+ aAdjustmentSeqRange[ nAdjustmentIndex ] = aAdjustmentVal;
+ }
+ } else if ( aAdjustmentSeq.hasElements() ) {
+ EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
+ aAdjustmentVal.Value <<= adjustmentGuide.maFormula.toInt32();
+ aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
+ aAdjustmentVal.Name = adjustmentGuide.maName;
+ if (nIndex < aAdjustmentSeq.getLength())
+ {
+ aAdjustmentSeqRange[nIndex] = aAdjustmentVal;
+ ++nIndex;
+ }
+ }
+ }
+ rGeoProp.Value <<= aAdjustmentSeq;
+ xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ PropertyMap aPropertyMap;
+ aPropertyMap.setProperty( PROP_Type, OUString( "ooxml-non-primitive" ));
+ aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX );
+ aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY );
+ if( mnTextRotateAngle )
+ aPropertyMap.setProperty( PROP_TextPreRotateAngle, mnTextRotateAngle );
+ // Note 1: If Equations are defined - they are processed using internal div by 360 coordinates
+ // while if they are not, standard ooxml coordinates are used.
+ // This size specifically affects scaling.
+ // Note 2: Width and Height are set to 0 to force scaling to 1.
+ awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+ // tdf#113187 Each ArcTo introduces two additional equations for converting start and swing
+ // angles. They do not count for test for use of standard ooxml coordinates
+ if (maGuideList.size() - 2 * countArcTo() > 0)
+ aViewBox = awt::Rectangle( 0, 0, 0, 0 );
+ aPropertyMap.setProperty( PROP_ViewBox, aViewBox);
+
+ Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
+ auto aAdjustmentValuesRange = asNonConstRange(aAdjustmentValues);
+ for ( std::vector<CustomShapeGuide>::size_type i = 0; i < maAdjustmentGuideList.size(); i++ )
+ {
+ EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
+ aAdjustmentVal.Value <<= maAdjustmentGuideList[ i ].maFormula.toInt32();
+ aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
+ aAdjustmentVal.Name = maAdjustmentGuideList[ i ].maName;
+ aAdjustmentValuesRange[ i ] = aAdjustmentVal;
+ }
+ aPropertyMap.setProperty( PROP_AdjustmentValues, aAdjustmentValues);
+
+ PropertyMap aPath;
+
+ aPath.setProperty( PROP_Segments, comphelper::containerToSequence(maSegments) );
+
+ if ( maTextRect.has() ) {
+ Sequence< EnhancedCustomShapeTextFrame > aTextFrames{
+ { /* tl */ { maTextRect.get().l, maTextRect.get().t },
+ /* br */ { maTextRect.get().r, maTextRect.get().b } }
+ };
+ aPath.setProperty( PROP_TextFrames, aTextFrames);
+ }
+
+ sal_uInt32 nParameterPairs = 0;
+ for ( auto const & i: maPath2DList )
+ nParameterPairs += i.parameter.size();
+
+ Sequence< EnhancedCustomShapeParameterPair > aParameterPairs( nParameterPairs );
+ auto aParameterPairsRange = asNonConstRange(aParameterPairs);
+ sal_uInt32 k = 0;
+ for ( auto const & i: maPath2DList )
+ for ( auto const & j: i.parameter )
+ aParameterPairsRange[ k++ ] = j;
+ aPath.setProperty( PROP_Coordinates, aParameterPairs);
+
+ if ( !maPath2DList.empty() )
+ {
+ bool bAllZero = true;
+ for ( auto const & i: maPath2DList )
+ {
+ if ( i.w || i.h ) {
+ bAllZero = false;
+ break;
+ }
+ }
+
+ if ( !bAllZero ) {
+ Sequence< awt::Size > aSubViewSize( maPath2DList.size() );
+ std::transform(maPath2DList.begin(), maPath2DList.end(), aSubViewSize.getArray(),
+ [](const auto& p2d)
+ {
+ SAL_INFO("oox.cscode",
+ "set subpath; size: " << p2d.w << " x " << p2d.h);
+ return awt::Size(p2d.w, p2d.h);
+ });
+ aPath.setProperty( PROP_SubViewSize, aSubViewSize);
+ }
+ }
+
+ Sequence< PropertyValue > aPathSequence = aPath.makePropertyValueSequence();
+ aPropertyMap.setProperty( PROP_Path, aPathSequence);
+
+ Sequence< OUString > aEquations( maGuideList.size() );
+ std::transform(maGuideList.begin(), maGuideList.end(), aEquations.getArray(),
+ [](const auto& g) { return g.maFormula; });
+ aPropertyMap.setProperty( PROP_Equations, aEquations);
+
+ Sequence< PropertyValues > aHandles( maAdjustHandleList.size() );
+ auto aHandlesRange = asNonConstRange(aHandles);
+ for ( std::vector<AdjustHandle>::size_type i = 0; i < maAdjustHandleList.size(); i++ )
+ {
+ PropertyMap aHandle;
+ // maAdjustmentHandle[ i ].gdRef1 ... maAdjustmentHandle[ i ].gdRef2 ... :(
+ // gdRef1 && gdRef2 -> we do not offer such reference, so it is difficult
+ // to determine the correct adjustment handle that should be updated with the adjustment
+ // position. here is the solution: the adjustment value that is used within the position
+ // has to be updated, in case the position is a formula the first usage of a
+ // adjustment value is decisive
+ if ( maAdjustHandleList[ i ].polar )
+ {
+ // Polar handles in DrawingML
+ // 1. don't have reference center, so PROP_Polar isn't needed.
+ // 2. position always use planar coordinates.
+ // 3. use RefAngle and RefR to specify adjustment value to be updated.
+ // 4. The unit of angular adjustment values are 6000th degree.
+
+ aHandle.setProperty( PROP_Position, maAdjustHandleList[ i ].pos);
+ if ( maAdjustHandleList[ i ].gdRef1.has() )
+ {
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() );
+ if ( nIndex >= 0 )
+ aHandle.setProperty( PROP_RefR, nIndex);
+ }
+ if ( maAdjustHandleList[ i ].gdRef2.has() )
+ {
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() );
+ if ( nIndex >= 0 )
+ aHandle.setProperty( PROP_RefAngle, nIndex);
+ }
+ if ( maAdjustHandleList[ i ].min1.has() )
+ aHandle.setProperty( PROP_RadiusRangeMinimum, maAdjustHandleList[ i ].min1.get());
+ if ( maAdjustHandleList[ i ].max1.has() )
+ aHandle.setProperty( PROP_RadiusRangeMaximum, maAdjustHandleList[ i ].max1.get());
+
+ /* TODO: AngleMin & AngleMax
+ if ( maAdjustHandleList[ i ].min2.has() )
+ aHandle.setProperty( PROP_ ] = maAdjustHandleList[ i ].min2.get());
+ if ( maAdjustHandleList[ i ].max2.has() )
+ aHandle.setProperty( PROP_ ] = maAdjustHandleList[ i ].max2.get());
+ */
+ }
+ else
+ {
+ aHandle.setProperty( PROP_Position, maAdjustHandleList[ i ].pos);
+ if ( maAdjustHandleList[ i ].gdRef1.has() )
+ {
+ // TODO: PROP_RefX and PROP_RefY are not yet part of our file format,
+ // so the handles will not work after save/reload
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() );
+ if ( nIndex >= 0 )
+ aHandle.setProperty( PROP_RefX, nIndex);
+ }
+ if ( maAdjustHandleList[ i ].gdRef2.has() )
+ {
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() );
+ if ( nIndex >= 0 )
+ aHandle.setProperty( PROP_RefY, nIndex);
+ }
+ if ( maAdjustHandleList[ i ].min1.has() )
+ aHandle.setProperty( PROP_RangeXMinimum, maAdjustHandleList[ i ].min1.get());
+ if ( maAdjustHandleList[ i ].max1.has() )
+ aHandle.setProperty( PROP_RangeXMaximum, maAdjustHandleList[ i ].max1.get());
+ if ( maAdjustHandleList[ i ].min2.has() )
+ aHandle.setProperty( PROP_RangeYMinimum, maAdjustHandleList[ i ].min2.get());
+ if ( maAdjustHandleList[ i ].max2.has() )
+ aHandle.setProperty( PROP_RangeYMaximum, maAdjustHandleList[ i ].max2.get());
+ }
+ aHandlesRange[ i ] = aHandle.makePropertyValueSequence();
+ }
+ aPropertyMap.setProperty( PROP_Handles, aHandles);
+
+#ifdef DEBUG
+ // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks
+ // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs.
+ SAL_INFO("oox.cscode", "==cscode== begin");
+ aPropertyMap.dumpCode( aPropertyMap.makePropertySet() );
+ SAL_INFO("oox.cscode", "==cscode== end");
+ SAL_INFO("oox.csdata", "==csdata== begin");
+ aPropertyMap.dumpData( aPropertyMap.makePropertySet() );
+ SAL_INFO("oox.csdata", "==csdata== end");
+#endif
+ // converting the vector to a sequence
+ Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+ PropertySet aPropSet( xPropSet );
+ aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/customshapes/README.md b/oox/source/drawingml/customshapes/README.md
new file mode 100644
index 000000000..4b79fefc6
--- /dev/null
+++ b/oox/source/drawingml/customshapes/README.md
@@ -0,0 +1,19 @@
+# Generating Custom Shape Presets
+
+The Perl code (`generatePresetsData.pl` and `generatePresetsPPTXs.pl`) is used
+to generate the custom shape presets.
+
+The `generate.sh` script which invokes the above Perl files, should be invoked
+from the libreoffice core top-level source folder:
+```
+oox/source/drawingml/customshapes/generate.sh
+```
+The logs will be created in the file:
+```
+oox/source/drawingml/customshapes/custom-shapes.log
+```
+
+The output would be placed in this folder:
+```
+oox/source/drawingml/customshapes/pptx/
+``` \ No newline at end of file
diff --git a/oox/source/drawingml/customshapes/cshape.pptx b/oox/source/drawingml/customshapes/cshape.pptx
new file mode 100644
index 000000000..ec42eb93f
--- /dev/null
+++ b/oox/source/drawingml/customshapes/cshape.pptx
Binary files differ
diff --git a/oox/source/drawingml/customshapes/generate.sh b/oox/source/drawingml/customshapes/generate.sh
new file mode 100755
index 000000000..b0e661ec1
--- /dev/null
+++ b/oox/source/drawingml/customshapes/generate.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# This script is used to generate the custom shape presets
+
+# We want to exit on errors...
+
+set -o errexit
+
+# oox needs to be build with dbglevel=2 so that DEBUG is defined.
+
+make oox.clean && make oox dbglevel=2
+
+# This reads the
+# oox/source/drawingml/customshapes/presetShapeDefinitions.xml file.
+# It will produce the file
+# oox/source/drawingml/customshapes/pptx/cshape-all.ppx and a whole
+# bunch of other files that aren't needed further.
+
+(cd oox/source/drawingml/customshapes && ./generatePresetsPPTXs.pl)
+
+
+# Then load it and store the debugging output.
+# We need only the SAL_INFO output with tag "oox.csdata", plus stderr
+# for PropertyMap::dumpData() output.
+
+SAL_LOG='+INFO.oox.csdata-WARN' instdir/program/soffice --headless --convert-to odp --outdir oox/source/drawingml/customshapes/ oox/source/drawingml/customshapes/pptx/cshape-all.pptx > oox/source/drawingml/customshapes/custom-shapes.log 2>&1
+
+
+# Now run a script that reads the above log file and generates the
+# oox-drawingml-cs-presets data:
+
+(cd oox/source/drawingml/customshapes && ./generatePresetsData.pl)
+
+
+echo
+echo "To see what has been done, run git diff --patience oox/source/drawingml"
+echo
+
diff --git a/oox/source/drawingml/customshapes/generatePresetsData.pl b/oox/source/drawingml/customshapes/generatePresetsData.pl
new file mode 100755
index 000000000..99b2ff153
--- /dev/null
+++ b/oox/source/drawingml/customshapes/generatePresetsData.pl
@@ -0,0 +1,74 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+sub loadData()
+{
+ open (IN, "<custom-shapes.log");
+
+ my %sources;
+
+ while (<IN>)
+ {
+ if (/==csdata== /)
+ {
+ if (/shape name: '/)
+ {
+ chop;
+ s/.*shape name: '([^']+)'.*/$1/;
+ $name = $_;
+ }
+ else
+ {
+ if (/==csdata== begin/)
+ {
+ $inside = true;
+ @code = ();
+ }
+ else
+ {
+ if (/==csdata== end/)
+ {
+ s/^ <\/([^>]+)>/$1/;
+ undef $inside;
+ $sources{$name} = [ @code ];
+ }
+ }
+ }
+ }
+ else
+ {
+ if ($inside)
+ {
+ push @code, $_;
+ }
+ }
+ }
+
+ close (IN);
+
+ return \%sources;
+}
+
+sub generateData
+{
+ my $sources = shift;
+ open (OUT, ">oox-drawingml-cs-presets");
+
+ foreach $shape (sort(keys %$sources))
+ {
+ printf OUT "/* %s */\n", $shape;
+ print OUT @{$sources->{$shape}};
+ }
+
+ close OUT;
+}
+
+generateData(loadData());
+
+# vim:set ft=perl shiftwidth=4 softtabstop=4 expandtab: #
diff --git a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl
new file mode 100755
index 000000000..246bfddcd
--- /dev/null
+++ b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl
@@ -0,0 +1,193 @@
+#!/usr/bin/env perl
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+use IO::Handle;
+
+$shapes = loadShapes ();
+
+generatePPTXs($shapes);
+exit;
+
+
+sub generatePPTXs
+{
+ $shapes = shift;
+
+ foreach $shape (keys %$shapes)
+ {
+ generatePPTX ($shapes, $shape);
+ }
+
+ generatePPTX ($shapes);
+}
+
+sub generatePPTX
+{
+ $shapes = shift;
+ $type = shift;
+
+ mkdir ("cshape");
+ mkdir ("pptx");
+ system ("unzip -qq -o -d cshape cshape.pptx");
+
+ # custom shape(s) slide with preset definition
+ generateSlide ($shapes, $type, ">cshape/ppt/slides/slide1.xml", 0);
+
+ $pptx = "../pptx/cshape-" . (defined $type ? $type : "all") . ".pptx";
+ system ("cd cshape\nrm -rf ". $pptx . "\nzip -q -r " . $pptx . " .\ncd ..");
+
+ # preset(s) slide, for testing
+ generateSlide ($shapes, $type, ">cshape/ppt/slides/slide1.xml", 1);
+
+ $pptx = "../pptx/preset-cshape-" . (defined $type ? $type : "all") . ".pptx";
+ system ("cd cshape\nrm -rf ". $pptx . "\nzip -q -r " . $pptx . " .\ncd ..");
+}
+
+sub loadShapes()
+{
+ open (IN, "<presetShapeDefinitions.xml");
+
+ $inside = false;
+ my %shapes;
+
+ while (<IN>)
+ {
+ if (/^ <[^\/]/)
+ {
+ $inside = true;
+ @definition = ();
+ }
+ else
+ {
+ if (/^ <\//)
+ {
+ chomp;
+ s/^ <\/([^>]+)>.*/$1/;
+ undef $inside;
+ $shapes{$_} = [ @definition ];
+ #print "added ", $_, "\n";
+ }
+ else
+ {
+ if ($inside)
+ {
+ push @definition, $_;
+ }
+ }
+ }
+ }
+
+ close (IN);
+
+ return \%shapes;
+}
+
+sub generateSlide
+{
+ $shapes = shift;
+ $type = shift;
+ $file = shift;
+ $preset = shift;
+
+ open (OUT, $file);
+
+ print OUT "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
+<p:sld xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">
+ <p:cSld>
+ <p:spTree>
+ <p:nvGrpSpPr>
+ <p:cNvPr id=\"1\" name=\"\"/>
+ <p:cNvGrpSpPr/>
+ <p:nvPr/>
+ </p:nvGrpSpPr>
+ <p:grpSpPr>
+ <a:xfrm>
+ <a:off x=\"0\" y=\"0\"/>
+ <a:ext cx=\"0\" cy=\"0\"/>
+ <a:chOff x=\"0\" y=\"0\"/>
+ <a:chExt cx=\"0\" cy=\"0\"/>
+ </a:xfrm>
+ </p:grpSpPr>
+";
+
+ $id = 16;
+ $col = 0;
+ $row = 0;
+ $size = 500000;
+ foreach $shape (keys %$shapes)
+ {
+ if (defined $type) {
+ if ($shape ne $type) { next; }
+# <a:ext cx=\"1050925\" cy=\"457200\"/>
+# <a:ext cx=\"1000000\" cy=\"1000000\"/>
+ $size *= 10;
+ $col = 0.5;
+ $row = 0.25;
+ }
+
+ if ($col > 15) {
+ $col = 0;
+ $row ++;
+ }
+
+ print OUT " <p:sp>
+ <p:nvSpPr>
+ <p:cNvPr id=\"", $id++, "\" name=\"", $shape, "\"/>
+ <p:cNvSpPr/>
+ <p:nvPr/>
+ </p:nvSpPr>
+ <p:spPr bwMode=\"auto\">
+ <a:xfrm>
+ <a:off x=\"" . (350000 + $col++*$size) . "\" y=\"" . (450000 + $row*$size) . "\"/>
+ <a:ext cx=\"" . (4*$size/5) . "\" cy=\"" . (4*$size/5) . "\"/>
+ </a:xfrm>
+";
+ if ($preset) {
+ print OUT " <a:prstGeom prst=\"" . $shape . "\"><a:avLst/></a:prstGeom>
+";
+ } else {
+ print OUT " <a:custGeom>
+";
+ print OUT @{$shapes->{$shape}};
+ print OUT " </a:custGeom>
+";
+ }
+ print OUT " <a:solidFill>
+ <a:srgbClr val=\"FFFF7F\"/>
+ </a:solidFill>
+ <a:ln w=\"19080\">
+ <a:solidFill>
+ <a:srgbClr val=\"A0A060\"/>
+ </a:solidFill>
+ <a:miter lim=\"800000\"/>
+ <a:headEnd/>
+ <a:tailEnd/>
+ </a:ln>
+ </p:spPr>
+ </p:sp>
+";
+ }
+
+ print OUT " </p:spTree>
+ </p:cSld>
+ <p:clrMapOvr>
+ <a:masterClrMapping/>
+ </p:clrMapOvr>
+ <p:timing>
+ <p:tnLst>
+ <p:par>
+ <p:cTn id=\"1\" dur=\"indefinite\" restart=\"never\" nodeType=\"tmRoot\"/>
+ </p:par>
+ </p:tnLst>
+ </p:timing>
+</p:sld>
+";
+
+ close (OUT);
+}
diff --git a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
new file mode 100644
index 000000000..a88d30040
--- /dev/null
+++ b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
@@ -0,0 +1,3179 @@
+/* accentBorderCallout1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -38333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* accentBorderCallout2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -46667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* accentBorderCallout3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 100000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" }, { Value = (any) { (long) 112963 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj7" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj8" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logheight*$6 /100000", "logwidth*$7 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 7 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 6 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* accentCallout1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -38333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* accentCallout2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -46667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* accentCallout3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 100000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" }, { Value = (any) { (long) 112963 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj7" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj8" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logheight*$6 /100000", "logwidth*$7 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 7 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 6 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonBackPrevious */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonBeginning */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *1/8", "?8 *1/4", "?6 +?9 -0", "?6 +?10 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonBlank */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonDocument */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "?0 *9/32", "logwidth/2", "?6 +0-?5 ", "?6 +?5 -0", "?0 *3/16", "?8 +0-?9 ", "?3 +?9 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonEnd */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *3/4", "?8 *7/8", "?6 +?9 -0", "?6 +?10 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonForwardNext */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonHelp */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "logwidth/2", "?4 +0-?1 ", "?0 *3/4", "?6 *1/7", "?6 *3/14", "?6 *2/7", "?6 *3/7", "?6 *4/7", "?6 *17/28", "?6 *21/28", "?6 *11/14", "?3 +?9 -0", "?3 +?12 -0", "?3 +?13 -0", "?3 +?14 -0", "?5 +?8 -0", "?5 +?10 -0", "?5 +?11 -0", "?6 *1/14", "?6 *3/28", "logwidth", "logheight", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonHome */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *1/16", "?8 *1/8", "?8 *3/16", "?8 *5/16", "?8 *7/16", "?8 *9/16", "?8 *11/16", "?8 *3/4", "?8 *13/16", "?8 *7/8", "?3 +?9 -0", "?3 +?11 -0", "?3 +?12 -0", "?3 +?16 -0", "?6 +?10 -0", "?6 +?13 -0", "?6 +?14 -0", "?6 +?15 -0", "?6 +?17 -0", "?6 +?18 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonInformation */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "logwidth/2", "?4 +0-?1 ", "?0 *3/4", "?6 *1/32", "?6 *5/16", "?6 *3/8", "?6 *13/32", "?6 *19/32", "?6 *11/16", "?6 *13/16", "?6 *7/8", "?3 +?7 -0", "?3 +?8 -0", "?3 +?9 -0", "?3 +?13 -0", "?3 +?14 -0", "?5 +?8 -0", "?5 +?10 -0", "?5 +?11 -0", "?5 +?12 -0", "?6 *3/32", "logwidth", "logheight", "(16200000)/60000.0", "(21600000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0", "(16200000)/60000.0", "(21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 20, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonMovie */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *1455/21600", "?8 *1905/21600", "?8 *2325/21600", "?8 *16155/21600", "?8 *17010/21600", "?8 *19335/21600", "?8 *19725/21600", "?8 *20595/21600", "?8 *5280/21600", "?8 *5730/21600", "?8 *6630/21600", "?8 *7492/21600", "?8 *9067/21600", "?8 *9555/21600", "?8 *13342/21600", "?8 *14580/21600", "?8 *15592/21600", "?6 +?9 -0", "?6 +?10 -0", "?6 +?11 -0", "?6 +?12 -0", "?6 +?13 -0", "?6 +?14 -0", "?6 +?15 -0", "?6 +?16 -0", "?3 +?17 -0", "?3 +?18 -0", "?3 +?19 -0", "?3 +?20 -0", "?3 +?21 -0", "?3 +?22 -0", "?3 +?23 -0", "?3 +?24 -0", "?3 +?25 -0", "?3 +?26 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 18 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 18 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 18 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonReturn */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *7/8", "?8 *3/4", "?8 *5/8", "?8 *3/8", "?8 *1/4", "?3 +?10 -0", "?3 +?11 -0", "?3 +?13 -0", "?6 +?9 -0", "?6 +?10 -0", "?6 +?11 -0", "?6 +?12 -0", "?6 +?13 -0", "?8 *1/8", "logwidth", "logheight", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* actionButtonSound */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *3/8", "logheight/2", "?2 +0-?1 ", "?2 +?1 -0", "logwidth/2", "?5 +0-?1 ", "?5 +?1 -0", "?0 *3/4", "?8 *1/8", "?8 *5/16", "?8 *5/8", "?8 *11/16", "?8 *3/4", "?8 *7/8", "?3 +?9 -0", "?3 +?10 -0", "?3 +?12 -0", "?3 +?14 -0", "?6 +?10 -0", "?6 +?11 -0", "?6 +?13 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* arc */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16200000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))", "if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))", "?1 +0-?0 ", "?2 +21600000-0", "if(?2 ,?2 ,?3 )", "logwidth/2", "?5 *sin(pi*(?0 )/10800000)", "logheight/2", "?7 *cos(pi*(?0 )/10800000)", "?5 *(cos(atan2(?6 ,?8 )))", "?7 *(sin(atan2(?6 ,?8 )))", "?5 *sin(pi*(?1 )/10800000)", "?7 *cos(pi*(?1 )/10800000)", "?5 *(cos(atan2(?11 ,?12 )))", "?7 *(sin(atan2(?11 ,?12 )))", "logwidth/2", "?15 +?9 -0", "logheight/2", "?17 +?10 -0", "?15 +?13 -0", "?17 +?14 -0", "21600000+0-?0 ", "?4 +0-?21 ", "max(?16 ,?19 )", "if(?22 ,logwidth,?23 )", "5400000+0-?0 ", "27000000+0-?0 ", "if(?25 ,?25 ,?26 )", "?4 +0-?27 ", "max(?18 ,?20 )", "if(?28 ,logheight,?29 )", "10800000+0-?0 ", "32400000+0-?0 ", "if(?31 ,?31 ,?32 )", "?4 +0-?33 ", "min(?16 ,?19 )", "if(?34 ,0,?35 )", "16200000+0-?0 ", "37800000+0-?0 ", "if(?37 ,?37 ,?38 )", "?4 +0-?39 ", "min(?18 ,?20 )", "if(?40 ,0,?41 )", "?0 +0-5400000", "?1 +5400000-0", "(?43 +?44 )/2", "(?0 )/60000.0", "(?4 )/60000.0", "(?0 )/60000.0", "(?4 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 43750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(0-$2 ,0,if(50000-$2 ,$2 ,50000))", "min(logwidth,logheight)", "?4 *?2 /100000", "?4 *?0 /100000", "?5 *1/2", "?6 +0-?7 ", "?4 *?3 /100000", "logwidth+0-?9 ", "logheight+0-?8 ", "min(?10 ,?11 )", "100000*?12 /?4 ", "if(0-$3 ,0,if(?13 -$3 ,$3 ,?13 ))", "?4 *?14 /100000", "?15 +0-?5 ", "max(?16 ,0)", "?5 +?17 -0", "logwidth+0-?9 ", "?8 +?5 -0", "?20 +?8 -0", "?8 +?15 -0", "?20 +?17 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentConnector2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentConnector3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logheight/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentConnector4 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "logwidth*$0 /100000", "(?0 +logwidth)/2", "logheight*$1 /100000", "(0+?2 )/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentConnector5 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logwidth*$2 /100000", "(?0 +?1 )/2", "logheight*$1 /100000", "(0+?3 )/2", "(logheight+?3 )/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bentUpArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "if(0-$2 ,0,if(50000-$2 ,$2 ,50000))", "min(logwidth,logheight)", "?3 *?2 /100000", "?3 *?1 /50000", "logwidth+0-?5 ", "?3 *?1 /100000", "logwidth+0-?7 ", "?3 *?0 /200000", "?8 +0-?9 ", "?8 +?9 -0", "?3 *?0 /100000", "logheight+0-?12 ", "?11 *1/2", "(?13 +logheight)/2", "(?4 +logheight)/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 8 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bevel */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 21, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 20, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 18, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* blockArc */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 10800000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))", "if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))", "if(0-$2 ,0,if(50000-$2 ,$2 ,50000))", "?1 +0-?0 ", "?3 +21600000-0", "if(?3 ,?3 ,?4 )", "0+0-?5 ", "logwidth/2", "?7 *sin(pi*(?0 )/10800000)", "logheight/2", "?9 *cos(pi*(?0 )/10800000)", "?7 *sin(pi*(?1 )/10800000)", "?9 *cos(pi*(?1 )/10800000)", "?7 *(cos(atan2(?8 ,?10 )))", "?9 *(sin(atan2(?8 ,?10 )))", "?7 *(cos(atan2(?11 ,?12 )))", "?9 *(sin(atan2(?11 ,?12 )))", "logwidth/2", "?17 +?13 -0", "logheight/2", "?19 +?14 -0", "?17 +?15 -0", "?19 +?16 -0", "min(logwidth,logheight)", "?23 *?2 /100000", "?7 +0-?24 ", "?9 +0-?24 ", "?25 *sin(pi*(?1 )/10800000)", "?26 *cos(pi*(?1 )/10800000)", "?25 *sin(pi*(?0 )/10800000)", "?26 *cos(pi*(?0 )/10800000)", "?25 *(cos(atan2(?27 ,?28 )))", "?26 *(sin(atan2(?27 ,?28 )))", "?25 *(cos(atan2(?29 ,?30 )))", "?26 *(sin(atan2(?29 ,?30 )))", "?17 +?31 -0", "?19 +?32 -0", "?17 +?33 -0", "?19 +?34 -0", "21600000+0-?0 ", "?5 +0-?39 ", "max(?18 ,?35 )", "max(?21 ,?37 )", "max(?41 ,?42 )", "if(?40 ,logwidth,?43 )", "5400000+0-?0 ", "27000000+0-?0 ", "if(?45 ,?45 ,?46 )", "?5 +0-?47 ", "max(?20 ,?36 )", "max(?22 ,?38 )", "max(?49 ,?50 )", "if(?48 ,logheight,?51 )", "10800000+0-?0 ", "32400000+0-?0 ", "if(?53 ,?53 ,?54 )", "?5 +0-?55 ", "min(?18 ,?35 )", "min(?21 ,?37 )", "min(?57 ,?58 )", "if(?56 ,0,?59 )", "16200000+0-?0 ", "37800000+0-?0 ", "if(?61 ,?61 ,?62 )", "?5 +0-?63 ", "min(?20 ,?36 )", "min(?22 ,?38 )", "min(?65 ,?66 )", "if(?64 ,0,?67 )", "(?18 +?37 )/2", "(?20 +?38 )/2", "(?21 +?35 )/2", "(?22 +?36 )/2", "?0 +0-5400000", "?1 +5400000-0", "(?73 +?74 )/2", "(?0 )/60000.0", "(?5 )/60000.0", "(?1 )/60000.0", "(?6 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 76 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* borderCallout1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -38333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* borderCallout2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -46667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* borderCallout3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 100000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" }, { Value = (any) { (long) 112963 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj7" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj8" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logheight*$6 /100000", "logwidth*$7 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 7 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 6 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bracePair */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(25000-$0 ,$0 ,25000))", "min(logwidth,logheight)", "?1 *?0 /100000", "?1 *?0 /50000", "logwidth+0-?3 ", "logwidth+0-?2 ", "logheight/2", "?6 +0-?2 ", "?6 +?2 -0", "logheight+0-?2 ", "?2 *29289/100000", "?2 +?10 -0", "logwidth+0-?11 ", "logheight+0-?10 ", "logwidth/2", "logheight", "logwidth", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* bracketPair */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "?2 *29289/100000", "logwidth+0-?5 ", "logheight+0-?5 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* callout1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -38333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* callout2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 112500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -46667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* callout3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 100000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" }, { Value = (any) { (long) -16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj6" }, { Value = (any) { (long) 112963 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj7" }, { Value = (any) { (long) -8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj8" } }
+Equations
+([]string) { "logheight*$0 /100000", "logwidth*$1 /100000", "logheight*$2 /100000", "logwidth*$3 /100000", "logheight*$4 /100000", "logwidth*$5 /100000", "logheight*$6 /100000", "logwidth*$7 /100000", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 5 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 7 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 6 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* can */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /200000", "?3 +?3 -0", "logheight+0-?3 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/2", "(10800000)/60000.0", "(-10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 20, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* chartPlus */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) {}
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 10, Height = (long) 10 }, { Width = (long) 10, Height = (long) 10 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 400000, Height = (long) 400000 }
+/* chartStar */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) {}
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 10, Height = (long) 10 }, { Width = (long) 10, Height = (long) 10 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 400000, Height = (long) 400000 }
+/* chartX */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) {}
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 10, Height = (long) 10 }, { Width = (long) 10, Height = (long) 10 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 400000, Height = (long) 400000 }
+/* chevron */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /100000", "logwidth+0-?3 ", "?4 *1/2", "?4 +0-?3 ", "if(?6 ,?3 ,0)", "if(?6 ,?4 ,logwidth)", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* chord */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 2700000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 16200000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))", "if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))", "?1 +0-?0 ", "?2 +21600000-0", "if(?2 ,?2 ,?3 )", "logwidth/2", "?5 *sin(pi*(?0 )/10800000)", "logheight/2", "?7 *cos(pi*(?0 )/10800000)", "?5 *(cos(atan2(?6 ,?8 )))", "?7 *(sin(atan2(?6 ,?8 )))", "?5 *sin(pi*(?1 )/10800000)", "?7 *cos(pi*(?1 )/10800000)", "?5 *(cos(atan2(?11 ,?12 )))", "?7 *(sin(atan2(?11 ,?12 )))", "logwidth/2", "?15 +?9 -0", "logheight/2", "?17 +?10 -0", "?15 +?13 -0", "?17 +?14 -0", "(?16 +?19 )/2", "(?18 +?20 )/2", "?4 *1/2", "?0 +?23 -10800000", "?5 *cos(pi*(2700000)/10800000)", "?7 *sin(pi*(2700000)/10800000)", "?15 +0-?25 ", "?15 +?25 -0", "?17 +0-?26 ", "?17 +?26 -0", "(?0 )/60000.0", "(?4 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* circularArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 1142319 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 20457681 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 10800000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" } }
+Equations
+([]string) { "if(0-$4 ,0,if(25000-$4 ,$4 ,25000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(1-$2 ,1,if(21599999-$2 ,$2 ,21599999))", "if(0-$3 ,0,if(21599999-$3 ,$3 ,21599999))", "min(logwidth,logheight)", "?5 *?2 /100000", "?5 *?0 /100000", "?6 *1/2", "logwidth/2", "?9 +?8 -?7 ", "logheight/2", "?11 +?8 -?7 ", "?10 +0-?6 ", "?12 +0-?6 ", "?13 +?8 -0", "?14 +?8 -0", "?15 *sin(pi*(?3 )/10800000)", "?16 *cos(pi*(?3 )/10800000)", "?15 *(cos(atan2(?17 ,?18 )))", "?16 *(sin(atan2(?17 ,?18 )))", "logwidth/2", "?21 +?19 -0", "logheight/2", "?23 +?20 -0", "min(?13 ,?14 )", "?19 *?19 /1", "?20 *?20 /1", "?25 *?25 /1", "?26 +0-?28 ", "?27 +0-?28 ", "?29 *?30 /?26 ", "?31 *1/?27 ", "1+0-?32 ", "sqrt(?33 )", "?29 *1/?19 ", "?35 *1/?20 ", "(1+?34 )/?36 ", "(10800000*atan2(?37 ,1))/pi", "?38 +21600000-0", "if(?38 ,?38 ,?39 )", "?40 +0-?3 ", "?41 +21600000-0", "if(?41 ,?41 ,?42 )", "?43 +0-10800000", "?43 +0-21600000", "if(?44 ,?45 ,?43 )", "abs(?46 )", "if(0-$1 ,0,if(?47 -$1 ,$1 ,?47 ))", "?3 +?48 -0", "?15 *sin(pi*(?49 )/10800000)", "?16 *cos(pi*(?49 )/10800000)", "?15 *(cos(atan2(?50 ,?51 )))", "?16 *(sin(atan2(?50 ,?51 )))", "?21 +?52 -0", "?23 +?53 -0", "?10 *sin(pi*(?4 )/10800000)", "?12 *cos(pi*(?4 )/10800000)", "?10 *(cos(atan2(?56 ,?57 )))", "?12 *(sin(atan2(?56 ,?57 )))", "?21 +?58 -0", "?23 +?59 -0", "?7 *cos(pi*(?49 )/10800000)", "?7 *sin(pi*(?49 )/10800000)", "?22 +?62 -0", "?24 +?63 -0", "?7 *cos(pi*(?49 )/10800000)", "?7 *sin(pi*(?49 )/10800000)", "?22 +0-?66 ", "?24 +0-?67 ", "?68 +0-?21 ", "?69 +0-?23 ", "?64 +0-?21 ", "?65 +0-?23 ", "min(?10 ,?12 )", "?70 *?74 /?10 ", "?71 *?74 /?12 ", "?72 *?74 /?10 ", "?73 *?74 /?12 ", "?77 +0-?75 ", "?78 +0-?76 ", "sqrt(?79 *?79 +?80 *?80 +0*0)", "?75 *?78 /1", "?77 *?76 /1", "?82 +0-?83 ", "?74 *?74 /1", "?81 *?81 /1", "?85 *?86 /1", "?84 *?84 /1", "?87 +0-?88 ", "max(?89 ,0)", "sqrt(?90 )", "?80 *-1/1", "if(?92 ,-1,1)", "?93 *?79 /1", "?94 *?91 /1", "?84 *?80 /1", "(?96 +?95 )/?86 ", "?96 +0-?95 ", "?98 *1/?86 ", "abs(?80 )", "?100 *?91 /1", "?84 *?79 /-1", "(?102 +?101 )/?86 ", "?102 +0-?101 ", "?104 *1/?86 ", "?77 +0-?97 ", "?77 +0-?99 ", "?78 +0-?103 ", "?78 +0-?105 ", "sqrt(?106 *?106 +?108 *?108 +0*0)", "sqrt(?107 *?107 +?109 *?109 +0*0)", "?111 +0-?110 ", "if(?112 ,?97 ,?99 )", "if(?112 ,?103 ,?105 )", "?113 *?10 /?74 ", "?114 *?12 /?74 ", "?21 +?115 -0", "?23 +?116 -0", "?70 *?25 /?13 ", "?71 *?25 /?14 ", "?72 *?25 /?13 ", "?73 *?25 /?14 ", "?121 +0-?119 ", "?122 +0-?120 ", "sqrt(?123 *?123 +?124 *?124 +0*0)", "?119 *?122 /1", "?121 *?120 /1", "?126 +0-?127 ", "?25 *?25 /1", "?125 *?125 /1", "?129 *?130 /1", "?128 *?128 /1", "?131 +0-?132 ", "max(?133 ,0)", "sqrt(?134 )", "?93 *?123 /1", "?136 *?135 /1", "?128 *?124 /1", "(?138 +?137 )/?130 ", "?138 +0-?137 ", "?140 *1/?130 ", "abs(?124 )", "?142 *?135 /1", "?128 *?123 /-1", "(?144 +?143 )/?130 ", "?144 +0-?143 ", "?146 *1/?130 ", "?119 +0-?139 ", "?119 +0-?141 ", "?120 +0-?145 ", "?120 +0-?147 ", "sqrt(?148 *?148 +?150 *?150 +0*0)", "sqrt(?149 *?149 +?151 *?151 +0*0)", "?153 +0-?152 ", "if(?154 ,?139 ,?141 )", "if(?154 ,?145 ,?147 )", "?155 *?13 /?25 ", "?156 *?14 /?25 ", "?21 +?157 -0", "?23 +?158 -0", "(10800000*atan2(?158 ,?157 ))/pi", "?161 +21600000-0", "if(?161 ,?161 ,?162 )", "?4 +0-?163 ", "?164 +0-21600000", "if(?164 ,?165 ,?164 )", "?117 +0-?159 ", "?118 +0-?160 ", "sqrt(?167 *?167 +?168 *?168 +0*0)", "?169 *1/2", "?170 +0-?7 ", "if(?171 ,?117 ,?64 )", "if(?171 ,?118 ,?65 )", "if(?171 ,?159 ,?68 )", "if(?171 ,?160 ,?69 )", "(10800000*atan2(?116 ,?115 ))/pi", "?176 +21600000-0", "if(?176 ,?176 ,?177 )", "?178 +0-?4 ", "?179 +21600000-0", "if(?179 ,?179 ,?180 )", "?15 *sin(pi*(?4 )/10800000)", "?16 *cos(pi*(?4 )/10800000)", "?15 *(cos(atan2(?182 ,?183 )))", "?16 *(sin(atan2(?182 ,?183 )))", "?21 +?184 -0", "?23 +?185 -0", "?4 +0-5400000", "?49 +5400000-0", "?49 +10800000-0", "?10 *cos(pi*(2700000)/10800000)", "?12 *sin(pi*(2700000)/10800000)", "?21 +0-?191 ", "?21 +?191 -0", "?23 +0-?192 ", "?23 +?192 -0", "(?4 )/60000.0", "(?181 )/60000.0", "(?163 )/60000.0", "(?166 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 117 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 118 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 197 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 198 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 172 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 173 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 174 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 175 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 159 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 160 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 199 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 200 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 193 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 195 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 194 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 196 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* cloud */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*2977/21600", "logheight*3262/21600", "logwidth*17087/21600", "logheight*17337/21600", "logwidth*67/21600", "logheight*21577/21600", "logwidth*21582/21600", "logheight*1235/21600", "logheight/2", "logwidth/2", "(-11429249)/60000.0", "(7426832)/60000.0", "(-8646143)/60000.0", "(5396714)/60000.0", "(-8748475)/60000.0", "(5983381)/60000.0", "(-7859164)/60000.0", "(7034504)/60000.0", "(-4722533)/60000.0", "(6541615)/60000.0", "(-2776035)/60000.0", "(7816140)/60000.0", "(37501)/60000.0", "(6842000)/60000.0", "(1347096)/60000.0", "(6910353)/60000.0", "(3974558)/60000.0", "(4542661)/60000.0", "(-16496525)/60000.0", "(8804134)/60000.0", "(-14809710)/60000.0", "(9151131)/60000.0", "(5204520)/60000.0", "(1585770)/60000.0", "(4416628)/60000.0", "(686848)/60000.0", "(8257449)/60000.0", "(844866)/60000.0", "(387196)/60000.0", "(959901)/60000.0", "(-4217541)/60000.0", "(4255042)/60000.0", "(1819082)/60000.0", "(1665090)/60000.0", "(-824660)/60000.0", "(891534)/60000.0", "(-8950887)/60000.0", "(1091722)/60000.0", "(-9809656)/60000.0", "(1061181)/60000.0", "(-4002417)/60000.0", "(739161)/60000.0", "(9459261)/60000.0", "(711490)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3900 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14370 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7267 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4365 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7273 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6775 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9220 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5785 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7867 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7720 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10543 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4360 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5918 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4345 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4693 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26177 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4345 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6928 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34899 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4360 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5918 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16478 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39090 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28827 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34751 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34129 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22954 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5785 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7867 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41798 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15354 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7273 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38324 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5426 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29078 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3952 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22141 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4720 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4365 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5192 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4127 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15789 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 43200, Height = (long) 43200 }, { Width = (long) 43200, Height = (long) 43200 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* cloudCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) -20833 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 62500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logheight*$1 /100000", "logwidth/2", "?2 +?0 -0", "logheight/2", "?4 +?1 -0", "logheight/2", "?6 *(cos(atan2(?1 ,?0 )))", "logwidth/2", "?8 *(sin(atan2(?1 ,?0 )))", "?8 *(cos(atan2(?9 ,?7 )))", "?6 *(sin(atan2(?9 ,?7 )))", "?2 +?10 -0", "?4 +?11 -0", "?12 +0-?3 ", "?13 +0-?5 ", "sqrt(?14 *?14 +?15 *?15 +0*0)", "min(logwidth,logheight)", "?17 *6600/21600", "?16 +0-?18 ", "?19 *1/3", "?17 *1800/21600", "?20 +?21 -0", "?22 *?14 /?16 ", "?22 *?15 /?16 ", "?23 +?3 -0", "?24 +?5 -0", "?17 *4800/21600", "?20 *2/1", "?27 +?28 -0", "?29 *?14 /?16 ", "?29 *?15 /?16 ", "?30 +?3 -0", "?31 +?5 -0", "?17 *1200/21600", "?17 *600/21600", "?3 +?35 -0", "?25 +?34 -0", "?32 +?21 -0", "logwidth*2977/21600", "logheight*3262/21600", "logwidth*17087/21600", "logheight*17337/21600", "logwidth*67/21600", "logheight*21577/21600", "logwidth*21582/21600", "logheight*1235/21600", "(10800000*atan2(?1 ,?0 ))/pi", "(-11429249)/60000.0", "(7426832)/60000.0", "(-8646143)/60000.0", "(5396714)/60000.0", "(-8748475)/60000.0", "(5983381)/60000.0", "(-7859164)/60000.0", "(7034504)/60000.0", "(-4722533)/60000.0", "(6541615)/60000.0", "(-2776035)/60000.0", "(7816140)/60000.0", "(37501)/60000.0", "(6842000)/60000.0", "(1347096)/60000.0", "(6910353)/60000.0", "(3974558)/60000.0", "(4542661)/60000.0", "(-16496525)/60000.0", "(8804134)/60000.0", "(-14809710)/60000.0", "(9151131)/60000.0", "(0)/60000.0", "(21600000)/60000.0", "(0)/60000.0", "(21600000)/60000.0", "(0)/60000.0", "(21600000)/60000.0", "(5204520)/60000.0", "(1585770)/60000.0", "(4416628)/60000.0", "(686848)/60000.0", "(8257449)/60000.0", "(844866)/60000.0", "(387196)/60000.0", "(959901)/60000.0", "(-4217541)/60000.0", "(4255042)/60000.0", "(1819082)/60000.0", "(1665090)/60000.0", "(-824660)/60000.0", "(891534)/60000.0", "(-8950887)/60000.0", "(1091722)/60000.0", "(-9809656)/60000.0", "(1061181)/60000.0", "(-4002417)/60000.0", "(739161)/60000.0", "(9459261)/60000.0", "(711490)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3900 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14370 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7267 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4365 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7273 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6775 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9220 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5785 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7867 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7720 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10543 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4360 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5918 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4345 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 74 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4693 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26177 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4345 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 76 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6928 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34899 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4360 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5918 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16478 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39090 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 80 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 81 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28827 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34751 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6752 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9215 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 82 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34129 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22954 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5785 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7867 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 84 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 85 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41798 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15354 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5333 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7273 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 86 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 87 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38324 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5426 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 88 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 89 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29078 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3952 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4857 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6595 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 90 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 91 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22141 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4720 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4365 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5945 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 92 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5192 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 94 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 95 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4127 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15789 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6753 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9190 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 96 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 97 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 43200, Height = (long) 43200 }, { Width = (long) 0, Height = (long) 0 }, { Width = (long) 0, Height = (long) 0 }, { Width = (long) 0, Height = (long) 0 }, { Width = (long) 43200, Height = (long) 43200 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* corner */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logheight/?0 ", "100000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(0-$1 ,0,if(?2 -$1 ,$1 ,?2 ))", "?0 *?4 /100000", "?0 *?3 /100000", "logheight+0-?6 ", "?5 *1/2", "(?7 +logheight)/2", "logwidth+0-logheight", "if(?10 ,?7 ,0)", "if(?10 ,logwidth,?5 )", "logwidth", "logwidth/2", "logheight", "logheight/2" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* cornerTabs */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "sqrt(logwidth*logwidth+logheight*logheight+0*0)", "1*?0 /20", "0+logheight-?1 ", "0+logwidth-?1 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* cube */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logheight+0-?2 ", "?3 *1/2", "(?2 +logheight)/2", "logwidth+0-?2 ", "?6 *1/2", "(?2 +logwidth)/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 21, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedConnector2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth", "logheight", "logwidth/2", "logheight/2" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedConnector3 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "logwidth*$0 /100000", "(0+?0 )/2", "(logwidth+?0 )/2", "logheight*3/4", "logheight/2", "logwidth", "logheight", "logheight/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 2 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedConnector4 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "logwidth*$0 /100000", "(0+?0 )/2", "(logwidth+?0 )/2", "(?0 +?2 )/2", "(?2 +logwidth)/2", "logheight*$1 /100000", "(0+?5 )/2", "(0+?6 )/2", "(?6 +?5 )/2", "(logheight+?5 )/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 3 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedConnector5 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logwidth*$2 /100000", "(?0 +?1 )/2", "(0+?0 )/2", "(?0 +?2 )/2", "(?1 +?2 )/2", "(?1 +logwidth)/2", "logheight*$1 /100000", "(0+?7 )/2", "(0+?8 )/2", "(?8 +?7 )/2", "(logheight+?7 )/2", "(?11 +?7 )/2", "(?11 +logheight)/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 4 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedDownArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "?0 *?3 /100000", "?0 *?2 /100000", "(?4 +?5 )/4", "logwidth/2", "?7 +0-?6 ", "?8 *2/1", "?9 *?9 /1", "?4 *?4 /1", "?10 +0-?11 ", "sqrt(?12 )", "?13 *logheight/?9 ", "100000*?14 /?0 ", "if(0-$2 ,0,if(?15 -$2 ,$2 ,?15 ))", "?0 *$2 /100000", "?8 +?4 -0", "logheight*logheight/1", "?17 *?17 /1", "?19 +0-?20 ", "sqrt(?21 )", "?22 *?8 /logheight", "?8 +?23 -0", "?18 +?23 -0", "?5 +0-?4 ", "?26 *1/2", "?24 +0-?27 ", "?25 +?27 -0", "?5 *1/2", "logwidth+0-?30 ", "logheight+0-?17 ", "(10800000*atan2(?23 ,?17 ))/pi", "0+0-?33 ", "logheight+0-?14 ", "(?8 +?18 )/2", "?4 *1/2", "(10800000*atan2(?37 ,?14 ))/pi", "16200000+?33 -0", "16200000+0-?38 ", "?38 +0-5400000", "5400000+?38 -0", "logheight", "logwidth", "logheight", "(?39 )/60000.0", "(?34 )/60000.0", "(16200000)/60000.0", "(?33 )/60000.0", "(?40 )/60000.0", "(?41 )/60000.0", "(10800000)/60000.0", "(?42 )/60000.0", "(?40 )/60000.0", "(?41 )/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(?33 )/60000.0", "(?39 )/60000.0", "(?34 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 2 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedLeftArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "if(0-$0 ,0,if(?2 -$0 ,$0 ,?2 ))", "?0 *?3 /100000", "?0 *?2 /100000", "(?4 +?5 )/4", "logheight/2", "?7 +0-?6 ", "?8 *2/1", "?9 *?9 /1", "?4 *?4 /1", "?10 +0-?11 ", "sqrt(?12 )", "?13 *logwidth/?9 ", "100000*?14 /?0 ", "if(0-$2 ,0,if(?15 -$2 ,$2 ,?15 ))", "?0 *?16 /100000", "?8 +?4 -0", "logwidth*logwidth/1", "?17 *?17 /1", "?19 +0-?20 ", "sqrt(?21 )", "?22 *?8 /logwidth", "?8 +?23 -0", "?18 +?23 -0", "?5 +0-?4 ", "?26 *1/2", "?24 +0-?27 ", "?25 +?27 -0", "?5 *1/2", "logheight+0-?30 ", "0+?17 -0", "(10800000*atan2(?23 ,?17 ))/pi", "0+0-?33 ", "0+?14 -0", "(?8 +?18 )/2", "?4 *1/2", "(10800000*atan2(?37 ,?14 ))/pi", "?38 +0-?33 ", "?33 +?38 -0", "0+0-?38 ", "logwidth", "logheight", "logwidth", "(?33 )/60000.0", "(?39 )/60000.0", "(?41 )/60000.0", "(?40 )/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(?33 )/60000.0", "(?33 )/60000.0", "(?39 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedRightArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "if(0-$0 ,0,if(?2 -$0 ,$0 ,?2 ))", "?0 *?3 /100000", "?0 *?2 /100000", "(?4 +?5 )/4", "logheight/2", "?7 +0-?6 ", "?8 *2/1", "?9 *?9 /1", "?4 *?4 /1", "?10 +0-?11 ", "sqrt(?12 )", "?13 *logwidth/?9 ", "100000*?14 /?0 ", "if(0-$2 ,0,if(?15 -$2 ,$2 ,?15 ))", "?0 *?16 /100000", "?8 +?4 -0", "logwidth*logwidth/1", "?17 *?17 /1", "?19 +0-?20 ", "sqrt(?21 )", "?22 *?8 /logwidth", "?8 +?23 -0", "?18 +?23 -0", "?5 +0-?4 ", "?26 *1/2", "?24 +0-?27 ", "?25 +?27 -0", "?5 *1/2", "logheight+0-?30 ", "logwidth+0-?17 ", "(10800000*atan2(?23 ,?17 ))/pi", "10800000+0-?33 ", "0+0-?33 ", "logwidth+0-?14 ", "(?8 +?18 )/2", "?4 *1/2", "(10800000*atan2(?38 ,?14 ))/pi", "?39 +0-5400000", "5400000+?39 -0", "10800000+0-?39 ", "logwidth", "logheight", "logwidth", "(10800000)/60000.0", "(?35 )/60000.0", "(?34 )/60000.0", "(?33 )/60000.0", "(16200000)/60000.0", "(?40 )/60000.0", "(?42 )/60000.0", "(?41 )/60000.0", "(10800000)/60000.0", "(?35 )/60000.0", "(?34 )/60000.0", "(?33 )/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(?40 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* curvedUpArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "?0 *?3 /100000", "?0 *?2 /100000", "(?4 +?5 )/4", "logwidth/2", "?7 +0-?6 ", "?8 *2/1", "?9 *?9 /1", "?4 *?4 /1", "?10 +0-?11 ", "sqrt(?12 )", "?13 *logheight/?9 ", "100000*?14 /?0 ", "if(0-$2 ,0,if(?15 -$2 ,$2 ,?15 ))", "?0 *$2 /100000", "?8 +?4 -0", "logheight*logheight/1", "?17 *?17 /1", "?19 +0-?20 ", "sqrt(?21 )", "?22 *?8 /logheight", "?8 +?23 -0", "?18 +?23 -0", "?5 +0-?4 ", "?26 *1/2", "?24 +0-?27 ", "?25 +?27 -0", "?5 *1/2", "logwidth+0-?30 ", "0+?17 -0", "(10800000*atan2(?23 ,?17 ))/pi", "0+0-?33 ", "0+?14 -0", "(?8 +?18 )/2", "?4 *1/2", "(10800000*atan2(?37 ,?14 ))/pi", "?38 +0-?33 ", "0+0-?39 ", "5400000+0-?33 ", "?33 +?38 -0", "5400000+0-?38 ", "logwidth", "logheight", "logheight", "(?41 )/60000.0", "(?42 )/60000.0", "(?43 )/60000.0", "(?39 )/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(?43 )/60000.0", "(?39 )/60000.0", "(?41 )/60000.0", "(?33 )/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* decagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 105146 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "logheight/2", "?0 *$0 /100000", "logwidth/2", "?2 *cos(pi*(2160000)/10800000)", "?2 *cos(pi*(4320000)/10800000)", "logwidth/2", "?5 +0-?3 ", "?5 +0-?4 ", "?5 +?4 -0", "?5 +?3 -0", "?1 *sin(pi*(4320000)/10800000)", "?1 *sin(pi*(2160000)/10800000)", "logheight/2", "?12 +0-?10 ", "?12 +0-?11 ", "?12 +?11 -0", "?12 +?10 -0", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* diagStripe */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "logwidth*?0 /100000", "?1 *1/2", "(?1 +logwidth)/2", "logheight*?0 /100000", "?4 *1/2", "(?4 +logheight)/2", "logwidth/2", "logheight/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* diamond */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logheight*3/4", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/4", "logheight/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* dodecagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*2894/21600", "logwidth*7906/21600", "logwidth*13694/21600", "logwidth*18706/21600", "logheight*2894/21600", "logheight*7906/21600", "logheight*13694/21600", "logheight*18706/21600", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* donut */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth/2", "?3 +0-?2 ", "logheight/2", "?5 +0-?2 ", "?3 *cos(pi*(2700000)/10800000)", "?5 *sin(pi*(2700000)/10800000)", "logwidth/2", "?9 +0-?7 ", "?9 +?7 -0", "logheight/2", "?12 +0-?8 ", "?12 +?8 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* doubleWave */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 6250 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(12500-$0 ,$0 ,12500))", "if(-10000-$1 ,-10000,if(10000-$1 ,$1 ,10000))", "logheight*?0 /100000", "?2 *10/3", "?2 +0-?3 ", "?2 +?3 -0", "logheight+0-?2 ", "?6 +0-?3 ", "?6 +?3 -0", "logwidth*?1 /100000", "logwidth*?1 /50000", "abs(?9 )", "if(?10 ,0,?10 )", "0+0-?12 ", "if(?10 ,?10 ,0)", "logwidth+0-?14 ", "(?12 +?15 )/6", "?13 +?16 -0", "(?12 +?15 )/3", "?13 +?18 -0", "(?13 +?15 )/2", "?20 +?16 -0", "(?21 +?15 )/2", "0+?14 -0", "logwidth+?12 -0", "?23 +?16 -0", "?23 +?18 -0", "(?23 +?24 )/2", "?27 +?16 -0", "(?28 +?24 )/2", "logwidth+0-?11 ", "logwidth/2", "?31 +?9 -0", "max(?13 ,?23 )", "min(?15 ,?24 )", "logheight*?0 /50000", "logheight+0-?35 ", "logheight", "logheight/2" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12500 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -10000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 3, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* downArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logheight/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "logheight+0-?4 ", "logwidth*?2 /200000", "logwidth/2", "?7 +0-?6 ", "?7 +?6 -0", "logwidth/2", "?8 *?4 /?10 ", "?5 +?11 -0", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* downArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 64977 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "100000*logheight/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "?6 *?0 /logheight", "100000+0-?7 ", "if(0-$3 ,0,if(?8 -$3 ,$3 ,?8 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logwidth/2", "?12 +0-?10 ", "?12 +0-?11 ", "?12 +?11 -0", "?12 +?10 -0", "?0 *?6 /100000", "logheight+0-?17 ", "logheight*?9 /100000", "?19 *1/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* ellipse */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +0-?1 ", "?4 +?1 -0", "logheight/2", "?7 +0-?3 ", "?7 +?3 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* ellipseRibbon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(25000-$1 ,25000,if(75000-$1 ,$1 ,75000))", "100000+0-?0 ", "?2 *1/2", "?0 +0-?3 ", "max(0,?4 )", "if(?5 -$2 ,?5 ,if(?0 -$2 ,$2 ,?0 ))", "logwidth*?1 /200000", "logwidth/2", "?8 +0-?7 ", "logwidth/8", "?9 +?10 -0", "logwidth+0-?11 ", "logwidth+0-?9 ", "logwidth+0-?10 ", "logheight*?6 /100000", "4*?15 /logwidth", "?11 *?11 /logwidth", "?11 +0-?17 ", "?16 *?18 /1", "?11 *1/2", "?16 *?20 /1", "logwidth+0-?20 ", "logheight*?0 /100000", "?23 +0-?15 ", "?9 *?9 /logwidth", "?9 +0-?25 ", "?16 *?26 /1", "?27 +?24 -0", "?15 +?24 -?28 ", "?29 +?15 -0", "?30 +?24 -0", "logheight+0-?23 ", "?15 *14/16", "(?33 +?32 )/2", "?27 +?32 -0", "?28 +?32 -0", "?9 *1/2", "?16 *?37 /1", "?38 +?32 -0", "logwidth+0-?37 ", "?31 +?32 -0", "?19 +?24 -0", "?23 +?23 -?42 ", "logheight+0-?15 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* ellipseRibbon2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(25000-$1 ,25000,if(75000-$1 ,$1 ,75000))", "100000+0-?0 ", "?2 *1/2", "?0 +0-?3 ", "max(0,?4 )", "if(?5 -$2 ,?5 ,if(?0 -$2 ,$2 ,?0 ))", "logwidth*?1 /200000", "logwidth/2", "?8 +0-?7 ", "logwidth/8", "?9 +?10 -0", "logwidth+0-?11 ", "logwidth+0-?9 ", "logwidth+0-?10 ", "logheight*?6 /100000", "4*?15 /logwidth", "?11 *?11 /logwidth", "?11 +0-?17 ", "?16 *?18 /1", "logheight+0-?19 ", "?11 *1/2", "?16 *?21 /1", "logheight+0-?22 ", "logwidth+0-?21 ", "logheight*?0 /100000", "?25 +0-?15 ", "?9 *?9 /logwidth", "?9 +0-?27 ", "?16 *?28 /1", "?29 +?26 -0", "logheight+0-?30 ", "?15 +?26 -?30 ", "?32 +?15 -0", "?33 +?26 -0", "logheight+0-?34 ", "logheight+0-?25 ", "?15 *14/16", "(?37 +?36 )/2", "logheight+0-?38 ", "?29 +?36 -0", "logheight+0-?40 ", "?30 +?36 -0", "logheight+0-?42 ", "?9 *1/2", "?16 *?44 /1", "?45 +?36 -0", "logheight+0-?46 ", "logwidth+0-?44 ", "?34 +?36 -0", "logheight+0-?49 ", "?19 +?26 -0", "logheight+0-?51 ", "?25 +?25 -?51 ", "logheight+0-?53 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartAlternateProcess */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)/6", "logwidth+0-?0 ", "logheight+0-?0 ", "?0 *29289/100000", "logwidth+0-?3 ", "logheight+0-?3 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartCollate */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logheight*3/4", "logwidth/2", "logheight/2", "logheight", "logwidth/4", "logheight/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartConnector */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +0-?1 ", "?4 +?1 -0", "logheight/2", "?7 +0-?3 ", "?7 +?3 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartDecision */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logheight*3/4", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/4", "logheight/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartDelay */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +?1 -0", "logheight/2", "?6 +0-?3 ", "?6 +?3 -0", "logheight", "logwidth", "(16200000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartDisplay */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*5/6", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/6", "(16200000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 6, Height = (long) 6 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartDocument */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*17322/21600", "logheight*20172/21600", "logwidth/2", "logheight/2", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17322 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17322 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23922 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20172 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartExtract */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logwidth/2", "logwidth/4", "logheight/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartInputOutput */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*2/5", "logwidth*3/5", "logwidth*4/5", "logwidth*9/10", "logwidth/2", "logwidth/10", "logheight/2", "logheight", "logwidth/5" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 5, Height = (long) 5 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartInternalStorage */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/8", "logheight/8" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 1, Height = (long) 1 }, { Width = (long) 8, Height = (long) 8 }, { Width = (long) 1, Height = (long) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartMagneticDisk */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*5/6", "logwidth/2", "logheight/3", "logheight/2", "logheight", "logwidth", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 6, Height = (long) 6 }, { Width = (long) 6, Height = (long) 6 }, { Width = (long) 6, Height = (long) 6 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartMagneticDrum */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*2/3", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/6", "(16200000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 6, Height = (long) 6 }, { Width = (long) 6, Height = (long) 6 }, { Width = (long) 6, Height = (long) 6 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartMagneticTape */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +0-?1 ", "?4 +?1 -0", "logheight/2", "?7 +0-?3 ", "?7 +?3 -0", "(10800000*atan2(logheight,logwidth))/pi", "logheight", "logwidth", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(?10 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartManualInput */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "logheight/10", "logheight/2", "logheight", "logwidth", "logheight/5" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 5, Height = (long) 5 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartManualOperation */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*4/5", "logwidth*9/10", "logwidth/2", "logwidth/10", "logheight/2", "logheight", "logwidth/5" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 5, Height = (long) 5 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartMerge */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logwidth/2", "logwidth/4", "logheight/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartMultidocument */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*3675/21600", "logheight*20782/21600", "logwidth*9298/21600", "logwidth*12286/21600", "logwidth*18595/21600", "logheight/2", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20782 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23542 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23542 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20782 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20782 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23542 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18022 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18595 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16352 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19298 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16252 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14467 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14392 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2972 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1815 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3675 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 }, { Width = (long) 21600, Height = (long) 21600 }, { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartOfflineStorage */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logheight/2", "logwidth/2", "logheight", "logwidth/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 }, { Width = (long) 5, Height = (long) 5 }, { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartOffpageConnector */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*4/5", "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 10, Height = (long) 10 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartOnlineStorage */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*5/6", "logwidth/2", "logheight/2", "logheight", "logwidth/6", "(16200000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 6, Height = (long) 6 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartOr */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +0-?1 ", "?4 +?1 -0", "logheight/2", "?7 +0-?3 ", "?7 +?3 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartPredefinedProcess */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*7/8", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/8" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 1, Height = (long) 1 }, { Width = (long) 8, Height = (long) 8 }, { Width = (long) 1, Height = (long) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartPreparation */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*4/5", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/5" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 10, Height = (long) 10 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartProcess */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 1, Height = (long) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartPunchedCard */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "logheight/2", "logheight", "logwidth", "logheight/5" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 5, Height = (long) 5 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartPunchedTape */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*9/10", "logheight*4/5", "logwidth/2", "logheight/10", "logheight/2", "logwidth", "logheight/5", "(10800000)/60000.0", "(-10800000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 20, Height = (long) 20 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartSort */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*3/4", "logheight*3/4", "logwidth/2", "logheight/2", "logheight", "logwidth", "logwidth/4", "logheight/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 2, Height = (long) 2 }, { Width = (long) 2, Height = (long) 2 }, { Width = (long) 2, Height = (long) 2 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartSummingJunction */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "?0 *cos(pi*(2700000)/10800000)", "logheight/2", "?2 *sin(pi*(2700000)/10800000)", "logwidth/2", "?4 +0-?1 ", "?4 +?1 -0", "logheight/2", "?7 +0-?3 ", "?7 +?3 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* flowChartTerminator */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*1018/21600", "logwidth*20582/21600", "logheight*3163/21600", "logheight*18437/21600", "logwidth/2", "logheight/2", "logheight", "logwidth", "(16200000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3475 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18125 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3475 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10800 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3475 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3475 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10800 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* foldedCorner */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "?2 *1/5", "logwidth+0-?2 ", "?4 +?3 -0", "logheight+0-?2 ", "?6 +?3 -0", "logheight", "logwidth/2", "logheight/2", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* frame */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* funnel */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "min(logwidth,logheight)", "?0 *1/20", "logwidth/2", "?2 +0-?1 ", "logheight/4", "?4 +0-?1 ", "?2 *cos(pi*(480000)/10800000)", "?4 *sin(pi*(480000)/10800000)", "(10800000*atan2(?7 ,?6 ))/pi", "?8 *2/1", "10800000+0-?8 ", "10800000+2-0", "10800000+0-2", "?2 *1/4", "?4 *1/4", "?4 *cos(pi*(?10 )/10800000)", "?2 *sin(pi*(?10 )/10800000)", "sqrt(?15 *?15 +?16 *?16 +0*0)", "?2 *?4 /?17 ", "?18 *cos(pi*(?10 )/10800000)", "?18 *sin(pi*(?10 )/10800000)", "logwidth/2", "?21 +?19 -0", "?4 +?20 -0", "?14 *cos(pi*(?8 )/10800000)", "?13 *sin(pi*(?8 )/10800000)", "sqrt(?24 *?24 +?25 *?25 +0*0)", "?13 *?14 /?26 ", "?27 *cos(pi*(?8 )/10800000)", "?27 *sin(pi*(?8 )/10800000)", "?21 +?28 -0", "logheight+0-?14 ", "?31 +?29 -0", "?2 +0-?3 ", "10800000*2/1", "logwidth", "logheight", "(?10 )/60000.0", "(?11 )/60000.0", "(?8 )/60000.0", "(?12 )/60000.0", "(10800000)/60000.0", "(-21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* gear6 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 15000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 3526 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(20000-$0 ,$0 ,20000))", "if(0-$1 ,0,if(5358-$1 ,$1 ,5358))", "min(logwidth,logheight)", "?2 *?0 /100000", "?2 *?1 /100000", "?3 *1/2", "?4 *1/2", "?5 +?6 -0", "logheight/2", "?8 +0-?3 ", "logwidth/2", "?10 +0-?3 ", "?11 +0-?9 ", "if(?12 ,?9 ,?11 )", "(10800000*atan2(?7 ,?13 ))/pi", "19800000+0-?14 ", "19800000+?14 -0", "?11 *cos(pi*(?15 )/10800000)", "?9 *sin(pi*(?15 )/10800000)", "(10800000*atan2(?18 ,?17 ))/pi", "?9 *cos(pi*(?19 )/10800000)", "?11 *sin(pi*(?19 )/10800000)", "sqrt(?20 *?20 +?21 *?21 +0*0)", "?11 *?9 /?22 ", "?23 *cos(pi*(?19 )/10800000)", "?23 *sin(pi*(?19 )/10800000)", "logwidth/2", "?26 +?24 -0", "logheight/2", "?28 +?25 -0", "?11 *cos(pi*(?16 )/10800000)", "?9 *sin(pi*(?16 )/10800000)", "(10800000*atan2(?31 ,?30 ))/pi", "?9 *cos(pi*(?32 )/10800000)", "?11 *sin(pi*(?32 )/10800000)", "sqrt(?33 *?33 +?34 *?34 +0*0)", "?11 *?9 /?35 ", "?36 *cos(pi*(?32 )/10800000)", "?36 *sin(pi*(?32 )/10800000)", "?26 +?37 -0", "?28 +?38 -0", "?27 +0-?39 ", "?29 +0-?40 ", "sqrt(?41 *?41 +?42 *?42 +0*0)", "(10800000*atan2(?41 ,?42 ))/pi", "?4 *sin(pi*(?44 )/10800000)", "?4 *cos(pi*(?44 )/10800000)", "?39 +?45 -0", "?40 +?46 -0", "?27 +0-?45 ", "?29 +0-?46 ", "?3 *sin(pi*(?44 )/10800000)", "?3 *cos(pi*(?44 )/10800000)", "?48 +?51 -0", "?47 +0-?52 ", "?50 +?51 -0", "?49 +0-?52 ", "16200000+?14 -0", "?11 *cos(pi*(?57 )/10800000)", "?9 *sin(pi*(?57 )/10800000)", "(10800000*atan2(?59 ,?58 ))/pi", "?9 *cos(pi*(?60 )/10800000)", "?11 *sin(pi*(?60 )/10800000)", "sqrt(?61 *?61 +?62 *?62 +0*0)", "?11 *?9 /?63 ", "?64 *cos(pi*(?60 )/10800000)", "?64 *sin(pi*(?60 )/10800000)", "?26 +?65 -0", "?28 +?66 -0", "?26 +0-?65 ", "?67 +0-?4 ", "?69 +?4 -0", "?68 +0-?3 ", "?19 +0-?60 ", "1800000+0-?14 ", "1800000+?14 -0", "?11 *cos(pi*(?74 )/10800000)", "?9 *sin(pi*(?74 )/10800000)", "(10800000*atan2(?77 ,?76 ))/pi", "logheight+0-?40 ", "?11 *cos(pi*(?75 )/10800000)", "?9 *sin(pi*(?75 )/10800000)", "(10800000*atan2(?81 ,?80 ))/pi", "logheight+0-?29 ", "logheight+0-?55 ", "logheight+0-?53 ", "?54 ", "?78 +0-?32 ", "5400000+?14 -0", "?11 *cos(pi*(?88 )/10800000)", "?9 *sin(pi*(?88 )/10800000)", "(10800000*atan2(?90 ,?89 ))/pi", "logheight+0-?68 ", "logheight+0-?72 ", "9000000+?14 -0", "?11 *cos(pi*(?94 )/10800000)", "?9 *sin(pi*(?94 )/10800000)", "(10800000*atan2(?96 ,?95 ))/pi", "logwidth+0-?39 ", "logwidth+0-?54 ", "logwidth+0-?56 ", "12600000+?14 -0", "?11 *cos(pi*(?101 )/10800000)", "?9 *sin(pi*(?101 )/10800000)", "(10800000*atan2(?103 ,?102 ))/pi", "logwidth+0-?27 ", "logwidth+0-?56 ", "logwidth+0-?54 ", "(?56 +?54 )/2", "(?55 +?53 )/2", "logheight+0-?109 ", "(logwidth+0)/?108 ", "(?32 )/60000.0", "(?87 )/60000.0", "(?82 )/60000.0", "(?73 )/60000.0", "(?91 )/60000.0", "(?73 )/60000.0", "(?97 )/60000.0", "(?87 )/60000.0", "(?104 )/60000.0", "(?73 )/60000.0", "(?60 )/60000.0", "(?73 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5358 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 112 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 113 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 85 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 84 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 114 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 115 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 92 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 116 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 117 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 84 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 99 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 85 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 98 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 118 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 119 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 107 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 106 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 105 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 120 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 121 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 122 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 123 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 105 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* gear9 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 10000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 1763 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(20000-$0 ,$0 ,20000))", "if(0-$1 ,0,if(2679-$1 ,$1 ,2679))", "min(logwidth,logheight)", "?2 *?0 /100000", "?2 *?1 /100000", "?3 *1/2", "?4 *1/2", "?5 +?6 -0", "logheight/2", "?8 +0-?3 ", "logwidth/2", "?10 +0-?3 ", "?11 +0-?9 ", "if(?12 ,?9 ,?11 )", "(10800000*atan2(?7 ,?13 ))/pi", "18600000+0-?14 ", "18600000+?14 -0", "?11 *cos(pi*(?15 )/10800000)", "?9 *sin(pi*(?15 )/10800000)", "(10800000*atan2(?18 ,?17 ))/pi", "?9 *cos(pi*(?19 )/10800000)", "?11 *sin(pi*(?19 )/10800000)", "sqrt(?20 *?20 +?21 *?21 +0*0)", "?11 *?9 /?22 ", "?23 *cos(pi*(?19 )/10800000)", "?23 *sin(pi*(?19 )/10800000)", "logwidth/2", "?26 +?24 -0", "logheight/2", "?28 +?25 -0", "?11 *cos(pi*(?16 )/10800000)", "?9 *sin(pi*(?16 )/10800000)", "(10800000*atan2(?31 ,?30 ))/pi", "?9 *cos(pi*(?32 )/10800000)", "?11 *sin(pi*(?32 )/10800000)", "sqrt(?33 *?33 +?34 *?34 +0*0)", "?11 *?9 /?35 ", "?36 *cos(pi*(?32 )/10800000)", "?36 *sin(pi*(?32 )/10800000)", "?26 +?37 -0", "?28 +?38 -0", "?27 +0-?39 ", "?29 +0-?40 ", "sqrt(?41 *?41 +?42 *?42 +0*0)", "(10800000*atan2(?41 ,?42 ))/pi", "?4 *sin(pi*(?44 )/10800000)", "?4 *cos(pi*(?44 )/10800000)", "?39 +?45 -0", "?40 +?46 -0", "?27 +0-?45 ", "?29 +0-?46 ", "?3 *sin(pi*(?44 )/10800000)", "?3 *cos(pi*(?44 )/10800000)", "?48 +?51 -0", "?47 +0-?52 ", "?50 +?51 -0", "?49 +0-?52 ", "21000000+0-?14 ", "21000000+?14 -0", "?11 *cos(pi*(?57 )/10800000)", "?9 *sin(pi*(?57 )/10800000)", "(10800000*atan2(?60 ,?59 ))/pi", "?9 *cos(pi*(?61 )/10800000)", "?11 *sin(pi*(?61 )/10800000)", "sqrt(?62 *?62 +?63 *?63 +0*0)", "?11 *?9 /?64 ", "?65 *cos(pi*(?61 )/10800000)", "?65 *sin(pi*(?61 )/10800000)", "?26 +?66 -0", "?28 +?67 -0", "?11 *cos(pi*(?58 )/10800000)", "?9 *sin(pi*(?58 )/10800000)", "(10800000*atan2(?71 ,?70 ))/pi", "?9 *cos(pi*(?72 )/10800000)", "?11 *sin(pi*(?72 )/10800000)", "sqrt(?73 *?73 +?74 *?74 +0*0)", "?11 *?9 /?75 ", "?76 *cos(pi*(?72 )/10800000)", "?76 *sin(pi*(?72 )/10800000)", "?26 +?77 -0", "?28 +?78 -0", "?68 +0-?79 ", "?69 +0-?80 ", "sqrt(?81 *?81 +?82 *?82 +0*0)", "(10800000*atan2(?81 ,?82 ))/pi", "?4 *sin(pi*(?84 )/10800000)", "?4 *cos(pi*(?84 )/10800000)", "?79 +?85 -0", "?80 +?86 -0", "?68 +0-?85 ", "?69 +0-?86 ", "?3 *sin(pi*(?84 )/10800000)", "?3 *cos(pi*(?84 )/10800000)", "?88 +?91 -0", "?87 +0-?92 ", "?90 +?91 -0", "?89 +0-?92 ", "?61 +0-?32 ", "1800000+0-?14 ", "1800000+?14 -0", "?11 *cos(pi*(?98 )/10800000)", "?9 *sin(pi*(?98 )/10800000)", "(10800000*atan2(?101 ,?100 ))/pi", "?9 *cos(pi*(?102 )/10800000)", "?11 *sin(pi*(?102 )/10800000)", "sqrt(?103 *?103 +?104 *?104 +0*0)", "?11 *?9 /?105 ", "?106 *cos(pi*(?102 )/10800000)", "?106 *sin(pi*(?102 )/10800000)", "?26 +?107 -0", "?28 +?108 -0", "?11 *cos(pi*(?99 )/10800000)", "?9 *sin(pi*(?99 )/10800000)", "(10800000*atan2(?112 ,?111 ))/pi", "?9 *cos(pi*(?113 )/10800000)", "?11 *sin(pi*(?113 )/10800000)", "sqrt(?114 *?114 +?115 *?115 +0*0)", "?11 *?9 /?116 ", "?117 *cos(pi*(?113 )/10800000)", "?117 *sin(pi*(?113 )/10800000)", "?26 +?118 -0", "?28 +?119 -0", "?109 +0-?120 ", "?110 +0-?121 ", "sqrt(?122 *?122 +?123 *?123 +0*0)", "(10800000*atan2(?122 ,?123 ))/pi", "?4 *sin(pi*(?125 )/10800000)", "?4 *cos(pi*(?125 )/10800000)", "?120 +?126 -0", "?121 +?127 -0", "?109 +0-?126 ", "?110 +0-?127 ", "?3 *sin(pi*(?125 )/10800000)", "?3 *cos(pi*(?125 )/10800000)", "?129 +?132 -0", "?128 +0-?133 ", "?131 +?132 -0", "?130 +0-?133 ", "?102 +0-?72 ", "4200000+0-?14 ", "4200000+?14 -0", "?11 *cos(pi*(?139 )/10800000)", "?9 *sin(pi*(?139 )/10800000)", "(10800000*atan2(?142 ,?141 ))/pi", "?9 *cos(pi*(?143 )/10800000)", "?11 *sin(pi*(?143 )/10800000)", "sqrt(?144 *?144 +?145 *?145 +0*0)", "?11 *?9 /?146 ", "?147 *cos(pi*(?143 )/10800000)", "?147 *sin(pi*(?143 )/10800000)", "?26 +?148 -0", "?28 +?149 -0", "?11 *cos(pi*(?140 )/10800000)", "?9 *sin(pi*(?140 )/10800000)", "(10800000*atan2(?153 ,?152 ))/pi", "?9 *cos(pi*(?154 )/10800000)", "?11 *sin(pi*(?154 )/10800000)", "sqrt(?155 *?155 +?156 *?156 +0*0)", "?11 *?9 /?157 ", "?158 *cos(pi*(?154 )/10800000)", "?158 *sin(pi*(?154 )/10800000)", "?26 +?159 -0", "?28 +?160 -0", "?150 +0-?161 ", "?151 +0-?162 ", "sqrt(?163 *?163 +?164 *?164 +0*0)", "(10800000*atan2(?163 ,?164 ))/pi", "?4 *sin(pi*(?166 )/10800000)", "?4 *cos(pi*(?166 )/10800000)", "?161 +?167 -0", "?162 +?168 -0", "?150 +0-?167 ", "?151 +0-?168 ", "?3 *sin(pi*(?166 )/10800000)", "?3 *cos(pi*(?166 )/10800000)", "?170 +?173 -0", "?169 +0-?174 ", "?172 +?173 -0", "?171 +0-?174 ", "?143 +0-?113 ", "6600000+0-?14 ", "6600000+?14 -0", "?11 *cos(pi*(?180 )/10800000)", "?9 *sin(pi*(?180 )/10800000)", "(10800000*atan2(?183 ,?182 ))/pi", "?11 *cos(pi*(?181 )/10800000)", "?9 *sin(pi*(?181 )/10800000)", "(10800000*atan2(?186 ,?185 ))/pi", "logwidth+0-?150 ", "logwidth+0-?178 ", "logwidth+0-?176 ", "?184 +0-?154 ", "9000000+?14 -0", "?11 *cos(pi*(?192 )/10800000)", "?9 *sin(pi*(?192 )/10800000)", "(10800000*atan2(?194 ,?193 ))/pi", "logwidth+0-?109 ", "logwidth+0-?137 ", "logwidth+0-?135 ", "11400000+?14 -0", "?11 *cos(pi*(?199 )/10800000)", "?9 *sin(pi*(?199 )/10800000)", "(10800000*atan2(?201 ,?200 ))/pi", "logwidth+0-?68 ", "logwidth+0-?96 ", "logwidth+0-?94 ", "13800000+?14 -0", "?11 *cos(pi*(?206 )/10800000)", "?9 *sin(pi*(?206 )/10800000)", "(10800000*atan2(?208 ,?207 ))/pi", "logwidth+0-?39 ", "logwidth+0-?27 ", "logwidth+0-?56 ", "logwidth+0-?54 ", "16200000+0-?14 ", "16200000+?14 -0", "?11 *cos(pi*(?215 )/10800000)", "?9 *sin(pi*(?215 )/10800000)", "(10800000*atan2(?217 ,?216 ))/pi", "?9 *cos(pi*(?218 )/10800000)", "?11 *sin(pi*(?218 )/10800000)", "sqrt(?219 *?219 +?220 *?220 +0*0)", "?11 *?9 /?221 ", "?222 *cos(pi*(?218 )/10800000)", "?222 *sin(pi*(?218 )/10800000)", "?26 +?223 -0", "?28 +?224 -0", "?11 *cos(pi*(?214 )/10800000)", "?9 *sin(pi*(?214 )/10800000)", "(10800000*atan2(?228 ,?227 ))/pi", "?26 +0-?223 ", "?225 +0-?4 ", "?230 +?4 -0", "?226 +0-?3 ", "?229 +0-?209 ", "(?56 +?54 )/2", "(?55 +?53 )/2", "(?96 +?94 )/2", "(?95 +?93 )/2", "(?137 +?135 )/2", "(?136 +?134 )/2", "(?178 +?176 )/2", "(?177 +?175 )/2", "(logwidth+0)/?241 ", "(logwidth+0)/?239 ", "(logwidth+0)/?237 ", "(logwidth+0)/?235 ", "(?32 )/60000.0", "(?97 )/60000.0", "(?72 )/60000.0", "(?138 )/60000.0", "(?113 )/60000.0", "(?179 )/60000.0", "(?154 )/60000.0", "(?191 )/60000.0", "(?187 )/60000.0", "(?179 )/60000.0", "(?195 )/60000.0", "(?138 )/60000.0", "(?202 )/60000.0", "(?97 )/60000.0", "(?209 )/60000.0", "(?234 )/60000.0", "(?218 )/60000.0", "(?234 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 225 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 226 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 230 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 226 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2679 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 247 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 248 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 96 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 95 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 94 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 80 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 249 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 250 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 137 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 136 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 135 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 134 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 120 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 121 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 251 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 252 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 178 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 177 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 176 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 175 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 161 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 162 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 253 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 254 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 190 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 175 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 189 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 177 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 188 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 151 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 255 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 256 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 198 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 134 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 197 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 136 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 196 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 110 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 257 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 258 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 205 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 204 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 95 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 203 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 259 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 260 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 213 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 212 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 211 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 261 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 262 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 232 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 233 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 231 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 233 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 225 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 226 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 263 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 264 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 210 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 121 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* halfFrame */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 33333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 33333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?2 /100000", "logheight*?3 /logwidth", "logheight+0-?4 ", "100000*?5 /?0 ", "if(0-$0 ,0,if(?6 -$0 ,$0 ,?6 ))", "?0 *?7 /100000", "?8 *logwidth/logheight", "logwidth+0-?9 ", "?3 *logheight/logwidth", "logheight+0-?11 ", "?3 *1/2", "(?12 +logheight)/2", "(?10 +logwidth)/2", "?8 *1/2", "logheight/2", "logwidth/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* heart */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*49/48", "logwidth*10/48", "logwidth/2", "?2 +0-?0 ", "?2 +0-?1 ", "?2 +?1 -0", "?2 +?0 -0", "logheight/3", "0+0-?7 ", "logwidth*1/6", "logwidth*5/6", "logheight*2/3", "logheight/4", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* heptagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 102572 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" }, { Value = (any) { (long) 105210 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "logwidth/2", "?0 *$0 /100000", "logheight/2", "?2 *$1 /100000", "logheight/2", "?4 *$1 /100000", "?1 *97493/100000", "?1 *78183/100000", "?1 *43388/100000", "?3 *62349/100000", "?3 *22252/100000", "?3 *90097/100000", "logwidth/2", "?12 +0-?6 ", "?12 +0-?7 ", "?12 +0-?8 ", "?12 +?8 -0", "?12 +?7 -0", "?12 +?6 -0", "?5 +0-?9 ", "?5 +?10 -0", "?5 +?11 -0", "logheight+0-?19 " }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* hexagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = (any) { (long) 115470 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "logheight/2", "?3 *$1 /100000", "?0 *?2 /100000", "logwidth+0-?5 ", "?4 *sin(pi*(3600000)/10800000)", "logheight/2", "?8 +0-?7 ", "?8 +?7 -0", "?1 *-1/2", "?2 +?11 -0", "if(?12 ,4,2)", "if(?12 ,3,2)", "if(?12 ,?11 ,0)", "(?2 +?15 )/?11 ", "?16 *?14 /-1", "?13 +?17 -0", "logwidth*?18 /24", "logheight*?18 /24", "logwidth+0-?19 ", "logheight+0-?20 ", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* homePlate */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /100000", "logwidth+0-?3 ", "(?4 +logwidth)/2", "?4 *1/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* horizontalScroll */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(25000-$0 ,$0 ,25000))", "min(logwidth,logheight)", "?1 *?0 /100000", "?2 *1/2", "?2 *1/4", "?2 +?3 -0", "?2 +?2 -0", "logheight+0-?2 ", "logheight+0-?3 ", "?7 +0-?3 ", "logwidth+0-?2 ", "logwidth+0-?3 ", "logwidth/2", "logheight/2", "logwidth", "(0)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(-16200000)/60000.0", "(10800000)/60000.0", "(-10800000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* irregularSeal1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*4627/21600", "logwidth*8485/21600", "logwidth*16702/21600", "logwidth*14522/21600", "logheight*6320/21600", "logheight*8615/21600", "logheight*13937/21600", "logheight*13290/21600", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10800 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5800 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14522 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14155 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5325 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18380 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4457 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16702 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7315 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21097 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8137 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17607 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10475 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13290 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16837 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12942 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18145 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18095 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14020 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14457 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13247 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19737 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10532 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14935 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8485 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7715 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15627 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4762 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17617 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5667 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13937 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 135 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14587 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3722 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11775 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8615 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4627 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7617 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 370 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2295 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7312 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6320 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8352 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2295 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 23 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* irregularSeal2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*9722/21600", "logwidth*5372/21600", "logwidth*11612/21600", "logwidth*14640/21600", "logheight*1887/21600", "logheight*6382/21600", "logheight*12877/21600", "logheight*19712/21600", "logheight*18842/21600", "logheight*15935/21600", "logheight*6645/21600", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11462 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4342 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14790 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14525 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5777 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18007 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3172 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16380 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6532 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6645 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16985 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9402 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18270 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11290 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16380 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12310 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18877 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15632 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14640 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14350 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14942 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17370 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12180 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15935 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11612 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18842 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9872 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17370 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8700 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19712 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7527 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18125 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4917 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4805 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18240 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1285 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17825 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3330 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15370 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12877 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3935 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11592 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1172 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8270 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5372 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7817 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4502 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3625 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8550 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6382 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9722 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1887 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 27 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "0+?4 -0", "logheight*?2 /200000", "logheight/2", "?7 +0-?6 ", "?7 +?6 -0", "logheight/2", "?8 *?4 /?10 ", "?5 +0-?11 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 64977 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "100000*logwidth/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "?6 *?0 /logwidth", "100000+0-?7 ", "if(0-$3 ,0,if(?8 -$3 ,$3 ,?8 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logheight/2", "?12 +0-?10 ", "?12 +0-?11 ", "?12 +?11 -0", "?12 +?10 -0", "?0 *?6 /100000", "logwidth*?9 /100000", "logwidth+0-?18 ", "(?19 +logwidth)/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftBrace */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$1 ,0,if(100000-$1 ,$1 ,100000))", "100000+0-?0 ", "min(?1 ,?0 )", "?2 *1/2", "min(logwidth,logheight)", "?3 *logheight/?4 ", "if(0-$0 ,0,if(?5 -$0 ,$0 ,?5 ))", "?4 *?6 /100000", "logheight*?0 /100000", "?8 +?7 -0", "logwidth/2", "?10 *cos(pi*(2700000)/10800000)", "?7 *sin(pi*(2700000)/10800000)", "logwidth+0-?11 ", "?7 +0-?12 ", "logheight+?12 -?7 ", "logwidth/2", "logwidth", "logheight", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftBracket */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /100000", "logheight+0-?3 ", "logwidth*cos(pi*(2700000)/10800000)", "?3 *sin(pi*(2700000)/10800000)", "logwidth+0-?5 ", "?3 +0-?6 ", "logheight+?6 -?3 ", "logwidth", "logheight/2", "logheight", "logwidth", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftCircularArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) -1142319 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 1142319 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 10800000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" } }
+Equations
+([]string) { "if(0-$4 ,0,if(25000-$4 ,$4 ,25000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(1-$2 ,1,if(21599999-$2 ,$2 ,21599999))", "if(0-$3 ,0,if(21599999-$3 ,$3 ,21599999))", "min(logwidth,logheight)", "?5 *?2 /100000", "?5 *?0 /100000", "?6 *1/2", "logwidth/2", "?9 +?8 -?7 ", "logheight/2", "?11 +?8 -?7 ", "?10 +0-?6 ", "?12 +0-?6 ", "?13 +?8 -0", "?14 +?8 -0", "?15 *sin(pi*(?3 )/10800000)", "?16 *cos(pi*(?3 )/10800000)", "?15 *(cos(atan2(?17 ,?18 )))", "?16 *(sin(atan2(?17 ,?18 )))", "logwidth/2", "?21 +?19 -0", "logheight/2", "?23 +?20 -0", "min(?13 ,?14 )", "?19 *?19 /1", "?20 *?20 /1", "?25 *?25 /1", "?26 +0-?28 ", "?27 +0-?28 ", "?29 *?30 /?26 ", "?31 *1/?27 ", "1+0-?32 ", "sqrt(?33 )", "?29 *1/?19 ", "?35 *1/?20 ", "(1+?34 )/?36 ", "(10800000*atan2(?37 ,1))/pi", "?38 +21600000-0", "if(?38 ,?38 ,?39 )", "?40 +0-?3 ", "?41 +21600000-0", "if(?41 ,?41 ,?42 )", "?43 +0-10800000", "?43 +0-21600000", "if(?44 ,?45 ,?43 )", "abs(?46 )", "?47 *-1/1", "abs($1 )", "?49 *-1/1", "if(?48 -?50 ,?48 ,if(0-?50 ,?50 ,0))", "?3 +?51 -0", "?15 *sin(pi*(?52 )/10800000)", "?16 *cos(pi*(?52 )/10800000)", "?15 *(cos(atan2(?53 ,?54 )))", "?16 *(sin(atan2(?53 ,?54 )))", "?21 +?55 -0", "?23 +?56 -0", "?10 *sin(pi*(?4 )/10800000)", "?12 *cos(pi*(?4 )/10800000)", "?10 *(cos(atan2(?59 ,?60 )))", "?12 *(sin(atan2(?59 ,?60 )))", "?21 +?61 -0", "?23 +?62 -0", "?13 *sin(pi*(?4 )/10800000)", "?14 *cos(pi*(?4 )/10800000)", "?13 *(cos(atan2(?65 ,?66 )))", "?14 *(sin(atan2(?65 ,?66 )))", "?21 +?67 -0", "?23 +?68 -0", "?7 *cos(pi*(?52 )/10800000)", "?7 *sin(pi*(?52 )/10800000)", "?22 +?71 -0", "?24 +?72 -0", "?7 *cos(pi*(?52 )/10800000)", "?7 *sin(pi*(?52 )/10800000)", "?22 +0-?75 ", "?24 +0-?76 ", "?77 +0-?21 ", "?78 +0-?23 ", "?73 +0-?21 ", "?74 +0-?23 ", "min(?10 ,?12 )", "?79 *?83 /?10 ", "?80 *?83 /?12 ", "?81 *?83 /?10 ", "?82 *?83 /?12 ", "?86 +0-?84 ", "?87 +0-?85 ", "sqrt(?88 *?88 +?89 *?89 +0*0)", "?84 *?87 /1", "?86 *?85 /1", "?91 +0-?92 ", "?83 *?83 /1", "?90 *?90 /1", "?94 *?95 /1", "?93 *?93 /1", "?96 +0-?97 ", "max(?98 ,0)", "sqrt(?99 )", "?89 *-1/1", "if(?101 ,-1,1)", "?102 *?88 /1", "?103 *?100 /1", "?93 *?89 /1", "(?105 +?104 )/?95 ", "?105 +0-?104 ", "?107 *1/?95 ", "abs(?89 )", "?109 *?100 /1", "?93 *?88 /-1", "(?111 +?110 )/?95 ", "?111 +0-?110 ", "?113 *1/?95 ", "?86 +0-?106 ", "?86 +0-?108 ", "?87 +0-?112 ", "?87 +0-?114 ", "sqrt(?115 *?115 +?117 *?117 +0*0)", "sqrt(?116 *?116 +?118 *?118 +0*0)", "?120 +0-?119 ", "if(?121 ,?106 ,?108 )", "if(?121 ,?112 ,?114 )", "?122 *?10 /?83 ", "?123 *?12 /?83 ", "?21 +?124 -0", "?23 +?125 -0", "?79 *?25 /?13 ", "?80 *?25 /?14 ", "?81 *?25 /?13 ", "?82 *?25 /?14 ", "?130 +0-?128 ", "?131 +0-?129 ", "sqrt(?132 *?132 +?133 *?133 +0*0)", "?128 *?131 /1", "?130 *?129 /1", "?135 +0-?136 ", "?25 *?25 /1", "?134 *?134 /1", "?138 *?139 /1", "?137 *?137 /1", "?140 +0-?141 ", "max(?142 ,0)", "sqrt(?143 )", "?102 *?132 /1", "?145 *?144 /1", "?137 *?133 /1", "(?147 +?146 )/?139 ", "?147 +0-?146 ", "?149 *1/?139 ", "abs(?133 )", "?151 *?144 /1", "?137 *?132 /-1", "(?153 +?152 )/?139 ", "?153 +0-?152 ", "?155 *1/?139 ", "?128 +0-?148 ", "?128 +0-?150 ", "?129 +0-?154 ", "?129 +0-?156 ", "sqrt(?157 *?157 +?159 *?159 +0*0)", "sqrt(?158 *?158 +?160 *?160 +0*0)", "?162 +0-?161 ", "if(?163 ,?148 ,?150 )", "if(?163 ,?154 ,?156 )", "?164 *?13 /?25 ", "?165 *?14 /?25 ", "?21 +?166 -0", "?23 +?167 -0", "(10800000*atan2(?167 ,?166 ))/pi", "?170 +21600000-0", "if(?170 ,?170 ,?171 )", "?4 +0-?172 ", "?173 +21600000-0", "if(?173 ,?173 ,?174 )", "?172 +?175 -0", "0+0-?175 ", "?126 +0-?168 ", "?127 +0-?169 ", "sqrt(?178 *?178 +?179 *?179 +0*0)", "?180 *1/2", "?181 +0-?7 ", "if(?182 ,?126 ,?73 )", "if(?182 ,?127 ,?74 )", "if(?182 ,?168 ,?77 )", "if(?182 ,?169 ,?78 )", "(10800000*atan2(?125 ,?124 ))/pi", "?187 +21600000-0", "if(?187 ,?187 ,?188 )", "?189 +0-?4 ", "?190 +0-21600000", "if(?190 ,?191 ,?190 )", "?4 +?192 -0", "0+0-?192 ", "?15 *sin(pi*(?4 )/10800000)", "?16 *cos(pi*(?4 )/10800000)", "?15 *(cos(atan2(?195 ,?196 )))", "?16 *(sin(atan2(?195 ,?196 )))", "?21 +?197 -0", "?23 +?198 -0", "?4 +5400000-0", "?52 +0-5400000", "?52 +10800000-0", "?10 *cos(pi*(2700000)/10800000)", "?12 *sin(pi*(2700000)/10800000)", "?21 +0-?204 ", "?21 +?204 -0", "?23 +0-?205 ", "?23 +?205 -0", "(?176 )/60000.0", "(?177 )/60000.0", "(?193 )/60000.0", "(?194 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 126 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 127 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 210 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 211 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 185 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 186 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 183 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 184 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 126 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 127 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 212 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 213 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 206 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 208 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 207 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 209 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftRightArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "logwidth+0-?4 ", "logheight*?2 /200000", "logheight/2", "?7 +0-?6 ", "?7 +?6 -0", "logheight/2", "?8 *?4 /?10 ", "?4 +0-?11 ", "?5 +?11 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftRightArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 48123 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "50000*logwidth/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "logwidth/2", "?6 *?0 /?7 ", "100000+0-?8 ", "if(0-$3 ,0,if(?9 -$3 ,$3 ,?9 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logheight/2", "?13 +0-?11 ", "?13 +0-?12 ", "?13 +?12 -0", "?13 +?11 -0", "?0 *?6 /100000", "logwidth+0-?18 ", "logwidth*?10 /200000", "logwidth/2", "?21 +0-?20 ", "?21 +?20 -0", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 17 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftRightCircularArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 1142319 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 20457681 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 11942319 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" } }
+Equations
+([]string) { "if(0-$4 ,0,if(25000-$4 ,$4 ,25000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(1-$2 ,1,if(21599999-$2 ,$2 ,21599999))", "if(0-$3 ,0,if(21599999-$3 ,$3 ,21599999))", "min(logwidth,logheight)", "?5 *?2 /100000", "?5 *?0 /100000", "?6 *1/2", "logwidth/2", "?9 +?8 -?7 ", "logheight/2", "?11 +?8 -?7 ", "?10 +0-?6 ", "?12 +0-?6 ", "?13 +?8 -0", "?14 +?8 -0", "?15 *sin(pi*(?3 )/10800000)", "?16 *cos(pi*(?3 )/10800000)", "?15 *(cos(atan2(?17 ,?18 )))", "?16 *(sin(atan2(?17 ,?18 )))", "logwidth/2", "?21 +?19 -0", "logheight/2", "?23 +?20 -0", "min(?13 ,?14 )", "?19 *?19 /1", "?20 *?20 /1", "?25 *?25 /1", "?26 +0-?28 ", "?27 +0-?28 ", "?29 *?30 /?26 ", "?31 *1/?27 ", "1+0-?32 ", "sqrt(?33 )", "?29 *1/?19 ", "?35 *1/?20 ", "(1+?34 )/?36 ", "(10800000*atan2(?37 ,1))/pi", "?38 +21600000-0", "if(?38 ,?38 ,?39 )", "?40 +0-?3 ", "?41 +21600000-0", "if(?41 ,?41 ,?42 )", "?43 +0-10800000", "?43 +0-21600000", "if(?44 ,?45 ,?43 )", "abs(?46 )", "if(0-$1 ,0,if(?47 -$1 ,$1 ,?47 ))", "?3 +?48 -0", "?15 *sin(pi*(?49 )/10800000)", "?16 *cos(pi*(?49 )/10800000)", "?15 *(cos(atan2(?50 ,?51 )))", "?16 *(sin(atan2(?50 ,?51 )))", "?21 +?52 -0", "?23 +?53 -0", "?7 *cos(pi*(?49 )/10800000)", "?7 *sin(pi*(?49 )/10800000)", "?22 +?56 -0", "?24 +?57 -0", "?7 *cos(pi*(?49 )/10800000)", "?7 *sin(pi*(?49 )/10800000)", "?22 +0-?60 ", "?24 +0-?61 ", "?62 +0-?21 ", "?63 +0-?23 ", "?58 +0-?21 ", "?59 +0-?23 ", "min(?10 ,?12 )", "?64 *?68 /?10 ", "?65 *?68 /?12 ", "?66 *?68 /?10 ", "?67 *?68 /?12 ", "?71 +0-?69 ", "?72 +0-?70 ", "sqrt(?73 *?73 +?74 *?74 +0*0)", "?69 *?72 /1", "?71 *?70 /1", "?76 +0-?77 ", "?68 *?68 /1", "?75 *?75 /1", "?79 *?80 /1", "?78 *?78 /1", "?81 +0-?82 ", "max(?83 ,0)", "sqrt(?84 )", "?74 *-1/1", "if(?86 ,-1,1)", "?87 *?73 /1", "?88 *?85 /1", "?78 *?74 /1", "(?90 +?89 )/?80 ", "?90 +0-?89 ", "?92 *1/?80 ", "abs(?74 )", "?94 *?85 /1", "?78 *?73 /-1", "(?96 +?95 )/?80 ", "?96 +0-?95 ", "?98 *1/?80 ", "?71 +0-?91 ", "?71 +0-?93 ", "?72 +0-?97 ", "?72 +0-?99 ", "sqrt(?100 *?100 +?102 *?102 +0*0)", "sqrt(?101 *?101 +?103 *?103 +0*0)", "?105 +0-?104 ", "if(?106 ,?91 ,?93 )", "if(?106 ,?97 ,?99 )", "?107 *?10 /?68 ", "?108 *?12 /?68 ", "?21 +?109 -0", "?23 +?110 -0", "?64 *?25 /?13 ", "?65 *?25 /?14 ", "?66 *?25 /?13 ", "?67 *?25 /?14 ", "?115 +0-?113 ", "?116 +0-?114 ", "sqrt(?117 *?117 +?118 *?118 +0*0)", "?113 *?116 /1", "?115 *?114 /1", "?120 +0-?121 ", "?25 *?25 /1", "?119 *?119 /1", "?123 *?124 /1", "?122 *?122 /1", "?125 +0-?126 ", "max(?127 ,0)", "sqrt(?128 )", "?87 *?117 /1", "?130 *?129 /1", "?122 *?118 /1", "(?132 +?131 )/?124 ", "?132 +0-?131 ", "?134 *1/?124 ", "abs(?118 )", "?136 *?129 /1", "?122 *?117 /-1", "(?138 +?137 )/?124 ", "?138 +0-?137 ", "?140 *1/?124 ", "?113 +0-?133 ", "?113 +0-?135 ", "?114 +0-?139 ", "?114 +0-?141 ", "sqrt(?142 *?142 +?144 *?144 +0*0)", "sqrt(?143 *?143 +?145 *?145 +0*0)", "?147 +0-?146 ", "if(?148 ,?133 ,?135 )", "if(?148 ,?139 ,?141 )", "?149 *?13 /?25 ", "?150 *?14 /?25 ", "?21 +?151 -0", "?23 +?152 -0", "?15 *sin(pi*(?4 )/10800000)", "?16 *cos(pi*(?4 )/10800000)", "?15 *(cos(atan2(?155 ,?156 )))", "?16 *(sin(atan2(?155 ,?156 )))", "?21 +?157 -0", "?23 +?158 -0", "?4 +0-?48 ", "?15 *sin(pi*(?161 )/10800000)", "?16 *cos(pi*(?161 )/10800000)", "?15 *(cos(atan2(?162 ,?163 )))", "?16 *(sin(atan2(?162 ,?163 )))", "?21 +?164 -0", "?23 +?165 -0", "?7 *cos(pi*(?161 )/10800000)", "?7 *sin(pi*(?161 )/10800000)", "?159 +?168 -0", "?160 +?169 -0", "?7 *cos(pi*(?161 )/10800000)", "?7 *sin(pi*(?161 )/10800000)", "?159 +0-?172 ", "?160 +0-?173 ", "?111 +0-?153 ", "?112 +0-?154 ", "sqrt(?176 *?176 +?177 *?177 +0*0)", "?178 *1/2", "?179 +0-?7 ", "if(?180 ,?111 ,?58 )", "if(?180 ,?112 ,?59 )", "if(?180 ,?153 ,?62 )", "if(?180 ,?154 ,?63 )", "(10800000*atan2(?110 ,?109 ))/pi", "?185 +21600000-0", "if(?185 ,?185 ,?186 )", "?187 +0-?3 ", "?188 +21600000-0", "if(?188 ,?188 ,?189 )", "?4 +0-?190 ", "?191 +21600000-0", "if(?191 ,?191 ,?192 )", "?187 +0-?193 ", "?194 +21600000-0", "if(?194 ,?194 ,?195 )", "(10800000*atan2(?152 ,?151 ))/pi", "?197 +21600000-0", "if(?197 ,?197 ,?198 )", "?199 +0-?3 ", "?200 +0-21600000", "if(?200 ,?201 ,?200 )", "?4 +0-?202 ", "?203 +0-21600000", "if(?204 ,?204 ,?203 )", "?205 +0-?199 ", "?206 +0-21600000", "if(?206 ,?207 ,?206 )", "?10 *sin(pi*(?193 )/10800000)", "?12 *cos(pi*(?193 )/10800000)", "?10 *(cos(atan2(?209 ,?210 )))", "?12 *(sin(atan2(?209 ,?210 )))", "?21 +?211 -0", "?23 +?212 -0", "?13 *sin(pi*(?205 )/10800000)", "?14 *cos(pi*(?205 )/10800000)", "?13 *(cos(atan2(?215 ,?216 )))", "?14 *(sin(atan2(?215 ,?216 )))", "?21 +?217 -0", "?23 +?218 -0", "if(?180 ,?213 ,?170 )", "if(?180 ,?214 ,?171 )", "if(?180 ,?219 ,?174 )", "if(?180 ,?220 ,?175 )", "?161 +0-5400000", "?49 +5400000-0", "?49 +10800000-0", "?161 +10800000-0", "?10 *cos(pi*(2700000)/10800000)", "?12 *sin(pi*(2700000)/10800000)", "?21 +0-?229 ", "?21 +?229 -0", "?23 +0-?230 ", "?23 +?230 -0", "(?193 )/60000.0", "(?196 )/60000.0", "(?199 )/60000.0", "(?208 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 213 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 214 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 111 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 112 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 166 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 167 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 221 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 222 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 213 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 214 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 235 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 236 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 181 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 182 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 183 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 184 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 153 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 154 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 237 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 238 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 223 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 224 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 231 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 233 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 232 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 234 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftRightRibbon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$2 ,0,if(33333-$2 ,$2 ,33333))", "100000+0-?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "logwidth/2", "logwidth/32", "?3 +0-?4 ", "min(logwidth,logheight)", "100000*?5 /?6 ", "if(0-$1 ,0,if(?7 -$1 ,$1 ,?7 ))", "?6 *?8 /100000", "logwidth+0-?9 ", "logheight*?2 /200000", "logheight*?0 /-200000", "logheight/2", "?13 +?12 -?11 ", "?13 +?11 -?12 ", "?14 +?11 -0", "logheight+0-?16 ", "?16 *2/1", "logheight+0-?18 ", "?18 +0-?14 ", "logheight+0-?20 ", "?0 *?6 /400000", "logwidth/2", "?23 +0-?4 ", "?23 +?4 -0", "?14 +?22 -0", "?21 +0-?22 ", "logwidth", "logheight", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33333 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftRightUpArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "100000+0-?1 ", "?3 *1/2", "if(0-$2 ,0,if(?4 -$2 ,$2 ,?4 ))", "min(logwidth,logheight)", "?6 *?5 /100000", "?6 *?0 /100000", "logwidth/2", "?9 +0-?8 ", "?9 +?8 -0", "?6 *?2 /200000", "?9 +0-?12 ", "?9 +?12 -0", "logwidth+0-?7 ", "?6 *?0 /50000", "logheight+0-?16 ", "logheight+0-?8 ", "?18 +0-?12 ", "?18 +?12 -0", "?12 *?7 /?8 ", "logwidth+0-?21 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 16 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* leftUpArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "100000+0-?1 ", "if(0-$2 ,0,if(?3 -$2 ,$2 ,?3 ))", "min(logwidth,logheight)", "?5 *?4 /100000", "?5 *?0 /50000", "logwidth+0-?7 ", "logheight+0-?7 ", "?5 *?0 /100000", "logwidth+0-?10 ", "logheight+0-?10 ", "?5 *?2 /200000", "?11 +0-?13 ", "?11 +?13 -0", "?12 +0-?13 ", "?12 +?13 -0", "?13 *?6 /?10 ", "(?6 +?15 )/2", "(?6 +?17 )/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* lightningBolt */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*5022/21600", "logwidth*8472/21600", "logwidth*8757/21600", "logwidth*10012/21600", "logwidth*12860/21600", "logwidth*13917/21600", "logwidth*16577/21600", "logheight*3890/21600", "logheight*6080/21600", "logheight*7437/21600", "logheight*9705/21600", "logheight*12007/21600", "logheight*14277/21600", "logheight*14915/21600", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8472 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12860 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6080 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11050 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6797 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16577 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12007 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14767 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12877 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21600 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10012 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14915 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12222 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13987 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5022 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9705 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7602 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8382 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3890 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "SubViewSize", Handle = (long) 0, Value = (any) { ([]com.sun.star.awt.Size) { { Width = (long) 21600, Height = (long) 21600 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* line */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* lineInv */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathDivide */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 5880 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 11760 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(1000-$0 ,1000,if(36745-$0 ,$0 ,36745))", "0+0-?0 ", "(73490+?1 )/4", "36745*logwidth/logheight", "min(?2 ,?3 )", "if(1000-$2 ,1000,if(?4 -$2 ,$2 ,?4 ))", "-4*?5 /1", "73490+?6 -?0 ", "if(0-$1 ,0,if(?7 -$1 ,$1 ,?7 ))", "logheight*?0 /200000", "logheight*?8 /100000", "logheight*?5 /100000", "logwidth*73490/200000", "logheight/2", "?13 +0-?9 ", "?13 +?9 -0", "?10 +?11 -0", "?14 +0-?16 ", "?17 +0-?11 ", "logheight+0-?18 ", "logwidth/2", "?20 +0-?12 ", "?20 +?12 -0", "?20 +0-?11 ", "logwidth", "(16200000)/60000.0", "(21600000)/60000.0", "(5400000)/60000.0", "(21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36745 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathEqual */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 11760 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(36745-$0 ,$0 ,36745))", "?0 *2/1", "100000+0-2", "if(0-$1 ,0,if(?2 -$1 ,$1 ,?2 ))", "logheight*?0 /100000", "logheight*?3 /200000", "logwidth*73490/200000", "logheight/2", "?7 +0-?5 ", "?7 +?5 -0", "?8 +0-?4 ", "?9 +?4 -0", "logwidth/2", "?12 +0-?6 ", "?12 +?6 -0", "(?10 +?8 )/2", "(?9 +?11 )/2", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36745 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathMinus */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "logheight*?0 /200000", "logwidth*73490/200000", "logheight/2", "?3 +0-?1 ", "?3 +?1 -0", "logwidth/2", "?6 +0-?2 ", "?6 +?2 -0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathMultiply */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "if(0-$0 ,0,if(51965-$0 ,$0 ,51965))", "min(logwidth,logheight)", "?1 *?0 /100000", "(10800000*atan2(logheight,logwidth))/pi", "1*sin(pi*(?3 )/10800000)", "1*cos(pi*(?3 )/10800000)", "1*tan(pi*(?3 )/10800000)", "sqrt(logwidth*logwidth+logheight*logheight+0*0)", "?7 *51965/100000", "?7 +0-?8 ", "?5 *?9 /2", "?4 *?9 /2", "?4 *?2 /2", "?5 *?2 /2", "?10 +0-?12 ", "?11 +?13 -0", "?10 +?12 -0", "?11 +0-?13 ", "logwidth/2", "?18 +0-?16 ", "?19 *?6 /1", "?20 +?17 -0", "logwidth+0-?16 ", "logwidth+0-?14 ", "logheight/2", "?24 +0-?15 ", "?25 *1/?6 ", "?23 +0-?26 ", "?14 +?26 -0", "logheight+0-?15 ", "logheight+0-?17 ", "logheight+0-?21 ", "logwidth+0-?10 ", "logheight+0-?11 " }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51965 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathNotEqual */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 6600000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 11760 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(4200000-$1 ,4200000,if(6600000-$1 ,$1 ,6600000))", "?0 *2/1", "100000+0-2", "if(0-$2 ,0,if(?3 -$2 ,$2 ,?3 ))", "logheight*?0 /100000", "logheight*?4 /200000", "logwidth*73490/200000", "logwidth/2", "?8 +0-?7 ", "?8 +?7 -0", "logheight/2", "?11 +0-?6 ", "?11 +?6 -0", "?12 +0-?5 ", "?13 +?5 -0", "?1 +0-5400000", "logheight/2", "?17 *tan(pi*(?16 )/10800000)", "sqrt(?18 *?18 +?17 *?17 +0*0)", "?19 *?5 /?17 ", "?20 *1/2", "?8 +?18 -?21 ", "?18 *?14 /?17 ", "?22 +0-?23 ", "?18 *?12 /?17 ", "?22 +0-?25 ", "?18 *?13 /?17 ", "?22 +0-?27 ", "?18 *?15 /?17 ", "?22 +0-?29 ", "?18 *2/1", "?22 +0-?31 ", "?22 +?20 -0", "?24 +?20 -0", "?26 +?20 -0", "?28 +?20 -0", "?30 +?20 -0", "?32 +?20 -0", "?5 *?17 /?19 ", "?22 +?39 -0", "?33 +0-?39 ", "if(?16 ,?40 ,?33 )", "if(?16 ,?22 ,?41 )", "?5 *?18 /?19 ", "0+0-?44 ", "if(?16 ,?44 ,0)", "if(?16 ,0,?45 )", "logwidth+0-?42 ", "logwidth+0-?43 ", "logheight+0-?46 ", "logheight+0-?47 ", "(?42 +?43 )/2", "(?49 +?48 )/2", "(?46 +?47 )/2", "(?14 +?12 )/2", "(?13 +?15 )/2", "(?51 +?50 )/2", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 19 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* mathPlus */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 23520 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" } }
+Equations
+([]string) { "if(0-$0 ,0,if(73490-$0 ,$0 ,73490))", "logwidth*73490/200000", "logheight*73490/200000", "min(logwidth,logheight)", "?3 *?0 /200000", "logwidth/2", "?5 +0-?1 ", "?5 +0-?4 ", "?5 +?4 -0", "?5 +?1 -0", "logheight/2", "?10 +0-?2 ", "?10 +0-?4 ", "?10 +?4 -0", "?10 +?2 -0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73490 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* moon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(87500-$0 ,$0 ,87500))", "min(logwidth,logheight)", "?1 *?0 /100000", "?2 *logwidth/?1 ", "?1 +0-?2 ", "?2 *?2 /?4 ", "?1 *?1 /?4 ", "?6 *2/1", "?7 +0-?5 ", "?8 +0-?2 ", "?9 *logwidth/?1 ", "?8 *1/2", "?11 +0-?2 ", "logheight/2", "?12 *?13 /?1 ", "logheight/2", "?15 +0-?14 ", "?15 +?14 -0", "?2 *9598/32768", "?18 *logwidth/?1 ", "?1 +0-?18 ", "?1 *?1 /1", "?20 *?20 /1", "?21 +0-?22 ", "sqrt(?23 )", "?24 *?13 /?1 ", "?15 +0-?25 ", "?15 +?25 -0", "?10 +0-?3 ", "?28 *1/2", "?3 +?29 -logwidth", "?30 *-1/1", "?13 *-1/1", "(10800000*atan2(?32 ,?31 ))/pi", "(10800000*atan2(?13 ,?31 ))/pi", "?34 +0-21600000", "?35 +0-?33 ", "logwidth", "logheight", "logwidth", "(5400000)/60000.0", "(10800000)/60000.0", "(?33 )/60000.0", "(?36 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 87500 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* noSmoking */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth/2", "?3 +0-?2 ", "logheight/2", "?5 +0-?2 ", "(10800000*atan2(logheight,logwidth))/pi", "?6 *cos(pi*(?7 )/10800000)", "?4 *sin(pi*(?7 )/10800000)", "sqrt(?8 *?8 +?9 *?9 +0*0)", "?4 *?6 /?10 ", "?2 *1/2", "(10800000*atan2(?12 ,?11 ))/pi", "?13 *2/1", "-10800000+?14 -0", "(10800000*atan2(logheight,logwidth))/pi", "?16 +0-?13 ", "?17 +0-10800000", "?6 *cos(pi*(?17 )/10800000)", "?4 *sin(pi*(?17 )/10800000)", "sqrt(?19 *?19 +?20 *?20 +0*0)", "?4 *?6 /?21 ", "?22 *cos(pi*(?17 )/10800000)", "?22 *sin(pi*(?17 )/10800000)", "logwidth/2", "?25 +?23 -0", "logheight/2", "?27 +?24 -0", "?25 +0-?23 ", "?27 +0-?24 ", "?3 *cos(pi*(2700000)/10800000)", "?5 *sin(pi*(2700000)/10800000)", "?25 +0-?31 ", "?25 +?31 -0", "?27 +0-?32 ", "?27 +?32 -0", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(?17 )/60000.0", "(?15 )/60000.0", "(?18 )/60000.0", "(?15 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RadiusRangeMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefR", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* nonIsoscelesTrapezoid */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?2 /200000", "?0 *?2 /100000", "?0 *?3 /100000", "logwidth+0-?6 ", "(logwidth+?7 )/2", "logwidth/3", "?9 *?2 /?1 ", "max(?2 ,?3 )", "logheight/3", "?12 *?11 /?1 ", "?9 *?3 /?1 ", "logwidth+0-?14 ", "logheight/2", "logwidth/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* notchedRightArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "logwidth+0-?4 ", "logheight*?2 /200000", "logheight/2", "?7 +0-?6 ", "?7 +?6 -0", "logheight/2", "?6 *?4 /?10 ", "logwidth+0-?11 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* octagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 29289 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "?2 *1/2", "logwidth+0-?5 ", "logheight+0-?5 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* parallelogram */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /200000", "?0 *?2 /100000", "logwidth+0-?3 ", "logwidth+0-?4 ", "?6 *1/2", "logwidth+0-?7 ", "logwidth/2", "?9 *?2 /?1 ", "5*?2 /?1 ", "(1+?11 )/12", "?12 *logwidth/1", "?12 *logheight/1", "logwidth+0-?13 ", "logheight+0-?14 ", "logwidth/2", "logheight*?17 /?4 ", "if(0-?18 ,0,if(logheight-?18 ,?18 ,logheight))", "logheight+0-?19 ", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* pentagon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 105146 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" }, { Value = (any) { (long) 110557 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "logwidth/2", "?0 *$0 /100000", "logheight/2", "?2 *$1 /100000", "logheight/2", "?4 *$1 /100000", "?1 *cos(pi*(1080000)/10800000)", "?1 *cos(pi*(18360000)/10800000)", "?3 *sin(pi*(1080000)/10800000)", "?3 *sin(pi*(18360000)/10800000)", "logwidth/2", "?10 +0-?6 ", "?10 +0-?7 ", "?10 +?7 -0", "?10 +?6 -0", "?5 +0-?8 ", "?5 +0-?9 ", "?15 *?7 /?6 ", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* pie */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 16200000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))", "if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))", "?1 +0-?0 ", "?2 +21600000-0", "if(?2 ,?2 ,?3 )", "logwidth/2", "?5 *sin(pi*(?0 )/10800000)", "logheight/2", "?7 *cos(pi*(?0 )/10800000)", "?5 *(cos(atan2(?6 ,?8 )))", "?7 *(sin(atan2(?6 ,?8 )))", "logwidth/2", "?11 +?9 -0", "logheight/2", "?13 +?10 -0", "?5 *sin(pi*(?1 )/10800000)", "?7 *cos(pi*(?1 )/10800000)", "?5 *(cos(atan2(?15 ,?16 )))", "?7 *(sin(atan2(?15 ,?16 )))", "?11 +?17 -0", "?13 +?18 -0", "?5 *cos(pi*(2700000)/10800000)", "?7 *sin(pi*(2700000)/10800000)", "?11 +0-?21 ", "?11 +?21 -0", "?13 +0-?22 ", "?13 +?22 -0", "logwidth", "logheight", "(?0 )/60000.0", "(?4 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefAngle", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* pieWedge */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth*cos(pi*(13500000)/10800000)", "logheight*sin(pi*(13500000)/10800000)", "logwidth+?0 -0", "logheight+?1 -0", "logwidth", "logheight/2", "logwidth/2", "logheight", "logwidth", "logheight", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* plaque */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "?2 *70711/100000", "logwidth+0-?5 ", "logheight+0-?5 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "(5400000)/60000.0", "(-5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* plaqueTabs */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "sqrt(logwidth*logwidth+logheight*logheight+0*0)", "1*?0 /20", "0+logheight-?1 ", "0+logwidth-?1 ", "logheight", "logwidth", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* plus */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "logwidth+0-logheight", "if(?5 ,0,?2 )", "if(?5 ,logwidth,?3 )", "if(?5 ,?2 ,0)", "if(?5 ,?4 ,logheight)", "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* quadArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 22500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 22500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 22500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "100000+0-?1 ", "?3 *1/2", "if(0-$2 ,0,if(?4 -$2 ,$2 ,?4 ))", "min(logwidth,logheight)", "?6 *?5 /100000", "?6 *?0 /100000", "logwidth/2", "?9 +0-?8 ", "?9 +?8 -0", "?6 *?2 /200000", "?9 +0-?12 ", "?9 +?12 -0", "logwidth+0-?7 ", "logheight/2", "?16 +0-?8 ", "?16 +?8 -0", "?16 +0-?12 ", "?16 +?12 -0", "logheight+0-?7 ", "?12 *?7 /?8 ", "logwidth+0-?22 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 23 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* quadArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 18515 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 18515 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 18515 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 48123 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "50000+0-?0 ", "if(0-$2 ,0,if(?3 -$2 ,$2 ,?3 ))", "?4 *2/1", "100000+0-?5 ", "if(?2 -$3 ,?2 ,if(?6 -$3 ,$3 ,?6 ))", "min(logwidth,logheight)", "?8 *?0 /100000", "?8 *?2 /200000", "?8 *?4 /100000", "logwidth*?7 /200000", "logheight*?7 /200000", "logwidth+0-?11 ", "logwidth/2", "?15 +0-?12 ", "?15 +?12 -0", "?15 +0-?9 ", "?15 +?9 -0", "?15 +0-?10 ", "?15 +?10 -0", "logheight+0-?11 ", "logheight/2", "?23 +0-?13 ", "?23 +?13 -0", "?23 +0-?9 ", "?23 +?9 -0", "?23 +0-?10 ", "?23 +?10 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 31 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* ribbon */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(33333-$0 ,$0 ,33333))", "if(25000-$1 ,25000,if(75000-$1 ,$1 ,75000))", "logwidth/8", "logwidth+0-?2 ", "logwidth*?1 /200000", "logwidth/2", "?5 +0-?4 ", "?5 +?4 -0", "logwidth/32", "?6 +?8 -0", "?7 +0-?8 ", "?6 +?2 -0", "?7 +0-?2 ", "?11 +0-?8 ", "?12 +?8 -0", "logheight*?0 /200000", "logheight*?0 /100000", "logheight+0-?16 ", "?17 *1/2", "logheight*?0 /400000", "logheight+0-?19 ", "?16 +0-?19 ", "logheight", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "logwidth", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33333 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* ribbon2 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(33333-$0 ,$0 ,33333))", "if(25000-$1 ,25000,if(75000-$1 ,$1 ,75000))", "logwidth/8", "logwidth+0-?2 ", "logwidth*?1 /200000", "logwidth/2", "?5 +0-?4 ", "?5 +?4 -0", "logwidth/32", "?6 +?8 -0", "?7 +0-?8 ", "?6 +?2 -0", "?7 +0-?2 ", "?11 +0-?8 ", "?12 +?8 -0", "logheight*?0 /200000", "logheight+0-?15 ", "logheight*?0 /100000", "logheight+0-?17 ", "0+?17 -0", "(?19 +logheight)/2", "logheight*?0 /400000", "logheight+0-?21 ", "?16 +0-?21 ", "logheight", "(5400000)/60000.0", "(-10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "logwidth", "(0)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(-10800000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(-10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33333 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rightArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logwidth/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "logwidth+0-?4 ", "logheight*?2 /200000", "logheight/2", "?7 +0-?6 ", "?7 +?6 -0", "logheight/2", "?8 *?4 /?10 ", "?5 +?11 -0", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rightArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 64977 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "100000*logwidth/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "?6 *?0 /logwidth", "100000+0-?7 ", "if(0-$3 ,0,if(?8 -$3 ,$3 ,?8 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logheight/2", "?12 +0-?10 ", "?12 +0-?11 ", "?12 +?11 -0", "?12 +?10 -0", "?0 *?6 /100000", "logwidth+0-?17 ", "logwidth*?9 /100000", "?19 *1/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rightBrace */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$1 ,0,if(100000-$1 ,$1 ,100000))", "100000+0-?0 ", "min(?1 ,?0 )", "?2 *1/2", "min(logwidth,logheight)", "?3 *logheight/?4 ", "if(0-$0 ,0,if(?5 -$0 ,$0 ,?5 ))", "?4 *?6 /100000", "logheight*?0 /100000", "?8 +0-?7 ", "logheight+0-?7 ", "logwidth/2", "?11 *cos(pi*(2700000)/10800000)", "?7 *sin(pi*(2700000)/10800000)", "0+?12 -0", "?7 +0-?13 ", "logheight+?13 -?7 ", "logwidth/2", "logwidth", "logheight", "(16200000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rightBracket */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 8333 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /100000", "logheight+0-?3 ", "logwidth*cos(pi*(2700000)/10800000)", "?3 *sin(pi*(2700000)/10800000)", "0+?5 -0", "?3 +0-?6 ", "logheight+?6 -?3 ", "logwidth", "logheight", "logheight/2", "logwidth", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* round1Rect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "?2 *29289/100000", "logwidth+0-?4 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "(16200000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* round2DiagRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "min(logwidth,logheight)", "?2 *?0 /100000", "logheight+0-?3 ", "?2 *?1 /100000", "logwidth+0-?5 ", "logheight+0-?5 ", "?3 *29289/100000", "?5 *29289/100000", "?8 +0-?9 ", "if(?10 ,?8 ,?9 )", "logwidth+0-?11 ", "logheight+0-?11 ", "logwidth", "logheight/2", "logwidth/2", "logheight", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* round2SameRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "min(logwidth,logheight)", "?2 *?0 /100000", "logwidth+0-?3 ", "?2 *?1 /100000", "logwidth+0-?5 ", "logheight+0-?5 ", "?3 +0-?5 ", "?3 *29289/100000", "?5 *29289/100000", "if(?8 ,?9 ,?10 )", "logwidth+0-?11 ", "logheight+0-?10 ", "logheight", "logwidth", "logheight/2", "logwidth/2", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* roundRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "logheight+0-?2 ", "?2 *29289/100000", "logwidth+0-?5 ", "logheight+0-?5 ", "logwidth/2", "logheight/2", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* rtTriangle */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logheight*7/12", "logwidth*7/12", "logheight*11/12", "logheight/2", "logheight", "logwidth/2", "logwidth", "logwidth/12" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, , { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* smileyFace */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 4653 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(-4653-$0 ,-4653,if(4653-$0 ,$0 ,4653))", "logwidth*4969/21699", "logwidth*6215/21600", "logwidth*13135/21600", "logwidth*16640/21600", "logheight*7570/21600", "logheight*16515/21600", "logheight*?0 /100000", "?6 +0-?7 ", "?6 +?7 -0", "logheight*?0 /50000", "?9 +?10 -0", "logwidth/2", "?12 *cos(pi*(2700000)/10800000)", "logheight/2", "?14 *sin(pi*(2700000)/10800000)", "logwidth/2", "?16 +0-?13 ", "?16 +?13 -0", "logheight/2", "?19 +0-?15 ", "?19 +?15 -0", "logwidth*1125/21600", "logheight*1125/21600", "logheight", "logwidth", "(10800000)/60000.0", "(21600000)/60000.0", "(10800000)/60000.0", "(21600000)/60000.0", "(10800000)/60000.0", "(21600000)/60000.0", "(10800000)/60000.0", "(21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4653 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -4653 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* snip1Rect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "min(logwidth,logheight)", "?1 *?0 /100000", "logwidth+0-?2 ", "?2 *1/2", "(?3 +logwidth)/2", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* snip2DiagRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "min(logwidth,logheight)", "?2 *?0 /100000", "logwidth+0-?3 ", "logheight+0-?3 ", "?2 *?1 /100000", "logwidth+0-?6 ", "logheight+0-?6 ", "?3 +0-?6 ", "if(?9 ,?3 ,?6 )", "?10 *1/2", "logwidth+0-?11 ", "logheight+0-?11 ", "logwidth", "logheight/2", "logwidth/2", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* snip2SameRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "min(logwidth,logheight)", "?2 *?0 /100000", "logwidth+0-?3 ", "?2 *?1 /100000", "logwidth+0-?5 ", "logheight+0-?5 ", "?3 +0-?5 ", "if(?8 ,?3 ,?5 )", "?9 *1/2", "logwidth+0-?10 ", "?3 *1/2", "(?7 +logheight)/2", "logheight", "logwidth", "logheight/2", "logwidth/2" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* snipRoundRect */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "if(0-$1 ,0,if(50000-$1 ,$1 ,50000))", "min(logwidth,logheight)", "?2 *?0 /100000", "?2 *?1 /100000", "logwidth+0-?4 ", "?3 *29289/100000", "(?5 +logwidth)/2", "logwidth", "logheight/2", "logwidth/2", "logheight", "(10800000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 5 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* squareTabs */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "sqrt(logwidth*logwidth+logheight*logheight+0*0)", "1*?0 /20", "0+logheight-?1 ", "0+logwidth-?1 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star10 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 42533 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = (any) { (long) 105146 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *$1 /100000", "?2 *95106/100000", "?2 *58779/100000", "logwidth/2", "?5 +0-?3 ", "?5 +0-?4 ", "?5 +?4 -0", "?5 +?3 -0", "logheight/2", "?10 *80902/100000", "?10 *30902/100000", "logheight/2", "?13 +0-?11 ", "?13 +0-?12 ", "?13 +?12 -0", "?13 +?11 -0", "?2 *?0 /50000", "?10 *?0 /50000", "?18 *80902/100000", "?18 *30902/100000", "?19 *95106/100000", "?19 *58779/100000", "?5 +0-?18 ", "?5 +0-?20 ", "?5 +0-?21 ", "?5 +?21 -0", "?5 +?20 -0", "?5 +?18 -0", "?13 +0-?22 ", "?13 +0-?23 ", "?13 +?23 -0", "?13 +?22 -0", "?13 +0-?19 ", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 19 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star12 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 37500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *cos(pi*(1800000)/10800000)", "logheight/2", "?3 *sin(pi*(3600000)/10800000)", "logwidth/2", "?5 +0-?2 ", "logwidth*3/4", "?5 +?2 -0", "logheight/2", "?9 +0-?4 ", "logheight*3/4", "?9 +?4 -0", "?1 *?0 /50000", "?3 *?0 /50000", "?13 *cos(pi*(900000)/10800000)", "?13 *cos(pi*(2700000)/10800000)", "?13 *cos(pi*(4500000)/10800000)", "?14 *sin(pi*(4500000)/10800000)", "?14 *sin(pi*(2700000)/10800000)", "?14 *sin(pi*(900000)/10800000)", "?5 +0-?15 ", "?5 +0-?16 ", "?5 +0-?17 ", "?5 +?17 -0", "?5 +?16 -0", "?5 +?15 -0", "?9 +0-?18 ", "?9 +0-?19 ", "?9 +0-?20 ", "?9 +?20 -0", "?9 +?19 -0", "?9 +?18 -0", "?9 +0-?14 ", "logheight/4", "logwidth", "logheight", "logwidth/4" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 23 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star16 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 37500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *92388/100000", "?1 *70711/100000", "?1 *38268/100000", "logheight/2", "?5 *92388/100000", "?5 *70711/100000", "?5 *38268/100000", "logwidth/2", "?9 +0-?2 ", "?9 +0-?3 ", "?9 +0-?4 ", "?9 +?4 -0", "?9 +?3 -0", "?9 +?2 -0", "logheight/2", "?16 +0-?6 ", "?16 +0-?7 ", "?16 +0-?8 ", "?16 +?8 -0", "?16 +?7 -0", "?16 +?6 -0", "?1 *?0 /50000", "?5 *?0 /50000", "?23 *98079/100000", "?23 *83147/100000", "?23 *55557/100000", "?23 *19509/100000", "?24 *98079/100000", "?24 *83147/100000", "?24 *55557/100000", "?24 *19509/100000", "?9 +0-?25 ", "?9 +0-?26 ", "?9 +0-?27 ", "?9 +0-?28 ", "?9 +?28 -0", "?9 +?27 -0", "?9 +?26 -0", "?9 +?25 -0", "?16 +0-?29 ", "?16 +0-?30 ", "?16 +0-?31 ", "?16 +0-?32 ", "?16 +?32 -0", "?16 +?31 -0", "?16 +?30 -0", "?16 +?29 -0", "?23 *cos(pi*(2700000)/10800000)", "?24 *sin(pi*(2700000)/10800000)", "?9 +0-?49 ", "?16 +0-?50 ", "?9 +?49 -0", "?16 +?50 -0", "?16 +0-?24 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 31 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star24 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 37500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *cos(pi*(900000)/10800000)", "?1 *cos(pi*(1800000)/10800000)", "?1 *cos(pi*(2700000)/10800000)", "logwidth/4", "?5 ", "?1 *cos(pi*(4500000)/10800000)", "logheight/2", "?8 *sin(pi*(4500000)/10800000)", "?8 *sin(pi*(3600000)/10800000)", "?8 *sin(pi*(2700000)/10800000)", "logheight/4", "?12 ", "?8 *sin(pi*(900000)/10800000)", "logwidth/2", "?15 +0-?2 ", "?15 +0-?3 ", "?15 +0-?4 ", "?15 +0-?6 ", "?15 +0-?7 ", "?15 +?7 -0", "?15 +?6 -0", "?15 +?4 -0", "?15 +?3 -0", "?15 +?2 -0", "logheight/2", "?26 +0-?9 ", "?26 +0-?10 ", "?26 +0-?11 ", "?26 +0-?13 ", "?26 +0-?14 ", "?26 +?14 -0", "?26 +?13 -0", "?26 +?11 -0", "?26 +?10 -0", "?26 +?9 -0", "?1 *?0 /50000", "?8 *?0 /50000", "?37 *99144/100000", "?37 *92388/100000", "?37 *79335/100000", "?37 *60876/100000", "?37 *38268/100000", "?37 *13053/100000", "?38 *99144/100000", "?38 *92388/100000", "?38 *79335/100000", "?38 *60876/100000", "?38 *38268/100000", "?38 *13053/100000", "?15 +0-?39 ", "?15 +0-?40 ", "?15 +0-?41 ", "?15 +0-?42 ", "?15 +0-?43 ", "?15 +0-?44 ", "?15 +?44 -0", "?15 +?43 -0", "?15 +?42 -0", "?15 +?41 -0", "?15 +?40 -0", "?15 +?39 -0", "?26 +0-?45 ", "?26 +0-?46 ", "?26 +0-?47 ", "?26 +0-?48 ", "?26 +0-?49 ", "?26 +0-?50 ", "?26 +?50 -0", "?26 +?49 -0", "?26 +?48 -0", "?26 +?47 -0", "?26 +?46 -0", "?26 +?45 -0", "?37 *cos(pi*(2700000)/10800000)", "?38 *sin(pi*(2700000)/10800000)", "?15 +0-?75 ", "?26 +0-?76 ", "?15 +?75 -0", "?26 +?76 -0", "?26 +0-?38 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 81 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 63 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 64 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 62 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 61 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 60 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 59 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 58 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 57 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 74 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 82 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 56 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 74 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 55 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 54 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 53 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 47 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 80 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star32 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 37500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *98079/100000", "?1 *92388/100000", "?1 *83147/100000", "?1 *cos(pi*(2700000)/10800000)", "?1 *55557/100000", "?1 *38268/100000", "?1 *19509/100000", "logheight/2", "?9 *98079/100000", "?9 *92388/100000", "?9 *83147/100000", "?9 *sin(pi*(2700000)/10800000)", "?9 *55557/100000", "?9 *38268/100000", "?9 *19509/100000", "logwidth/2", "?17 +0-?2 ", "?17 +0-?3 ", "?17 +0-?4 ", "?17 +0-?5 ", "?17 +0-?6 ", "?17 +0-?7 ", "?17 +0-?8 ", "?17 +?8 -0", "?17 +?7 -0", "?17 +?6 -0", "?17 +?5 -0", "?17 +?4 -0", "?17 +?3 -0", "?17 +?2 -0", "logheight/2", "?32 +0-?10 ", "?32 +0-?11 ", "?32 +0-?12 ", "?32 +0-?13 ", "?32 +0-?14 ", "?32 +0-?15 ", "?32 +0-?16 ", "?32 +?16 -0", "?32 +?15 -0", "?32 +?14 -0", "?32 +?13 -0", "?32 +?12 -0", "?32 +?11 -0", "?32 +?10 -0", "?1 *?0 /50000", "?9 *?0 /50000", "?47 *99518/100000", "?47 *95694/100000", "?47 *88192/100000", "?47 *77301/100000", "?47 *63439/100000", "?47 *47140/100000", "?47 *29028/100000", "?47 *9802/100000", "?48 *99518/100000", "?48 *95694/100000", "?48 *88192/100000", "?48 *77301/100000", "?48 *63439/100000", "?48 *47140/100000", "?48 *29028/100000", "?48 *9802/100000", "?17 +0-?49 ", "?17 +0-?50 ", "?17 +0-?51 ", "?17 +0-?52 ", "?17 +0-?53 ", "?17 +0-?54 ", "?17 +0-?55 ", "?17 +0-?56 ", "?17 +?56 -0", "?17 +?55 -0", "?17 +?54 -0", "?17 +?53 -0", "?17 +?52 -0", "?17 +?51 -0", "?17 +?50 -0", "?17 +?49 -0", "?32 +0-?57 ", "?32 +0-?58 ", "?32 +0-?59 ", "?32 +0-?60 ", "?32 +0-?61 ", "?32 +0-?62 ", "?32 +0-?63 ", "?32 +0-?64 ", "?32 +?64 -0", "?32 +?63 -0", "?32 +?62 -0", "?32 +?61 -0", "?32 +?60 -0", "?32 +?59 -0", "?32 +?58 -0", "?32 +?57 -0", "?47 *cos(pi*(2700000)/10800000)", "?48 *sin(pi*(2700000)/10800000)", "?17 +0-?97 ", "?32 +0-?98 ", "?17 +?97 -0", "?32 +?98 -0", "?32 +0-?48 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 103 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 88 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 87 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 86 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 85 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 84 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 82 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 81 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 81 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 74 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 82 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 83 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 76 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 84 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 85 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 86 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 87 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 80 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 88 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 105 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 80 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 89 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 79 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 90 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 78 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 91 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 77 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 92 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 76 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 94 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 74 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 95 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 73 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 96 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 104 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 72 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 96 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 71 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 95 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 70 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 94 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 69 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 93 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 68 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 92 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 67 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 91 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 66 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 90 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 65 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 89 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 63 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 99 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 101 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 102 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star4 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *?0 /50000", "logheight/2", "?3 *?0 /50000", "?2 *cos(pi*(2700000)/10800000)", "?4 *sin(pi*(2700000)/10800000)", "logwidth/2", "?7 +0-?5 ", "?7 +?5 -0", "logheight/2", "?10 +0-?6 ", "?10 +?6 -0", "?10 +0-?4 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 7 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star5 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 19098 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = (any) { (long) 105146 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" }, { Value = (any) { (long) 110557 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *$1 /100000", "logheight/2", "?3 *$2 /100000", "logheight/2", "?5 *$2 /100000", "?2 *cos(pi*(1080000)/10800000)", "?2 *cos(pi*(18360000)/10800000)", "?4 *sin(pi*(1080000)/10800000)", "?4 *sin(pi*(18360000)/10800000)", "logwidth/2", "?11 +0-?7 ", "?11 +0-?8 ", "?11 +?8 -0", "?11 +?7 -0", "?6 +0-?9 ", "?6 +0-?10 ", "?2 *?0 /50000", "?4 *?0 /50000", "?18 *cos(pi*(20520000)/10800000)", "?18 *cos(pi*(3240000)/10800000)", "?19 *sin(pi*(3240000)/10800000)", "?19 *sin(pi*(20520000)/10800000)", "?11 +0-?20 ", "?11 +0-?21 ", "?11 +?21 -0", "?11 +?20 -0", "?6 +0-?22 ", "?6 +0-?23 ", "?6 +?19 -0", "?6 +0-?19 " }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star6 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 28868 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = (any) { (long) 115470 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *$1 /100000", "?2 *cos(pi*(1800000)/10800000)", "logwidth/2", "?4 +0-?3 ", "?4 +?3 -0", "logheight/2", "logheight/4", "?7 +?8 -0", "?2 *?0 /50000", "logheight/2", "?11 *?0 /50000", "?10 *1/2", "?4 +0-?10 ", "?4 +0-?13 ", "?4 +?13 -0", "?4 +?10 -0", "?12 *sin(pi*(3600000)/10800000)", "?7 +0-?18 ", "?7 +?18 -0", "?7 +0-?12 ", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 11 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star7 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 34601 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" }, { Value = (any) { (long) 102572 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "hf" }, { Value = (any) { (long) 105210 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "vf" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *$1 /100000", "logheight/2", "?3 *$2 /100000", "logheight/2", "?5 *$2 /100000", "?2 *97493/100000", "?2 *78183/100000", "?2 *43388/100000", "?4 *62349/100000", "?4 *22252/100000", "?4 *90097/100000", "logwidth/2", "?13 +0-?7 ", "?13 +0-?8 ", "?13 +0-?9 ", "?13 +?9 -0", "?13 +?8 -0", "?13 +?7 -0", "?6 +0-?10 ", "?6 +?11 -0", "?6 +?12 -0", "?2 *?0 /50000", "?4 *?0 /50000", "?23 *97493/100000", "?23 *78183/100000", "?23 *43388/100000", "?13 +0-?25 ", "?13 +0-?26 ", "?13 +0-?27 ", "?13 +?27 -0", "?13 +?26 -0", "?13 +?25 -0", "?24 *90097/100000", "?24 *22252/100000", "?24 *62349/100000", "?6 +0-?34 ", "?6 +0-?35 ", "?6 +?36 -0", "?6 +?24 -0", "?6 +0-?24 " }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 13 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* star8 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 37500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(50000-$0 ,$0 ,50000))", "logwidth/2", "?1 *cos(pi*(2700000)/10800000)", "logwidth/2", "?3 +0-?2 ", "?3 +?2 -0", "logheight/2", "?6 *sin(pi*(2700000)/10800000)", "logheight/2", "?8 +0-?7 ", "?8 +?7 -0", "?1 *?0 /50000", "?6 *?0 /50000", "?11 *92388/100000", "?11 *38268/100000", "?12 *92388/100000", "?12 *38268/100000", "?3 +0-?13 ", "?3 +0-?14 ", "?3 +?14 -0", "?3 +?13 -0", "?8 +0-?15 ", "?8 +0-?16 ", "?8 +?16 -0", "?8 +?15 -0", "?8 +0-?12 ", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 15 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* straightConnector1 */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}
+Equations
+([]string) { "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) {}
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* stripedRightArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "84375*logwidth/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *5/32", "?0 *?3 /100000", "logwidth+0-?5 ", "logheight*?2 /200000", "logheight/2", "?8 +0-?7 ", "?8 +?7 -0", "logheight/2", "?7 *?5 /?11 ", "logwidth+0-?12 ", "logheight", "logwidth", "min(logwidth,logheight)/32", "min(logwidth,logheight)/16", "min(logwidth,logheight)/8" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* sun */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(12500-$0 ,12500,if(46875-$0 ,$0 ,46875))", "50000+0-?0 ", "?1 *30274/32768", "?1 *12540/32768", "?2 +50000-0", "?3 +50000-0", "50000+0-?2 ", "50000+0-?3 ", "?1 *23170/32768", "50000+?8 -0", "50000+0-?8 ", "?6 *3/4", "?7 *3/4", "?11 +3662-0", "?12 +3662-0", "?12 +12500-0", "100000+0-?11 ", "100000+0-?13 ", "100000+0-?14 ", "100000+0-?15 ", "logwidth*18436/21600", "logheight*3163/21600", "logwidth*3163/21600", "logheight*18436/21600", "logwidth*?9 /100000", "logwidth*?10 /100000", "logwidth*?11 /100000", "logwidth*?13 /100000", "logwidth*?14 /100000", "logwidth*?15 /100000", "logwidth*?16 /100000", "logwidth*?17 /100000", "logwidth*?18 /100000", "logwidth*?19 /100000", "logwidth*?0 /100000", "logwidth*?1 /100000", "logheight*?1 /100000", "logheight*?9 /100000", "logheight*?10 /100000", "logheight*?11 /100000", "logheight*?13 /100000", "logheight*?14 /100000", "logheight*?15 /100000", "logheight*?16 /100000", "logheight*?17 /100000", "logheight*?18 /100000", "logheight*?19 /100000", "logheight/2", "logwidth/2", "logheight", "logwidth", "(10800000)/60000.0", "(21600000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46875 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12500 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* swooshArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(1-$0 ,1,if(75000-$0 ,$0 ,75000))", "min(logwidth,logheight)", "70000*logwidth/?1 ", "if(0-$1 ,0,if(?2 -$1 ,$1 ,?2 ))", "logheight*?0 /100000", "?1 *?3 /100000", "logwidth+0-?5 ", "min(logwidth,logheight)/8", "0+?7 -0", "5400000*1/14", "?7 *tan(pi*(?9 )/10800000)", "?6 +0-?10 ", "?4 *tan(pi*(?9 )/10800000)", "?8 +?4 -0", "?6 +?12 -0", "?14 +?10 -0", "?13 +?7 -0", "?16 +0-0", "?17 *1/2", "logheight*1/20", "0+?18 -?19 ", "logheight/6", "?21 *1/1", "?21 +?22 -0", "logwidth/6", "?24 ", "?21 *1/2", "?13 +?26 -0", "logwidth/4", "?28 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 75000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 16, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* teardrop */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 100000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(200000-$0 ,$0 ,200000))", "sqrt(2)", "logwidth/2", "?2 *?1 /1", "logheight/2", "?4 *?1 /1", "?3 *?0 /100000", "?5 *?0 /100000", "?6 *cos(pi*(2700000)/10800000)", "?7 *sin(pi*(2700000)/10800000)", "logwidth/2", "?10 +?8 -0", "logheight/2", "?12 +0-?9 ", "(?10 +?11 )/2", "(?12 +?13 )/2", "?2 *cos(pi*(2700000)/10800000)", "?4 *sin(pi*(2700000)/10800000)", "?10 +0-?16 ", "?10 +?16 -0", "?12 +0-?17 ", "?12 +?17 -0", "logwidth", "logheight", "(10800000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 200000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 16, Count = (short) 2 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* trapezoid */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "?0 *?2 /200000", "?0 *?2 /100000", "logwidth+0-?4 ", "logwidth+0-?3 ", "logwidth/3", "?7 *?2 /?1 ", "logheight/3", "?9 *?2 /?1 ", "logwidth+0-?8 ", "logwidth/2", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* triangle */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "logwidth*?0 /200000", "logwidth*?0 /100000", "logwidth/2", "?1 +?3 -0", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* upArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "100000*logheight/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "0+?4 -0", "logwidth*?2 /200000", "logwidth/2", "?7 +0-?6 ", "?7 +?6 -0", "logwidth/2", "?8 *?4 /?10 ", "?5 +0-?11 ", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* upArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 64977 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "100000*logheight/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "?6 *?0 /logheight", "100000+0-?7 ", "if(0-$3 ,0,if(?8 -$3 ,$3 ,?8 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logwidth/2", "?12 +0-?10 ", "?12 +0-?11 ", "?12 +?11 -0", "?12 +?10 -0", "?0 *?6 /100000", "logheight*?9 /100000", "logheight+0-?18 ", "(?19 +logheight)/2", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 10 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* upDownArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 50000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logheight/?0 ", "if(0-$0 ,0,if(100000-$0 ,$0 ,100000))", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?0 *?3 /100000", "logheight+0-?4 ", "logwidth*?2 /200000", "logwidth/2", "?7 +0-?6 ", "?7 +?6 -0", "logwidth/2", "?8 *?4 /?10 ", "?4 +0-?11 ", "?5 +?11 -0", "logheight/2", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 9 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* upDownArrowCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 48123 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" } }
+Equations
+([]string) { "min(logwidth,logheight)", "50000*logwidth/?0 ", "if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))", "?2 *2/1", "if(0-$0 ,0,if(?3 -$0 ,$0 ,?3 ))", "50000*logheight/?0 ", "if(0-$2 ,0,if(?5 -$2 ,$2 ,?5 ))", "logheight/2", "?6 *?0 /?7 ", "100000+0-?8 ", "if(0-$3 ,0,if(?9 -$3 ,$3 ,?9 ))", "?0 *?2 /100000", "?0 *?4 /200000", "logwidth/2", "?13 +0-?11 ", "?13 +0-?12 ", "?13 +?12 -0", "?13 +?11 -0", "?0 *?6 /100000", "logheight+0-?18 ", "logheight*?10 /200000", "logheight/2", "?21 +0-?20 ", "?21 +?20 -0", "logwidth", "logheight" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 17 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* uturnArrow */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 25000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" }, { Value = (any) { (long) 43750 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj4" }, { Value = (any) { (long) 75000 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj5" } }
+Equations
+([]string) { "if(0-$1 ,0,if(25000-$1 ,$1 ,25000))", "?0 *2/1", "if(0-$0 ,0,if(?1 -$0 ,$0 ,?1 ))", "min(logwidth,logheight)", "?2 *?3 /logheight", "100000+0-?4 ", "?5 *logheight/?3 ", "if(0-$2 ,0,if(?6 -$2 ,$2 ,?6 ))", "?7 +?2 -0", "?8 *?3 /logheight", "if(?9 -$4 ,?9 ,if(100000-$4 ,$4 ,100000))", "?3 *?2 /100000", "?3 *?0 /100000", "?11 *1/2", "?12 +0-?13 ", "logheight*?10 /100000", "?3 *?7 /100000", "?15 +0-?16 ", "logwidth+0-?14 ", "?18 *1/2", "min(?19 ,?17 )", "?20 *100000/?3 ", "if(0-$3 ,0,if(?21 -$3 ,$3 ,?21 ))", "?3 *?22 /100000", "?23 +0-?11 ", "max(?24 ,0)", "?11 +?25 -0", "logwidth+0-?12 ", "?27 +0-?12 ", "?28 +?14 -0", "?18 +0-?23 ", "?29 +0-?25 ", "(?11 +?29 )/2", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(-5400000)/60000.0", "(16200000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 1 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 2 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 3 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 100000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9 }, Type = (short) 1 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 4 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 6 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* verticalScroll */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj" } }
+Equations
+([]string) { "if(0-$0 ,0,if(25000-$0 ,$0 ,25000))", "min(logwidth,logheight)", "?1 *?0 /100000", "?2 *1/2", "?2 *1/4", "?2 +?3 -0", "?2 +?2 -0", "logwidth+0-?2 ", "logwidth+0-?3 ", "?7 +0-?3 ", "logheight+0-?2 ", "logheight+0-?3 ", "logwidth/2", "logheight/2", "logheight", "(5400000)/60000.0", "(-5400000)/60000.0", "(5400000)/60000.0", "(-10800000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(16200000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(10800000)/60000.0", "(16200000)/60000.0", "(10800000)/60000.0", "(5400000)/60000.0", "(-5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 32 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 51 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 52 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 19, Count = (short) 0 }, { Command = (short) 7, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 2 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 2 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 6, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* wave */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) 12500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "if(0-$0 ,0,if(20000-$0 ,$0 ,20000))", "if(-10000-$1 ,-10000,if(10000-$1 ,$1 ,10000))", "logheight*?0 /100000", "?2 *10/3", "?2 +0-?3 ", "?2 +?3 -0", "logheight+0-?2 ", "?6 +0-?3 ", "?6 +?3 -0", "logwidth*?1 /100000", "logwidth*?1 /50000", "abs(?9 )", "if(?10 ,0,?10 )", "0+0-?12 ", "if(?10 ,?10 ,0)", "logwidth+0-?14 ", "(?12 +?15 )/3", "?13 +?16 -0", "(?17 +?15 )/2", "0+?14 -0", "logwidth+?12 -0", "?19 +?16 -0", "(?21 +?20 )/2", "logwidth+0-?11 ", "logwidth/2", "?24 +?9 -0", "?24 +0-?9 ", "max(?13 ,?19 )", "min(?15 ,?20 )", "logheight*?0 /50000", "logheight+0-?29 ", "logheight", "logheight/2" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }, { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -10000 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 4 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 6 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 3, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* wedgeEllipseCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) -20833 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 62500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logheight*$1 /100000", "logwidth/2", "?2 +?0 -0", "logheight/2", "?4 +?1 -0", "?0 *logheight/1", "?1 *logwidth/1", "(10800000*atan2(?7 ,?6 ))/pi", "?8 +660000-0", "?8 +0-660000", "logwidth/2", "?11 *cos(pi*(?9 )/10800000)", "logheight/2", "?13 *sin(pi*(?9 )/10800000)", "?2 +?12 -0", "?4 +?14 -0", "?11 *cos(pi*(?10 )/10800000)", "?13 *sin(pi*(?10 )/10800000)", "?2 +?17 -0", "?4 +?18 -0", "(10800000*atan2(?14 ,?12 ))/pi", "(10800000*atan2(?18 ,?17 ))/pi", "?22 +0-?21 ", "?23 +21600000-0", "if(?23 ,?23 ,?24 )", "?11 *cos(pi*(2700000)/10800000)", "?13 *sin(pi*(2700000)/10800000)", "?2 +0-?26 ", "?2 +?26 -0", "?4 +0-?27 ", "?4 +?27 -0", "logheight", "logwidth", "(?21 )/60000.0", "(?25 )/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 34 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 28 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* wedgeRectCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) -20833 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 62500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logheight*$1 /100000", "logwidth/2", "?2 +?0 -0", "logheight/2", "?4 +?1 -0", "?3 +0-?2 ", "?5 +0-?4 ", "?0 *logheight/logwidth", "abs(?1 )", "abs(?8 )", "?9 +0-?10 ", "if(?0 ,7,2)", "if(?0 ,10,5)", "logwidth*?12 /12", "logwidth*?13 /12", "if(?1 ,7,2)", "if(?1 ,10,5)", "logheight*?16 /12", "logheight*?17 /12", "if(?0 ,0,?3 )", "if(?11 ,0,?20 )", "if(?1 ,?14 ,?3 )", "if(?11 ,?22 ,?14 )", "if(?0 ,?3 ,logwidth)", "if(?11 ,logwidth,?24 )", "if(?1 ,?3 ,?14 )", "if(?11 ,?26 ,?14 )", "if(?0 ,?18 ,?5 )", "if(?11 ,?18 ,?28 )", "if(?1 ,0,?5 )", "if(?11 ,?30 ,0)", "if(?0 ,?5 ,?18 )", "if(?11 ,?18 ,?32 )", "if(?1 ,?5 ,logheight)", "if(?11 ,?34 ,logheight)", "logheight", "logwidth" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 2, Count = (short) 15 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
+/* wedgeRoundRectCallout */
+AdjustmentValues
+([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { { Value = (any) { (long) -20833 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj1" }, { Value = (any) { (long) 62500 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj2" }, { Value = (any) { (long) 16667 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE, Name = "adj3" } }
+Equations
+([]string) { "logwidth*$0 /100000", "logheight*$1 /100000", "logwidth/2", "?2 +?0 -0", "logheight/2", "?4 +?1 -0", "?0 *logheight/logwidth", "abs(?1 )", "abs(?6 )", "?7 +0-?8 ", "if(?0 ,7,2)", "if(?0 ,10,5)", "logwidth*?10 /12", "logwidth*?11 /12", "if(?1 ,7,2)", "if(?1 ,10,5)", "logheight*?14 /12", "logheight*?15 /12", "if(?0 ,0,?3 )", "if(?9 ,0,?18 )", "if(?1 ,?12 ,?3 )", "if(?9 ,?20 ,?12 )", "if(?0 ,?3 ,logwidth)", "if(?9 ,logwidth,?22 )", "if(?1 ,?3 ,?12 )", "if(?9 ,?24 ,?12 )", "if(?0 ,?16 ,?5 )", "if(?9 ,?16 ,?26 )", "if(?1 ,0,?5 )", "if(?9 ,?28 ,0)", "if(?0 ,?5 ,?16 )", "if(?9 ,?16 ,?30 )", "if(?1 ,?5 ,logheight)", "if(?9 ,?32 ,logheight)", "min(logwidth,logheight)", "?34 *$2 /100000", "logwidth+0-?35 ", "logheight+0-?35 ", "?35 *29289/100000", "logwidth+0-?38 ", "logheight+0-?38 ", "logheight", "logwidth", "(10800000)/60000.0", "(5400000)/60000.0", "(16200000)/60000.0", "(5400000)/60000.0", "(0)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0", "(5400000)/60000.0" }
+Handles
+([][]com.sun.star.beans.PropertyValue) { { { Name = "Position", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeXMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMaximum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RangeYMinimum", Handle = (long) 0, Value = (any) { (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) -2147483647 }, Type = (short) 0 } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefX", Handle = (long) 0, Value = (any) { (long) 0 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "RefY", Handle = (long) 0, Value = (any) { (long) 1 }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } }
+MirroredX
+false
+MirroredY
+false
+Path
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 43 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 44 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 36 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 45 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 46 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 31 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 42 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 37 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 47 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 48 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 33 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 41 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 35 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 49 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 50 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 27 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 16 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 4 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 3 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 38 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 39 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 40 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } }
+Type
+"ooxml-non-primitive"
+ViewBox
+(com.sun.star.awt.Rectangle) { X = (long) 0, Y = (long) 0, Width = (long) 0, Height = (long) 0 }
diff --git a/oox/source/drawingml/customshapes/presetShapeDefinitions.xml b/oox/source/drawingml/customshapes/presetShapeDefinitions.xml
new file mode 100644
index 000000000..7123e27cc
--- /dev/null
+++ b/oox/source/drawingml/customshapes/presetShapeDefinitions.xml
@@ -0,0 +1,19898 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presetShapeDefinitons>
+ <accentBorderCallout1>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 112500" />
+
+ <gd name="adj4" fmla="val -38333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentBorderCallout1>
+ <accentBorderCallout2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 112500" />
+
+ <gd name="adj6" fmla="val -46667" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentBorderCallout2>
+ <accentBorderCallout3>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 100000" />
+
+ <gd name="adj6" fmla="val -16667" />
+
+ <gd name="adj7" fmla="val 112963" />
+
+ <gd name="adj8" fmla="val -8333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ <gd name="y4" fmla="*/ h adj7 100000" />
+ <gd name="x4" fmla="*/ w adj8 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj8" minX="-2147483647" maxX="2147483647" gdRefY="adj7" minY="-2147483647" maxY="2147483647">
+ <pos x="x4" y="y4" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentBorderCallout3>
+ <accentCallout1>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 112500" />
+
+ <gd name="adj4" fmla="val -38333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentCallout1>
+ <accentCallout2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 112500" />
+
+ <gd name="adj6" fmla="val -46667" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentCallout2>
+ <accentCallout3>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 100000" />
+
+ <gd name="adj6" fmla="val -16667" />
+
+ <gd name="adj7" fmla="val 112963" />
+
+ <gd name="adj8" fmla="val -8333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ <gd name="y4" fmla="*/ h adj7 100000" />
+ <gd name="x4" fmla="*/ w adj8 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj8" minX="-2147483647" maxX="2147483647" gdRefY="adj7" minY="-2147483647" maxY="2147483647">
+ <pos x="x4" y="y4" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <close />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </accentCallout3>
+ <actionButtonBackPrevious>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g11" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </actionButtonBackPrevious>
+ <actionButtonBeginning>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1 8" />
+ <gd name="g15" fmla="*/ g13 1 4" />
+ <gd name="g16" fmla="+- g11 g14 0" />
+ <gd name="g17" fmla="+- g11 g15 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g17" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g16" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g16" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g17" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g16" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g16" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g17" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g16" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g16" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonBeginning>
+ <actionButtonBlank>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonBlank>
+ <actionButtonDocument>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="dx1" fmla="*/ ss 9 32" />
+ <gd name="g11" fmla="+- hc 0 dx1" />
+ <gd name="g12" fmla="+- hc dx1 0" />
+ <gd name="g13" fmla="*/ ss 3 16" />
+ <gd name="g14" fmla="+- g12 0 g13" />
+ <gd name="g15" fmla="+- g9 g13 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g11" y="g9" />
+ </moveTo>
+ <lnTo>
+ <pt x="g14" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="g11" y="g9" />
+ </moveTo>
+ <lnTo>
+ <pt x="g14" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g14" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g14" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g14" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g15" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="g9" />
+ </moveTo>
+ <lnTo>
+ <pt x="g14" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g12" y="g15" />
+ </moveTo>
+ <lnTo>
+ <pt x="g14" y="g15" />
+ </lnTo>
+ <lnTo>
+ <pt x="g14" y="g9" />
+ </lnTo>
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonDocument>
+ <actionButtonEnd>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 3 4" />
+ <gd name="g15" fmla="*/ g13 7 8" />
+ <gd name="g16" fmla="+- g11 g14 0" />
+ <gd name="g17" fmla="+- g11 g15 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g16" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g17" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g17" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g16" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g17" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g17" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g16" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g17" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g12" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g17" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonEnd>
+ <actionButtonForwardNext>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g12" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g12" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g12" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g11" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g9" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </actionButtonForwardNext>
+ <actionButtonHelp>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1 7" />
+ <gd name="g15" fmla="*/ g13 3 14" />
+ <gd name="g16" fmla="*/ g13 2 7" />
+ <gd name="g19" fmla="*/ g13 3 7" />
+ <gd name="g20" fmla="*/ g13 4 7" />
+ <gd name="g21" fmla="*/ g13 17 28" />
+ <gd name="g23" fmla="*/ g13 21 28" />
+ <gd name="g24" fmla="*/ g13 11 14" />
+ <gd name="g27" fmla="+- g9 g16 0" />
+ <gd name="g29" fmla="+- g9 g21 0" />
+ <gd name="g30" fmla="+- g9 g23 0" />
+ <gd name="g31" fmla="+- g9 g24 0" />
+ <gd name="g33" fmla="+- g11 g15 0" />
+ <gd name="g36" fmla="+- g11 g19 0" />
+ <gd name="g37" fmla="+- g11 g20 0" />
+ <gd name="g41" fmla="*/ g13 1 14" />
+ <gd name="g42" fmla="*/ g13 3 28" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g33" y="g27" />
+ </moveTo>
+
+ <arcTo wR="g16" hR="g16" stAng="cd2" swAng="cd2" />
+ <arcTo wR="g14" hR="g15" stAng="0" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g29" />
+ </lnTo>
+ <arcTo wR="g14" hR="g15" stAng="cd2" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="g14" hR="g14" stAng="0" swAng="-10800000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="g31" />
+ </moveTo>
+
+ <arcTo wR="g42" hR="g42" stAng="3cd4" swAng="21600000" />
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g33" y="g27" />
+ </moveTo>
+
+ <arcTo wR="g16" hR="g16" stAng="cd2" swAng="cd2" />
+ <arcTo wR="g14" hR="g15" stAng="0" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g29" />
+ </lnTo>
+ <arcTo wR="g14" hR="g15" stAng="cd2" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="g14" hR="g14" stAng="0" swAng="-10800000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="g31" />
+ </moveTo>
+
+ <arcTo wR="g42" hR="g42" stAng="3cd4" swAng="21600000" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g33" y="g27" />
+ </moveTo>
+
+ <arcTo wR="g16" hR="g16" stAng="cd2" swAng="cd2" />
+ <arcTo wR="g14" hR="g15" stAng="0" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g29" />
+ </lnTo>
+ <arcTo wR="g14" hR="g15" stAng="cd2" swAng="cd4" />
+ <arcTo wR="g41" hR="g42" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="g14" hR="g14" stAng="0" swAng="-10800000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="g31" />
+ </moveTo>
+
+ <arcTo wR="g42" hR="g42" stAng="3cd4" swAng="21600000" />
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonHelp>
+ <actionButtonHome>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1 16" />
+ <gd name="g15" fmla="*/ g13 1 8" />
+ <gd name="g16" fmla="*/ g13 3 16" />
+ <gd name="g17" fmla="*/ g13 5 16" />
+ <gd name="g18" fmla="*/ g13 7 16" />
+ <gd name="g19" fmla="*/ g13 9 16" />
+ <gd name="g20" fmla="*/ g13 11 16" />
+ <gd name="g21" fmla="*/ g13 3 4" />
+ <gd name="g22" fmla="*/ g13 13 16" />
+ <gd name="g23" fmla="*/ g13 7 8" />
+ <gd name="g24" fmla="+- g9 g14 0" />
+ <gd name="g25" fmla="+- g9 g16 0" />
+ <gd name="g26" fmla="+- g9 g17 0" />
+ <gd name="g27" fmla="+- g9 g21 0" />
+ <gd name="g28" fmla="+- g11 g15 0" />
+ <gd name="g29" fmla="+- g11 g18 0" />
+ <gd name="g30" fmla="+- g11 g19 0" />
+ <gd name="g31" fmla="+- g11 g20 0" />
+ <gd name="g32" fmla="+- g11 g22 0" />
+ <gd name="g33" fmla="+- g11 g23 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+ <lnTo>
+ <pt x="g11" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g28" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g28" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g26" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g25" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="g32" y="g26" />
+ </moveTo>
+ <lnTo>
+ <pt x="g32" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g25" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g28" y="vc" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g28" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g29" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g29" y="g27" />
+ </lnTo>
+ <lnTo>
+ <pt x="g30" y="g27" />
+ </lnTo>
+ <lnTo>
+ <pt x="g30" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="vc" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g29" y="g27" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g30" y="g27" />
+ </lnTo>
+ <lnTo>
+ <pt x="g30" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g29" y="g10" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+ <lnTo>
+ <pt x="g31" y="g25" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g24" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g26" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g28" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g28" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="vc" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g31" y="g25" />
+ </moveTo>
+ <lnTo>
+ <pt x="g32" y="g26" />
+ </lnTo>
+
+ <moveTo>
+ <pt x="g33" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g28" y="vc" />
+ </lnTo>
+
+ <moveTo>
+ <pt x="g29" y="g10" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g29" y="g27" />
+ </lnTo>
+ <lnTo>
+ <pt x="g30" y="g27" />
+ </lnTo>
+ <lnTo>
+ <pt x="g30" y="g10" />
+ </lnTo>
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonHome>
+ <actionButtonInformation>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1 32" />
+ <gd name="g17" fmla="*/ g13 5 16" />
+ <gd name="g18" fmla="*/ g13 3 8" />
+ <gd name="g19" fmla="*/ g13 13 32" />
+ <gd name="g20" fmla="*/ g13 19 32" />
+ <gd name="g22" fmla="*/ g13 11 16" />
+ <gd name="g23" fmla="*/ g13 13 16" />
+ <gd name="g24" fmla="*/ g13 7 8" />
+ <gd name="g25" fmla="+- g9 g14 0" />
+ <gd name="g28" fmla="+- g9 g17 0" />
+ <gd name="g29" fmla="+- g9 g18 0" />
+ <gd name="g30" fmla="+- g9 g23 0" />
+ <gd name="g31" fmla="+- g9 g24 0" />
+ <gd name="g32" fmla="+- g11 g17 0" />
+ <gd name="g34" fmla="+- g11 g19 0" />
+ <gd name="g35" fmla="+- g11 g20 0" />
+ <gd name="g37" fmla="+- g11 g22 0" />
+ <gd name="g38" fmla="*/ g13 3 32" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+
+ <arcTo wR="dx2" hR="dx2" stAng="3cd4" swAng="21600000" />
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+
+ <arcTo wR="dx2" hR="dx2" stAng="3cd4" swAng="21600000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="g25" />
+ </moveTo>
+
+ <arcTo wR="g38" hR="g38" stAng="3cd4" swAng="21600000" />
+ <moveTo>
+ <pt x="g32" y="g28" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g32" y="g29" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g29" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g28" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="lighten" extrusionOk="false">
+ <moveTo>
+ <pt x="hc" y="g25" />
+ </moveTo>
+
+ <arcTo wR="g38" hR="g38" stAng="3cd4" swAng="21600000" />
+ <moveTo>
+ <pt x="g32" y="g28" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g35" y="g28" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g29" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g29" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="hc" y="g9" />
+ </moveTo>
+
+ <arcTo wR="dx2" hR="dx2" stAng="3cd4" swAng="21600000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="g25" />
+ </moveTo>
+
+ <arcTo wR="g38" hR="g38" stAng="3cd4" swAng="21600000" />
+ <moveTo>
+ <pt x="g32" y="g28" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g35" y="g28" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g31" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g30" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g29" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g29" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonInformation>
+ <actionButtonMovie>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1455 21600" />
+ <gd name="g15" fmla="*/ g13 1905 21600" />
+ <gd name="g16" fmla="*/ g13 2325 21600" />
+ <gd name="g17" fmla="*/ g13 16155 21600" />
+ <gd name="g18" fmla="*/ g13 17010 21600" />
+ <gd name="g19" fmla="*/ g13 19335 21600" />
+ <gd name="g20" fmla="*/ g13 19725 21600" />
+ <gd name="g21" fmla="*/ g13 20595 21600" />
+ <gd name="g22" fmla="*/ g13 5280 21600" />
+ <gd name="g23" fmla="*/ g13 5730 21600" />
+ <gd name="g24" fmla="*/ g13 6630 21600" />
+ <gd name="g25" fmla="*/ g13 7492 21600" />
+ <gd name="g26" fmla="*/ g13 9067 21600" />
+ <gd name="g27" fmla="*/ g13 9555 21600" />
+ <gd name="g28" fmla="*/ g13 13342 21600" />
+ <gd name="g29" fmla="*/ g13 14580 21600" />
+ <gd name="g30" fmla="*/ g13 15592 21600" />
+ <gd name="g31" fmla="+- g11 g14 0" />
+ <gd name="g32" fmla="+- g11 g15 0" />
+ <gd name="g33" fmla="+- g11 g16 0" />
+ <gd name="g34" fmla="+- g11 g17 0" />
+ <gd name="g35" fmla="+- g11 g18 0" />
+ <gd name="g36" fmla="+- g11 g19 0" />
+ <gd name="g37" fmla="+- g11 g20 0" />
+ <gd name="g38" fmla="+- g11 g21 0" />
+ <gd name="g39" fmla="+- g9 g22 0" />
+ <gd name="g40" fmla="+- g9 g23 0" />
+ <gd name="g41" fmla="+- g9 g24 0" />
+ <gd name="g42" fmla="+- g9 g25 0" />
+ <gd name="g43" fmla="+- g9 g26 0" />
+ <gd name="g44" fmla="+- g9 g27 0" />
+ <gd name="g45" fmla="+- g9 g28 0" />
+ <gd name="g46" fmla="+- g9 g29 0" />
+ <gd name="g47" fmla="+- g9 g30 0" />
+ <gd name="g48" fmla="+- g9 g31 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g11" y="g39" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g44" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g44" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g39" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="g39" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g44" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g44" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g39" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="g39" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g31" y="g39" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g34" y="g40" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g37" y="g42" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g41" />
+ </lnTo>
+ <lnTo>
+ <pt x="g12" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g38" y="g46" />
+ </lnTo>
+ <lnTo>
+ <pt x="g36" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g45" />
+ </lnTo>
+ <lnTo>
+ <pt x="g35" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g47" />
+ </lnTo>
+ <lnTo>
+ <pt x="g33" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g32" y="g43" />
+ </lnTo>
+ <lnTo>
+ <pt x="g31" y="g44" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g44" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonMovie>
+ <actionButtonReturn>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 7 8" />
+ <gd name="g15" fmla="*/ g13 3 4" />
+ <gd name="g16" fmla="*/ g13 5 8" />
+ <gd name="g17" fmla="*/ g13 3 8" />
+ <gd name="g18" fmla="*/ g13 1 4" />
+ <gd name="g19" fmla="+- g9 g15 0" />
+ <gd name="g20" fmla="+- g9 g16 0" />
+ <gd name="g21" fmla="+- g9 g18 0" />
+ <gd name="g22" fmla="+- g11 g14 0" />
+ <gd name="g23" fmla="+- g11 g15 0" />
+ <gd name="g24" fmla="+- g11 g16 0" />
+ <gd name="g25" fmla="+- g11 g17 0" />
+ <gd name="g26" fmla="+- g11 g18 0" />
+ <gd name="g27" fmla="*/ g13 1 8" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g12" y="g21" />
+ </moveTo>
+ <lnTo>
+ <pt x="g23" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g20" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="g25" y="g19" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="g26" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g20" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="cd2" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="g10" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g22" y="g21" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g12" y="g21" />
+ </moveTo>
+ <lnTo>
+ <pt x="g23" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g20" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="g25" y="g19" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="g26" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g20" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="cd2" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="g10" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g22" y="g21" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g12" y="g21" />
+ </moveTo>
+ <lnTo>
+ <pt x="g22" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g22" y="g20" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="g25" y="g10" />
+ </lnTo>
+ <arcTo wR="g17" hR="g17" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="g11" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g26" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g26" y="g20" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="cd2" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="g19" />
+ </lnTo>
+ <arcTo wR="g27" hR="g27" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g23" y="g9" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonReturn>
+ <actionButtonSound>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx2" fmla="*/ ss 3 8" />
+ <gd name="g9" fmla="+- vc 0 dx2" />
+ <gd name="g10" fmla="+- vc dx2 0" />
+ <gd name="g11" fmla="+- hc 0 dx2" />
+ <gd name="g12" fmla="+- hc dx2 0" />
+ <gd name="g13" fmla="*/ ss 3 4" />
+ <gd name="g14" fmla="*/ g13 1 8" />
+ <gd name="g15" fmla="*/ g13 5 16" />
+ <gd name="g16" fmla="*/ g13 5 8" />
+ <gd name="g17" fmla="*/ g13 11 16" />
+ <gd name="g18" fmla="*/ g13 3 4" />
+ <gd name="g19" fmla="*/ g13 7 8" />
+ <gd name="g20" fmla="+- g9 g14 0" />
+ <gd name="g21" fmla="+- g9 g15 0" />
+ <gd name="g22" fmla="+- g9 g17 0" />
+ <gd name="g23" fmla="+- g9 g19 0" />
+ <gd name="g24" fmla="+- g11 g15 0" />
+ <gd name="g25" fmla="+- g11 g16 0" />
+ <gd name="g26" fmla="+- g11 g18 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g11" y="g21" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g22" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g22" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="g21" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g11" y="g22" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g22" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="g11" y="g21" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="g24" y="g21" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g9" />
+ </lnTo>
+ <lnTo>
+ <pt x="g25" y="g10" />
+ </lnTo>
+ <lnTo>
+ <pt x="g24" y="g22" />
+ </lnTo>
+ <lnTo>
+ <pt x="g11" y="g22" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="g26" y="g21" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="g20" />
+ </lnTo>
+ <moveTo>
+ <pt x="g26" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="vc" />
+ </lnTo>
+ <moveTo>
+ <pt x="g26" y="g22" />
+ </moveTo>
+ <lnTo>
+ <pt x="g12" y="g23" />
+ </lnTo>
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </actionButtonSound>
+ <arc>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16200000" />
+ <gd name="adj2" fmla="val 0" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="stAng" fmla="pin 0 adj1 21599999" />
+ <gd name="enAng" fmla="pin 0 adj2 21599999" />
+ <gd name="sw11" fmla="+- enAng 0 stAng" />
+ <gd name="sw12" fmla="+- sw11 21600000 0" />
+ <gd name="swAng" fmla="?: sw11 sw11 sw12" />
+ <gd name="wt1" fmla="sin wd2 stAng" />
+ <gd name="ht1" fmla="cos hd2 stAng" />
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1" />
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1" />
+ <gd name="wt2" fmla="sin wd2 enAng" />
+ <gd name="ht2" fmla="cos hd2 enAng" />
+ <gd name="dx2" fmla="cat2 wd2 ht2 wt2" />
+ <gd name="dy2" fmla="sat2 hd2 ht2 wt2" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc dy1 0" />
+ <gd name="x2" fmla="+- hc dx2 0" />
+ <gd name="y2" fmla="+- vc dy2 0" />
+ <gd name="sw0" fmla="+- 21600000 0 stAng" />
+ <gd name="da1" fmla="+- swAng 0 sw0" />
+ <gd name="g1" fmla="max x1 x2" />
+ <gd name="ir" fmla="?: da1 r g1" />
+ <gd name="sw1" fmla="+- cd4 0 stAng" />
+ <gd name="sw2" fmla="+- 27000000 0 stAng" />
+ <gd name="sw3" fmla="?: sw1 sw1 sw2" />
+ <gd name="da2" fmla="+- swAng 0 sw3" />
+ <gd name="g5" fmla="max y1 y2" />
+ <gd name="ib" fmla="?: da2 b g5" />
+ <gd name="sw4" fmla="+- cd2 0 stAng" />
+ <gd name="sw5" fmla="+- 32400000 0 stAng" />
+ <gd name="sw6" fmla="?: sw4 sw4 sw5" />
+ <gd name="da3" fmla="+- swAng 0 sw6" />
+ <gd name="g9" fmla="min x1 x2" />
+ <gd name="il" fmla="?: da3 l g9" />
+ <gd name="sw7" fmla="+- 3cd4 0 stAng" />
+ <gd name="sw8" fmla="+- 37800000 0 stAng" />
+ <gd name="sw9" fmla="?: sw7 sw7 sw8" />
+ <gd name="da4" fmla="+- swAng 0 sw9" />
+ <gd name="g13" fmla="min y1 y2" />
+ <gd name="it" fmla="?: da4 t g13" />
+ <gd name="cang1" fmla="+- stAng 0 cd4" />
+ <gd name="cang2" fmla="+- enAng cd4 0" />
+ <gd name="cang3" fmla="+/ cang1 cang2 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj2" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2" />
+ </ahPolar>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cang1">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="cang3">
+ <pos x="hc" y="vc" />
+ </cxn>
+ <cxn ang="cang2">
+ <pos x="x2" y="y2" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng" />
+ <lnTo>
+ <pt x="hc" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng" />
+ </path>
+ </pathLst>
+ </arc>
+ <bentArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 43750" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="a3" fmla="pin 0 adj3 50000" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw2" fmla="*/ ss a2 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+ <gd name="dh2" fmla="+- aw2 0 th2" />
+
+ <gd name="ah" fmla="*/ ss a3 100000" />
+
+ <gd name="bw" fmla="+- r 0 ah" />
+
+ <gd name="bh" fmla="+- b 0 dh2" />
+
+ <gd name="bs" fmla="min bw bh" />
+
+ <gd name="maxAdj4" fmla="*/ 100000 bs ss" />
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+
+ <gd name="bd" fmla="*/ ss a4 100000" />
+
+
+ <gd name="bd3" fmla="+- bd 0 th" />
+ <gd name="bd2" fmla="max bd3 0" />
+ <gd name="x3" fmla="+- th bd2 0" />
+ <gd name="x4" fmla="+- r 0 ah" />
+
+
+ <gd name="y3" fmla="+- dh2 th 0" />
+ <gd name="y4" fmla="+- y3 dh2 0" />
+ <gd name="y5" fmla="+- dh2 bd 0" />
+ <gd name="y6" fmla="+- y3 bd2 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="th" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="50000">
+ <pos x="r" y="y4" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="50000">
+ <pos x="x4" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="0" maxX="maxAdj4">
+ <pos x="bd" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x4" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="th2" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="aw2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="l" y="y5" />
+ </lnTo>
+ <arcTo wR="bd" hR="bd" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x4" y="dh2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="aw2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <arcTo wR="bd2" hR="bd2" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="th" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </bentArrow>
+ <bentConnector2>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </bentConnector2>
+ <bentConnector3>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x1" fmla="*/ w adj1 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x1" y="vc" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </bentConnector3>
+ <bentConnector4>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x1" fmla="*/ w adj1 100000" />
+ <gd name="x2" fmla="+/ x1 r 2" />
+ <gd name="y2" fmla="*/ h adj2 100000" />
+ <gd name="y1" fmla="+/ t y2 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </bentConnector4>
+ <bentConnector5>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 50000" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x1" fmla="*/ w adj1 100000" />
+
+ <gd name="x3" fmla="*/ w adj3 100000" />
+
+ <gd name="x2" fmla="+/ x1 x3 2" />
+
+ <gd name="y2" fmla="*/ h adj2 100000" />
+
+ <gd name="y1" fmla="+/ t y2 2" />
+
+ <gd name="y3" fmla="+/ b y2 2" />
+
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="-2147483647" maxX="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </bentConnector5>
+ <bentUpArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="a3" fmla="pin 0 adj3 50000" />
+ <gd name="y1" fmla="*/ ss a3 100000" />
+ <gd name="dx1" fmla="*/ ss a2 50000" />
+
+ <gd name="x1" fmla="+- r 0 dx1" />
+ <gd name="dx3" fmla="*/ ss a2 100000" />
+
+ <gd name="x3" fmla="+- r 0 dx3" />
+ <gd name="dx2" fmla="*/ ss a1 200000" />
+
+ <gd name="x2" fmla="+- x3 0 dx2" />
+ <gd name="x4" fmla="+- x3 dx2 0" />
+ <gd name="dy2" fmla="*/ ss a1 100000" />
+
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="x0" fmla="*/ x4 1 2" />
+ <gd name="y3" fmla="+/ y2 b 2" />
+ <gd name="y15" fmla="+/ y1 b 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="50000">
+ <pos x="l" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="50000">
+ <pos x="x2" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x0" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y15" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="y2" r="x4" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </bentUpArrow>
+ <bevel>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+
+
+
+ <gd name="x2" fmla="+- r 0 x1" />
+
+ <gd name="y2" fmla="+- b 0 x1" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="x1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="x1" r="x2" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x1" y="x1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="lightenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="lighten" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darken" extrusionOk="false">
+
+ <moveTo>
+ <pt x="r" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x1" y="x1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <moveTo>
+ <pt x="r" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </bevel>
+ <blockArc>
+
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 10800000" />
+
+ <gd name="adj2" fmla="val 0" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="stAng" fmla="pin 0 adj1 21599999" />
+ <gd name="istAng" fmla="pin 0 adj2 21599999" />
+ <gd name="a3" fmla="pin 0 adj3 50000" />
+ <gd name="sw11" fmla="+- istAng 0 stAng" />
+
+ <gd name="sw12" fmla="+- sw11 21600000 0" />
+
+ <gd name="swAng" fmla="?: sw11 sw11 sw12" />
+
+ <gd name="iswAng" fmla="+- 0 0 swAng" />
+
+
+ <gd name="wt1" fmla="sin wd2 stAng" />
+ <gd name="ht1" fmla="cos hd2 stAng" />
+ <gd name="wt3" fmla="sin wd2 istAng" />
+ <gd name="ht3" fmla="cos hd2 istAng" />
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1" />
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1" />
+ <gd name="dx3" fmla="cat2 wd2 ht3 wt3" />
+ <gd name="dy3" fmla="sat2 hd2 ht3 wt3" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+
+ <gd name="y1" fmla="+- vc dy1 0" />
+
+ <gd name="x3" fmla="+- hc dx3 0" />
+
+ <gd name="y3" fmla="+- vc dy3 0" />
+
+
+ <gd name="dr" fmla="*/ ss a3 100000" />
+ <gd name="iwd2" fmla="+- wd2 0 dr" />
+ <gd name="ihd2" fmla="+- hd2 0 dr" />
+ <gd name="wt2" fmla="sin iwd2 istAng" />
+ <gd name="ht2" fmla="cos ihd2 istAng" />
+ <gd name="wt4" fmla="sin iwd2 stAng" />
+ <gd name="ht4" fmla="cos ihd2 stAng" />
+ <gd name="dx2" fmla="cat2 iwd2 ht2 wt2" />
+ <gd name="dy2" fmla="sat2 ihd2 ht2 wt2" />
+ <gd name="dx4" fmla="cat2 iwd2 ht4 wt4" />
+ <gd name="dy4" fmla="sat2 ihd2 ht4 wt4" />
+ <gd name="x2" fmla="+- hc dx2 0" />
+
+ <gd name="y2" fmla="+- vc dy2 0" />
+
+ <gd name="x4" fmla="+- hc dx4 0" />
+
+ <gd name="y4" fmla="+- vc dy4 0" />
+
+
+ <gd name="sw0" fmla="+- 21600000 0 stAng" />
+ <gd name="da1" fmla="+- swAng 0 sw0" />
+ <gd name="g1" fmla="max x1 x2" />
+ <gd name="g2" fmla="max x3 x4" />
+ <gd name="g3" fmla="max g1 g2" />
+ <gd name="ir" fmla="?: da1 r g3" />
+
+ <gd name="sw1" fmla="+- cd4 0 stAng" />
+ <gd name="sw2" fmla="+- 27000000 0 stAng" />
+ <gd name="sw3" fmla="?: sw1 sw1 sw2" />
+ <gd name="da2" fmla="+- swAng 0 sw3" />
+ <gd name="g5" fmla="max y1 y2" />
+ <gd name="g6" fmla="max y3 y4" />
+ <gd name="g7" fmla="max g5 g6" />
+ <gd name="ib" fmla="?: da2 b g7" />
+
+ <gd name="sw4" fmla="+- cd2 0 stAng" />
+ <gd name="sw5" fmla="+- 32400000 0 stAng" />
+ <gd name="sw6" fmla="?: sw4 sw4 sw5" />
+ <gd name="da3" fmla="+- swAng 0 sw6" />
+ <gd name="g9" fmla="min x1 x2" />
+ <gd name="g10" fmla="min x3 x4" />
+ <gd name="g11" fmla="min g9 g10" />
+ <gd name="il" fmla="?: da3 l g11" />
+
+ <gd name="sw7" fmla="+- 3cd4 0 stAng" />
+ <gd name="sw8" fmla="+- 37800000 0 stAng" />
+ <gd name="sw9" fmla="?: sw7 sw7 sw8" />
+ <gd name="da4" fmla="+- swAng 0 sw9" />
+ <gd name="g13" fmla="min y1 y2" />
+ <gd name="g14" fmla="min y3 y4" />
+ <gd name="g15" fmla="min g13 g14" />
+ <gd name="it" fmla="?: da4 t g15" />
+
+ <gd name="x5" fmla="+/ x1 x4 2" />
+
+ <gd name="y5" fmla="+/ y1 y4 2" />
+
+ <gd name="x6" fmla="+/ x3 x2 2" />
+
+ <gd name="y6" fmla="+/ y3 y2 2" />
+
+ <gd name="cang1" fmla="+- stAng 0 cd4" />
+ <gd name="cang2" fmla="+- istAng cd4 0" />
+ <gd name="cang3" fmla="+/ cang1 cang2 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1" />
+ </ahPolar>
+ <ahPolar gdRefR="adj3" minR="0" maxR="50000" gdRefAng="adj2" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cang1">
+ <pos x="x5" y="y5" />
+ </cxn>
+ <cxn ang="cang2">
+ <pos x="x6" y="y6" />
+ </cxn>
+ <cxn ang="cang3">
+ <pos x="hc" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng" />
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="istAng" swAng="iswAng" />
+ <close />
+ </path>
+ </pathLst>
+
+ </blockArc>
+ <borderCallout1>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 112500" />
+
+ <gd name="adj4" fmla="val -38333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </borderCallout1>
+ <borderCallout2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 112500" />
+
+ <gd name="adj6" fmla="val -46667" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </borderCallout2>
+ <borderCallout3>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 100000" />
+
+ <gd name="adj6" fmla="val -16667" />
+
+ <gd name="adj7" fmla="val 112963" />
+
+ <gd name="adj8" fmla="val -8333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ <gd name="y4" fmla="*/ h adj7 100000" />
+ <gd name="x4" fmla="*/ w adj8 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj8" minX="-2147483647" maxX="2147483647" gdRefY="adj7" minY="-2147483647" maxY="2147483647">
+ <pos x="x4" y="y4" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </borderCallout3>
+ <bracePair>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 8333" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 25000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="*/ ss a 50000" />
+ <gd name="x3" fmla="+- r 0 x2" />
+ <gd name="x4" fmla="+- r 0 x1" />
+
+ <gd name="y2" fmla="+- vc 0 x1" />
+ <gd name="y3" fmla="+- vc x1 0" />
+ <gd name="y4" fmla="+- b 0 x1" />
+ <gd name="it" fmla="*/ x1 29289 100000" />
+
+ <gd name="il" fmla="+- x1 it 0" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 it" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="25000">
+ <pos x="l" y="x1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x2" y="b" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="-5400000" />
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="-5400000" />
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="x2" y="b" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="-5400000" />
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <moveTo>
+ <pt x="x3" y="t" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="-5400000" />
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ </path>
+ </pathLst>
+
+ </bracePair>
+ <bracketPair>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+
+ <gd name="y2" fmla="+- b 0 x1" />
+ <gd name="il" fmla="*/ x1 29289 100000" />
+
+
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="l" y="x1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="x1" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="x1" y="b" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="x1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <moveTo>
+ <pt x="x2" y="t" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ </path>
+ </pathLst>
+
+ </bracketPair>
+ <callout1>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 112500" />
+
+ <gd name="adj4" fmla="val -38333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </callout1>
+ <callout2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 112500" />
+
+ <gd name="adj6" fmla="val -46667" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </callout2>
+ <callout3>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="adj1" fmla="val 18750" />
+
+ <gd name="adj2" fmla="val -8333" />
+
+ <gd name="adj3" fmla="val 18750" />
+
+ <gd name="adj4" fmla="val -16667" />
+
+ <gd name="adj5" fmla="val 100000" />
+
+ <gd name="adj6" fmla="val -16667" />
+
+ <gd name="adj7" fmla="val 112963" />
+
+ <gd name="adj8" fmla="val -8333" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h adj1 100000" />
+ <gd name="x1" fmla="*/ w adj2 100000" />
+ <gd name="y2" fmla="*/ h adj3 100000" />
+ <gd name="x2" fmla="*/ w adj4 100000" />
+ <gd name="y3" fmla="*/ h adj5 100000" />
+ <gd name="x3" fmla="*/ w adj6 100000" />
+ <gd name="y4" fmla="*/ h adj7 100000" />
+ <gd name="x4" fmla="*/ w adj8 100000" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj2" minX="-2147483647" maxX="2147483647" gdRefY="adj1" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="-2147483647" maxX="2147483647" gdRefY="adj3" minY="-2147483647" maxY="2147483647">
+ <pos x="x2" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj6" minX="-2147483647" maxX="2147483647" gdRefY="adj5" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj8" minX="-2147483647" maxX="2147483647" gdRefY="adj7" minY="-2147483647" maxY="2147483647">
+ <pos x="x4" y="y4" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </callout3>
+ <can>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 h ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="y1" fmla="*/ ss a 200000" />
+ <gd name="y2" fmla="+- y1 y1 0" />
+ <gd name="y3" fmla="+- b 0 y1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="maxAdj">
+ <pos x="hc" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="y2" r="r" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="-10800000" />
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd2" />
+ <close />
+ </path>
+ <path stroke="false" fill="lighten" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="cd2" />
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd2" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="r" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd2" />
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="cd2" />
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd2" />
+ <lnTo>
+ <pt x="l" y="y1" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </can>
+ <chartPlus>
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="10" h="10" fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="5" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="10" />
+ </lnTo>
+ <moveTo>
+ <pt x="0" y="5" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="5" />
+ </lnTo>
+ </path>
+ <path w="10" h="10" stroke="false">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="0" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </chartPlus>
+ <chartStar>
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="10" h="10" fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="10" />
+ </lnTo>
+ <moveTo>
+ <pt x="0" y="10" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ <moveTo>
+ <pt x="5" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="10" />
+ </lnTo>
+ </path>
+ <path w="10" h="10" stroke="false">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="0" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </chartStar>
+ <chartX>
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="10" h="10" fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="10" />
+ </lnTo>
+ <moveTo>
+ <pt x="0" y="10" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ </path>
+ <path w="10" h="10" stroke="false">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="0" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </chartX>
+ <chevron>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 100000 w ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+ <gd name="x3" fmla="*/ x2 1 2" />
+ <gd name="dx" fmla="+- x2 0 x1" />
+ <gd name="il" fmla="?: dx x1 l" />
+ <gd name="ir" fmla="?: dx x2 r" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="maxAdj">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="t" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </chevron>
+ <chord>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 2700000" />
+
+ <gd name="adj2" fmla="val 16200000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="stAng" fmla="pin 0 adj1 21599999" />
+ <gd name="enAng" fmla="pin 0 adj2 21599999" />
+ <gd name="sw1" fmla="+- enAng 0 stAng" />
+
+ <gd name="sw2" fmla="+- sw1 21600000 0" />
+
+ <gd name="swAng" fmla="?: sw1 sw1 sw2" />
+
+ <gd name="wt1" fmla="sin wd2 stAng" />
+ <gd name="ht1" fmla="cos hd2 stAng" />
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1" />
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1" />
+ <gd name="wt2" fmla="sin wd2 enAng" />
+ <gd name="ht2" fmla="cos hd2 enAng" />
+ <gd name="dx2" fmla="cat2 wd2 ht2 wt2" />
+ <gd name="dy2" fmla="sat2 hd2 ht2 wt2" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+
+ <gd name="y1" fmla="+- vc dy1 0" />
+
+ <gd name="x2" fmla="+- hc dx2 0" />
+
+ <gd name="y2" fmla="+- vc dy2 0" />
+
+ <gd name="x3" fmla="+/ x1 x2 2" />
+ <gd name="y3" fmla="+/ y1 y2 2" />
+ <gd name="midAng0" fmla="*/ swAng 1 2" />
+ <gd name="midAng" fmla="+- stAng midAng0 cd2" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj2" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="stAng">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="enAng">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="midAng">
+ <pos x="x3" y="y3" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng" />
+ <close />
+ </path>
+ </pathLst>
+
+ </chord>
+ <circularArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500" />
+
+ <gd name="adj2" fmla="val 1142319" />
+
+ <gd name="adj3" fmla="val 20457681" />
+
+ <gd name="adj4" fmla="val 10800000" />
+
+ <gd name="adj5" fmla="val 12500" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a5" fmla="pin 0 adj5 25000" />
+
+ <gd name="maxAdj1" fmla="*/ a5 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="enAng" fmla="pin 1 adj3 21599999" />
+ <gd name="stAng" fmla="pin 0 adj4 21599999" />
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="thh" fmla="*/ ss a5 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+
+
+ <gd name="rw1" fmla="+- wd2 th2 thh" />
+
+ <gd name="rh1" fmla="+- hd2 th2 thh" />
+
+ <gd name="rw2" fmla="+- rw1 0 th" />
+
+ <gd name="rh2" fmla="+- rh1 0 th" />
+
+ <gd name="rw3" fmla="+- rw2 th2 0" />
+
+ <gd name="rh3" fmla="+- rh2 th2 0" />
+
+
+ <gd name="wtH" fmla="sin rw3 enAng" />
+ <gd name="htH" fmla="cos rh3 enAng" />
+ <gd name="dxH" fmla="cat2 rw3 htH wtH" />
+ <gd name="dyH" fmla="sat2 rh3 htH wtH" />
+ <gd name="xH" fmla="+- hc dxH 0" />
+
+ <gd name="yH" fmla="+- vc dyH 0" />
+
+
+ <gd name="rI" fmla="min rw2 rh2" />
+
+ <gd name="u1" fmla="*/ dxH dxH 1" />
+ <gd name="u2" fmla="*/ dyH dyH 1" />
+ <gd name="u3" fmla="*/ rI rI 1" />
+ <gd name="u4" fmla="+- u1 0 u3" />
+ <gd name="u5" fmla="+- u2 0 u3" />
+ <gd name="u6" fmla="*/ u4 u5 u1" />
+ <gd name="u7" fmla="*/ u6 1 u2" />
+ <gd name="u8" fmla="+- 1 0 u7" />
+ <gd name="u9" fmla="sqrt u8" />
+ <gd name="u10" fmla="*/ u4 1 dxH" />
+ <gd name="u11" fmla="*/ u10 1 dyH" />
+ <gd name="u12" fmla="+/ 1 u9 u11" />
+ <gd name="u13" fmla="at2 1 u12" />
+ <gd name="u14" fmla="+- u13 21600000 0" />
+ <gd name="u15" fmla="?: u13 u13 u14" />
+ <gd name="u16" fmla="+- u15 0 enAng" />
+
+ <gd name="u17" fmla="+- u16 21600000 0" />
+ <gd name="u18" fmla="?: u16 u16 u17" />
+ <gd name="u19" fmla="+- u18 0 cd2" />
+ <gd name="u20" fmla="+- u18 0 21600000" />
+ <gd name="u21" fmla="?: u19 u20 u18" />
+ <gd name="maxAng" fmla="abs u21" />
+ <gd name="aAng" fmla="pin 0 adj2 maxAng" />
+
+ <gd name="ptAng" fmla="+- enAng aAng 0" />
+
+
+ <gd name="wtA" fmla="sin rw3 ptAng" />
+ <gd name="htA" fmla="cos rh3 ptAng" />
+ <gd name="dxA" fmla="cat2 rw3 htA wtA" />
+ <gd name="dyA" fmla="sat2 rh3 htA wtA" />
+ <gd name="xA" fmla="+- hc dxA 0" />
+
+ <gd name="yA" fmla="+- vc dyA 0" />
+
+
+ <gd name="wtE" fmla="sin rw1 stAng" />
+ <gd name="htE" fmla="cos rh1 stAng" />
+ <gd name="dxE" fmla="cat2 rw1 htE wtE" />
+ <gd name="dyE" fmla="sat2 rh1 htE wtE" />
+ <gd name="xE" fmla="+- hc dxE 0" />
+
+ <gd name="yE" fmla="+- vc dyE 0" />
+
+
+ <gd name="dxG" fmla="cos thh ptAng" />
+ <gd name="dyG" fmla="sin thh ptAng" />
+ <gd name="xG" fmla="+- xH dxG 0" />
+
+ <gd name="yG" fmla="+- yH dyG 0" />
+
+
+ <gd name="dxB" fmla="cos thh ptAng" />
+ <gd name="dyB" fmla="sin thh ptAng" />
+ <gd name="xB" fmla="+- xH 0 dxB 0" />
+
+ <gd name="yB" fmla="+- yH 0 dyB 0" />
+
+
+ <gd name="sx1" fmla="+- xB 0 hc" />
+
+ <gd name="sy1" fmla="+- yB 0 vc" />
+
+ <gd name="sx2" fmla="+- xG 0 hc" />
+
+ <gd name="sy2" fmla="+- yG 0 vc" />
+
+
+ <gd name="rO" fmla="min rw1 rh1" />
+
+ <gd name="x1O" fmla="*/ sx1 rO rw1" />
+
+ <gd name="y1O" fmla="*/ sy1 rO rh1" />
+
+ <gd name="x2O" fmla="*/ sx2 rO rw1" />
+
+ <gd name="y2O" fmla="*/ sy2 rO rh1" />
+
+
+ <gd name="dxO" fmla="+- x2O 0 x1O" />
+ <gd name="dyO" fmla="+- y2O 0 y1O" />
+ <gd name="dO" fmla="mod dxO dyO 0" />
+
+ <gd name="q1" fmla="*/ x1O y2O 1" />
+ <gd name="q2" fmla="*/ x2O y1O 1" />
+ <gd name="DO" fmla="+- q1 0 q2" />
+
+
+ <gd name="q3" fmla="*/ rO rO 1" />
+
+ <gd name="q4" fmla="*/ dO dO 1" />
+
+ <gd name="q5" fmla="*/ q3 q4 1" />
+
+ <gd name="q6" fmla="*/ DO DO 1" />
+
+ <gd name="q7" fmla="+- q5 0 q6" />
+
+ <gd name="q8" fmla="max q7 0" />
+
+ <gd name="sdelO" fmla="sqrt q8" />
+
+ <gd name="ndyO" fmla="*/ dyO -1 1" />
+ <gd name="sdyO" fmla="?: ndyO -1 1" />
+
+ <gd name="q9" fmla="*/ sdyO dxO 1" />
+
+ <gd name="q10" fmla="*/ q9 sdelO 1" />
+
+ <gd name="q11" fmla="*/ DO dyO 1" />
+
+ <gd name="dxF1" fmla="+/ q11 q10 q4" />
+
+ <gd name="q12" fmla="+- q11 0 q10" />
+ <gd name="dxF2" fmla="*/ q12 1 q4" />
+
+
+ <gd name="adyO" fmla="abs dyO" />
+ <gd name="q13" fmla="*/ adyO sdelO 1" />
+
+ <gd name="q14" fmla="*/ DO dxO -1" />
+
+ <gd name="dyF1" fmla="+/ q14 q13 q4" />
+
+ <gd name="q15" fmla="+- q14 0 q13" />
+ <gd name="dyF2" fmla="*/ q15 1 q4" />
+
+
+
+ <gd name="q16" fmla="+- x2O 0 dxF1" />
+ <gd name="q17" fmla="+- x2O 0 dxF2" />
+ <gd name="q18" fmla="+- y2O 0 dyF1" />
+ <gd name="q19" fmla="+- y2O 0 dyF2" />
+ <gd name="q20" fmla="mod q16 q18 0" />
+
+ <gd name="q21" fmla="mod q17 q19 0" />
+
+ <gd name="q22" fmla="+- q21 0 q20" />
+ <gd name="dxF" fmla="?: q22 dxF1 dxF2" />
+
+ <gd name="dyF" fmla="?: q22 dyF1 dyF2" />
+
+ <gd name="sdxF" fmla="*/ dxF rw1 rO" />
+
+ <gd name="sdyF" fmla="*/ dyF rh1 rO" />
+
+ <gd name="xF" fmla="+- hc sdxF 0" />
+
+ <gd name="yF" fmla="+- vc sdyF 0" />
+
+
+
+
+ <gd name="x1I" fmla="*/ sx1 rI rw2" />
+
+ <gd name="y1I" fmla="*/ sy1 rI rh2" />
+
+ <gd name="x2I" fmla="*/ sx2 rI rw2" />
+
+ <gd name="y2I" fmla="*/ sy2 rI rh2" />
+
+
+ <gd name="dxI" fmla="+- x2I 0 x1I" />
+ <gd name="dyI" fmla="+- y2I 0 y1I" />
+ <gd name="dI" fmla="mod dxI dyI 0" />
+ <gd name="v1" fmla="*/ x1I y2I 1" />
+ <gd name="v2" fmla="*/ x2I y1I 1" />
+ <gd name="DI" fmla="+- v1 0 v2" />
+
+ <gd name="v3" fmla="*/ rI rI 1" />
+ <gd name="v4" fmla="*/ dI dI 1" />
+ <gd name="v5" fmla="*/ v3 v4 1" />
+ <gd name="v6" fmla="*/ DI DI 1" />
+ <gd name="v7" fmla="+- v5 0 v6" />
+ <gd name="v8" fmla="max v7 0" />
+ <gd name="sdelI" fmla="sqrt v8" />
+ <gd name="v9" fmla="*/ sdyO dxI 1" />
+ <gd name="v10" fmla="*/ v9 sdelI 1" />
+ <gd name="v11" fmla="*/ DI dyI 1" />
+ <gd name="dxC1" fmla="+/ v11 v10 v4" />
+ <gd name="v12" fmla="+- v11 0 v10" />
+ <gd name="dxC2" fmla="*/ v12 1 v4" />
+
+ <gd name="adyI" fmla="abs dyI" />
+ <gd name="v13" fmla="*/ adyI sdelI 1" />
+ <gd name="v14" fmla="*/ DI dxI -1" />
+ <gd name="dyC1" fmla="+/ v14 v13 v4" />
+ <gd name="v15" fmla="+- v14 0 v13" />
+ <gd name="dyC2" fmla="*/ v15 1 v4" />
+
+ <gd name="v16" fmla="+- x1I 0 dxC1" />
+ <gd name="v17" fmla="+- x1I 0 dxC2" />
+ <gd name="v18" fmla="+- y1I 0 dyC1" />
+ <gd name="v19" fmla="+- y1I 0 dyC2" />
+ <gd name="v20" fmla="mod v16 v18 0" />
+ <gd name="v21" fmla="mod v17 v19 0" />
+ <gd name="v22" fmla="+- v21 0 v20" />
+ <gd name="dxC" fmla="?: v22 dxC1 dxC2" />
+ <gd name="dyC" fmla="?: v22 dyC1 dyC2" />
+ <gd name="sdxC" fmla="*/ dxC rw2 rI" />
+ <gd name="sdyC" fmla="*/ dyC rh2 rI" />
+ <gd name="xC" fmla="+- hc sdxC 0" />
+
+ <gd name="yC" fmla="+- vc sdyC 0" />
+
+
+ <gd name="ist0" fmla="at2 sdxC sdyC" />
+ <gd name="ist1" fmla="+- ist0 21600000 0" />
+ <gd name="istAng" fmla="?: ist0 ist0 ist1" />
+ <gd name="isw1" fmla="+- stAng 0 istAng" />
+ <gd name="isw2" fmla="+- isw1 0 21600000" />
+ <gd name="iswAng" fmla="?: isw1 isw2 isw1" />
+
+
+ <gd name="p1" fmla="+- xF 0 xC" />
+ <gd name="p2" fmla="+- yF 0 yC" />
+ <gd name="p3" fmla="mod p1 p2 0" />
+ <gd name="p4" fmla="*/ p3 1 2" />
+ <gd name="p5" fmla="+- p4 0 thh" />
+ <gd name="xGp" fmla="?: p5 xF xG" />
+ <gd name="yGp" fmla="?: p5 yF yG" />
+ <gd name="xBp" fmla="?: p5 xC xB" />
+ <gd name="yBp" fmla="?: p5 yC yB" />
+
+ <gd name="en0" fmla="at2 sdxF sdyF" />
+ <gd name="en1" fmla="+- en0 21600000 0" />
+ <gd name="en2" fmla="?: en0 en0 en1" />
+ <gd name="sw0" fmla="+- en2 0 stAng" />
+ <gd name="sw1" fmla="+- sw0 21600000 0" />
+ <gd name="swAng" fmla="?: sw0 sw0 sw1" />
+
+ <gd name="wtI" fmla="sin rw3 stAng" />
+ <gd name="htI" fmla="cos rh3 stAng" />
+ <gd name="dxI" fmla="cat2 rw3 htI wtI" />
+ <gd name="dyI" fmla="sat2 rh3 htI wtI" />
+ <gd name="xI" fmla="+- hc dxI 0" />
+
+ <gd name="yI" fmla="+- vc dyI 0" />
+
+
+ <gd name="aI" fmla="+- stAng 0 cd4" />
+ <gd name="aA" fmla="+- ptAng cd4 0" />
+ <gd name="aB" fmla="+- ptAng cd2 0" />
+
+ <gd name="idx" fmla="cos rw1 2700000" />
+ <gd name="idy" fmla="sin rh1 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj2" minAng="0" maxAng="maxAng">
+ <pos x="xA" y="yA" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj4" minAng="0" maxAng="21599999">
+ <pos x="xE" y="yE" />
+ </ahPolar>
+ <ahPolar gdRefR="adj1" minR="0" maxR="maxAdj1" gdRefAng="adj3" minAng="0" maxAng="21599999">
+ <pos x="xF" y="yF" />
+ </ahPolar>
+ <ahPolar gdRefR="adj5" minR="0" maxR="25000">
+ <pos x="xB" y="yB" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="aI">
+ <pos x="xI" y="yI" />
+ </cxn>
+ <cxn ang="ptAng">
+ <pos x="xGp" y="yGp" />
+ </cxn>
+ <cxn ang="aA">
+ <pos x="xA" y="yA" />
+ </cxn>
+ <cxn ang="aB">
+ <pos x="xBp" y="yBp" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xE" y="yE" />
+ </moveTo>
+ <arcTo wR="rw1" hR="rh1" stAng="stAng" swAng="swAng" />
+ <lnTo>
+ <pt x="xGp" y="yGp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA" y="yA" />
+ </lnTo>
+ <lnTo>
+ <pt x="xBp" y="yBp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC" y="yC" />
+ </lnTo>
+ <arcTo wR="rw2" hR="rh2" stAng="istAng" swAng="iswAng" />
+ <close />
+ </path>
+ </pathLst>
+
+ </circularArrow>
+ <cloud>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="il" fmla="*/ w 2977 21600" />
+ <gd name="it" fmla="*/ h 3262 21600" />
+ <gd name="ir" fmla="*/ w 17087 21600" />
+ <gd name="ib" fmla="*/ h 17337 21600" />
+ <gd name="g27" fmla="*/ w 67 21600" />
+ <gd name="g28" fmla="*/ h 21577 21600" />
+ <gd name="g29" fmla="*/ w 21582 21600" />
+ <gd name="g30" fmla="*/ h 1235 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="g29" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="g28" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="g27" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="g30" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="43200" h="43200">
+ <moveTo>
+ <pt x="3900" y="14370" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="-11429249" swAng="7426832" />
+ <arcTo wR="5333" hR="7267" stAng="-8646143" swAng="5396714" />
+ <arcTo wR="4365" hR="5945" stAng="-8748475" swAng="5983381" />
+ <arcTo wR="4857" hR="6595" stAng="-7859164" swAng="7034504" />
+ <arcTo wR="5333" hR="7273" stAng="-4722533" swAng="6541615" />
+ <arcTo wR="6775" hR="9220" stAng="-2776035" swAng="7816140" />
+ <arcTo wR="5785" hR="7867" stAng="37501" swAng="6842000" />
+ <arcTo wR="6752" hR="9215" stAng="1347096" swAng="6910353" />
+ <arcTo wR="7720" hR="10543" stAng="3974558" swAng="4542661" />
+ <arcTo wR="4360" hR="5918" stAng="-16496525" swAng="8804134" />
+ <arcTo wR="4345" hR="5945" stAng="-14809710" swAng="9151131" />
+ <close />
+ </path>
+ <path w="43200" h="43200" fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="4693" y="26177" />
+ </moveTo>
+ <arcTo wR="4345" hR="5945" stAng="5204520" swAng="1585770" />
+ <moveTo>
+ <pt x="6928" y="34899" />
+ </moveTo>
+ <arcTo wR="4360" hR="5918" stAng="4416628" swAng="686848" />
+ <moveTo>
+ <pt x="16478" y="39090" />
+ </moveTo>
+ <arcTo wR="6752" hR="9215" stAng="8257449" swAng="844866" />
+ <moveTo>
+ <pt x="28827" y="34751" />
+ </moveTo>
+ <arcTo wR="6752" hR="9215" stAng="387196" swAng="959901" />
+ <moveTo>
+ <pt x="34129" y="22954" />
+ </moveTo>
+ <arcTo wR="5785" hR="7867" stAng="-4217541" swAng="4255042" />
+ <moveTo>
+ <pt x="41798" y="15354" />
+ </moveTo>
+ <arcTo wR="5333" hR="7273" stAng="1819082" swAng="1665090" />
+ <moveTo>
+ <pt x="38324" y="5426" />
+ </moveTo>
+ <arcTo wR="4857" hR="6595" stAng="-824660" swAng="891534" />
+ <moveTo>
+ <pt x="29078" y="3952" />
+ </moveTo>
+ <arcTo wR="4857" hR="6595" stAng="-8950887" swAng="1091722" />
+ <moveTo>
+ <pt x="22141" y="4720" />
+ </moveTo>
+ <arcTo wR="4365" hR="5945" stAng="-9809656" swAng="1061181" />
+ <moveTo>
+ <pt x="14000" y="5192" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="-4002417" swAng="739161" />
+ <moveTo>
+ <pt x="4127" y="15789" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="9459261" swAng="711490" />
+ </path>
+ </pathLst>
+
+ </cloud>
+ <cloudCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val -20833" />
+
+ <gd name="adj2" fmla="val 62500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dxPos" fmla="*/ w adj1 100000" />
+ <gd name="dyPos" fmla="*/ h adj2 100000" />
+ <gd name="xPos" fmla="+- hc dxPos 0" />
+ <gd name="yPos" fmla="+- vc dyPos 0" />
+ <gd name="ht" fmla="cat2 hd2 dxPos dyPos" />
+ <gd name="wt" fmla="sat2 wd2 dxPos dyPos" />
+ <gd name="g2" fmla="cat2 wd2 ht wt" />
+ <gd name="g3" fmla="sat2 hd2 ht wt" />
+ <gd name="g4" fmla="+- hc g2 0" />
+
+ <gd name="g5" fmla="+- vc g3 0" />
+
+ <gd name="g6" fmla="+- g4 0 xPos" />
+
+ <gd name="g7" fmla="+- g5 0 yPos" />
+
+ <gd name="g8" fmla="mod g6 g7 0" />
+
+ <gd name="g9" fmla="*/ ss 6600 21600" />
+
+ <gd name="g10" fmla="+- g8 0 g9" />
+
+ <gd name="g11" fmla="*/ g10 1 3" />
+
+ <gd name="g12" fmla="*/ ss 1800 21600" />
+
+ <gd name="g13" fmla="+- g11 g12 0" />
+
+ <gd name="g14" fmla="*/ g13 g6 g8" />
+
+ <gd name="g15" fmla="*/ g13 g7 g8" />
+
+ <gd name="g16" fmla="+- g14 xPos 0" />
+
+ <gd name="g17" fmla="+- g15 yPos 0" />
+
+ <gd name="g18" fmla="*/ ss 4800 21600" />
+
+ <gd name="g19" fmla="*/ g11 2 1" />
+
+ <gd name="g20" fmla="+- g18 g19 0" />
+
+ <gd name="g21" fmla="*/ g20 g6 g8" />
+ <gd name="g22" fmla="*/ g20 g7 g8" />
+ <gd name="g23" fmla="+- g21 xPos 0" />
+ <gd name="g24" fmla="+- g22 yPos 0" />
+ <gd name="g25" fmla="*/ ss 1200 21600" />
+ <gd name="g26" fmla="*/ ss 600 21600" />
+
+ <gd name="x23" fmla="+- xPos g26 0" />
+ <gd name="x24" fmla="+- g16 g25 0" />
+ <gd name="x25" fmla="+- g23 g12 0" />
+ <gd name="il" fmla="*/ w 2977 21600" />
+ <gd name="it" fmla="*/ h 3262 21600" />
+ <gd name="ir" fmla="*/ w 17087 21600" />
+ <gd name="ib" fmla="*/ h 17337 21600" />
+
+ <gd name="g27" fmla="*/ w 67 21600" />
+ <gd name="g28" fmla="*/ h 21577 21600" />
+ <gd name="g29" fmla="*/ w 21582 21600" />
+ <gd name="g30" fmla="*/ h 1235 21600" />
+ <gd name="pang" fmla="at2 dxPos dyPos" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647" gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="xPos" y="yPos" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="g27" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="g28" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="g29" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="g30" />
+ </cxn>
+ <cxn ang="pang">
+ <pos x="xPos" y="yPos" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="43200" h="43200">
+ <moveTo>
+ <pt x="3900" y="14370" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="-11429249" swAng="7426832" />
+ <arcTo wR="5333" hR="7267" stAng="-8646143" swAng="5396714" />
+ <arcTo wR="4365" hR="5945" stAng="-8748475" swAng="5983381" />
+ <arcTo wR="4857" hR="6595" stAng="-7859164" swAng="7034504" />
+ <arcTo wR="5333" hR="7273" stAng="-4722533" swAng="6541615" />
+ <arcTo wR="6775" hR="9220" stAng="-2776035" swAng="7816140" />
+ <arcTo wR="5785" hR="7867" stAng="37501" swAng="6842000" />
+ <arcTo wR="6752" hR="9215" stAng="1347096" swAng="6910353" />
+ <arcTo wR="7720" hR="10543" stAng="3974558" swAng="4542661" />
+ <arcTo wR="4360" hR="5918" stAng="-16496525" swAng="8804134" />
+ <arcTo wR="4345" hR="5945" stAng="-14809710" swAng="9151131" />
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x23" y="yPos" />
+ </moveTo>
+ <arcTo wR="g26" hR="g26" stAng="0" swAng="21600000" />
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x24" y="g17" />
+ </moveTo>
+ <arcTo wR="g25" hR="g25" stAng="0" swAng="21600000" />
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x25" y="g24" />
+ </moveTo>
+ <arcTo wR="g12" hR="g12" stAng="0" swAng="21600000" />
+ <close />
+ </path>
+ <path w="43200" h="43200" fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="4693" y="26177" />
+ </moveTo>
+ <arcTo wR="4345" hR="5945" stAng="5204520" swAng="1585770" />
+ <moveTo>
+ <pt x="6928" y="34899" />
+ </moveTo>
+ <arcTo wR="4360" hR="5918" stAng="4416628" swAng="686848" />
+ <moveTo>
+ <pt x="16478" y="39090" />
+ </moveTo>
+ <arcTo wR="6752" hR="9215" stAng="8257449" swAng="844866" />
+ <moveTo>
+ <pt x="28827" y="34751" />
+ </moveTo>
+ <arcTo wR="6752" hR="9215" stAng="387196" swAng="959901" />
+ <moveTo>
+ <pt x="34129" y="22954" />
+ </moveTo>
+ <arcTo wR="5785" hR="7867" stAng="-4217541" swAng="4255042" />
+ <moveTo>
+ <pt x="41798" y="15354" />
+ </moveTo>
+ <arcTo wR="5333" hR="7273" stAng="1819082" swAng="1665090" />
+ <moveTo>
+ <pt x="38324" y="5426" />
+ </moveTo>
+ <arcTo wR="4857" hR="6595" stAng="-824660" swAng="891534" />
+ <moveTo>
+ <pt x="29078" y="3952" />
+ </moveTo>
+ <arcTo wR="4857" hR="6595" stAng="-8950887" swAng="1091722" />
+ <moveTo>
+ <pt x="22141" y="4720" />
+ </moveTo>
+ <arcTo wR="4365" hR="5945" stAng="-9809656" swAng="1061181" />
+ <moveTo>
+ <pt x="14000" y="5192" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="-4002417" swAng="739161" />
+ <moveTo>
+ <pt x="4127" y="15789" />
+ </moveTo>
+ <arcTo wR="6753" hR="9190" stAng="9459261" swAng="711490" />
+ </path>
+ </pathLst>
+
+ </cloudCallout>
+ <corner>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj1" fmla="*/ 100000 h ss" />
+ <gd name="maxAdj2" fmla="*/ 100000 w ss" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="x1" fmla="*/ ss a2 100000" />
+ <gd name="dy1" fmla="*/ ss a1 100000" />
+ <gd name="y1" fmla="+- b 0 dy1" />
+ <gd name="cx1" fmla="*/ x1 1 2" />
+ <gd name="cy1" fmla="+/ y1 b 2" />
+ <gd name="d" fmla="+- w 0 h" />
+ <gd name="it" fmla="?: d y1 t" />
+ <gd name="ir" fmla="?: d r x1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="cy1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="cx1" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="it" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </corner>
+ <cornerTabs>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="md" fmla="mod w h 0" />
+ <gd name="dx" fmla="*/ 1 md 20" />
+
+ <gd name="y1" fmla="+- 0 b dx" />
+
+ <gd name="x1" fmla="+- 0 r dx" />
+
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="dx" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="dx" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="dx" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="dx" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="dx" t="dx" r="x1" b="y1" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="dx" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="dx" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="dx" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="dx" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="r" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </cornerTabs>
+ <cube>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 100000" />
+ <gd name="y1" fmla="*/ ss a 100000" />
+ <gd name="y4" fmla="+- b 0 y1" />
+ <gd name="y2" fmla="*/ y4 1 2" />
+ <gd name="y3" fmla="+/ y1 b 2" />
+ <gd name="x4" fmla="+- r 0 y1" />
+ <gd name="x2" fmla="*/ x4 1 2" />
+ <gd name="x3" fmla="+/ y1 r 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="100000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="y1" r="x4" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+ <moveTo>
+ <pt x="x4" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="lightenLess" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="y1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="y1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <moveTo>
+ <pt x="x4" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </cube>
+ <curvedConnector2>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="wd2" y="t" />
+ <pt x="r" y="hd2" />
+ <pt x="r" y="b" />
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </curvedConnector2>
+ <curvedConnector3>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w adj1 100000" />
+ <gd name="x1" fmla="+/ l x2 2" />
+ <gd name="x3" fmla="+/ r x2 2" />
+ <gd name="y3" fmla="*/ h 3 4" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x2" y="vc" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="t" />
+ <pt x="x2" y="hd4" />
+ <pt x="x2" y="vc" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x2" y="y3" />
+ <pt x="x3" y="b" />
+ <pt x="r" y="b" />
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </curvedConnector3>
+ <curvedConnector4>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w adj1 100000" />
+ <gd name="x1" fmla="+/ l x2 2" />
+ <gd name="x3" fmla="+/ r x2 2" />
+ <gd name="x4" fmla="+/ x2 x3 2" />
+ <gd name="x5" fmla="+/ x3 r 2" />
+ <gd name="y4" fmla="*/ h adj2 100000" />
+ <gd name="y1" fmla="+/ t y4 2" />
+ <gd name="y2" fmla="+/ t y1 2" />
+ <gd name="y3" fmla="+/ y1 y4 2" />
+ <gd name="y5" fmla="+/ b y4 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x2" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="x3" y="y4" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="t" />
+ <pt x="x2" y="y2" />
+ <pt x="x2" y="y1" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x2" y="y3" />
+ <pt x="x4" y="y4" />
+ <pt x="x3" y="y4" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x5" y="y4" />
+ <pt x="r" y="y5" />
+ <pt x="r" y="b" />
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </curvedConnector4>
+ <curvedConnector5>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 50000" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x3" fmla="*/ w adj1 100000" />
+ <gd name="x6" fmla="*/ w adj3 100000" />
+ <gd name="x1" fmla="+/ x3 x6 2" />
+ <gd name="x2" fmla="+/ l x3 2" />
+ <gd name="x4" fmla="+/ x3 x1 2" />
+ <gd name="x5" fmla="+/ x6 x1 2" />
+ <gd name="x7" fmla="+/ x6 r 2" />
+ <gd name="y4" fmla="*/ h adj2 100000" />
+ <gd name="y1" fmla="+/ t y4 2" />
+ <gd name="y2" fmla="+/ t y1 2" />
+ <gd name="y3" fmla="+/ y1 y4 2" />
+ <gd name="y5" fmla="+/ b y4 2" />
+ <gd name="y6" fmla="+/ y5 y4 2" />
+ <gd name="y7" fmla="+/ y5 b 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647">
+ <pos x="x3" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="x1" y="y4" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="-2147483647" maxX="2147483647">
+ <pos x="x6" y="y5" />
+ </ahXY>
+ </ahLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x2" y="t" />
+ <pt x="x3" y="y2" />
+ <pt x="x3" y="y1" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x3" y="y3" />
+ <pt x="x4" y="y4" />
+ <pt x="x1" y="y4" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x5" y="y4" />
+ <pt x="x6" y="y6" />
+ <pt x="x6" y="y5" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x6" y="y7" />
+ <pt x="x7" y="b" />
+ <pt x="r" y="b" />
+ </cubicBezTo>
+ </path>
+ </pathLst>
+
+ </curvedConnector5>
+ <curvedDownArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw" fmla="*/ ss a2 100000" />
+
+ <gd name="q1" fmla="+/ th aw 4" />
+
+ <gd name="wR" fmla="+- wd2 0 q1" />
+
+ <gd name="q7" fmla="*/ wR 2 1" />
+
+ <gd name="q8" fmla="*/ q7 q7 1" />
+
+ <gd name="q9" fmla="*/ th th 1" />
+
+ <gd name="q10" fmla="+- q8 0 q9" />
+ <gd name="q11" fmla="sqrt q10" />
+ <gd name="idy" fmla="*/ q11 h q7" />
+ <gd name="maxAdj3" fmla="*/ 100000 idy ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="ah" fmla="*/ ss adj3 100000" />
+
+
+
+
+
+ <gd name="x3" fmla="+- wR th 0" />
+
+ <gd name="q2" fmla="*/ h h 1" />
+ <gd name="q3" fmla="*/ ah ah 1" />
+ <gd name="q4" fmla="+- q2 0 q3" />
+ <gd name="q5" fmla="sqrt q4" />
+ <gd name="dx" fmla="*/ q5 wR h" />
+ <gd name="x5" fmla="+- wR dx 0" />
+
+ <gd name="x7" fmla="+- x3 dx 0" />
+
+ <gd name="q6" fmla="+- aw 0 th" />
+ <gd name="dh" fmla="*/ q6 1 2" />
+
+ <gd name="x4" fmla="+- x5 0 dh" />
+
+ <gd name="x8" fmla="+- x7 dh 0" />
+
+ <gd name="aw2" fmla="*/ aw 1 2" />
+ <gd name="x6" fmla="+- r 0 aw2" />
+
+ <gd name="y1" fmla="+- b 0 ah" />
+ <gd name="swAng" fmla="at2 ah dx" />
+
+ <gd name="mswAng" fmla="+- 0 0 swAng" />
+ <gd name="iy" fmla="+- b 0 idy" />
+
+ <gd name="ix" fmla="+/ wR x3 2" />
+
+ <gd name="q12" fmla="*/ th 1 2" />
+ <gd name="dang2" fmla="at2 idy q12" />
+ <gd name="stAng" fmla="+- 3cd4 swAng 0" />
+ <gd name="stAng2" fmla="+- 3cd4 0 dang2" />
+ <gd name="swAng2" fmla="+- dang2 0 cd4" />
+ <gd name="swAng3" fmla="+- cd4 dang2 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="adj2">
+ <pos x="x7" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x4" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="ix" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="q12" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x6" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x8" y="y1" />
+ </cxn>
+ </cxnLst>
+
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x6" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="stAng" swAng="mswAng" />
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="3cd4" swAng="swAng" />
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <close />
+ </path>
+
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="ix" y="iy" />
+ </moveTo>
+ <arcTo wR="wR" hR="h" stAng="stAng2" swAng="swAng2" />
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="cd2" swAng="swAng3" />
+ <close />
+ </path>
+
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="ix" y="iy" />
+ </moveTo>
+ <arcTo wR="wR" hR="h" stAng="stAng2" swAng="swAng2" />
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="3cd4" swAng="swAng" />
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="stAng" swAng="mswAng" />
+ </path>
+ </pathLst>
+
+ </curvedDownArrow>
+ <curvedLeftArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="a1" fmla="pin 0 adj1 a2" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw" fmla="*/ ss a2 100000" />
+
+ <gd name="q1" fmla="+/ th aw 4" />
+
+ <gd name="hR" fmla="+- hd2 0 q1" />
+
+ <gd name="q7" fmla="*/ hR 2 1" />
+
+ <gd name="q8" fmla="*/ q7 q7 1" />
+
+ <gd name="q9" fmla="*/ th th 1" />
+
+ <gd name="q10" fmla="+- q8 0 q9" />
+ <gd name="q11" fmla="sqrt q10" />
+ <gd name="idx" fmla="*/ q11 w q7" />
+ <gd name="maxAdj3" fmla="*/ 100000 idx ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="ah" fmla="*/ ss a3 100000" />
+
+
+
+
+
+ <gd name="y3" fmla="+- hR th 0" />
+
+ <gd name="q2" fmla="*/ w w 1" />
+ <gd name="q3" fmla="*/ ah ah 1" />
+ <gd name="q4" fmla="+- q2 0 q3" />
+ <gd name="q5" fmla="sqrt q4" />
+ <gd name="dy" fmla="*/ q5 hR w" />
+ <gd name="y5" fmla="+- hR dy 0" />
+
+ <gd name="y7" fmla="+- y3 dy 0" />
+
+ <gd name="q6" fmla="+- aw 0 th" />
+ <gd name="dh" fmla="*/ q6 1 2" />
+
+ <gd name="y4" fmla="+- y5 0 dh" />
+
+ <gd name="y8" fmla="+- y7 dh 0" />
+
+ <gd name="aw2" fmla="*/ aw 1 2" />
+ <gd name="y6" fmla="+- b 0 aw2" />
+
+ <gd name="x1" fmla="+- l ah 0" />
+ <gd name="swAng" fmla="at2 ah dy" />
+
+ <gd name="mswAng" fmla="+- 0 0 swAng" />
+ <gd name="ix" fmla="+- l idx 0" />
+
+ <gd name="iy" fmla="+/ hR y3 2" />
+
+ <gd name="q12" fmla="*/ th 1 2" />
+ <gd name="dang2" fmla="at2 idx q12" />
+ <gd name="swAng2" fmla="+- dang2 0 swAng" />
+ <gd name="swAng3" fmla="+- swAng dang2 0" />
+ <gd name="stAng3" fmla="+- 0 0 dang2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="a2">
+ <pos x="x1" y="y5" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="r" y="y4" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="maxAdj3">
+ <pos x="x1" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="l" y="q12" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y4" />
+ </cxn>
+ <cxn ang="cd3">
+ <pos x="l" y="y6" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="y8" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="iy" />
+ </cxn>
+ </cxnLst>
+
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="y6" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="swAng" swAng="swAng2" />
+ <arcTo wR="w" hR="hR" stAng="stAng3" swAng="swAng3" />
+ <lnTo>
+ <pt x="x1" y="y8" />
+ </lnTo>
+ <close />
+ </path>
+
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="r" y="y3" />
+ </moveTo>
+ <arcTo wR="w" hR="hR" stAng="0" swAng="-5400000" />
+ <lnTo>
+ <pt x="l" y="t" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="3cd4" swAng="cd4" />
+ <close />
+ </path>
+
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="r" y="y3" />
+ </moveTo>
+ <arcTo wR="w" hR="hR" stAng="0" swAng="-5400000" />
+ <lnTo>
+ <pt x="l" y="t" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="0" swAng="swAng" />
+ <lnTo>
+ <pt x="x1" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="swAng" swAng="swAng2" />
+ </path>
+ </pathLst>
+
+ </curvedLeftArrow>
+ <curvedRightArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="a1" fmla="pin 0 adj1 a2" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw" fmla="*/ ss a2 100000" />
+
+ <gd name="q1" fmla="+/ th aw 4" />
+
+ <gd name="hR" fmla="+- hd2 0 q1" />
+
+ <gd name="q7" fmla="*/ hR 2 1" />
+
+ <gd name="q8" fmla="*/ q7 q7 1" />
+
+ <gd name="q9" fmla="*/ th th 1" />
+
+ <gd name="q10" fmla="+- q8 0 q9" />
+ <gd name="q11" fmla="sqrt q10" />
+ <gd name="idx" fmla="*/ q11 w q7" />
+ <gd name="maxAdj3" fmla="*/ 100000 idx ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="ah" fmla="*/ ss a3 100000" />
+
+
+
+
+
+ <gd name="y3" fmla="+- hR th 0" />
+
+ <gd name="q2" fmla="*/ w w 1" />
+ <gd name="q3" fmla="*/ ah ah 1" />
+ <gd name="q4" fmla="+- q2 0 q3" />
+ <gd name="q5" fmla="sqrt q4" />
+ <gd name="dy" fmla="*/ q5 hR w" />
+ <gd name="y5" fmla="+- hR dy 0" />
+
+ <gd name="y7" fmla="+- y3 dy 0" />
+
+ <gd name="q6" fmla="+- aw 0 th" />
+ <gd name="dh" fmla="*/ q6 1 2" />
+
+ <gd name="y4" fmla="+- y5 0 dh" />
+
+ <gd name="y8" fmla="+- y7 dh 0" />
+
+ <gd name="aw2" fmla="*/ aw 1 2" />
+ <gd name="y6" fmla="+- b 0 aw2" />
+
+ <gd name="x1" fmla="+- r 0 ah" />
+ <gd name="swAng" fmla="at2 ah dy" />
+
+ <gd name="stAng" fmla="+- cd2 0 swAng" />
+ <gd name="mswAng" fmla="+- 0 0 swAng" />
+ <gd name="ix" fmla="+- r 0 idx" />
+
+ <gd name="iy" fmla="+/ hR y3 2" />
+
+ <gd name="q12" fmla="*/ th 1 2" />
+ <gd name="dang2" fmla="at2 idx q12" />
+ <gd name="swAng2" fmla="+- dang2 0 cd4" />
+ <gd name="swAng3" fmla="+- cd4 dang2 0" />
+ <gd name="stAng3" fmla="+- cd2 0 dang2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="a2">
+ <pos x="x1" y="y5" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="r" y="y4" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="maxAdj3">
+ <pos x="x1" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="l" y="iy" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="y8" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y6" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x1" y="y4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="q12" />
+ </cxn>
+ </cxnLst>
+
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="hR" />
+ </moveTo>
+ <arcTo wR="w" hR="hR" stAng="cd2" swAng="mswAng" />
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y7" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="stAng" swAng="swAng" />
+ <close />
+ </path>
+
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="r" y="th" />
+ </moveTo>
+ <arcTo wR="w" hR="hR" stAng="3cd4" swAng="swAng2" />
+ <arcTo wR="w" hR="hR" stAng="stAng3" swAng="swAng3" />
+ <close />
+ </path>
+
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="hR" />
+ </moveTo>
+ <arcTo wR="w" hR="hR" stAng="cd2" swAng="mswAng" />
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y7" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="stAng" swAng="swAng" />
+ <lnTo>
+ <pt x="l" y="hR" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="th" />
+ </lnTo>
+ <arcTo wR="w" hR="hR" stAng="3cd4" swAng="swAng2" />
+ </path>
+ </pathLst>
+
+ </curvedRightArrow>
+ <curvedUpArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw" fmla="*/ ss a2 100000" />
+
+ <gd name="q1" fmla="+/ th aw 4" />
+
+ <gd name="wR" fmla="+- wd2 0 q1" />
+
+ <gd name="q7" fmla="*/ wR 2 1" />
+
+ <gd name="q8" fmla="*/ q7 q7 1" />
+
+ <gd name="q9" fmla="*/ th th 1" />
+
+ <gd name="q10" fmla="+- q8 0 q9" />
+ <gd name="q11" fmla="sqrt q10" />
+ <gd name="idy" fmla="*/ q11 h q7" />
+ <gd name="maxAdj3" fmla="*/ 100000 idy ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="ah" fmla="*/ ss adj3 100000" />
+
+
+
+
+
+ <gd name="x3" fmla="+- wR th 0" />
+
+ <gd name="q2" fmla="*/ h h 1" />
+ <gd name="q3" fmla="*/ ah ah 1" />
+ <gd name="q4" fmla="+- q2 0 q3" />
+ <gd name="q5" fmla="sqrt q4" />
+ <gd name="dx" fmla="*/ q5 wR h" />
+ <gd name="x5" fmla="+- wR dx 0" />
+
+ <gd name="x7" fmla="+- x3 dx 0" />
+
+ <gd name="q6" fmla="+- aw 0 th" />
+ <gd name="dh" fmla="*/ q6 1 2" />
+
+ <gd name="x4" fmla="+- x5 0 dh" />
+
+ <gd name="x8" fmla="+- x7 dh 0" />
+
+ <gd name="aw2" fmla="*/ aw 1 2" />
+ <gd name="x6" fmla="+- r 0 aw2" />
+
+ <gd name="y1" fmla="+- t ah 0" />
+ <gd name="swAng" fmla="at2 ah dx" />
+
+ <gd name="mswAng" fmla="+- 0 0 swAng" />
+ <gd name="iy" fmla="+- t idy 0" />
+
+ <gd name="ix" fmla="+/ wR x3 2" />
+
+ <gd name="q12" fmla="*/ th 1 2" />
+ <gd name="dang2" fmla="at2 idy q12" />
+ <gd name="swAng2" fmla="+- dang2 0 swAng" />
+ <gd name="mswAng2" fmla="+- 0 0 swAng2" />
+ <gd name="stAng3" fmla="+- cd4 0 swAng" />
+ <gd name="swAng3" fmla="+- swAng dang2 0" />
+ <gd name="stAng2" fmla="+- cd4 0 dang2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="a2">
+ <pos x="x7" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x4" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x6" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x4" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="q12" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ix" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x8" y="y1" />
+ </cxn>
+ </cxnLst>
+
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x6" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="stAng3" swAng="swAng3" />
+ <arcTo wR="wR" hR="h" stAng="stAng2" swAng="swAng2" />
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <close />
+ </path>
+
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="wR" y="b" />
+ </moveTo>
+ <arcTo wR="wR" hR="h" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="th" y="t" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="cd2" swAng="-5400000" />
+ <close />
+ </path>
+
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="ix" y="iy" />
+ </moveTo>
+ <arcTo wR="wR" hR="h" stAng="stAng2" swAng="swAng2" />
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="stAng3" swAng="swAng" />
+ <lnTo>
+ <pt x="wR" y="b" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="th" y="t" />
+ </lnTo>
+ <arcTo wR="wR" hR="h" stAng="cd2" swAng="-5400000" />
+ </path>
+ </pathLst>
+
+ </curvedUpArrow>
+ <decagon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="vf" fmla="val 105146" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="dx1" fmla="cos wd2 2160000" />
+ <gd name="dx2" fmla="cos wd2 4320000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="dy1" fmla="sin shd2 4320000" />
+ <gd name="dy2" fmla="sin shd2 2160000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc dy2 0" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y2" r="x4" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </decagon>
+ <diagStripe>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 100000" />
+ <gd name="x2" fmla="*/ w a 100000" />
+ <gd name="x1" fmla="*/ x2 1 2" />
+ <gd name="x3" fmla="+/ x2 r 2" />
+ <gd name="y2" fmla="*/ h a 100000" />
+ <gd name="y1" fmla="*/ y2 1 2" />
+ <gd name="y3" fmla="+/ y2 b 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="100000">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="hc" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="x3" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </diagStripe>
+ <diamond>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="ir" fmla="*/ w 3 4" />
+ <gd name="ib" fmla="*/ h 3 4" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="wd4" t="hd4" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </diamond>
+ <dodecagon>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x1" fmla="*/ w 2894 21600" />
+ <gd name="x2" fmla="*/ w 7906 21600" />
+ <gd name="x3" fmla="*/ w 13694 21600" />
+ <gd name="x4" fmla="*/ w 18706 21600" />
+ <gd name="y1" fmla="*/ h 2894 21600" />
+ <gd name="y2" fmla="*/ h 7906 21600" />
+ <gd name="y3" fmla="*/ h 13694 21600" />
+ <gd name="y4" fmla="*/ h 18706 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y3" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x4" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </dodecagon>
+ <donut>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dr" fmla="*/ ss a 100000" />
+ <gd name="iwd2" fmla="+- wd2 0 dr" />
+ <gd name="ihd2" fmla="+- hd2 0 dr" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj" minR="0" maxR="50000">
+ <pos x="dr" y="vc" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ <moveTo>
+ <pt x="dr" y="vc" />
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="cd2" swAng="-5400000" />
+ <arcTo wR="iwd2" hR="ihd2" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="iwd2" hR="ihd2" stAng="0" swAng="-5400000" />
+ <arcTo wR="iwd2" hR="ihd2" stAng="3cd4" swAng="-5400000" />
+ <close />
+ </path>
+ </pathLst>
+
+ </donut>
+ <doubleWave>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 6250" />
+
+ <gd name="adj2" fmla="val 0" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 12500" />
+ <gd name="a2" fmla="pin -10000 adj2 10000" />
+ <gd name="y1" fmla="*/ h a1 100000" />
+
+ <gd name="dy2" fmla="*/ y1 10 3" />
+ <gd name="y2" fmla="+- y1 0 dy2" />
+
+ <gd name="y3" fmla="+- y1 dy2 0" />
+
+ <gd name="y4" fmla="+- b 0 y1" />
+
+ <gd name="y5" fmla="+- y4 0 dy2" />
+
+ <gd name="y6" fmla="+- y4 dy2 0" />
+
+ <gd name="dx1" fmla="*/ w a2 100000" />
+
+ <gd name="of2" fmla="*/ w a2 50000" />
+
+ <gd name="x1" fmla="abs dx1" />
+
+ <gd name="dx2" fmla="?: of2 0 of2" />
+ <gd name="x2" fmla="+- l 0 dx2" />
+
+ <gd name="dx8" fmla="?: of2 of2 0" />
+ <gd name="x8" fmla="+- r 0 dx8" />
+
+ <gd name="dx3" fmla="+/ dx2 x8 6" />
+ <gd name="x3" fmla="+- x2 dx3 0" />
+
+ <gd name="dx4" fmla="+/ dx2 x8 3" />
+ <gd name="x4" fmla="+- x2 dx4 0" />
+
+ <gd name="x5" fmla="+/ x2 x8 2" />
+
+ <gd name="x6" fmla="+- x5 dx3 0" />
+
+ <gd name="x7" fmla="+/ x6 x8 2" />
+
+ <gd name="x9" fmla="+- l dx8 0" />
+
+ <gd name="x15" fmla="+- r dx2 0" />
+
+ <gd name="x10" fmla="+- x9 dx3 0" />
+
+ <gd name="x11" fmla="+- x9 dx4 0" />
+
+ <gd name="x12" fmla="+/ x9 x15 2" />
+
+ <gd name="x13" fmla="+- x12 dx3 0" />
+
+ <gd name="x14" fmla="+/ x13 x15 2" />
+
+ <gd name="x16" fmla="+- r 0 x1" />
+
+ <gd name="xAdj" fmla="+- hc dx1 0" />
+ <gd name="il" fmla="max x2 x9" />
+ <gd name="ir" fmla="min x8 x15" />
+ <gd name="it" fmla="*/ h a1 50000" />
+ <gd name="ib" fmla="+- b 0 it" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="12500">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="x12" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x5" y="y4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x16" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y2" />
+ <pt x="x4" y="y3" />
+ <pt x="x5" y="y1" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x6" y="y2" />
+ <pt x="x7" y="y3" />
+ <pt x="x8" y="y1" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="x15" y="y4" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="x14" y="y6" />
+ <pt x="x13" y="y5" />
+ <pt x="x12" y="y4" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x11" y="y6" />
+ <pt x="x10" y="y5" />
+ <pt x="x9" y="y4" />
+ </cubicBezTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </doubleWave>
+ <downArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 h ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="dy1" fmla="*/ ss a2 100000" />
+ <gd name="y1" fmla="+- b 0 dy1" />
+ <gd name="dx1" fmla="*/ w a1 200000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc dx1 0" />
+ <gd name="dy2" fmla="*/ x1 dy1 wd2" />
+ <gd name="y2" fmla="+- y1 dy2 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="100000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="l" y="y1" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="t" r="x2" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </downArrow>
+ <downArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 64977" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 100000 h ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss h" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dx1" fmla="*/ ss a2 100000" />
+
+ <gd name="dx2" fmla="*/ ss a1 200000" />
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="dy3" fmla="*/ ss a3 100000" />
+
+ <gd name="y3" fmla="+- b 0 dy3" />
+ <gd name="y2" fmla="*/ h a4 100000" />
+
+ <gd name="y1" fmla="*/ y2 1 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x2" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y3" />
+ </ahXY>
+ <ahXY gdRefY="adj4" minY="0" maxY="maxAdj4">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </downArrowCallout>
+ <ellipse>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+ </ellipse>
+ <ellipseRibbon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 25000 adj2 75000" />
+ <gd name="q10" fmla="+- 100000 0 a1" />
+ <gd name="q11" fmla="*/ q10 1 2" />
+ <gd name="q12" fmla="+- a1 0 q11" />
+ <gd name="minAdj3" fmla="max 0 q12" />
+ <gd name="a3" fmla="pin minAdj3 adj3 a1" />
+
+
+ <gd name="dx2" fmla="*/ w a2 200000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x3" fmla="+- x2 wd8 0" />
+
+ <gd name="x4" fmla="+- r 0 x3" />
+
+ <gd name="x5" fmla="+- r 0 x2" />
+
+ <gd name="x6" fmla="+- r 0 wd8" />
+
+ <gd name="dy1" fmla="*/ h a3 100000" />
+
+ <gd name="f1" fmla="*/ 4 dy1 w" />
+
+ <gd name="q1" fmla="*/ x3 x3 w" />
+ <gd name="q2" fmla="+- x3 0 q1" />
+ <gd name="y1" fmla="*/ f1 q2 1" />
+
+ <gd name="cx1" fmla="*/ x3 1 2" />
+
+ <gd name="cy1" fmla="*/ f1 cx1 1" />
+
+ <gd name="cx2" fmla="+- r 0 cx1" />
+
+
+
+ <gd name="q1" fmla="*/ h a1 100000" />
+
+ <gd name="dy3" fmla="+- q1 0 dy1" />
+
+ <gd name="q3" fmla="*/ x2 x2 w" />
+ <gd name="q4" fmla="+- x2 0 q3" />
+ <gd name="q5" fmla="*/ f1 q4 1" />
+ <gd name="y3" fmla="+- q5 dy3 0" />
+
+
+
+ <gd name="q6" fmla="+- dy1 dy3 y3" />
+ <gd name="q7" fmla="+- q6 dy1 0" />
+ <gd name="cy3" fmla="+- q7 dy3 0" />
+
+ <gd name="rh" fmla="+- b 0 q1" />
+
+ <gd name="q8" fmla="*/ dy1 14 16" />
+ <gd name="y2" fmla="+/ q8 rh 2" />
+
+
+ <gd name="y5" fmla="+- q5 rh 0" />
+
+ <gd name="y6" fmla="+- y3 rh 0" />
+
+ <gd name="cx4" fmla="*/ x2 1 2" />
+
+ <gd name="q9" fmla="*/ f1 cx4 1" />
+ <gd name="cy4" fmla="+- q9 rh 0" />
+
+ <gd name="cx5" fmla="+- r 0 cx4" />
+
+
+
+
+
+ <gd name="cy6" fmla="+- cy3 rh 0" />
+
+ <gd name="y7" fmla="+- y1 dy3 0" />
+ <gd name="cy7" fmla="+- q1 q1 y7" />
+ <gd name="y8" fmla="+- b 0 dy1" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="hc" y="q1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="25000" maxX="75000">
+ <pos x="x2" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="minAdj3" maxY="a1">
+ <pos x="l" y="y8" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="q1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd8" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="q1" r="x5" b="y6" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <quadBezTo>
+ <pt x="cx1" y="cy1" />
+ <pt x="x3" y="y1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x5" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx2" y="cy1" />
+ <pt x="r" y="t" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="rh" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx5" y="cy4" />
+ <pt x="x5" y="y5" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x5" y="y6" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy6" />
+ <pt x="x2" y="y6" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx4" y="cy4" />
+ <pt x="l" y="rh" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="wd8" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x3" y="y7" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x5" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y7" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy7" />
+ <pt x="x3" y="y7" />
+ </quadBezTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <quadBezTo>
+ <pt x="cx1" y="cy1" />
+ <pt x="x3" y="y1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x5" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx2" y="cy1" />
+ <pt x="r" y="t" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="rh" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx5" y="cy4" />
+ <pt x="x5" y="y5" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x5" y="y6" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy6" />
+ <pt x="x2" y="y6" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx4" y="cy4" />
+ <pt x="l" y="rh" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="wd8" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x2" y="y5" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <moveTo>
+ <pt x="x5" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="x5" y="y5" />
+ </lnTo>
+ <moveTo>
+ <pt x="x3" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="y7" />
+ </lnTo>
+ <moveTo>
+ <pt x="x4" y="y7" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </ellipseRibbon>
+ <ellipseRibbon2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 25000 adj2 75000" />
+ <gd name="q10" fmla="+- 100000 0 a1" />
+ <gd name="q11" fmla="*/ q10 1 2" />
+ <gd name="q12" fmla="+- a1 0 q11" />
+ <gd name="minAdj3" fmla="max 0 q12" />
+ <gd name="a3" fmla="pin minAdj3 adj3 a1" />
+ <gd name="dx2" fmla="*/ w a2 200000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x3" fmla="+- x2 wd8 0" />
+
+ <gd name="x4" fmla="+- r 0 x3" />
+
+ <gd name="x5" fmla="+- r 0 x2" />
+
+ <gd name="x6" fmla="+- r 0 wd8" />
+
+ <gd name="dy1" fmla="*/ h a3 100000" />
+
+ <gd name="f1" fmla="*/ 4 dy1 w" />
+
+ <gd name="q1" fmla="*/ x3 x3 w" />
+ <gd name="q2" fmla="+- x3 0 q1" />
+ <gd name="u1" fmla="*/ f1 q2 1" />
+
+ <gd name="y1" fmla="+- b 0 u1" />
+ <gd name="cx1" fmla="*/ x3 1 2" />
+
+ <gd name="cu1" fmla="*/ f1 cx1 1" />
+
+ <gd name="cy1" fmla="+- b 0 cu1" />
+ <gd name="cx2" fmla="+- r 0 cx1" />
+
+
+
+ <gd name="q1" fmla="*/ h a1 100000" />
+
+ <gd name="dy3" fmla="+- q1 0 dy1" />
+
+ <gd name="q3" fmla="*/ x2 x2 w" />
+ <gd name="q4" fmla="+- x2 0 q3" />
+ <gd name="q5" fmla="*/ f1 q4 1" />
+ <gd name="u3" fmla="+- q5 dy3 0" />
+
+ <gd name="y3" fmla="+- b 0 u3" />
+
+
+ <gd name="q6" fmla="+- dy1 dy3 u3" />
+ <gd name="q7" fmla="+- q6 dy1 0" />
+ <gd name="cu3" fmla="+- q7 dy3 0" />
+
+ <gd name="cy3" fmla="+- b 0 cu3" />
+ <gd name="rh" fmla="+- b 0 q1" />
+
+ <gd name="q8" fmla="*/ dy1 14 16" />
+ <gd name="u2" fmla="+/ q8 rh 2" />
+
+ <gd name="y2" fmla="+- b 0 u2" />
+
+ <gd name="u5" fmla="+- q5 rh 0" />
+
+ <gd name="y5" fmla="+- b 0 u5" />
+ <gd name="u6" fmla="+- u3 rh 0" />
+
+ <gd name="y6" fmla="+- b 0 u6" />
+ <gd name="cx4" fmla="*/ x2 1 2" />
+
+ <gd name="q9" fmla="*/ f1 cx4 1" />
+ <gd name="cu4" fmla="+- q9 rh 0" />
+
+ <gd name="cy4" fmla="+- b 0 cu4" />
+ <gd name="cx5" fmla="+- r 0 cx4" />
+
+
+
+
+
+ <gd name="cu6" fmla="+- cu3 rh 0" />
+
+ <gd name="cy6" fmla="+- b 0 cu6" />
+ <gd name="u7" fmla="+- u1 dy3 0" />
+ <gd name="y7" fmla="+- b 0 u7" />
+ <gd name="cu7" fmla="+- q1 q1 u7" />
+ <gd name="cy7" fmla="+- b 0 cu7" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="hc" y="rh" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="25000" maxX="100000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="minAdj3" maxY="a1">
+ <pos x="l" y="dy1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd8" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="rh" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="y6" r="x5" b="rh" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <quadBezTo>
+ <pt x="cx1" y="cy1" />
+ <pt x="x3" y="y1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x5" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx2" y="cy1" />
+ <pt x="r" y="b" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="q1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx5" y="cy4" />
+ <pt x="x5" y="y5" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x5" y="y6" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy6" />
+ <pt x="x2" y="y6" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx4" y="cy4" />
+ <pt x="l" y="q1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="wd8" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="x3" y="y7" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x5" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y7" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy7" />
+ <pt x="x3" y="y7" />
+ </quadBezTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="wd8" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="q1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx4" y="cy4" />
+ <pt x="x2" y="y5" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x2" y="y6" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy6" />
+ <pt x="x5" y="y6" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x5" y="y5" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx5" y="cy4" />
+ <pt x="r" y="q1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx2" y="cy1" />
+ <pt x="x4" y="y1" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x5" y="y3" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="hc" y="cy3" />
+ <pt x="x2" y="y3" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="cx1" y="cy1" />
+ <pt x="l" y="b" />
+ </quadBezTo>
+ <close />
+ <moveTo>
+ <pt x="x2" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <moveTo>
+ <pt x="x5" y="y5" />
+ </moveTo>
+ <lnTo>
+ <pt x="x5" y="y3" />
+ </lnTo>
+ <moveTo>
+ <pt x="x3" y="y7" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <moveTo>
+ <pt x="x4" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="y7" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </ellipseRibbon2>
+ <flowChartAlternateProcess>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="+- r 0 ssd6" />
+ <gd name="y2" fmla="+- b 0 ssd6" />
+ <gd name="il" fmla="*/ ssd6 29289 100000" />
+
+
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="ssd6" />
+ </moveTo>
+ <arcTo wR="ssd6" hR="ssd6" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <arcTo wR="ssd6" hR="ssd6" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="ssd6" hR="ssd6" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="ssd6" y="b" />
+ </lnTo>
+ <arcTo wR="ssd6" hR="ssd6" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartAlternateProcess>
+ <flowChartCollate>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="ir" fmla="*/ w 3 4" />
+ <gd name="ib" fmla="*/ h 3 4" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="hd4" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="2" h="2">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="2" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="2" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartCollate>
+ <flowChartConnector>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartConnector>
+ <flowChartDecision>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="ir" fmla="*/ w 3 4" />
+ <gd name="ib" fmla="*/ h 3 4" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="hd4" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="2" h="2">
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartDecision>
+ <flowChartDelay>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartDelay>
+ <flowChartDisplay>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 5 6" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd6" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="6" h="6">
+ <moveTo>
+ <pt x="0" y="3" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="1" y="6" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartDisplay>
+ <flowChartDocument>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h 17322 21600" />
+ <gd name="y2" fmla="*/ h 20172 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="y1" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="21600" h="21600">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="21600" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="17322" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="10800" y="17322" />
+ <pt x="10800" y="23922" />
+ <pt x="0" y="20172" />
+ </cubicBezTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartDocument>
+ <flowChartExtract>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 3 4" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd4" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="vc" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="2" h="2">
+ <moveTo>
+ <pt x="0" y="2" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartExtract>
+ <flowChartInputOutput>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x3" fmla="*/ w 2 5" />
+ <gd name="x4" fmla="*/ w 3 5" />
+ <gd name="x5" fmla="*/ w 4 5" />
+ <gd name="x6" fmla="*/ w 9 10" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x4" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd10" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd5" t="t" r="x5" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="5" h="5">
+ <moveTo>
+ <pt x="0" y="5" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="4" y="5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartInputOutput>
+ <flowChartInternalStorage>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd8" t="hd8" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="1" h="1">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="8" h="8">
+
+ <moveTo>
+ <pt x="1" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="8" />
+ </lnTo>
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="8" y="1" />
+ </lnTo>
+ </path>
+ <path fill="none" w="1" h="1">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartInternalStorage>
+ <flowChartMagneticDisk>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y3" fmla="*/ h 5 6" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="hd3" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="hd3" r="r" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="6" h="6">
+
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <arcTo wR="3" hR="1" stAng="cd2" swAng="cd2" />
+ <lnTo>
+ <pt x="6" y="5" />
+ </lnTo>
+ <arcTo wR="3" hR="1" stAng="0" swAng="cd2" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="6" h="6">
+
+ <moveTo>
+ <pt x="6" y="1" />
+ </moveTo>
+ <arcTo wR="3" hR="1" stAng="0" swAng="cd2" />
+ </path>
+ <path fill="none" w="6" h="6">
+
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <arcTo wR="3" hR="1" stAng="cd2" swAng="cd2" />
+ <lnTo>
+ <pt x="6" y="5" />
+ </lnTo>
+ <arcTo wR="3" hR="1" stAng="0" swAng="cd2" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartMagneticDisk>
+ <flowChartMagneticDrum>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 2 3" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd6" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="6" h="6">
+
+ <moveTo>
+ <pt x="1" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="1" y="6" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="cd4" swAng="cd2" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="6" h="6">
+
+ <moveTo>
+ <pt x="5" y="6" />
+ </moveTo>
+ <arcTo wR="1" hR="3" stAng="cd4" swAng="cd2" />
+ </path>
+ <path fill="none" w="6" h="6">
+
+ <moveTo>
+ <pt x="1" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="1" y="6" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="cd4" swAng="cd2" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartMagneticDrum>
+ <flowChartMagneticTape>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ <gd name="ang1" fmla="at2 w h" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="hc" y="b" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="ang1" />
+ <lnTo>
+ <pt x="r" y="ib" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartMagneticTape>
+ <flowChartManualInput>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="hd10" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="hd5" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="5" h="5">
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="5" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartManualInput>
+ <flowChartManualOperation>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x3" fmla="*/ w 4 5" />
+ <gd name="x4" fmla="*/ w 9 10" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd10" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd5" t="t" r="x3" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="5" h="5">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="4" y="5" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartManualOperation>
+ <flowChartMerge>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 3 4" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd4" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="t" r="x2" b="vc" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="2" h="2">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartMerge>
+ <flowChartMultidocument>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y2" fmla="*/ h 3675 21600" />
+ <gd name="y8" fmla="*/ h 20782 21600" />
+ <gd name="x3" fmla="*/ w 9298 21600" />
+ <gd name="x4" fmla="*/ w 12286 21600" />
+ <gd name="x5" fmla="*/ w 18595 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x4" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y8" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="y2" r="x5" b="y8" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="21600" h="21600">
+
+ <moveTo>
+ <pt x="0" y="20782" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="9298" y="23542" />
+ <pt x="9298" y="18022" />
+ <pt x="18595" y="18022" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="18595" y="3675" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="3675" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="1532" y="3675" />
+ </moveTo>
+ <lnTo>
+ <pt x="1532" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="20000" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="20000" y="16252" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="19298" y="16252" />
+ <pt x="18595" y="16352" />
+ <pt x="18595" y="16352" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="18595" y="3675" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="2972" y="1815" />
+ </moveTo>
+ <lnTo>
+ <pt x="2972" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="14392" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="20800" y="14392" />
+ <pt x="20000" y="14467" />
+ <pt x="20000" y="14467" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="20000" y="1815" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="21600" h="21600">
+
+ <moveTo>
+ <pt x="0" y="3675" />
+ </moveTo>
+ <lnTo>
+ <pt x="18595" y="3675" />
+ </lnTo>
+ <lnTo>
+ <pt x="18595" y="18022" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="9298" y="18022" />
+ <pt x="9298" y="23542" />
+ <pt x="0" y="20782" />
+ </cubicBezTo>
+ <close />
+ <moveTo>
+ <pt x="1532" y="3675" />
+ </moveTo>
+ <lnTo>
+ <pt x="1532" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="20000" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="20000" y="16252" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="19298" y="16252" />
+ <pt x="18595" y="16352" />
+ <pt x="18595" y="16352" />
+ </cubicBezTo>
+ <moveTo>
+ <pt x="2972" y="1815" />
+ </moveTo>
+ <lnTo>
+ <pt x="2972" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="14392" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="20800" y="14392" />
+ <pt x="20000" y="14467" />
+ <pt x="20000" y="14467" />
+ </cubicBezTo>
+ </path>
+ <path stroke="false" fill="none" w="21600" h="21600">
+
+ <moveTo>
+ <pt x="0" y="20782" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="9298" y="23542" />
+ <pt x="9298" y="18022" />
+ <pt x="18595" y="18022" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="18595" y="16352" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="18595" y="16352" />
+ <pt x="19298" y="16252" />
+ <pt x="20000" y="16252" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="20000" y="14467" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="20000" y="14467" />
+ <pt x="20800" y="14392" />
+ <pt x="21600" y="14392" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="21600" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2972" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2972" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="1532" y="1815" />
+ </lnTo>
+ <lnTo>
+ <pt x="1532" y="3675" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="3675" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartMultidocument>
+ <flowChartOfflineStorage>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x4" fmla="*/ w 3 4" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd4" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="t" r="x4" b="vc" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="2" h="2">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="5" h="5">
+
+ <moveTo>
+ <pt x="2" y="4" />
+ </moveTo>
+ <lnTo>
+ <pt x="3" y="4" />
+ </lnTo>
+ </path>
+ <path fill="none" extrusionOk="true" w="2" h="2">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartOfflineStorage>
+ <flowChartOffpageConnector>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y1" fmla="*/ h 4 5" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="y1" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="10" h="10">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="10" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="8" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="8" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartOffpageConnector>
+ <flowChartOnlineStorage>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 5 6" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd6" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="6" h="6">
+ <moveTo>
+ <pt x="1" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="6" y="0" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="1" y="6" />
+ </lnTo>
+ <arcTo wR="1" hR="3" stAng="cd4" swAng="cd2" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartOnlineStorage>
+ <flowChartOr>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="hc" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ </path>
+ <path fill="none">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartOr>
+ <flowChartPredefinedProcess>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 7 8" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd8" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="1" h="1">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="8" h="8">
+
+ <moveTo>
+ <pt x="1" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="8" />
+ </lnTo>
+ <moveTo>
+ <pt x="7" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="7" y="8" />
+ </lnTo>
+ </path>
+ <path fill="none" w="1" h="1">
+
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartPredefinedProcess>
+ <flowChartPreparation>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 4 5" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd5" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="10" h="10">
+ <moveTo>
+ <pt x="0" y="5" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="8" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="10" y="5" />
+ </lnTo>
+ <lnTo>
+ <pt x="8" y="10" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="10" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartPreparation>
+ <flowChartProcess>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="1" h="1">
+ <moveTo>
+ <pt x="0" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartProcess>
+ <flowChartPunchedCard>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="hd5" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="5" h="5">
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="5" y="5" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartPunchedCard>
+ <flowChartPunchedTape>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="y2" fmla="*/ h 9 10" />
+ <gd name="ib" fmla="*/ h 4 5" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="hd10" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="hd5" r="r" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="20" h="20">
+ <moveTo>
+ <pt x="0" y="2" />
+ </moveTo>
+ <arcTo wR="5" hR="2" stAng="cd2" swAng="-10800000" />
+ <arcTo wR="5" hR="2" stAng="cd2" swAng="cd2" />
+ <lnTo>
+ <pt x="20" y="18" />
+ </lnTo>
+ <arcTo wR="5" hR="2" stAng="0" swAng="-10800000" />
+ <arcTo wR="5" hR="2" stAng="0" swAng="cd2" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartPunchedTape>
+ <flowChartSort>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="ir" fmla="*/ w 3 4" />
+ <gd name="ib" fmla="*/ h 3 4" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="wd4" t="hd4" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false" w="2" h="2">
+
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false" w="2" h="2">
+
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="2" y="1" />
+ </lnTo>
+ </path>
+ <path fill="none" w="2" h="2">
+
+ <moveTo>
+ <pt x="0" y="1" />
+ </moveTo>
+ <lnTo>
+ <pt x="1" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="2" y="1" />
+ </lnTo>
+ <lnTo>
+ <pt x="1" y="2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartSort>
+ <flowChartSummingJunction>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="il" y="it" />
+ </moveTo>
+ <lnTo>
+ <pt x="ir" y="ib" />
+ </lnTo>
+ <moveTo>
+ <pt x="ir" y="it" />
+ </moveTo>
+ <lnTo>
+ <pt x="il" y="ib" />
+ </lnTo>
+ </path>
+ <path fill="none">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartSummingJunction>
+ <flowChartTerminator>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="il" fmla="*/ w 1018 21600" />
+ <gd name="ir" fmla="*/ w 20582 21600" />
+ <gd name="it" fmla="*/ h 3163 21600" />
+ <gd name="ib" fmla="*/ h 18437 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="21600" h="21600">
+ <moveTo>
+ <pt x="3475" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="18125" y="0" />
+ </lnTo>
+ <arcTo wR="3475" hR="10800" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="3475" y="21600" />
+ </lnTo>
+ <arcTo wR="3475" hR="10800" stAng="cd4" swAng="cd2" />
+ <close />
+ </path>
+ </pathLst>
+
+ </flowChartTerminator>
+ <foldedCorner>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dy2" fmla="*/ ss a 100000" />
+ <gd name="dy1" fmla="*/ dy2 1 5" />
+ <gd name="x1" fmla="+- r 0 dy2" />
+ <gd name="x2" fmla="+- x1 dy1 0" />
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="y1" fmla="+- y2 dy1 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x1" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+ <moveTo>
+ <pt x="x1" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </foldedCorner>
+ <frame>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="x1" fmla="*/ ss a1 100000" />
+
+ <gd name="x4" fmla="+- r 0 x1" />
+
+
+
+ <gd name="y4" fmla="+- b 0 x1" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="x1" r="x4" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x1" y="x1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="x1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </frame>
+ <funnel>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="d" fmla="*/ ss 1 20" />
+
+
+ <gd name="rw2" fmla="+- wd2 0 d" />
+
+ <gd name="rh2" fmla="+- hd4 0 d" />
+
+
+
+ <gd name="t1" fmla="cos wd2 480000" />
+
+ <gd name="t2" fmla="sin hd4 480000" />
+
+ <gd name="da" fmla="at2 t1 t2" />
+
+
+ <gd name="2da" fmla="*/ da 2 1" />
+ <gd name="stAng1" fmla="+- cd2 0 da" />
+ <gd name="swAng1" fmla="+- cd2 2da 0" />
+
+
+ <gd name="swAng3" fmla="+- cd2 0 2da" />
+
+
+ <gd name="rw3" fmla="*/ wd2 1 4" />
+ <gd name="rh3" fmla="*/ hd4 1 4" />
+
+
+ <gd name="ct1" fmla="cos hd4 stAng1" />
+ <gd name="st1" fmla="sin wd2 stAng1" />
+ <gd name="m1" fmla="mod ct1 st1 0" />
+ <gd name="n1" fmla="*/ wd2 hd4 m1" />
+ <gd name="dx1" fmla="cos n1 stAng1" />
+ <gd name="dy1" fmla="sin n1 stAng1" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- hd4 dy1 0" />
+
+
+ <gd name="ct3" fmla="cos rh3 da" />
+ <gd name="st3" fmla="sin rw3 da" />
+ <gd name="m3" fmla="mod ct3 st3 0" />
+ <gd name="n3" fmla="*/ rw3 rh3 m3" />
+ <gd name="dx3" fmla="cos n3 da" />
+ <gd name="dy3" fmla="sin n3 da" />
+ <gd name="x3" fmla="+- hc dx3 0" />
+ <gd name="vc3" fmla="+- b 0 rh3" />
+ <gd name="y2" fmla="+- vc3 dy3 0" />
+
+
+ <gd name="x2" fmla="+- wd2 0 rw2" />
+
+ <gd name="cd" fmla="*/ cd2 2 1" />
+ </gdLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo hR="hd4" wR="wd2" stAng="stAng1" swAng="swAng1" />
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <arcTo hR="rh3" wR="rw3" stAng="da" swAng="swAng3" />
+ <close />
+ <moveTo>
+ <pt x="x2" y="hd4" />
+ </moveTo>
+ <arcTo hR="rh2" wR="rw2" stAng="cd2" swAng="-21600000" />
+ <close />
+ </path>
+ </pathLst>
+
+ </funnel>
+ <gear6>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 15000" />
+
+ <gd name="adj2" fmla="val 3526" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+
+
+
+ <gd name="a1" fmla="pin 0 adj1 20000" />
+ <gd name="a2" fmla="pin 0 adj2 5358" />
+
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+ <gd name="lFD" fmla="*/ ss a2 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+ <gd name="l2" fmla="*/ lFD 1 2" />
+ <gd name="l3" fmla="+- th2 l2 0" />
+
+
+ <gd name="rh" fmla="+- hd2 0 th" />
+ <gd name="rw" fmla="+- wd2 0 th" />
+
+
+ <gd name="dr" fmla="+- rw 0 rh" />
+ <gd name="maxr" fmla="?: dr rh rw" />
+ <gd name="ha" fmla="at2 maxr l3" />
+
+
+ <gd name="aA1" fmla="+- 19800000 0 ha" />
+ <gd name="aD1" fmla="+- 19800000 ha 0" />
+
+
+ <gd name="ta11" fmla="cos rw aA1" />
+ <gd name="ta12" fmla="sin rh aA1" />
+ <gd name="bA1" fmla="at2 ta11 ta12" />
+
+ <gd name="cta1" fmla="cos rh bA1" />
+ <gd name="sta1" fmla="sin rw bA1" />
+ <gd name="ma1" fmla="mod cta1 sta1 0" />
+ <gd name="na1" fmla="*/ rw rh ma1" />
+ <gd name="dxa1" fmla="cos na1 bA1" />
+ <gd name="dya1" fmla="sin na1 bA1" />
+ <gd name="xA1" fmla="+- hc dxa1 0" />
+ <gd name="yA1" fmla="+- vc dya1 0" />
+
+
+ <gd name="td11" fmla="cos rw aD1" />
+ <gd name="td12" fmla="sin rh aD1" />
+ <gd name="bD1" fmla="at2 td11 td12" />
+
+ <gd name="ctd1" fmla="cos rh bD1" />
+ <gd name="std1" fmla="sin rw bD1" />
+ <gd name="md1" fmla="mod ctd1 std1 0" />
+ <gd name="nd1" fmla="*/ rw rh md1" />
+ <gd name="dxd1" fmla="cos nd1 bD1" />
+ <gd name="dyd1" fmla="sin nd1 bD1" />
+ <gd name="xD1" fmla="+- hc dxd1 0" />
+ <gd name="yD1" fmla="+- vc dyd1 0" />
+
+
+ <gd name="xAD1" fmla="+- xA1 0 xD1" />
+ <gd name="yAD1" fmla="+- yA1 0 yD1" />
+ <gd name="lAD1" fmla="mod xAD1 yAD1 0" />
+ <gd name="a1" fmla="at2 yAD1 xAD1" />
+
+
+ <gd name="dxF1" fmla="sin lFD a1" />
+ <gd name="dyF1" fmla="cos lFD a1" />
+ <gd name="xF1" fmla="+- xD1 dxF1 0" />
+ <gd name="yF1" fmla="+- yD1 dyF1 0" />
+ <gd name="xE1" fmla="+- xA1 0 dxF1" />
+ <gd name="yE1" fmla="+- yA1 0 dyF1" />
+
+
+ <gd name="yC1t" fmla="sin th a1" />
+ <gd name="xC1t" fmla="cos th a1" />
+ <gd name="yC1" fmla="+- yF1 yC1t 0" />
+ <gd name="xC1" fmla="+- xF1 0 xC1t" />
+
+
+ <gd name="yB1" fmla="+- yE1 yC1t 0" />
+ <gd name="xB1" fmla="+- xE1 0 xC1t" />
+
+
+ <gd name="aD6" fmla="+- 3cd4 ha 0" />
+
+
+ <gd name="td61" fmla="cos rw aD6" />
+ <gd name="td62" fmla="sin rh aD6" />
+ <gd name="bD6" fmla="at2 td61 td62" />
+
+ <gd name="ctd6" fmla="cos rh bD6" />
+ <gd name="std6" fmla="sin rw bD6" />
+ <gd name="md6" fmla="mod ctd6 std6 0" />
+ <gd name="nd6" fmla="*/ rw rh md6" />
+ <gd name="dxd6" fmla="cos nd6 bD6" />
+ <gd name="dyd6" fmla="sin nd6 bD6" />
+ <gd name="xD6" fmla="+- hc dxd6 0" />
+ <gd name="yD6" fmla="+- vc dyd6 0" />
+
+
+ <gd name="xA6" fmla="+- hc 0 dxd6" />
+
+
+ <gd name="xF6" fmla="+- xD6 0 lFD" />
+ <gd name="xE6" fmla="+- xA6 lFD 0" />
+
+
+ <gd name="yC6" fmla="+- yD6 0 th" />
+
+ <gd name="swAng1" fmla="+- bA1 0 bD6" />
+
+
+ <gd name="aA2" fmla="+- 1800000 0 ha" />
+ <gd name="aD2" fmla="+- 1800000 ha 0" />
+
+
+ <gd name="ta21" fmla="cos rw aA2" />
+ <gd name="ta22" fmla="sin rh aA2" />
+ <gd name="bA2" fmla="at2 ta21 ta22" />
+
+ <gd name="yA2" fmla="+- h 0 yD1" />
+
+
+ <gd name="td21" fmla="cos rw aD2" />
+ <gd name="td22" fmla="sin rh aD2" />
+ <gd name="bD2" fmla="at2 td21 td22" />
+
+ <gd name="yD2" fmla="+- h 0 yA1" />
+
+
+ <gd name="yC2" fmla="+- h 0 yB1" />
+
+
+ <gd name="yB2" fmla="+- h 0 yC1" />
+ <gd name="xB2" fmla="val xC1" />
+
+ <gd name="swAng2" fmla="+- bA2 0 bD1" />
+
+
+ <gd name="aD3" fmla="+- cd4 ha 0" />
+
+ <gd name="td31" fmla="cos rw aD3" />
+ <gd name="td32" fmla="sin rh aD3" />
+ <gd name="bD3" fmla="at2 td31 td32" />
+
+
+ <gd name="yD3" fmla="+- h 0 yD6" />
+
+
+ <gd name="yB3" fmla="+- h 0 yC6" />
+
+
+ <gd name="aD4" fmla="+- 9000000 ha 0" />
+
+ <gd name="td41" fmla="cos rw aD4" />
+ <gd name="td42" fmla="sin rh aD4" />
+ <gd name="bD4" fmla="at2 td41 td42" />
+
+
+ <gd name="xD4" fmla="+- w 0 xD1" />
+
+
+ <gd name="xC4" fmla="+- w 0 xC1" />
+
+
+ <gd name="xB4" fmla="+- w 0 xB1" />
+
+
+ <gd name="aD5" fmla="+- 12600000 ha 0" />
+
+ <gd name="td51" fmla="cos rw aD5" />
+ <gd name="td52" fmla="sin rh aD5" />
+ <gd name="bD5" fmla="at2 td51 td52" />
+
+
+ <gd name="xD5" fmla="+- w 0 xA1" />
+
+
+ <gd name="xC5" fmla="+- w 0 xB1" />
+
+
+ <gd name="xB5" fmla="+- w 0 xC1" />
+
+
+ <gd name="xCxn1" fmla="+/ xB1 xC1 2" />
+ <gd name="yCxn1" fmla="+/ yB1 yC1 2" />
+ <gd name="yCxn2" fmla="+- b 0 yCxn1" />
+ <gd name="xCxn4" fmla="+/ r 0 xCxn1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="20000">
+ <pos x="xD6" y="yD6" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="5358">
+ <pos x="xA6" y="yD6" />
+ </ahXY>
+
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="19800000">
+ <pos x="xCxn1" y="yCxn1" />
+ </cxn>
+
+ <cxn ang="1800000">
+ <pos x="xCxn1" y="yCxn2" />
+ </cxn>
+
+ <cxn ang="cd4">
+ <pos x="hc" y="yB3" />
+ </cxn>
+
+ <cxn ang="9000000">
+ <pos x="xCxn4" y="yCxn2" />
+ </cxn>
+
+ <cxn ang="12600000">
+ <pos x="xCxn4" y="yCxn1" />
+ </cxn>
+
+ <cxn ang="3cd4">
+ <pos x="hc" y="yC6" />
+ </cxn>
+
+ </cxnLst>
+
+ <rect l="xD5" t="yA1" r="xA1" b="yD2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xA1" y="yA1" />
+ </moveTo>
+ <lnTo>
+ <pt x="xB1" y="yB1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC1" y="yC1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD1" y="yD1" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD1" swAng="swAng2" />
+
+ <lnTo>
+ <pt x="xC1" y="yB2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xB1" y="yC2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA1" y="yD2" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD2" swAng="swAng1" />
+
+ <lnTo>
+ <pt x="xF6" y="yB3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xE6" y="yB3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA6" y="yD3" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD3" swAng="swAng1" />
+
+ <lnTo>
+ <pt x="xB4" y="yC2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC4" y="yB2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD4" y="yA2" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD4" swAng="swAng2" />
+
+ <lnTo>
+ <pt x="xB5" y="yC1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC5" y="yB1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD5" y="yA1" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD5" swAng="swAng1" />
+
+ <lnTo>
+ <pt x="xE6" y="yC6" />
+ </lnTo>
+ <lnTo>
+ <pt x="xF6" y="yC6" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD6" y="yD6" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD6" swAng="swAng1" />
+ <close />
+ </path>
+ </pathLst>
+
+ </gear6>
+ <gear9>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 10000" />
+
+ <gd name="adj2" fmla="val 1763" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+
+
+
+ <gd name="a1" fmla="pin 0 adj1 20000" />
+ <gd name="a2" fmla="pin 0 adj2 2679" />
+
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+ <gd name="lFD" fmla="*/ ss a2 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+ <gd name="l2" fmla="*/ lFD 1 2" />
+ <gd name="l3" fmla="+- th2 l2 0" />
+
+
+ <gd name="rh" fmla="+- hd2 0 th" />
+ <gd name="rw" fmla="+- wd2 0 th" />
+
+
+ <gd name="dr" fmla="+- rw 0 rh" />
+ <gd name="maxr" fmla="?: dr rh rw" />
+ <gd name="ha" fmla="at2 maxr l3" />
+
+
+ <gd name="aA1" fmla="+- 18600000 0 ha" />
+ <gd name="aD1" fmla="+- 18600000 ha 0" />
+
+
+ <gd name="ta11" fmla="cos rw aA1" />
+ <gd name="ta12" fmla="sin rh aA1" />
+ <gd name="bA1" fmla="at2 ta11 ta12" />
+
+ <gd name="cta1" fmla="cos rh bA1" />
+ <gd name="sta1" fmla="sin rw bA1" />
+ <gd name="ma1" fmla="mod cta1 sta1 0" />
+ <gd name="na1" fmla="*/ rw rh ma1" />
+ <gd name="dxa1" fmla="cos na1 bA1" />
+ <gd name="dya1" fmla="sin na1 bA1" />
+ <gd name="xA1" fmla="+- hc dxa1 0" />
+ <gd name="yA1" fmla="+- vc dya1 0" />
+
+
+ <gd name="td11" fmla="cos rw aD1" />
+ <gd name="td12" fmla="sin rh aD1" />
+ <gd name="bD1" fmla="at2 td11 td12" />
+
+ <gd name="ctd1" fmla="cos rh bD1" />
+ <gd name="std1" fmla="sin rw bD1" />
+ <gd name="md1" fmla="mod ctd1 std1 0" />
+ <gd name="nd1" fmla="*/ rw rh md1" />
+ <gd name="dxd1" fmla="cos nd1 bD1" />
+ <gd name="dyd1" fmla="sin nd1 bD1" />
+ <gd name="xD1" fmla="+- hc dxd1 0" />
+ <gd name="yD1" fmla="+- vc dyd1 0" />
+
+
+ <gd name="xAD1" fmla="+- xA1 0 xD1" />
+ <gd name="yAD1" fmla="+- yA1 0 yD1" />
+ <gd name="lAD1" fmla="mod xAD1 yAD1 0" />
+ <gd name="a1" fmla="at2 yAD1 xAD1" />
+
+
+ <gd name="dxF1" fmla="sin lFD a1" />
+ <gd name="dyF1" fmla="cos lFD a1" />
+ <gd name="xF1" fmla="+- xD1 dxF1 0" />
+ <gd name="yF1" fmla="+- yD1 dyF1 0" />
+ <gd name="xE1" fmla="+- xA1 0 dxF1" />
+ <gd name="yE1" fmla="+- yA1 0 dyF1" />
+
+
+ <gd name="yC1t" fmla="sin th a1" />
+ <gd name="xC1t" fmla="cos th a1" />
+ <gd name="yC1" fmla="+- yF1 yC1t 0" />
+ <gd name="xC1" fmla="+- xF1 0 xC1t" />
+
+
+ <gd name="yB1" fmla="+- yE1 yC1t 0" />
+ <gd name="xB1" fmla="+- xE1 0 xC1t" />
+
+
+ <gd name="aA2" fmla="+- 21000000 0 ha" />
+ <gd name="aD2" fmla="+- 21000000 ha 0" />
+
+
+ <gd name="ta21" fmla="cos rw aA2" />
+ <gd name="ta22" fmla="sin rh aA2" />
+ <gd name="bA2" fmla="at2 ta21 ta22" />
+
+ <gd name="cta2" fmla="cos rh bA2" />
+ <gd name="sta2" fmla="sin rw bA2" />
+ <gd name="ma2" fmla="mod cta2 sta2 0" />
+ <gd name="na2" fmla="*/ rw rh ma2" />
+ <gd name="dxa2" fmla="cos na2 bA2" />
+ <gd name="dya2" fmla="sin na2 bA2" />
+ <gd name="xA2" fmla="+- hc dxa2 0" />
+ <gd name="yA2" fmla="+- vc dya2 0" />
+
+
+ <gd name="td21" fmla="cos rw aD2" />
+ <gd name="td22" fmla="sin rh aD2" />
+ <gd name="bD2" fmla="at2 td21 td22" />
+
+ <gd name="ctd2" fmla="cos rh bD2" />
+ <gd name="std2" fmla="sin rw bD2" />
+ <gd name="md2" fmla="mod ctd2 std2 0" />
+ <gd name="nd2" fmla="*/ rw rh md2" />
+ <gd name="dxd2" fmla="cos nd2 bD2" />
+ <gd name="dyd2" fmla="sin nd2 bD2" />
+ <gd name="xD2" fmla="+- hc dxd2 0" />
+ <gd name="yD2" fmla="+- vc dyd2 0" />
+
+
+ <gd name="xAD2" fmla="+- xA2 0 xD2" />
+ <gd name="yAD2" fmla="+- yA2 0 yD2" />
+ <gd name="lAD2" fmla="mod xAD2 yAD2 0" />
+ <gd name="a2" fmla="at2 yAD2 xAD2" />
+
+
+ <gd name="dxF2" fmla="sin lFD a2" />
+ <gd name="dyF2" fmla="cos lFD a2" />
+ <gd name="xF2" fmla="+- xD2 dxF2 0" />
+ <gd name="yF2" fmla="+- yD2 dyF2 0" />
+ <gd name="xE2" fmla="+- xA2 0 dxF2" />
+ <gd name="yE2" fmla="+- yA2 0 dyF2" />
+
+
+ <gd name="yC2t" fmla="sin th a2" />
+ <gd name="xC2t" fmla="cos th a2" />
+ <gd name="yC2" fmla="+- yF2 yC2t 0" />
+ <gd name="xC2" fmla="+- xF2 0 xC2t" />
+
+
+ <gd name="yB2" fmla="+- yE2 yC2t 0" />
+ <gd name="xB2" fmla="+- xE2 0 xC2t" />
+
+ <gd name="swAng1" fmla="+- bA2 0 bD1" />
+
+
+ <gd name="aA3" fmla="+- 1800000 0 ha" />
+ <gd name="aD3" fmla="+- 1800000 ha 0" />
+
+
+ <gd name="ta31" fmla="cos rw aA3" />
+ <gd name="ta32" fmla="sin rh aA3" />
+ <gd name="bA3" fmla="at2 ta31 ta32" />
+
+ <gd name="cta3" fmla="cos rh bA3" />
+ <gd name="sta3" fmla="sin rw bA3" />
+ <gd name="ma3" fmla="mod cta3 sta3 0" />
+ <gd name="na3" fmla="*/ rw rh ma3" />
+ <gd name="dxa3" fmla="cos na3 bA3" />
+ <gd name="dya3" fmla="sin na3 bA3" />
+ <gd name="xA3" fmla="+- hc dxa3 0" />
+ <gd name="yA3" fmla="+- vc dya3 0" />
+
+
+ <gd name="td31" fmla="cos rw aD3" />
+ <gd name="td32" fmla="sin rh aD3" />
+ <gd name="bD3" fmla="at2 td31 td32" />
+
+ <gd name="ctd3" fmla="cos rh bD3" />
+ <gd name="std3" fmla="sin rw bD3" />
+ <gd name="md3" fmla="mod ctd3 std3 0" />
+ <gd name="nd3" fmla="*/ rw rh md3" />
+ <gd name="dxd3" fmla="cos nd3 bD3" />
+ <gd name="dyd3" fmla="sin nd3 bD3" />
+ <gd name="xD3" fmla="+- hc dxd3 0" />
+ <gd name="yD3" fmla="+- vc dyd3 0" />
+
+
+ <gd name="xAD3" fmla="+- xA3 0 xD3" />
+ <gd name="yAD3" fmla="+- yA3 0 yD3" />
+ <gd name="lAD3" fmla="mod xAD3 yAD3 0" />
+ <gd name="a3" fmla="at2 yAD3 xAD3" />
+
+
+ <gd name="dxF3" fmla="sin lFD a3" />
+ <gd name="dyF3" fmla="cos lFD a3" />
+ <gd name="xF3" fmla="+- xD3 dxF3 0" />
+ <gd name="yF3" fmla="+- yD3 dyF3 0" />
+ <gd name="xE3" fmla="+- xA3 0 dxF3" />
+ <gd name="yE3" fmla="+- yA3 0 dyF3" />
+
+
+ <gd name="yC3t" fmla="sin th a3" />
+ <gd name="xC3t" fmla="cos th a3" />
+ <gd name="yC3" fmla="+- yF3 yC3t 0" />
+ <gd name="xC3" fmla="+- xF3 0 xC3t" />
+
+
+ <gd name="yB3" fmla="+- yE3 yC3t 0" />
+ <gd name="xB3" fmla="+- xE3 0 xC3t" />
+
+ <gd name="swAng2" fmla="+- bA3 0 bD2" />
+
+
+ <gd name="aA4" fmla="+- 4200000 0 ha" />
+ <gd name="aD4" fmla="+- 4200000 ha 0" />
+
+
+ <gd name="ta41" fmla="cos rw aA4" />
+ <gd name="ta42" fmla="sin rh aA4" />
+ <gd name="bA4" fmla="at2 ta41 ta42" />
+
+ <gd name="cta4" fmla="cos rh bA4" />
+ <gd name="sta4" fmla="sin rw bA4" />
+ <gd name="ma4" fmla="mod cta4 sta4 0" />
+ <gd name="na4" fmla="*/ rw rh ma4" />
+ <gd name="dxa4" fmla="cos na4 bA4" />
+ <gd name="dya4" fmla="sin na4 bA4" />
+ <gd name="xA4" fmla="+- hc dxa4 0" />
+ <gd name="yA4" fmla="+- vc dya4 0" />
+
+
+ <gd name="td41" fmla="cos rw aD4" />
+ <gd name="td42" fmla="sin rh aD4" />
+ <gd name="bD4" fmla="at2 td41 td42" />
+
+ <gd name="ctd4" fmla="cos rh bD4" />
+ <gd name="std4" fmla="sin rw bD4" />
+ <gd name="md4" fmla="mod ctd4 std4 0" />
+ <gd name="nd4" fmla="*/ rw rh md4" />
+ <gd name="dxd4" fmla="cos nd4 bD4" />
+ <gd name="dyd4" fmla="sin nd4 bD4" />
+ <gd name="xD4" fmla="+- hc dxd4 0" />
+ <gd name="yD4" fmla="+- vc dyd4 0" />
+
+
+ <gd name="xAD4" fmla="+- xA4 0 xD4" />
+ <gd name="yAD4" fmla="+- yA4 0 yD4" />
+ <gd name="lAD4" fmla="mod xAD4 yAD4 0" />
+ <gd name="a4" fmla="at2 yAD4 xAD4" />
+
+
+ <gd name="dxF4" fmla="sin lFD a4" />
+ <gd name="dyF4" fmla="cos lFD a4" />
+ <gd name="xF4" fmla="+- xD4 dxF4 0" />
+ <gd name="yF4" fmla="+- yD4 dyF4 0" />
+ <gd name="xE4" fmla="+- xA4 0 dxF4" />
+ <gd name="yE4" fmla="+- yA4 0 dyF4" />
+
+
+ <gd name="yC4t" fmla="sin th a4" />
+ <gd name="xC4t" fmla="cos th a4" />
+ <gd name="yC4" fmla="+- yF4 yC4t 0" />
+ <gd name="xC4" fmla="+- xF4 0 xC4t" />
+
+
+ <gd name="yB4" fmla="+- yE4 yC4t 0" />
+ <gd name="xB4" fmla="+- xE4 0 xC4t" />
+
+ <gd name="swAng3" fmla="+- bA4 0 bD3" />
+
+
+ <gd name="aA5" fmla="+- 6600000 0 ha" />
+ <gd name="aD5" fmla="+- 6600000 ha 0" />
+
+ <gd name="ta51" fmla="cos rw aA5" />
+ <gd name="ta52" fmla="sin rh aA5" />
+ <gd name="bA5" fmla="at2 ta51 ta52" />
+
+ <gd name="td51" fmla="cos rw aD5" />
+ <gd name="td52" fmla="sin rh aD5" />
+ <gd name="bD5" fmla="at2 td51 td52" />
+
+
+ <gd name="xD5" fmla="+- w 0 xA4" />
+
+
+ <gd name="xC5" fmla="+- w 0 xB4" />
+
+
+ <gd name="xB5" fmla="+- w 0 xC4" />
+
+ <gd name="swAng4" fmla="+- bA5 0 bD4" />
+
+
+ <gd name="aD6" fmla="+- 9000000 ha 0" />
+
+ <gd name="td61" fmla="cos rw aD6" />
+ <gd name="td62" fmla="sin rh aD6" />
+ <gd name="bD6" fmla="at2 td61 td62" />
+
+
+ <gd name="xD6" fmla="+- w 0 xA3" />
+
+
+ <gd name="xC6" fmla="+- w 0 xB3" />
+
+
+ <gd name="xB6" fmla="+- w 0 xC3" />
+
+
+ <gd name="aD7" fmla="+- 11400000 ha 0" />
+
+ <gd name="td71" fmla="cos rw aD7" />
+ <gd name="td72" fmla="sin rh aD7" />
+ <gd name="bD7" fmla="at2 td71 td72" />
+
+
+ <gd name="xD7" fmla="+- w 0 xA2" />
+
+
+ <gd name="xC7" fmla="+- w 0 xB2" />
+
+
+ <gd name="xB7" fmla="+- w 0 xC2" />
+
+
+ <gd name="aD8" fmla="+- 13800000 ha 0" />
+
+ <gd name="td81" fmla="cos rw aD8" />
+ <gd name="td82" fmla="sin rh aD8" />
+ <gd name="bD8" fmla="at2 td81 td82" />
+
+
+ <gd name="xA8" fmla="+- w 0 xD1" />
+
+ <gd name="xD8" fmla="+- w 0 xA1" />
+
+
+ <gd name="xC8" fmla="+- w 0 xB1" />
+
+
+ <gd name="xB8" fmla="+- w 0 xC1" />
+
+
+ <gd name="aA9" fmla="+- 3cd4 0 ha" />
+ <gd name="aD9" fmla="+- 3cd4 ha 0" />
+
+
+ <gd name="td91" fmla="cos rw aD9" />
+ <gd name="td92" fmla="sin rh aD9" />
+ <gd name="bD9" fmla="at2 td91 td92" />
+
+ <gd name="ctd9" fmla="cos rh bD9" />
+ <gd name="std9" fmla="sin rw bD9" />
+ <gd name="md9" fmla="mod ctd9 std9 0" />
+ <gd name="nd9" fmla="*/ rw rh md9" />
+ <gd name="dxd9" fmla="cos nd9 bD9" />
+ <gd name="dyd9" fmla="sin nd9 bD9" />
+ <gd name="xD9" fmla="+- hc dxd9 0" />
+ <gd name="yD9" fmla="+- vc dyd9 0" />
+
+
+ <gd name="ta91" fmla="cos rw aA9" />
+ <gd name="ta92" fmla="sin rh aA9" />
+ <gd name="bA9" fmla="at2 ta91 ta92" />
+
+ <gd name="xA9" fmla="+- hc 0 dxd9" />
+
+
+ <gd name="xF9" fmla="+- xD9 0 lFD" />
+ <gd name="xE9" fmla="+- xA9 lFD 0" />
+
+
+ <gd name="yC9" fmla="+- yD9 0 th" />
+
+ <gd name="swAng5" fmla="+- bA9 0 bD8" />
+
+
+ <gd name="xCxn1" fmla="+/ xB1 xC1 2" />
+ <gd name="yCxn1" fmla="+/ yB1 yC1 2" />
+ <gd name="xCxn2" fmla="+/ xB2 xC2 2" />
+ <gd name="yCxn2" fmla="+/ yB2 yC2 2" />
+ <gd name="xCxn3" fmla="+/ xB3 xC3 2" />
+ <gd name="yCxn3" fmla="+/ yB3 yC3 2" />
+ <gd name="xCxn4" fmla="+/ xB4 xC4 2" />
+ <gd name="yCxn4" fmla="+/ yB4 yC4 2" />
+ <gd name="xCxn5" fmla="+/ r 0 xCxn4" />
+ <gd name="xCxn6" fmla="+/ r 0 xCxn3" />
+ <gd name="xCxn7" fmla="+/ r 0 xCxn2" />
+ <gd name="xCxn8" fmla="+/ r 0 xCxn1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="20000">
+ <pos x="xD9" y="yD9" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="2679">
+ <pos x="xA9" y="yD9" />
+ </ahXY>
+
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="18600000">
+ <pos x="xCxn1" y="yCxn1" />
+ </cxn>
+
+ <cxn ang="21000000">
+ <pos x="xCxn2" y="yCxn2" />
+ </cxn>
+
+ <cxn ang="1800000">
+ <pos x="xCxn3" y="yCxn3" />
+ </cxn>
+
+ <cxn ang="4200000">
+ <pos x="xCxn4" y="yCxn4" />
+ </cxn>
+
+ <cxn ang="6600000">
+ <pos x="xCxn5" y="yCxn4" />
+ </cxn>
+
+ <cxn ang="9000000">
+ <pos x="xCxn6" y="yCxn3" />
+ </cxn>
+
+ <cxn ang="11400000">
+ <pos x="xCxn7" y="yCxn2" />
+ </cxn>
+
+ <cxn ang="13800000">
+ <pos x="xCxn8" y="yCxn1" />
+ </cxn>
+
+ <cxn ang="3cd4">
+ <pos x="hc" y="yC9" />
+ </cxn>
+
+ </cxnLst>
+
+ <rect l="xA8" t="yD1" r="xD1" b="yD3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xA1" y="yA1" />
+ </moveTo>
+ <lnTo>
+ <pt x="xB1" y="yB1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC1" y="yC1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD1" y="yD1" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD1" swAng="swAng1" />
+
+ <lnTo>
+ <pt x="xB2" y="yB2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC2" y="yC2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD2" y="yD2" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD2" swAng="swAng2" />
+
+ <lnTo>
+ <pt x="xB3" y="yB3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC3" y="yC3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD3" y="yD3" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD3" swAng="swAng3" />
+
+ <lnTo>
+ <pt x="xB4" y="yB4" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC4" y="yC4" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD4" y="yD4" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD4" swAng="swAng4" />
+
+ <lnTo>
+ <pt x="xB5" y="yC4" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC5" y="yB4" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD5" y="yA4" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD5" swAng="swAng3" />
+
+ <lnTo>
+ <pt x="xB6" y="yC3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC6" y="yB3" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD6" y="yA3" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD6" swAng="swAng2" />
+
+ <lnTo>
+ <pt x="xB7" y="yC2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC7" y="yB2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD7" y="yA2" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD7" swAng="swAng1" />
+
+ <lnTo>
+ <pt x="xB8" y="yC1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC8" y="yB1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD8" y="yA1" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD8" swAng="swAng5" />
+
+ <lnTo>
+ <pt x="xE9" y="yC9" />
+ </lnTo>
+ <lnTo>
+ <pt x="xF9" y="yC9" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD9" y="yD9" />
+ </lnTo>
+ <arcTo hR="rh" wR="rw" stAng="bD9" swAng="swAng5" />
+ <close />
+ </path>
+ </pathLst>
+
+ </gear9>
+ <halfFrame>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 33333" />
+
+ <gd name="adj2" fmla="val 33333" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 w ss" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="x1" fmla="*/ ss a2 100000" />
+ <gd name="g1" fmla="*/ h x1 w" />
+ <gd name="g2" fmla="+- h 0 g1" />
+ <gd name="maxAdj1" fmla="*/ 100000 g2 ss" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="y1" fmla="*/ ss a1 100000" />
+ <gd name="dx2" fmla="*/ y1 w h" />
+ <gd name="x2" fmla="+- r 0 dx2" />
+ <gd name="dy2" fmla="*/ x1 h w" />
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="cx1" fmla="*/ x1 1 2" />
+ <gd name="cy1" fmla="+/ y2 b 2" />
+ <gd name="cx2" fmla="+/ x2 r 2" />
+ <gd name="cy2" fmla="*/ y1 1 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="cx2" y="cy2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="cx1" y="cy1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </halfFrame>
+ <heart>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dx1" fmla="*/ w 49 48" />
+ <gd name="dx2" fmla="*/ w 10 48" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- t 0 hd3" />
+
+
+ <gd name="il" fmla="*/ w 1 6" />
+ <gd name="ir" fmla="*/ w 5 6" />
+ <gd name="ib" fmla="*/ h 2 3" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="hd4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="hd4" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="hc" y="hd4" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y1" />
+ <pt x="x4" y="hd4" />
+ <pt x="hc" y="b" />
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x1" y="hd4" />
+ <pt x="x2" y="y1" />
+ <pt x="hc" y="hd4" />
+ </cubicBezTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </heart>
+ <heptagon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="hf" fmla="val 102572" />
+ <gd name="vf" fmla="val 105210" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="svc" fmla="*/ vc vf 100000" />
+ <gd name="dx1" fmla="*/ swd2 97493 100000" />
+ <gd name="dx2" fmla="*/ swd2 78183 100000" />
+ <gd name="dx3" fmla="*/ swd2 43388 100000" />
+ <gd name="dy1" fmla="*/ shd2 62349 100000" />
+ <gd name="dy2" fmla="*/ shd2 22252 100000" />
+ <gd name="dy3" fmla="*/ shd2 90097 100000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc dx3 0" />
+ <gd name="x5" fmla="+- hc dx2 0" />
+ <gd name="x6" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- svc 0 dy1" />
+ <gd name="y2" fmla="+- svc dy2 0" />
+ <gd name="y3" fmla="+- svc dy3 0" />
+ <gd name="ib" fmla="+- b 0 y1" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x5" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x2" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="y1" r="x5" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </heptagon>
+ <hexagon>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ <gd name="vf" fmla="val 115470" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 w ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+ <gd name="dy1" fmla="sin shd2 3600000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="q1" fmla="*/ maxAdj -1 2" />
+ <gd name="q2" fmla="+- a q1 0" />
+ <gd name="q3" fmla="?: q2 4 2" />
+ <gd name="q4" fmla="?: q2 3 2" />
+ <gd name="q5" fmla="?: q2 q1 0" />
+ <gd name="q6" fmla="+/ a q5 q1" />
+ <gd name="q7" fmla="*/ q6 q4 -1" />
+ <gd name="q8" fmla="+- q3 q7 0" />
+ <gd name="il" fmla="*/ w q8 24" />
+ <gd name="it" fmla="*/ h q8 24" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 it" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="maxAdj">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="y1" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </hexagon>
+ <homePlate>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 100000 w ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="dx1" fmla="*/ ss a 100000" />
+ <gd name="x1" fmla="+- r 0 dx1" />
+ <gd name="ir" fmla="+/ x1 r 2" />
+ <gd name="x2" fmla="*/ x1 1 2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="maxAdj">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </homePlate>
+ <horizontalScroll>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 25000" />
+ <gd name="ch" fmla="*/ ss a 100000" />
+
+ <gd name="ch2" fmla="*/ ch 1 2" />
+
+ <gd name="ch4" fmla="*/ ch 1 4" />
+
+
+
+
+
+ <gd name="y3" fmla="+- ch ch2 0" />
+
+ <gd name="y4" fmla="+- ch ch 0" />
+
+ <gd name="y6" fmla="+- b 0 ch" />
+
+ <gd name="y7" fmla="+- b 0 ch2" />
+
+ <gd name="y5" fmla="+- y6 0 ch2" />
+
+
+
+
+
+ <gd name="x3" fmla="+- r 0 ch" />
+
+ <gd name="x4" fmla="+- r 0 ch2" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="25000">
+ <pos x="ch" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="hc" y="ch" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="y6" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="ch" t="ch" r="x4" b="y6" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="r" y="ch2" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x4" y="ch2" />
+ </lnTo>
+ <arcTo wR="ch4" hR="ch4" stAng="0" swAng="cd2" />
+ <lnTo>
+ <pt x="x3" y="ch" />
+ </lnTo>
+ <lnTo>
+ <pt x="ch2" y="ch" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="l" y="y7" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd2" swAng="-10800000" />
+ <lnTo>
+ <pt x="ch" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y6" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <close />
+ <moveTo>
+ <pt x="ch2" y="y4" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="ch4" hR="ch4" stAng="0" swAng="-10800000" />
+ <close />
+ </path>
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="ch2" y="y4" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <arcTo wR="ch4" hR="ch4" stAng="0" swAng="-10800000" />
+ <close />
+ <moveTo>
+ <pt x="x4" y="ch" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-16200000" />
+ <arcTo wR="ch4" hR="ch4" stAng="cd2" swAng="-10800000" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="y3" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="ch" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="ch2" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd2" swAng="cd2" />
+ <lnTo>
+ <pt x="r" y="y5" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="ch" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="ch" y="y7" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd2" />
+ <close />
+ <moveTo>
+ <pt x="x3" y="ch" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="ch" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <moveTo>
+ <pt x="x4" y="ch" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="ch2" />
+ </lnTo>
+ <arcTo wR="ch4" hR="ch4" stAng="0" swAng="cd2" />
+ <moveTo>
+ <pt x="ch2" y="y4" />
+ </moveTo>
+ <lnTo>
+ <pt x="ch2" y="y3" />
+ </lnTo>
+ <arcTo wR="ch4" hR="ch4" stAng="cd2" swAng="cd2" />
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd2" />
+ <moveTo>
+ <pt x="ch" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="ch" y="y6" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </horizontalScroll>
+ <irregularSeal1>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x5" fmla="*/ w 4627 21600" />
+ <gd name="x12" fmla="*/ w 8485 21600" />
+ <gd name="x21" fmla="*/ w 16702 21600" />
+ <gd name="x24" fmla="*/ w 14522 21600" />
+ <gd name="y3" fmla="*/ h 6320 21600" />
+ <gd name="y6" fmla="*/ h 8615 21600" />
+ <gd name="y9" fmla="*/ h 13937 21600" />
+ <gd name="y18" fmla="*/ h 13290 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x24" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y6" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x12" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y18" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x5" t="y3" r="x21" b="y9" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="21600" h="21600">
+ <moveTo>
+ <pt x="10800" y="5800" />
+ </moveTo>
+ <lnTo>
+ <pt x="14522" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="14155" y="5325" />
+ </lnTo>
+ <lnTo>
+ <pt x="18380" y="4457" />
+ </lnTo>
+ <lnTo>
+ <pt x="16702" y="7315" />
+ </lnTo>
+ <lnTo>
+ <pt x="21097" y="8137" />
+ </lnTo>
+ <lnTo>
+ <pt x="17607" y="10475" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="13290" />
+ </lnTo>
+ <lnTo>
+ <pt x="16837" y="12942" />
+ </lnTo>
+ <lnTo>
+ <pt x="18145" y="18095" />
+ </lnTo>
+ <lnTo>
+ <pt x="14020" y="14457" />
+ </lnTo>
+ <lnTo>
+ <pt x="13247" y="19737" />
+ </lnTo>
+ <lnTo>
+ <pt x="10532" y="14935" />
+ </lnTo>
+ <lnTo>
+ <pt x="8485" y="21600" />
+ </lnTo>
+ <lnTo>
+ <pt x="7715" y="15627" />
+ </lnTo>
+ <lnTo>
+ <pt x="4762" y="17617" />
+ </lnTo>
+ <lnTo>
+ <pt x="5667" y="13937" />
+ </lnTo>
+ <lnTo>
+ <pt x="135" y="14587" />
+ </lnTo>
+ <lnTo>
+ <pt x="3722" y="11775" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="8615" />
+ </lnTo>
+ <lnTo>
+ <pt x="4627" y="7617" />
+ </lnTo>
+ <lnTo>
+ <pt x="370" y="2295" />
+ </lnTo>
+ <lnTo>
+ <pt x="7312" y="6320" />
+ </lnTo>
+ <lnTo>
+ <pt x="8352" y="2295" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </irregularSeal1>
+ <irregularSeal2>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x2" fmla="*/ w 9722 21600" />
+ <gd name="x5" fmla="*/ w 5372 21600" />
+ <gd name="x16" fmla="*/ w 11612 21600" />
+ <gd name="x19" fmla="*/ w 14640 21600" />
+ <gd name="y2" fmla="*/ h 1887 21600" />
+ <gd name="y3" fmla="*/ h 6382 21600" />
+ <gd name="y8" fmla="*/ h 12877 21600" />
+ <gd name="y14" fmla="*/ h 19712 21600" />
+ <gd name="y16" fmla="*/ h 18842 21600" />
+ <gd name="y17" fmla="*/ h 15935 21600" />
+ <gd name="y24" fmla="*/ h 6645 21600" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y8" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x16" y="y16" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y24" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x5" t="y3" r="x19" b="y17" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="21600" h="21600">
+ <moveTo>
+ <pt x="11462" y="4342" />
+ </moveTo>
+ <lnTo>
+ <pt x="14790" y="0" />
+ </lnTo>
+ <lnTo>
+ <pt x="14525" y="5777" />
+ </lnTo>
+ <lnTo>
+ <pt x="18007" y="3172" />
+ </lnTo>
+ <lnTo>
+ <pt x="16380" y="6532" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="6645" />
+ </lnTo>
+ <lnTo>
+ <pt x="16985" y="9402" />
+ </lnTo>
+ <lnTo>
+ <pt x="18270" y="11290" />
+ </lnTo>
+ <lnTo>
+ <pt x="16380" y="12310" />
+ </lnTo>
+ <lnTo>
+ <pt x="18877" y="15632" />
+ </lnTo>
+ <lnTo>
+ <pt x="14640" y="14350" />
+ </lnTo>
+ <lnTo>
+ <pt x="14942" y="17370" />
+ </lnTo>
+ <lnTo>
+ <pt x="12180" y="15935" />
+ </lnTo>
+ <lnTo>
+ <pt x="11612" y="18842" />
+ </lnTo>
+ <lnTo>
+ <pt x="9872" y="17370" />
+ </lnTo>
+ <lnTo>
+ <pt x="8700" y="19712" />
+ </lnTo>
+ <lnTo>
+ <pt x="7527" y="18125" />
+ </lnTo>
+ <lnTo>
+ <pt x="4917" y="21600" />
+ </lnTo>
+ <lnTo>
+ <pt x="4805" y="18240" />
+ </lnTo>
+ <lnTo>
+ <pt x="1285" y="17825" />
+ </lnTo>
+ <lnTo>
+ <pt x="3330" y="15370" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="12877" />
+ </lnTo>
+ <lnTo>
+ <pt x="3935" y="11592" />
+ </lnTo>
+ <lnTo>
+ <pt x="1172" y="8270" />
+ </lnTo>
+ <lnTo>
+ <pt x="5372" y="7817" />
+ </lnTo>
+ <lnTo>
+ <pt x="4502" y="3625" />
+ </lnTo>
+ <lnTo>
+ <pt x="8550" y="6382" />
+ </lnTo>
+ <lnTo>
+ <pt x="9722" y="1887" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </irregularSeal2>
+ <leftArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 w ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+ <gd name="x2" fmla="+- l dx2 0" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="dx1" fmla="*/ y1 dx2 hd2" />
+ <gd name="x1" fmla="+- x2 0 dx1" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="r" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="y1" r="r" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </leftArrow>
+ <leftArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 64977" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 100000 w ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss w" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dy1" fmla="*/ ss a2 100000" />
+
+ <gd name="dy2" fmla="*/ ss a1 200000" />
+
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc dy2 0" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ <gd name="x1" fmla="*/ ss a3 100000" />
+
+ <gd name="dx2" fmla="*/ w a4 100000" />
+
+ <gd name="x2" fmla="+- r 0 dx2" />
+ <gd name="x3" fmla="+/ x2 r 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="x1" y="y2" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="maxAdj3">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="0" maxX="maxAdj4">
+ <pos x="x2" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </leftArrowCallout>
+ <leftBrace>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 8333" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 100000" />
+ <gd name="q1" fmla="+- 100000 0 a2" />
+ <gd name="q2" fmla="min q1 a2" />
+ <gd name="q3" fmla="*/ q2 1 2" />
+ <gd name="maxAdj1" fmla="*/ q3 h ss" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="y1" fmla="*/ ss a1 100000" />
+ <gd name="y3" fmla="*/ h a2 100000" />
+ <gd name="y4" fmla="+- y3 y1 0" />
+ <gd name="dx1" fmla="cos wd2 2700000" />
+ <gd name="dy1" fmla="sin y1 2700000" />
+ <gd name="il" fmla="+- r 0 dx1" />
+ <gd name="it" fmla="+- y1 0 dy1" />
+ <gd name="ib" fmla="+- b dy1 y1" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="hc" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="100000">
+ <pos x="l" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="r" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="hc" y="y4" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="-5400000" />
+ <arcTo wR="wd2" hR="y1" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="y1" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="hc" y="y4" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="-5400000" />
+ <arcTo wR="wd2" hR="y1" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="y1" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="cd4" />
+ </path>
+ </pathLst>
+ </leftBrace>
+ <leftBracket>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 8333" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 h ss" />
+
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="y1" fmla="*/ ss a 100000" />
+
+ <gd name="y2" fmla="+- b 0 y1" />
+
+ <gd name="dx1" fmla="cos w 2700000" />
+ <gd name="dy1" fmla="sin y1 2700000" />
+ <gd name="il" fmla="+- r 0 dx1" />
+ <gd name="it" fmla="+- y1 0 dy1" />
+ <gd name="ib" fmla="+- b dy1 y1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="maxAdj">
+ <pos x="l" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="r" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <arcTo wR="w" hR="y1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="y1" />
+ </lnTo>
+ <arcTo wR="w" hR="y1" stAng="cd2" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <arcTo wR="w" hR="y1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="y1" />
+ </lnTo>
+ <arcTo wR="w" hR="y1" stAng="cd2" swAng="cd4" />
+ </path>
+ </pathLst>
+
+ </leftBracket>
+ <leftCircularArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500" />
+
+ <gd name="adj2" fmla="val -1142319" />
+
+ <gd name="adj3" fmla="val 1142319" />
+
+ <gd name="adj4" fmla="val 10800000" />
+
+ <gd name="adj5" fmla="val 12500" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a5" fmla="pin 0 adj5 25000" />
+
+ <gd name="maxAdj1" fmla="*/ a5 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="enAng" fmla="pin 1 adj3 21599999" />
+ <gd name="stAng" fmla="pin 0 adj4 21599999" />
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="thh" fmla="*/ ss a5 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+
+
+ <gd name="rw1" fmla="+- wd2 th2 thh" />
+
+ <gd name="rh1" fmla="+- hd2 th2 thh" />
+
+ <gd name="rw2" fmla="+- rw1 0 th" />
+
+ <gd name="rh2" fmla="+- rh1 0 th" />
+
+ <gd name="rw3" fmla="+- rw2 th2 0" />
+
+ <gd name="rh3" fmla="+- rh2 th2 0" />
+
+
+ <gd name="wtH" fmla="sin rw3 enAng" />
+ <gd name="htH" fmla="cos rh3 enAng" />
+ <gd name="dxH" fmla="cat2 rw3 htH wtH" />
+ <gd name="dyH" fmla="sat2 rh3 htH wtH" />
+ <gd name="xH" fmla="+- hc dxH 0" />
+
+ <gd name="yH" fmla="+- vc dyH 0" />
+
+
+ <gd name="rI" fmla="min rw2 rh2" />
+
+ <gd name="u1" fmla="*/ dxH dxH 1" />
+ <gd name="u2" fmla="*/ dyH dyH 1" />
+ <gd name="u3" fmla="*/ rI rI 1" />
+ <gd name="u4" fmla="+- u1 0 u3" />
+ <gd name="u5" fmla="+- u2 0 u3" />
+ <gd name="u6" fmla="*/ u4 u5 u1" />
+ <gd name="u7" fmla="*/ u6 1 u2" />
+ <gd name="u8" fmla="+- 1 0 u7" />
+ <gd name="u9" fmla="sqrt u8" />
+ <gd name="u10" fmla="*/ u4 1 dxH" />
+ <gd name="u11" fmla="*/ u10 1 dyH" />
+ <gd name="u12" fmla="+/ 1 u9 u11" />
+ <gd name="u13" fmla="at2 1 u12" />
+ <gd name="u14" fmla="+- u13 21600000 0" />
+ <gd name="u15" fmla="?: u13 u13 u14" />
+ <gd name="u16" fmla="+- u15 0 enAng" />
+
+ <gd name="u17" fmla="+- u16 21600000 0" />
+ <gd name="u18" fmla="?: u16 u16 u17" />
+ <gd name="u19" fmla="+- u18 0 cd2" />
+ <gd name="u20" fmla="+- u18 0 21600000" />
+ <gd name="u21" fmla="?: u19 u20 u18" />
+ <gd name="u22" fmla="abs u21" />
+ <gd name="minAng" fmla="*/ u22 -1 1" />
+ <gd name="u23" fmla="abs adj2" />
+ <gd name="a2" fmla="*/ u23 -1 1" />
+ <gd name="aAng" fmla="pin minAng a2 0" />
+
+ <gd name="ptAng" fmla="+- enAng aAng 0" />
+
+
+ <gd name="wtA" fmla="sin rw3 ptAng" />
+ <gd name="htA" fmla="cos rh3 ptAng" />
+ <gd name="dxA" fmla="cat2 rw3 htA wtA" />
+ <gd name="dyA" fmla="sat2 rh3 htA wtA" />
+ <gd name="xA" fmla="+- hc dxA 0" />
+
+ <gd name="yA" fmla="+- vc dyA 0" />
+
+
+ <gd name="wtE" fmla="sin rw1 stAng" />
+ <gd name="htE" fmla="cos rh1 stAng" />
+ <gd name="dxE" fmla="cat2 rw1 htE wtE" />
+ <gd name="dyE" fmla="sat2 rh1 htE wtE" />
+ <gd name="xE" fmla="+- hc dxE 0" />
+
+ <gd name="yE" fmla="+- vc dyE 0" />
+
+
+ <gd name="wtD" fmla="sin rw2 stAng" />
+ <gd name="htD" fmla="cos rh2 stAng" />
+ <gd name="dxD" fmla="cat2 rw2 htD wtD" />
+ <gd name="dyD" fmla="sat2 rh2 htD wtD" />
+ <gd name="xD" fmla="+- hc dxD 0" />
+
+ <gd name="yD" fmla="+- vc dyD 0" />
+
+
+ <gd name="dxG" fmla="cos thh ptAng" />
+ <gd name="dyG" fmla="sin thh ptAng" />
+ <gd name="xG" fmla="+- xH dxG 0" />
+
+ <gd name="yG" fmla="+- yH dyG 0" />
+
+
+ <gd name="dxB" fmla="cos thh ptAng" />
+ <gd name="dyB" fmla="sin thh ptAng" />
+ <gd name="xB" fmla="+- xH 0 dxB 0" />
+
+ <gd name="yB" fmla="+- yH 0 dyB 0" />
+
+
+ <gd name="sx1" fmla="+- xB 0 hc" />
+
+ <gd name="sy1" fmla="+- yB 0 vc" />
+
+ <gd name="sx2" fmla="+- xG 0 hc" />
+
+ <gd name="sy2" fmla="+- yG 0 vc" />
+
+
+ <gd name="rO" fmla="min rw1 rh1" />
+
+ <gd name="x1O" fmla="*/ sx1 rO rw1" />
+
+ <gd name="y1O" fmla="*/ sy1 rO rh1" />
+
+ <gd name="x2O" fmla="*/ sx2 rO rw1" />
+
+ <gd name="y2O" fmla="*/ sy2 rO rh1" />
+
+
+ <gd name="dxO" fmla="+- x2O 0 x1O" />
+ <gd name="dyO" fmla="+- y2O 0 y1O" />
+ <gd name="dO" fmla="mod dxO dyO 0" />
+
+ <gd name="q1" fmla="*/ x1O y2O 1" />
+ <gd name="q2" fmla="*/ x2O y1O 1" />
+ <gd name="DO" fmla="+- q1 0 q2" />
+
+
+ <gd name="q3" fmla="*/ rO rO 1" />
+
+ <gd name="q4" fmla="*/ dO dO 1" />
+
+ <gd name="q5" fmla="*/ q3 q4 1" />
+
+ <gd name="q6" fmla="*/ DO DO 1" />
+
+ <gd name="q7" fmla="+- q5 0 q6" />
+
+ <gd name="q8" fmla="max q7 0" />
+
+ <gd name="sdelO" fmla="sqrt q8" />
+
+ <gd name="ndyO" fmla="*/ dyO -1 1" />
+ <gd name="sdyO" fmla="?: ndyO -1 1" />
+
+ <gd name="q9" fmla="*/ sdyO dxO 1" />
+
+ <gd name="q10" fmla="*/ q9 sdelO 1" />
+
+ <gd name="q11" fmla="*/ DO dyO 1" />
+
+ <gd name="dxF1" fmla="+/ q11 q10 q4" />
+
+ <gd name="q12" fmla="+- q11 0 q10" />
+ <gd name="dxF2" fmla="*/ q12 1 q4" />
+
+
+ <gd name="adyO" fmla="abs dyO" />
+ <gd name="q13" fmla="*/ adyO sdelO 1" />
+
+ <gd name="q14" fmla="*/ DO dxO -1" />
+
+ <gd name="dyF1" fmla="+/ q14 q13 q4" />
+
+ <gd name="q15" fmla="+- q14 0 q13" />
+ <gd name="dyF2" fmla="*/ q15 1 q4" />
+
+
+
+ <gd name="q16" fmla="+- x2O 0 dxF1" />
+ <gd name="q17" fmla="+- x2O 0 dxF2" />
+ <gd name="q18" fmla="+- y2O 0 dyF1" />
+ <gd name="q19" fmla="+- y2O 0 dyF2" />
+ <gd name="q20" fmla="mod q16 q18 0" />
+
+ <gd name="q21" fmla="mod q17 q19 0" />
+
+ <gd name="q22" fmla="+- q21 0 q20" />
+ <gd name="dxF" fmla="?: q22 dxF1 dxF2" />
+
+ <gd name="dyF" fmla="?: q22 dyF1 dyF2" />
+
+ <gd name="sdxF" fmla="*/ dxF rw1 rO" />
+
+ <gd name="sdyF" fmla="*/ dyF rh1 rO" />
+
+ <gd name="xF" fmla="+- hc sdxF 0" />
+
+ <gd name="yF" fmla="+- vc sdyF 0" />
+
+
+
+
+ <gd name="x1I" fmla="*/ sx1 rI rw2" />
+
+ <gd name="y1I" fmla="*/ sy1 rI rh2" />
+
+ <gd name="x2I" fmla="*/ sx2 rI rw2" />
+
+ <gd name="y2I" fmla="*/ sy2 rI rh2" />
+
+
+ <gd name="dxI" fmla="+- x2I 0 x1I" />
+ <gd name="dyI" fmla="+- y2I 0 y1I" />
+ <gd name="dI" fmla="mod dxI dyI 0" />
+ <gd name="v1" fmla="*/ x1I y2I 1" />
+ <gd name="v2" fmla="*/ x2I y1I 1" />
+ <gd name="DI" fmla="+- v1 0 v2" />
+
+ <gd name="v3" fmla="*/ rI rI 1" />
+ <gd name="v4" fmla="*/ dI dI 1" />
+ <gd name="v5" fmla="*/ v3 v4 1" />
+ <gd name="v6" fmla="*/ DI DI 1" />
+ <gd name="v7" fmla="+- v5 0 v6" />
+ <gd name="v8" fmla="max v7 0" />
+ <gd name="sdelI" fmla="sqrt v8" />
+ <gd name="v9" fmla="*/ sdyO dxI 1" />
+ <gd name="v10" fmla="*/ v9 sdelI 1" />
+ <gd name="v11" fmla="*/ DI dyI 1" />
+ <gd name="dxC1" fmla="+/ v11 v10 v4" />
+ <gd name="v12" fmla="+- v11 0 v10" />
+ <gd name="dxC2" fmla="*/ v12 1 v4" />
+
+ <gd name="adyI" fmla="abs dyI" />
+ <gd name="v13" fmla="*/ adyI sdelI 1" />
+ <gd name="v14" fmla="*/ DI dxI -1" />
+ <gd name="dyC1" fmla="+/ v14 v13 v4" />
+ <gd name="v15" fmla="+- v14 0 v13" />
+ <gd name="dyC2" fmla="*/ v15 1 v4" />
+
+ <gd name="v16" fmla="+- x1I 0 dxC1" />
+ <gd name="v17" fmla="+- x1I 0 dxC2" />
+ <gd name="v18" fmla="+- y1I 0 dyC1" />
+ <gd name="v19" fmla="+- y1I 0 dyC2" />
+ <gd name="v20" fmla="mod v16 v18 0" />
+ <gd name="v21" fmla="mod v17 v19 0" />
+ <gd name="v22" fmla="+- v21 0 v20" />
+ <gd name="dxC" fmla="?: v22 dxC1 dxC2" />
+ <gd name="dyC" fmla="?: v22 dyC1 dyC2" />
+ <gd name="sdxC" fmla="*/ dxC rw2 rI" />
+ <gd name="sdyC" fmla="*/ dyC rh2 rI" />
+ <gd name="xC" fmla="+- hc sdxC 0" />
+
+ <gd name="yC" fmla="+- vc sdyC 0" />
+
+
+ <gd name="ist0" fmla="at2 sdxC sdyC" />
+ <gd name="ist1" fmla="+- ist0 21600000 0" />
+ <gd name="istAng0" fmla="?: ist0 ist0 ist1" />
+ <gd name="isw1" fmla="+- stAng 0 istAng0" />
+ <gd name="isw2" fmla="+- isw1 21600000 0" />
+ <gd name="iswAng0" fmla="?: isw1 isw1 isw2" />
+
+ <gd name="istAng" fmla="+- istAng0 iswAng0 0" />
+ <gd name="iswAng" fmla="+- 0 0 iswAng0" />
+
+ <gd name="p1" fmla="+- xF 0 xC" />
+ <gd name="p2" fmla="+- yF 0 yC" />
+ <gd name="p3" fmla="mod p1 p2 0" />
+ <gd name="p4" fmla="*/ p3 1 2" />
+ <gd name="p5" fmla="+- p4 0 thh" />
+ <gd name="xGp" fmla="?: p5 xF xG" />
+ <gd name="yGp" fmla="?: p5 yF yG" />
+ <gd name="xBp" fmla="?: p5 xC xB" />
+ <gd name="yBp" fmla="?: p5 yC yB" />
+
+ <gd name="en0" fmla="at2 sdxF sdyF" />
+ <gd name="en1" fmla="+- en0 21600000 0" />
+ <gd name="en2" fmla="?: en0 en0 en1" />
+ <gd name="sw0" fmla="+- en2 0 stAng" />
+ <gd name="sw1" fmla="+- sw0 0 21600000" />
+ <gd name="swAng" fmla="?: sw0 sw1 sw0" />
+
+
+ <gd name="stAng0" fmla="+- stAng swAng 0" />
+
+ <gd name="swAng0" fmla="+- 0 0 swAng" />
+
+
+ <gd name="wtI" fmla="sin rw3 stAng" />
+ <gd name="htI" fmla="cos rh3 stAng" />
+ <gd name="dxI" fmla="cat2 rw3 htI wtI" />
+ <gd name="dyI" fmla="sat2 rh3 htI wtI" />
+ <gd name="xI" fmla="+- hc dxI 0" />
+
+ <gd name="yI" fmla="+- vc dyI 0" />
+
+
+ <gd name="aI" fmla="+- stAng cd4 0" />
+ <gd name="aA" fmla="+- ptAng 0 cd4" />
+ <gd name="aB" fmla="+- ptAng cd2 0" />
+
+ <gd name="idx" fmla="cos rw1 2700000" />
+ <gd name="idy" fmla="sin rh1 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj2" minAng="minAng" maxAng="0">
+ <pos x="xA" y="yA" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj4" minAng="0" maxAng="21599999">
+ <pos x="xE" y="yE" />
+ </ahPolar>
+ <ahPolar gdRefR="adj1" minR="0" maxR="maxAdj1" gdRefAng="adj3" minAng="0" maxAng="21599999">
+ <pos x="xF" y="yF" />
+ </ahPolar>
+ <ahPolar gdRefR="adj5" minR="0" maxR="25000">
+ <pos x="xB" y="yB" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="aI">
+ <pos x="xI" y="yI" />
+ </cxn>
+ <cxn ang="ptAng">
+ <pos x="xGp" y="yGp" />
+ </cxn>
+ <cxn ang="aA">
+ <pos x="xA" y="yA" />
+ </cxn>
+ <cxn ang="aB">
+ <pos x="xBp" y="yBp" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xE" y="yE" />
+ </moveTo>
+ <lnTo>
+ <pt x="xD" y="yD" />
+ </lnTo>
+ <arcTo wR="rw2" hR="rh2" stAng="istAng" swAng="iswAng" />
+ <lnTo>
+ <pt x="xBp" y="yBp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA" y="yA" />
+ </lnTo>
+ <lnTo>
+ <pt x="xGp" y="yGp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xF" y="yF" />
+ </lnTo>
+ <arcTo wR="rw1" hR="rh1" stAng="stAng0" swAng="swAng0" />
+ <close />
+ </path>
+ </pathLst>
+
+ </leftCircularArrow>
+ <leftRightArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="x2" fmla="*/ ss a2 100000" />
+ <gd name="x3" fmla="+- r 0 x2" />
+ <gd name="dy" fmla="*/ h a1 200000" />
+ <gd name="y1" fmla="+- vc 0 dy" />
+ <gd name="y2" fmla="+- vc dy 0" />
+ <gd name="dx1" fmla="*/ y1 x2 hd2" />
+ <gd name="x1" fmla="+- x2 0 dx1" />
+ <gd name="x4" fmla="+- x3 dx1 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="x3" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="y1" r="x4" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </leftRightArrow>
+ <leftRightArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 48123" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 50000 w ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss wd2" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dy1" fmla="*/ ss a2 100000" />
+
+ <gd name="dy2" fmla="*/ ss a1 200000" />
+
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc dy2 0" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ <gd name="x1" fmla="*/ ss a3 100000" />
+
+ <gd name="x4" fmla="+- r 0 x1" />
+
+ <gd name="dx2" fmla="*/ w a4 200000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x3" fmla="+- hc dx2 0" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="x1" y="y2" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="maxAdj3">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="0" maxX="maxAdj4">
+ <pos x="x2" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="t" r="x3" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </leftRightArrowCallout>
+ <leftRightCircularArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500" />
+
+ <gd name="adj2" fmla="val 1142319" />
+
+ <gd name="adj3" fmla="val 20457681" />
+
+ <gd name="adj4" fmla="val 11942319" />
+
+ <gd name="adj5" fmla="val 12500" />
+
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a5" fmla="pin 0 adj5 25000" />
+
+ <gd name="maxAdj1" fmla="*/ a5 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="enAng" fmla="pin 1 adj3 21599999" />
+ <gd name="stAng" fmla="pin 0 adj4 21599999" />
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="thh" fmla="*/ ss a5 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+
+
+ <gd name="rw1" fmla="+- wd2 th2 thh" />
+
+ <gd name="rh1" fmla="+- hd2 th2 thh" />
+
+ <gd name="rw2" fmla="+- rw1 0 th" />
+
+ <gd name="rh2" fmla="+- rh1 0 th" />
+
+ <gd name="rw3" fmla="+- rw2 th2 0" />
+
+ <gd name="rh3" fmla="+- rh2 th2 0" />
+
+
+ <gd name="wtH" fmla="sin rw3 enAng" />
+ <gd name="htH" fmla="cos rh3 enAng" />
+ <gd name="dxH" fmla="cat2 rw3 htH wtH" />
+ <gd name="dyH" fmla="sat2 rh3 htH wtH" />
+ <gd name="xH" fmla="+- hc dxH 0" />
+
+ <gd name="yH" fmla="+- vc dyH 0" />
+
+
+ <gd name="rI" fmla="min rw2 rh2" />
+
+ <gd name="u1" fmla="*/ dxH dxH 1" />
+ <gd name="u2" fmla="*/ dyH dyH 1" />
+ <gd name="u3" fmla="*/ rI rI 1" />
+ <gd name="u4" fmla="+- u1 0 u3" />
+ <gd name="u5" fmla="+- u2 0 u3" />
+ <gd name="u6" fmla="*/ u4 u5 u1" />
+ <gd name="u7" fmla="*/ u6 1 u2" />
+ <gd name="u8" fmla="+- 1 0 u7" />
+ <gd name="u9" fmla="sqrt u8" />
+ <gd name="u10" fmla="*/ u4 1 dxH" />
+ <gd name="u11" fmla="*/ u10 1 dyH" />
+ <gd name="u12" fmla="+/ 1 u9 u11" />
+ <gd name="u13" fmla="at2 1 u12" />
+ <gd name="u14" fmla="+- u13 21600000 0" />
+ <gd name="u15" fmla="?: u13 u13 u14" />
+ <gd name="u16" fmla="+- u15 0 enAng" />
+
+ <gd name="u17" fmla="+- u16 21600000 0" />
+ <gd name="u18" fmla="?: u16 u16 u17" />
+ <gd name="u19" fmla="+- u18 0 cd2" />
+ <gd name="u20" fmla="+- u18 0 21600000" />
+ <gd name="u21" fmla="?: u19 u20 u18" />
+ <gd name="maxAng" fmla="abs u21" />
+ <gd name="aAng" fmla="pin 0 adj2 maxAng" />
+
+ <gd name="ptAng" fmla="+- enAng aAng 0" />
+
+
+ <gd name="wtA" fmla="sin rw3 ptAng" />
+ <gd name="htA" fmla="cos rh3 ptAng" />
+ <gd name="dxA" fmla="cat2 rw3 htA wtA" />
+ <gd name="dyA" fmla="sat2 rh3 htA wtA" />
+ <gd name="xA" fmla="+- hc dxA 0" />
+
+ <gd name="yA" fmla="+- vc dyA 0" />
+
+
+ <gd name="dxG" fmla="cos thh ptAng" />
+ <gd name="dyG" fmla="sin thh ptAng" />
+ <gd name="xG" fmla="+- xH dxG 0" />
+
+ <gd name="yG" fmla="+- yH dyG 0" />
+
+
+ <gd name="dxB" fmla="cos thh ptAng" />
+ <gd name="dyB" fmla="sin thh ptAng" />
+ <gd name="xB" fmla="+- xH 0 dxB 0" />
+
+ <gd name="yB" fmla="+- yH 0 dyB 0" />
+
+
+ <gd name="sx1" fmla="+- xB 0 hc" />
+
+ <gd name="sy1" fmla="+- yB 0 vc" />
+
+ <gd name="sx2" fmla="+- xG 0 hc" />
+
+ <gd name="sy2" fmla="+- yG 0 vc" />
+
+
+ <gd name="rO" fmla="min rw1 rh1" />
+
+ <gd name="x1O" fmla="*/ sx1 rO rw1" />
+
+ <gd name="y1O" fmla="*/ sy1 rO rh1" />
+
+ <gd name="x2O" fmla="*/ sx2 rO rw1" />
+
+ <gd name="y2O" fmla="*/ sy2 rO rh1" />
+
+
+ <gd name="dxO" fmla="+- x2O 0 x1O" />
+ <gd name="dyO" fmla="+- y2O 0 y1O" />
+ <gd name="dO" fmla="mod dxO dyO 0" />
+
+ <gd name="q1" fmla="*/ x1O y2O 1" />
+ <gd name="q2" fmla="*/ x2O y1O 1" />
+ <gd name="DO" fmla="+- q1 0 q2" />
+
+
+ <gd name="q3" fmla="*/ rO rO 1" />
+
+ <gd name="q4" fmla="*/ dO dO 1" />
+
+ <gd name="q5" fmla="*/ q3 q4 1" />
+
+ <gd name="q6" fmla="*/ DO DO 1" />
+
+ <gd name="q7" fmla="+- q5 0 q6" />
+
+ <gd name="q8" fmla="max q7 0" />
+
+ <gd name="sdelO" fmla="sqrt q8" />
+
+ <gd name="ndyO" fmla="*/ dyO -1 1" />
+ <gd name="sdyO" fmla="?: ndyO -1 1" />
+
+ <gd name="q9" fmla="*/ sdyO dxO 1" />
+
+ <gd name="q10" fmla="*/ q9 sdelO 1" />
+
+ <gd name="q11" fmla="*/ DO dyO 1" />
+
+ <gd name="dxF1" fmla="+/ q11 q10 q4" />
+
+ <gd name="q12" fmla="+- q11 0 q10" />
+ <gd name="dxF2" fmla="*/ q12 1 q4" />
+
+
+ <gd name="adyO" fmla="abs dyO" />
+ <gd name="q13" fmla="*/ adyO sdelO 1" />
+
+ <gd name="q14" fmla="*/ DO dxO -1" />
+
+ <gd name="dyF1" fmla="+/ q14 q13 q4" />
+
+ <gd name="q15" fmla="+- q14 0 q13" />
+ <gd name="dyF2" fmla="*/ q15 1 q4" />
+
+
+
+ <gd name="q16" fmla="+- x2O 0 dxF1" />
+ <gd name="q17" fmla="+- x2O 0 dxF2" />
+ <gd name="q18" fmla="+- y2O 0 dyF1" />
+ <gd name="q19" fmla="+- y2O 0 dyF2" />
+ <gd name="q20" fmla="mod q16 q18 0" />
+
+ <gd name="q21" fmla="mod q17 q19 0" />
+
+ <gd name="q22" fmla="+- q21 0 q20" />
+ <gd name="dxF" fmla="?: q22 dxF1 dxF2" />
+
+ <gd name="dyF" fmla="?: q22 dyF1 dyF2" />
+
+ <gd name="sdxF" fmla="*/ dxF rw1 rO" />
+
+ <gd name="sdyF" fmla="*/ dyF rh1 rO" />
+
+ <gd name="xF" fmla="+- hc sdxF 0" />
+
+ <gd name="yF" fmla="+- vc sdyF 0" />
+
+
+
+
+ <gd name="x1I" fmla="*/ sx1 rI rw2" />
+
+ <gd name="y1I" fmla="*/ sy1 rI rh2" />
+
+ <gd name="x2I" fmla="*/ sx2 rI rw2" />
+
+ <gd name="y2I" fmla="*/ sy2 rI rh2" />
+
+
+ <gd name="dxI" fmla="+- x2I 0 x1I" />
+ <gd name="dyI" fmla="+- y2I 0 y1I" />
+ <gd name="dI" fmla="mod dxI dyI 0" />
+ <gd name="v1" fmla="*/ x1I y2I 1" />
+ <gd name="v2" fmla="*/ x2I y1I 1" />
+ <gd name="DI" fmla="+- v1 0 v2" />
+
+ <gd name="v3" fmla="*/ rI rI 1" />
+ <gd name="v4" fmla="*/ dI dI 1" />
+ <gd name="v5" fmla="*/ v3 v4 1" />
+ <gd name="v6" fmla="*/ DI DI 1" />
+ <gd name="v7" fmla="+- v5 0 v6" />
+ <gd name="v8" fmla="max v7 0" />
+ <gd name="sdelI" fmla="sqrt v8" />
+ <gd name="v9" fmla="*/ sdyO dxI 1" />
+ <gd name="v10" fmla="*/ v9 sdelI 1" />
+ <gd name="v11" fmla="*/ DI dyI 1" />
+ <gd name="dxC1" fmla="+/ v11 v10 v4" />
+ <gd name="v12" fmla="+- v11 0 v10" />
+ <gd name="dxC2" fmla="*/ v12 1 v4" />
+
+ <gd name="adyI" fmla="abs dyI" />
+ <gd name="v13" fmla="*/ adyI sdelI 1" />
+ <gd name="v14" fmla="*/ DI dxI -1" />
+ <gd name="dyC1" fmla="+/ v14 v13 v4" />
+ <gd name="v15" fmla="+- v14 0 v13" />
+ <gd name="dyC2" fmla="*/ v15 1 v4" />
+
+ <gd name="v16" fmla="+- x1I 0 dxC1" />
+ <gd name="v17" fmla="+- x1I 0 dxC2" />
+ <gd name="v18" fmla="+- y1I 0 dyC1" />
+ <gd name="v19" fmla="+- y1I 0 dyC2" />
+ <gd name="v20" fmla="mod v16 v18 0" />
+ <gd name="v21" fmla="mod v17 v19 0" />
+ <gd name="v22" fmla="+- v21 0 v20" />
+ <gd name="dxC" fmla="?: v22 dxC1 dxC2" />
+ <gd name="dyC" fmla="?: v22 dyC1 dyC2" />
+ <gd name="sdxC" fmla="*/ dxC rw2 rI" />
+ <gd name="sdyC" fmla="*/ dyC rh2 rI" />
+ <gd name="xC" fmla="+- hc sdxC 0" />
+
+ <gd name="yC" fmla="+- vc sdyC 0" />
+
+
+ <gd name="wtI" fmla="sin rw3 stAng" />
+ <gd name="htI" fmla="cos rh3 stAng" />
+ <gd name="dxI" fmla="cat2 rw3 htI wtI" />
+ <gd name="dyI" fmla="sat2 rh3 htI wtI" />
+ <gd name="xI" fmla="+- hc dxI 0" />
+
+ <gd name="yI" fmla="+- vc dyI 0" />
+
+
+ <gd name="lptAng" fmla="+- stAng 0 aAng" />
+
+
+ <gd name="wtL" fmla="sin rw3 lptAng" />
+ <gd name="htL" fmla="cos rh3 lptAng" />
+ <gd name="dxL" fmla="cat2 rw3 htL wtL" />
+ <gd name="dyL" fmla="sat2 rh3 htL wtL" />
+ <gd name="xL" fmla="+- hc dxL 0" />
+
+ <gd name="yL" fmla="+- vc dyL 0" />
+
+
+ <gd name="dxK" fmla="cos thh lptAng" />
+ <gd name="dyK" fmla="sin thh lptAng" />
+ <gd name="xK" fmla="+- xI dxK 0" />
+
+ <gd name="yK" fmla="+- yI dyK 0" />
+
+
+ <gd name="dxJ" fmla="cos thh lptAng" />
+ <gd name="dyJ" fmla="sin thh lptAng" />
+ <gd name="xJ" fmla="+- xI 0 dxJ 0" />
+
+ <gd name="yJ" fmla="+- yI 0 dyJ 0" />
+
+
+ <gd name="p1" fmla="+- xF 0 xC" />
+ <gd name="p2" fmla="+- yF 0 yC" />
+ <gd name="p3" fmla="mod p1 p2 0" />
+ <gd name="p4" fmla="*/ p3 1 2" />
+ <gd name="p5" fmla="+- p4 0 thh" />
+ <gd name="xGp" fmla="?: p5 xF xG" />
+ <gd name="yGp" fmla="?: p5 yF yG" />
+ <gd name="xBp" fmla="?: p5 xC xB" />
+ <gd name="yBp" fmla="?: p5 yC yB" />
+
+ <gd name="en0" fmla="at2 sdxF sdyF" />
+ <gd name="en1" fmla="+- en0 21600000 0" />
+ <gd name="en2" fmla="?: en0 en0 en1" />
+ <gd name="od0" fmla="+- en2 0 enAng" />
+ <gd name="od1" fmla="+- od0 21600000 0" />
+ <gd name="od2" fmla="?: od0 od0 od1" />
+
+ <gd name="st0" fmla="+- stAng 0 od2" />
+ <gd name="st1" fmla="+- st0 21600000 0" />
+ <gd name="st2" fmla="?: st0 st0 st1" />
+
+ <gd name="sw0" fmla="+- en2 0 st2" />
+ <gd name="sw1" fmla="+- sw0 21600000 0" />
+ <gd name="swAng" fmla="?: sw0 sw0 sw1" />
+
+
+ <gd name="ist0" fmla="at2 sdxC sdyC" />
+ <gd name="ist1" fmla="+- ist0 21600000 0" />
+ <gd name="istAng" fmla="?: ist0 ist0 ist1" />
+
+ <gd name="id0" fmla="+- istAng 0 enAng" />
+ <gd name="id1" fmla="+- id0 0 21600000" />
+ <gd name="id2" fmla="?: id0 id1 id0" />
+
+ <gd name="ien0" fmla="+- stAng 0 id2" />
+ <gd name="ien1" fmla="+- ien0 0 21600000" />
+ <gd name="ien2" fmla="?: ien1 ien1 ien0" />
+
+ <gd name="isw1" fmla="+- ien2 0 istAng" />
+ <gd name="isw2" fmla="+- isw1 0 21600000" />
+ <gd name="iswAng" fmla="?: isw1 isw2 isw1" />
+
+
+ <gd name="wtE" fmla="sin rw1 st2" />
+ <gd name="htE" fmla="cos rh1 st2" />
+ <gd name="dxE" fmla="cat2 rw1 htE wtE" />
+ <gd name="dyE" fmla="sat2 rh1 htE wtE" />
+ <gd name="xE" fmla="+- hc dxE 0" />
+
+ <gd name="yE" fmla="+- vc dyE 0" />
+
+
+ <gd name="wtD" fmla="sin rw2 ien2" />
+ <gd name="htD" fmla="cos rh2 ien2" />
+ <gd name="dxD" fmla="cat2 rw2 htD wtD" />
+ <gd name="dyD" fmla="sat2 rh2 htD wtD" />
+ <gd name="xD" fmla="+- hc dxD 0" />
+
+ <gd name="yD" fmla="+- vc dyD 0" />
+
+
+ <gd name="xKp" fmla="?: p5 xE xK" />
+ <gd name="yKp" fmla="?: p5 yE yK" />
+ <gd name="xJp" fmla="?: p5 xD xJ" />
+ <gd name="yJp" fmla="?: p5 yD yJ" />
+
+ <gd name="aL" fmla="+- lptAng 0 cd4" />
+ <gd name="aA" fmla="+- ptAng cd4 0" />
+ <gd name="aB" fmla="+- ptAng cd2 0" />
+ <gd name="aJ" fmla="+- lptAng cd2 0" />
+
+ <gd name="idx" fmla="cos rw1 2700000" />
+ <gd name="idy" fmla="sin rh1 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj2" minAng="0" maxAng="maxAng">
+ <pos x="xA" y="yA" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj4" minAng="0" maxAng="21599999">
+ <pos x="xE" y="yE" />
+ </ahPolar>
+ <ahPolar gdRefR="adj1" minR="0" maxR="maxAdj1" gdRefAng="adj3" minAng="0" maxAng="21599999">
+ <pos x="xF" y="yF" />
+ </ahPolar>
+ <ahPolar gdRefR="adj5" minR="0" maxR="25000">
+ <pos x="xB" y="yB" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="aL">
+ <pos x="xL" y="yL" />
+ </cxn>
+ <cxn ang="lptAng">
+ <pos x="xKp" y="yKp" />
+ </cxn>
+ <cxn ang="ptAng">
+ <pos x="xGp" y="yGp" />
+ </cxn>
+ <cxn ang="aA">
+ <pos x="xA" y="yA" />
+ </cxn>
+ <cxn ang="aB">
+ <pos x="xBp" y="yBp" />
+ </cxn>
+ <cxn ang="aJ">
+ <pos x="xJp" y="yJp" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xL" y="yL" />
+ </moveTo>
+ <lnTo>
+ <pt x="xKp" y="yKp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xE" y="yE" />
+ </lnTo>
+ <arcTo wR="rw1" hR="rh1" stAng="st2" swAng="swAng" />
+ <lnTo>
+ <pt x="xGp" y="yGp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA" y="yA" />
+ </lnTo>
+ <lnTo>
+ <pt x="xBp" y="yBp" />
+ </lnTo>
+ <lnTo>
+ <pt x="xC" y="yC" />
+ </lnTo>
+ <arcTo wR="rw2" hR="rh2" stAng="istAng" swAng="iswAng" />
+ <lnTo>
+ <pt x="xJp" y="yJp" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </leftRightCircularArrow>
+ <leftRightRibbon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ <gd name="adj3" fmla="val 16667" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a3" fmla="pin 0 adj3 33333" />
+ <gd name="maxAdj1" fmla="+- 100000 0 a3" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+
+ <gd name="w1" fmla="+- wd2 0 wd32" />
+ <gd name="maxAdj2" fmla="*/ 100000 w1 ss" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+
+ <gd name="x1" fmla="*/ ss a2 100000" />
+
+ <gd name="x4" fmla="+- r 0 x1" />
+
+ <gd name="dy1" fmla="*/ h a1 200000" />
+
+ <gd name="dy2" fmla="*/ h a3 -200000" />
+
+ <gd name="ly1" fmla="+- vc dy2 dy1" />
+
+ <gd name="ry4" fmla="+- vc dy1 dy2" />
+
+ <gd name="ly2" fmla="+- ly1 dy1 0" />
+
+ <gd name="ry3" fmla="+- b 0 ly2" />
+
+ <gd name="ly4" fmla="*/ ly2 2 1" />
+
+ <gd name="ry1" fmla="+- b 0 ly4" />
+
+ <gd name="ly3" fmla="+- ly4 0 ly1" />
+
+ <gd name="ry2" fmla="+- b 0 ly3" />
+
+
+ <gd name="hR" fmla="*/ a3 ss 400000" />
+
+ <gd name="x2" fmla="+- hc 0 wd32" />
+
+ <gd name="x3" fmla="+- hc wd32 0" />
+
+ <gd name="y1" fmla="+- ly1 hR 0" />
+
+ <gd name="y2" fmla="+- ry2 0 hR" />
+
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="x4" y="ry2" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="33333">
+ <pos x="x3" y="ry2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="ry3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="ly4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="ly2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x4" y="ry1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="ly1" r="x4" b="ry4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="ly2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="ly1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x4" y="ry2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="ry1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="ry3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="ry4" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="ry4" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="ly3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly4" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x3" y="y1" />
+ </moveTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="cd4" />
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x3" y="ry2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="ly2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="ly1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x4" y="ry2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="ry1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="ry3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="ry4" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="ry4" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="ly3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="ly4" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x3" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="ry2" />
+ </lnTo>
+ <moveTo>
+ <pt x="x2" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="ly3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </leftRightRibbon>
+ <leftRightUpArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="q1" fmla="+- 100000 0 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ q1 1 2" />
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="x1" fmla="*/ ss a3 100000" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x5" fmla="+- hc dx2 0" />
+ <gd name="dx3" fmla="*/ ss a1 200000" />
+
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc dx3 0" />
+ <gd name="x6" fmla="+- r 0 x1" />
+
+ <gd name="dy2" fmla="*/ ss a2 50000" />
+
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="y4" fmla="+- b 0 dx2" />
+ <gd name="y3" fmla="+- y4 0 dx3" />
+ <gd name="y5" fmla="+- y4 dx3 0" />
+ <gd name="il" fmla="*/ dx3 x1 dx2" />
+ <gd name="ir" fmla="+- r 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x3" y="x1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="x1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y5" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y4" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="y3" r="ir" b="y5" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y4" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </leftRightUpArrow>
+ <leftUpArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="+- 100000 0 maxAdj1" />
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="x1" fmla="*/ ss a3 100000" />
+
+ <gd name="dx2" fmla="*/ ss a2 50000" />
+
+ <gd name="x2" fmla="+- r 0 dx2" />
+ <gd name="y2" fmla="+- b 0 dx2" />
+ <gd name="dx4" fmla="*/ ss a2 100000" />
+
+ <gd name="x4" fmla="+- r 0 dx4" />
+ <gd name="y4" fmla="+- b 0 dx4" />
+ <gd name="dx3" fmla="*/ ss a1 200000" />
+
+ <gd name="x3" fmla="+- x4 0 dx3" />
+ <gd name="x5" fmla="+- x4 dx3 0" />
+ <gd name="y3" fmla="+- y4 0 dx3" />
+ <gd name="y5" fmla="+- y4 dx3 0" />
+ <gd name="il" fmla="*/ dx3 x1 dx4" />
+ <gd name="cx1" fmla="+/ x1 x5 2" />
+ <gd name="cy1" fmla="+/ x1 y5 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="x3" y="y3" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="x3" y="x1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x4" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x2" y="x1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="cx1" y="y5" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x5" y="cy1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="x1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="y3" r="x4" b="y5" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y4" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </leftUpArrow>
+ <lightningBolt>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="x1" fmla="*/ w 5022 21600" />
+ <gd name="x3" fmla="*/ w 8472 21600" />
+ <gd name="x4" fmla="*/ w 8757 21600" />
+
+ <gd name="x5" fmla="*/ w 10012 21600" />
+ <gd name="x8" fmla="*/ w 12860 21600" />
+ <gd name="x9" fmla="*/ w 13917 21600" />
+
+ <gd name="x11" fmla="*/ w 16577 21600" />
+ <gd name="y1" fmla="*/ h 3890 21600" />
+ <gd name="y2" fmla="*/ h 6080 21600" />
+ <gd name="y4" fmla="*/ h 7437 21600" />
+
+ <gd name="y6" fmla="*/ h 9705 21600" />
+ <gd name="y7" fmla="*/ h 12007 21600" />
+ <gd name="y10" fmla="*/ h 14277 21600" />
+
+ <gd name="y11" fmla="*/ h 14915 21600" />
+
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x3" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y6" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x5" y="y11" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x11" y="y7" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x8" y="y2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x4" t="y4" r="x9" b="y10" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path w="21600" h="21600">
+ <moveTo>
+ <pt x="8472" y="0" />
+ </moveTo>
+ <lnTo>
+ <pt x="12860" y="6080" />
+ </lnTo>
+ <lnTo>
+ <pt x="11050" y="6797" />
+ </lnTo>
+ <lnTo>
+ <pt x="16577" y="12007" />
+ </lnTo>
+ <lnTo>
+ <pt x="14767" y="12877" />
+ </lnTo>
+ <lnTo>
+ <pt x="21600" y="21600" />
+ </lnTo>
+ <lnTo>
+ <pt x="10012" y="14915" />
+ </lnTo>
+ <lnTo>
+ <pt x="12222" y="13987" />
+ </lnTo>
+ <lnTo>
+ <pt x="5022" y="9705" />
+ </lnTo>
+ <lnTo>
+ <pt x="7602" y="8382" />
+ </lnTo>
+ <lnTo>
+ <pt x="0" y="3890" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </lightningBolt>
+ <line>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ </cxnLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </line>
+ <lineInv>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="r" y="t" />
+ </cxn>
+ </cxnLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </lineInv>
+ <mathDivide>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ <gd name="adj2" fmla="val 5880" />
+
+ <gd name="adj3" fmla="val 11760" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+ <gd name="a1" fmla="pin 1000 adj1 36745" />
+ <gd name="ma1" fmla="+- 0 0 a1" />
+
+ <gd name="ma3h" fmla="+/ 73490 ma1 4" />
+
+ <gd name="ma3w" fmla="*/ 36745 w h" />
+
+ <gd name="maxAdj3" fmla="min ma3h ma3w" />
+ <gd name="a3" fmla="pin 1000 adj3 maxAdj3" />
+ <gd name="m4a3" fmla="*/ -4 a3 1" />
+
+ <gd name="maxAdj2" fmla="+- 73490 m4a3 a1" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+
+ <gd name="dy1" fmla="*/ h a1 200000" />
+
+ <gd name="yg" fmla="*/ h a2 100000" />
+
+ <gd name="rad" fmla="*/ h a3 100000" />
+
+ <gd name="dx1" fmla="*/ w 73490 200000" />
+
+
+ <gd name="y3" fmla="+- vc 0 dy1" />
+
+ <gd name="y4" fmla="+- vc dy1 0" />
+
+ <gd name="a" fmla="+- yg rad 0" />
+ <gd name="y2" fmla="+- y3 0 a" />
+
+ <gd name="y1" fmla="+- y2 0 rad" />
+
+ <gd name="y5" fmla="+- b 0 y1" />
+
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+
+ <gd name="x3" fmla="+- hc dx1 0" />
+
+ <gd name="x2" fmla="+- hc 0 rad" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="1000" maxY="36745">
+ <pos x="l" y="y3" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="r" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="1000" maxX="maxAdj3">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x3" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y5" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y3" r="x3" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="hc" y="y1" />
+ </moveTo>
+ <arcTo hR="rad" wR="rad" stAng="3cd4" swAng="21600000" />
+ <close />
+ <moveTo>
+ <pt x="hc" y="y5" />
+ </moveTo>
+ <arcTo hR="rad" wR="rad" stAng="cd4" swAng="21600000" />
+ <close />
+ <moveTo>
+ <pt x="x1" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathDivide>
+ <mathEqual>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ <gd name="adj2" fmla="val 11760" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 36745" />
+
+
+ <gd name="2a1" fmla="*/ a1 2 1" />
+
+ <gd name="mAdj2" fmla="+- 100000 0 2a1" />
+
+ <gd name="a2" fmla="pin 0 adj2 mAdj2" />
+ <gd name="dy1" fmla="*/ h a1 100000" />
+
+ <gd name="dy2" fmla="*/ h a2 200000" />
+
+ <gd name="dx1" fmla="*/ w 73490 200000" />
+
+
+ <gd name="y2" fmla="+- vc 0 dy2" />
+
+ <gd name="y3" fmla="+- vc dy2 0" />
+
+ <gd name="y1" fmla="+- y2 0 dy1" />
+
+ <gd name="y4" fmla="+- y3 dy1 0" />
+
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+
+ <gd name="x2" fmla="+- hc dx1 0" />
+
+
+
+ <gd name="yC1" fmla="+/ y1 y2 2" />
+
+ <gd name="yC2" fmla="+/ y3 y4 2" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="36745">
+ <pos x="l" y="y1" />
+ </ahXY>
+
+ <ahXY gdRefY="adj2" minY="0" maxY="mAdj2">
+ <pos x="r" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x2" y="yC1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="yC2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="yC1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="yC2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x2" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x1" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathEqual>
+ <mathMinus>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+
+ <gd name="dx1" fmla="*/ w 73490 200000" />
+
+
+ <gd name="y1" fmla="+- vc 0 dy1" />
+
+ <gd name="y2" fmla="+- vc dy1 0" />
+
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+
+ <gd name="x2" fmla="+- hc dx1 0" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x2" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathMinus>
+ <mathMultiply>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+
+
+
+
+ <gd name="a1" fmla="pin 0 adj1 51965" />
+
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+
+ <gd name="a" fmla="at2 w h" />
+
+ <gd name="sa" fmla="sin 1 a" />
+ <gd name="ca" fmla="cos 1 a" />
+ <gd name="ta" fmla="tan 1 a" />
+
+
+ <gd name="dl" fmla="mod w h 0" />
+
+ <gd name="rw" fmla="*/ dl 51965 100000" />
+
+
+
+ <gd name="lM" fmla="+- dl 0 rw" />
+ <gd name="xM" fmla="*/ ca lM 2" />
+ <gd name="yM" fmla="*/ sa lM 2" />
+
+
+ <gd name="dxAM" fmla="*/ sa th 2" />
+ <gd name="dyAM" fmla="*/ ca th 2" />
+ <gd name="xA" fmla="+- xM 0 dxAM" />
+ <gd name="yA" fmla="+- yM dyAM 0" />
+
+
+ <gd name="xB" fmla="+- xM dxAM 0" />
+ <gd name="yB" fmla="+- yM 0 dyAM" />
+
+
+ <gd name="xBC" fmla="+- hc 0 xB" />
+ <gd name="yBC" fmla="*/ xBC ta 1" />
+ <gd name="yC" fmla="+- yBC yB 0" />
+
+
+ <gd name="xD" fmla="+- r 0 xB" />
+ <gd name="xE" fmla="+- r 0 xA" />
+
+ <gd name="yFE" fmla="+- vc 0 yA" />
+ <gd name="xFE" fmla="*/ yFE 1 ta" />
+ <gd name="xF" fmla="+- xE 0 xFE" />
+ <gd name="xL" fmla="+- xA xFE 0" />
+ <gd name="yG" fmla="+- b 0 yA" />
+ <gd name="yH" fmla="+- b 0 yB" />
+ <gd name="yI" fmla="+- b 0 yC" />
+
+
+ <gd name="xC2" fmla="+- r 0 xM" />
+
+ <gd name="yC3" fmla="+- b 0 yM" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="51965">
+ <pos x="l" y="th" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="xM" y="yM" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="xC2" y="yM" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="xC2" y="yC3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="xM" y="yC3" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="xA" t="yB" r="xE" b="yH" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xA" y="yA" />
+ </moveTo>
+ <lnTo>
+ <pt x="xB" y="yB" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="yC" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD" y="yB" />
+ </lnTo>
+ <lnTo>
+ <pt x="xE" y="yA" />
+ </lnTo>
+ <lnTo>
+ <pt x="xF" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="xE" y="yG" />
+ </lnTo>
+ <lnTo>
+ <pt x="xD" y="yH" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="yI" />
+ </lnTo>
+ <lnTo>
+ <pt x="xB" y="yH" />
+ </lnTo>
+ <lnTo>
+ <pt x="xA" y="yG" />
+ </lnTo>
+ <lnTo>
+ <pt x="xL" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathMultiply>
+ <mathNotEqual>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ <gd name="adj2" fmla="val 6600000" />
+
+ <gd name="adj3" fmla="val 11760" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="crAng" fmla="pin 4200000 adj2 6600000" />
+
+
+ <gd name="2a1" fmla="*/ a1 2 1" />
+ <gd name="maxAdj3" fmla="+- 100000 0 2a1" />
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+
+ <gd name="dy1" fmla="*/ h a1 100000" />
+
+ <gd name="dy2" fmla="*/ h a3 200000" />
+
+ <gd name="dx1" fmla="*/ w 73490 200000" />
+
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+
+ <gd name="x8" fmla="+- hc dx1 0" />
+
+
+
+ <gd name="y2" fmla="+- vc 0 dy2" />
+
+ <gd name="y3" fmla="+- vc dy2 0" />
+
+ <gd name="y1" fmla="+- y2 0 dy1" />
+
+ <gd name="y4" fmla="+- y3 dy1 0" />
+
+
+ <gd name="cadj2" fmla="+- crAng 0 cd4" />
+ <gd name="xadj2" fmla="tan hd2 cadj2" />
+
+
+
+ <gd name="len" fmla="mod xadj2 hd2 0" />
+
+
+
+ <gd name="bhw" fmla="*/ len dy1 hd2" />
+
+ <gd name="bhw2" fmla="*/ bhw 1 2" />
+ <gd name="x7" fmla="+- hc xadj2 bhw2" />
+
+ <gd name="dx67" fmla="*/ xadj2 y1 hd2" />
+ <gd name="x6" fmla="+- x7 0 dx67" />
+
+ <gd name="dx57" fmla="*/ xadj2 y2 hd2" />
+ <gd name="x5" fmla="+- x7 0 dx57" />
+
+ <gd name="dx47" fmla="*/ xadj2 y3 hd2" />
+ <gd name="x4" fmla="+- x7 0 dx47" />
+
+ <gd name="dx37" fmla="*/ xadj2 y4 hd2" />
+ <gd name="x3" fmla="+- x7 0 dx37" />
+
+ <gd name="dx27" fmla="*/ xadj2 2 1" />
+ <gd name="x2" fmla="+- x7 0 dx27" />
+
+
+ <gd name="rx7" fmla="+- x7 bhw 0" />
+
+ <gd name="rx6" fmla="+- x6 bhw 0" />
+
+ <gd name="rx5" fmla="+- x5 bhw 0" />
+
+ <gd name="rx4" fmla="+- x4 bhw 0" />
+
+ <gd name="rx3" fmla="+- x3 bhw 0" />
+
+ <gd name="rx2" fmla="+- x2 bhw 0" />
+
+
+
+ <gd name="dx7" fmla="*/ dy1 hd2 len" />
+ <gd name="rxt" fmla="+- x7 dx7 0" />
+
+ <gd name="lxt" fmla="+- rx7 0 dx7" />
+
+ <gd name="rx" fmla="?: cadj2 rxt rx7" />
+
+ <gd name="lx" fmla="?: cadj2 x7 lxt" />
+
+
+ <gd name="dy3" fmla="*/ dy1 xadj2 len" />
+ <gd name="dy4" fmla="+- 0 0 dy3" />
+ <gd name="ry" fmla="?: cadj2 dy3 t" />
+
+ <gd name="ly" fmla="?: cadj2 t dy4" />
+
+
+ <gd name="dlx" fmla="+- w 0 rx" />
+
+ <gd name="drx" fmla="+- w 0 lx" />
+
+
+ <gd name="dly" fmla="+- h 0 ry" />
+
+ <gd name="dry" fmla="+- h 0 ly" />
+
+
+
+ <gd name="xC1" fmla="+/ rx lx 2" />
+
+ <gd name="xC2" fmla="+/ drx dlx 2" />
+
+
+ <gd name="yC1" fmla="+/ ry ly 2" />
+
+ <gd name="yC2" fmla="+/ y1 y2 2" />
+
+ <gd name="yC3" fmla="+/ y3 y4 2" />
+
+ <gd name="yC4" fmla="+/ dry dly 2" />
+
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="50000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahPolar gdRefAng="adj2" minAng="4200000" maxAng="6600000">
+ <pos x="lx" y="t" />
+ </ahPolar>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x8" y="yC2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x8" y="yC3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="xC2" y="yC4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="yC2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="yC3" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="xC1" y="yC1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x8" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x6" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="lx" y="ly" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx" y="ry" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx6" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx5" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="drx" y="dry" />
+ </lnTo>
+ <lnTo>
+ <pt x="dlx" y="dly" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathNotEqual>
+ <mathPlus>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 23520" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 73490" />
+ <gd name="dx1" fmla="*/ w 73490 200000" />
+
+ <gd name="dy1" fmla="*/ h 73490 200000" />
+
+ <gd name="dx2" fmla="*/ ss a1 200000" />
+
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x3" fmla="+- hc dx2 0" />
+
+ <gd name="x4" fmla="+- hc dx1 0" />
+
+
+ <gd name="y1" fmla="+- vc 0 dy1" />
+
+ <gd name="y2" fmla="+- vc 0 dx2" />
+
+ <gd name="y3" fmla="+- vc dx2 0" />
+
+ <gd name="y4" fmla="+- vc dy1 0" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="73490">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y2" r="x4" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </mathPlus>
+ <moon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 87500" />
+ <gd name="g0" fmla="*/ ss a 100000" />
+ <gd name="g0w" fmla="*/ g0 w ss" />
+ <gd name="g1" fmla="+- ss 0 g0" />
+ <gd name="g2" fmla="*/ g0 g0 g1" />
+ <gd name="g3" fmla="*/ ss ss g1" />
+ <gd name="g4" fmla="*/ g3 2 1" />
+ <gd name="g5" fmla="+- g4 0 g2" />
+ <gd name="g6" fmla="+- g5 0 g0" />
+ <gd name="g6w" fmla="*/ g6 w ss" />
+ <gd name="g7" fmla="*/ g5 1 2" />
+ <gd name="g8" fmla="+- g7 0 g0" />
+ <gd name="dy1" fmla="*/ g8 hd2 ss" />
+
+ <gd name="g10h" fmla="+- vc 0 dy1" />
+ <gd name="g11h" fmla="+- vc dy1 0" />
+ <gd name="g12" fmla="*/ g0 9598 32768" />
+ <gd name="g12w" fmla="*/ g12 w ss" />
+ <gd name="g13" fmla="+- ss 0 g12" />
+ <gd name="q1" fmla="*/ ss ss 1" />
+ <gd name="q2" fmla="*/ g13 g13 1" />
+ <gd name="q3" fmla="+- q1 0 q2" />
+ <gd name="q4" fmla="sqrt q3" />
+ <gd name="dy4" fmla="*/ q4 hd2 ss" />
+ <gd name="g15h" fmla="+- vc 0 dy4" />
+ <gd name="g16h" fmla="+- vc dy4 0" />
+ <gd name="g17w" fmla="+- g6w 0 g0w" />
+ <gd name="g18w" fmla="*/ g17w 1 2" />
+
+
+ <gd name="dx2p" fmla="+- g0w g18w w" />
+ <gd name="dx2" fmla="*/ dx2p -1 1" />
+
+ <gd name="dy2" fmla="*/ hd2 -1 1" />
+
+ <gd name="stAng1" fmla="at2 dx2 dy2" />
+ <gd name="enAngp1" fmla="at2 dx2 hd2" />
+ <gd name="enAng1" fmla="+- enAngp1 0 21600000" />
+ <gd name="swAng1" fmla="+- enAng1 0 stAng1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="87500">
+ <pos x="g0w" y="vc" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="g0w" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="g12w" t="g15h" r="g0w" b="g16h" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="r" y="b" />
+ </moveTo>
+ <arcTo wR="w" hR="hd2" stAng="cd4" swAng="cd2" />
+ <arcTo wR="g18w" hR="dy1" stAng="stAng1" swAng="swAng1" />
+ <close />
+ </path>
+ </pathLst>
+
+ </moon>
+ <nonIsoscelesTrapezoid>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 w ss" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj" />
+ <gd name="x1" fmla="*/ ss a1 200000" />
+
+ <gd name="x2" fmla="*/ ss a1 100000" />
+
+ <gd name="dx3" fmla="*/ ss a2 100000" />
+
+ <gd name="x3" fmla="+- r 0 dx3" />
+ <gd name="x4" fmla="+/ r x3 2" />
+ <gd name="il" fmla="*/ wd3 a1 maxAdj" />
+
+ <gd name="adjm" fmla="max a1 a2" />
+ <gd name="it" fmla="*/ hd3 adjm maxAdj" />
+
+ <gd name="irt" fmla="*/ wd3 a2 maxAdj" />
+ <gd name="ir" fmla="+- r 0 irt" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj">
+ <pos x="x2" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj">
+ <pos x="x3" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+
+ <rect l="il" t="it" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </nonIsoscelesTrapezoid>
+ <noSmoking>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 18750" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dr" fmla="*/ ss a 100000" />
+ <gd name="iwd2" fmla="+- wd2 0 dr" />
+ <gd name="ihd2" fmla="+- hd2 0 dr" />
+ <gd name="ang" fmla="at2 w h" />
+ <gd name="ct" fmla="cos ihd2 ang" />
+ <gd name="st" fmla="sin iwd2 ang" />
+ <gd name="m" fmla="mod ct st 0" />
+ <gd name="n" fmla="*/ iwd2 ihd2 m" />
+ <gd name="drd2" fmla="*/ dr 1 2" />
+ <gd name="dang" fmla="at2 n drd2" />
+ <gd name="dang2" fmla="*/ dang 2 1" />
+ <gd name="swAng" fmla="+- -10800000 dang2 0" />
+ <gd name="t3" fmla="at2 w h" />
+ <gd name="stAng1" fmla="+- t3 0 dang" />
+ <gd name="stAng2" fmla="+- stAng1 0 cd2" />
+ <gd name="ct1" fmla="cos ihd2 stAng1" />
+ <gd name="st1" fmla="sin iwd2 stAng1" />
+ <gd name="m1" fmla="mod ct1 st1 0" />
+ <gd name="n1" fmla="*/ iwd2 ihd2 m1" />
+ <gd name="dx1" fmla="cos n1 stAng1" />
+ <gd name="dy1" fmla="sin n1 stAng1" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc dy1 0" />
+ <gd name="x2" fmla="+- hc 0 dx1" />
+ <gd name="y2" fmla="+- vc 0 dy1" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj" minR="0" maxR="50000">
+ <pos x="dr" y="vc" />
+ </ahPolar>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="3cd4" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="stAng1" swAng="swAng" />
+ <close />
+ <moveTo>
+ <pt x="x2" y="y2" />
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="stAng2" swAng="swAng" />
+ <close />
+ </path>
+ </pathLst>
+
+ </noSmoking>
+ <notchedRightArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 w ss" />
+
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+ <gd name="x2" fmla="+- r 0 dx2" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="x1" fmla="*/ dy1 dx2 hd2" />
+ <gd name="x3" fmla="+- r 0 x1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="r" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x3" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </notchedRightArrow>
+ <octagon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 29289" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+ <gd name="y2" fmla="+- b 0 x1" />
+ <gd name="il" fmla="*/ x1 1 2" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="x1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="x1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="x1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </octagon>
+ <parallelogram>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 100000 w ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="x1" fmla="*/ ss a 200000" />
+ <gd name="x2" fmla="*/ ss a 100000" />
+ <gd name="x6" fmla="+- r 0 x1" />
+ <gd name="x5" fmla="+- r 0 x2" />
+ <gd name="x3" fmla="*/ x5 1 2" />
+ <gd name="x4" fmla="+- r 0 x3" />
+ <gd name="il" fmla="*/ wd2 a maxAdj" />
+ <gd name="q1" fmla="*/ 5 a maxAdj" />
+ <gd name="q2" fmla="+/ 1 q1 12" />
+ <gd name="il" fmla="*/ q2 w 1" />
+ <gd name="it" fmla="*/ q2 h 1" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 it" />
+ <gd name="q3" fmla="*/ h hc x2" />
+ <gd name="y1" fmla="pin 0 q3 h" />
+ <gd name="y2" fmla="+- b 0 y1" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="maxAdj">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x4" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </parallelogram>
+ <pentagon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="hf" fmla="val 105146" />
+ <gd name="vf" fmla="val 110557" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="svc" fmla="*/ vc vf 100000" />
+ <gd name="dx1" fmla="cos swd2 1080000" />
+ <gd name="dx2" fmla="cos swd2 18360000" />
+ <gd name="dy1" fmla="sin shd2 1080000" />
+ <gd name="dy2" fmla="sin shd2 18360000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- svc 0 dy1" />
+ <gd name="y2" fmla="+- svc 0 dy2" />
+ <gd name="it" fmla="*/ y1 dx2 dx1" />
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="it" r="x3" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </pentagon>
+ <pie>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 0" />
+ <gd name="adj2" fmla="val 16200000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="stAng" fmla="pin 0 adj1 21599999" />
+ <gd name="enAng" fmla="pin 0 adj2 21599999" />
+ <gd name="sw1" fmla="+- enAng 0 stAng" />
+ <gd name="sw2" fmla="+- sw1 21600000 0" />
+ <gd name="swAng" fmla="?: sw1 sw1 sw2" />
+ <gd name="wt1" fmla="sin wd2 stAng" />
+ <gd name="ht1" fmla="cos hd2 stAng" />
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1" />
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc dy1 0" />
+ <gd name="wt2" fmla="sin wd2 enAng" />
+ <gd name="ht2" fmla="cos hd2 enAng" />
+ <gd name="dx2" fmla="cat2 wd2 ht2 wt2" />
+ <gd name="dy2" fmla="sat2 hd2 ht2 wt2" />
+ <gd name="x2" fmla="+- hc dx2 0" />
+ <gd name="y2" fmla="+- vc dy2 0" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1" />
+ </ahPolar>
+ <ahPolar gdRefAng="adj2" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2" />
+ </ahPolar>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="ir" r="it" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng" />
+ <lnTo>
+ <pt x="hc" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </pie>
+ <pieWedge>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="g1" fmla="cos w 13500000" />
+ <gd name="g2" fmla="sin h 13500000" />
+ <gd name="x1" fmla="+- r g1 0" />
+ <gd name="y1" fmla="+- b g2 0" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="y1" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <arcTo wR="w" hR="h" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </pieWedge>
+ <plaque>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+
+ <gd name="y2" fmla="+- b 0 x1" />
+ <gd name="il" fmla="*/ x1 70711 100000" />
+
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="x1" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="-5400000" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="-5400000" />
+ <close />
+ </path>
+ </pathLst>
+
+ </plaque>
+ <plaqueTabs>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="md" fmla="mod w h 0" />
+ <gd name="dx" fmla="*/ 1 md 20" />
+
+ <gd name="y1" fmla="+- 0 b dx" />
+
+ <gd name="x1" fmla="+- 0 r dx" />
+
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="dx" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="dx" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="dx" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="dx" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="dx" t="dx" r="x1" b="y1" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="dx" y="t" />
+ </lnTo>
+ <arcTo wR="dx" hR="dx" stAng="0" swAng="cd4" />
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <arcTo wR="dx" hR="dx" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="r" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="dx" />
+ </lnTo>
+ <arcTo wR="dx" hR="dx" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="b" />
+ </moveTo>
+ <arcTo wR="dx" hR="dx" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </plaqueTabs>
+ <plus>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+ <gd name="y2" fmla="+- b 0 x1" />
+ <gd name="d" fmla="+- w 0 h" />
+ <gd name="il" fmla="?: d l x1" />
+ <gd name="ir" fmla="?: d r x2" />
+ <gd name="it" fmla="?: d x1 t" />
+ <gd name="ib" fmla="?: d y2 b" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="x1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </plus>
+ <quadArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 22500" />
+
+ <gd name="adj2" fmla="val 22500" />
+
+ <gd name="adj3" fmla="val 22500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="q1" fmla="+- 100000 0 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ q1 1 2" />
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="x1" fmla="*/ ss a3 100000" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x5" fmla="+- hc dx2 0" />
+ <gd name="dx3" fmla="*/ ss a1 200000" />
+
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc dx3 0" />
+ <gd name="x6" fmla="+- r 0 x1" />
+
+ <gd name="y2" fmla="+- vc 0 dx2" />
+ <gd name="y5" fmla="+- vc dx2 0" />
+ <gd name="y3" fmla="+- vc 0 dx3" />
+ <gd name="y4" fmla="+- vc dx3 0" />
+ <gd name="y6" fmla="+- b 0 x1" />
+ <gd name="il" fmla="*/ dx3 x1 dx2" />
+ <gd name="ir" fmla="+- r 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x3" y="x1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="x1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="y3" r="ir" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="x1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </quadArrow>
+ <quadArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 18515" />
+
+ <gd name="adj2" fmla="val 18515" />
+
+ <gd name="adj3" fmla="val 18515" />
+
+ <gd name="adj4" fmla="val 48123" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="+- 50000 0 a2" />
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 2 1" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin a1 adj4 maxAdj4" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+
+ <gd name="dx3" fmla="*/ ss a1 200000" />
+
+ <gd name="ah" fmla="*/ ss a3 100000" />
+
+ <gd name="dx1" fmla="*/ w a4 200000" />
+
+ <gd name="dy1" fmla="*/ h a4 200000" />
+
+
+ <gd name="x8" fmla="+- r 0 ah" />
+ <gd name="x2" fmla="+- hc 0 dx1" />
+ <gd name="x7" fmla="+- hc dx1 0" />
+ <gd name="x3" fmla="+- hc 0 dx2" />
+ <gd name="x6" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc 0 dx3" />
+ <gd name="x5" fmla="+- hc dx3 0" />
+
+ <gd name="y8" fmla="+- b 0 ah" />
+ <gd name="y2" fmla="+- vc 0 dy1" />
+ <gd name="y7" fmla="+- vc dy1 0" />
+ <gd name="y3" fmla="+- vc 0 dx2" />
+ <gd name="y6" fmla="+- vc dx2 0" />
+ <gd name="y4" fmla="+- vc 0 dx3" />
+ <gd name="y5" fmla="+- vc dx3 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x4" y="ah" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x3" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="ah" />
+ </ahXY>
+ <ahXY gdRefY="adj4" minY="a1" maxY="maxAdj4">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="y2" r="x7" b="y7" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="ah" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="ah" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="ah" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="ah" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="ah" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="ah" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="ah" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="ah" y="y6" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </quadArrowCallout>
+ <rect>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </rect>
+ <ribbon>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 33333" />
+ <gd name="a2" fmla="pin 25000 adj2 75000" />
+
+
+ <gd name="x10" fmla="+- r 0 wd8" />
+
+ <gd name="dx2" fmla="*/ w a2 200000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x9" fmla="+- hc dx2 0" />
+
+ <gd name="x3" fmla="+- x2 wd32 0" />
+ <gd name="x8" fmla="+- x9 0 wd32" />
+ <gd name="x5" fmla="+- x2 wd8 0" />
+
+ <gd name="x6" fmla="+- x9 0 wd8" />
+
+ <gd name="x4" fmla="+- x5 0 wd32" />
+ <gd name="x7" fmla="+- x6 wd32 0" />
+ <gd name="y1" fmla="*/ h a1 200000" />
+
+ <gd name="y2" fmla="*/ h a1 100000" />
+
+ <gd name="y4" fmla="+- b 0 y2" />
+
+ <gd name="y3" fmla="*/ y4 1 2" />
+
+ <gd name="hR" fmla="*/ h a1 400000" />
+
+ <gd name="y5" fmla="+- b 0 hR" />
+ <gd name="y6" fmla="+- y2 0 hR" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="33333">
+ <pos x="hc" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="25000" maxX="75000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd8" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x10" y="y3" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="y2" r="x9" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="t" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x8" y="y2" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y5" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="wd8" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x5" y="hR" />
+ </moveTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x6" y="hR" />
+ </moveTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd2" swAng="-5400000" />
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="t" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x8" y="y2" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y5" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x3" y="b" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="wd8" y="y3" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x5" y="hR" />
+ </moveTo>
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <moveTo>
+ <pt x="x6" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x6" y="hR" />
+ </lnTo>
+ <moveTo>
+ <pt x="x2" y="y4" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y6" />
+ </lnTo>
+ <moveTo>
+ <pt x="x9" y="y6" />
+ </moveTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </ribbon>
+ <ribbon2>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 33333" />
+ <gd name="a2" fmla="pin 25000 adj2 75000" />
+
+
+ <gd name="x10" fmla="+- r 0 wd8" />
+
+ <gd name="dx2" fmla="*/ w a2 200000" />
+
+ <gd name="x2" fmla="+- hc 0 dx2" />
+
+ <gd name="x9" fmla="+- hc dx2 0" />
+
+ <gd name="x3" fmla="+- x2 wd32 0" />
+ <gd name="x8" fmla="+- x9 0 wd32" />
+ <gd name="x5" fmla="+- x2 wd8 0" />
+
+ <gd name="x6" fmla="+- x9 0 wd8" />
+
+ <gd name="x4" fmla="+- x5 0 wd32" />
+ <gd name="x7" fmla="+- x6 wd32 0" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+
+ <gd name="y1" fmla="+- b 0 dy1" />
+ <gd name="dy2" fmla="*/ h a1 100000" />
+
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="y4" fmla="+- t dy2 0" />
+
+ <gd name="y3" fmla="+/ y4 b 2" />
+
+ <gd name="hR" fmla="*/ h a1 400000" />
+
+
+ <gd name="y6" fmla="+- b 0 hR" />
+ <gd name="y7" fmla="+- y1 0 hR" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="33333">
+ <pos x="hc" y="y2" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="25000" maxX="75000">
+ <pos x="x2" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="wd8" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x10" y="y3" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x2" t="t" r="x9" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x4" y="b" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x8" y="y2" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="hR" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="-5400000" />
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="wd8" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ <path stroke="false" fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x5" y="y6" />
+ </moveTo>
+ <arcTo wR="wd32" hR="hR" stAng="0" swAng="-5400000" />
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x6" y="y6" />
+ </moveTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="wd8" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="hR" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x8" y="t" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="b" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <arcTo wR="wd32" hR="hR" stAng="3cd4" swAng="cd2" />
+ <close />
+ <moveTo>
+ <pt x="x5" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x5" y="y6" />
+ </lnTo>
+ <moveTo>
+ <pt x="x6" y="y6" />
+ </moveTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <moveTo>
+ <pt x="x2" y="y7" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <moveTo>
+ <pt x="x9" y="y4" />
+ </moveTo>
+ <lnTo>
+ <pt x="x9" y="y7" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </ribbon2>
+ <rightArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 w ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="dx1" fmla="*/ ss a2 100000" />
+ <gd name="x1" fmla="+- r 0 dx1" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="dx2" fmla="*/ y1 dx1 hd2" />
+ <gd name="x2" fmla="+- x1 dx2 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="y1" r="x2" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </rightArrow>
+ <rightArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 64977" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 100000 w ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss w" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dy1" fmla="*/ ss a2 100000" />
+
+ <gd name="dy2" fmla="*/ ss a1 200000" />
+
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc dy2 0" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ <gd name="dx3" fmla="*/ ss a3 100000" />
+
+ <gd name="x3" fmla="+- r 0 dx3" />
+ <gd name="x2" fmla="*/ w a4 100000" />
+
+ <gd name="x1" fmla="*/ x2 1 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="x3" y="y2" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="r" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj3" minX="0" maxX="maxAdj3">
+ <pos x="x3" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="0" maxX="maxAdj4">
+ <pos x="x2" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </rightArrowCallout>
+ <rightBrace>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 8333" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 100000" />
+ <gd name="q1" fmla="+- 100000 0 a2" />
+ <gd name="q2" fmla="min q1 a2" />
+ <gd name="q3" fmla="*/ q2 1 2" />
+ <gd name="maxAdj1" fmla="*/ q3 h ss" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="y1" fmla="*/ ss a1 100000" />
+ <gd name="y3" fmla="*/ h a2 100000" />
+ <gd name="y2" fmla="+- y3 0 y1" />
+ <gd name="y4" fmla="+- b 0 y1" />
+ <gd name="dx1" fmla="cos wd2 2700000" />
+ <gd name="dy1" fmla="sin y1 2700000" />
+ <gd name="ir" fmla="+- l dx1 0" />
+ <gd name="it" fmla="+- y1 0 dy1" />
+ <gd name="ib" fmla="+- b dy1 y1" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="maxAdj1">
+ <pos x="hc" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="100000">
+ <pos x="r" y="y3" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="r" y="y3" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ </cxnLst>
+ <rect l="l" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="hc" y="y2" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="-5400000" />
+ <arcTo wR="wd2" hR="y1" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="y4" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <arcTo wR="wd2" hR="y1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="hc" y="y2" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="cd2" swAng="-5400000" />
+ <arcTo wR="wd2" hR="y1" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="hc" y="y4" />
+ </lnTo>
+ <arcTo wR="wd2" hR="y1" stAng="0" swAng="cd4" />
+ </path>
+ </pathLst>
+ </rightBrace>
+ <rightBracket>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 8333" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 h ss" />
+
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="y1" fmla="*/ ss a 100000" />
+
+ <gd name="y2" fmla="+- b 0 y1" />
+
+ <gd name="dx1" fmla="cos w 2700000" />
+ <gd name="dy1" fmla="sin y1 2700000" />
+ <gd name="ir" fmla="+- l dx1 0" />
+ <gd name="it" fmla="+- y1 0 dy1" />
+ <gd name="ib" fmla="+- b dy1 y1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="maxAdj">
+ <pos x="r" y="y1" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <arcTo wR="w" hR="y1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="w" hR="y1" stAng="0" swAng="cd4" />
+ <close />
+ </path>
+ <path fill="none">
+
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <arcTo wR="w" hR="y1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="w" hR="y1" stAng="0" swAng="cd4" />
+ </path>
+ </pathLst>
+
+ </rightBracket>
+ <round1Rect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="*/ ss a 100000" />
+ <gd name="x1" fmla="+- r 0 dx1" />
+ <gd name="idx" fmla="*/ dx1 29289 100000" />
+ <gd name="ir" fmla="+- r 0 idx" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <arcTo wR="dx1" hR="dx1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </round1Rect>
+ <round2DiagRect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+ <gd name="adj2" fmla="val 0" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="x1" fmla="*/ ss a1 100000" />
+ <gd name="y1" fmla="+- b 0 x1" />
+ <gd name="a" fmla="*/ ss a2 100000" />
+ <gd name="x2" fmla="+- r 0 a" />
+ <gd name="y2" fmla="+- b 0 a" />
+ <gd name="dx1" fmla="*/ x1 29289 100000" />
+ <gd name="dx2" fmla="*/ a 29289 100000" />
+ <gd name="d" fmla="+- dx1 0 dx2" />
+ <gd name="dx" fmla="?: d dx1 dx2" />
+ <gd name="ir" fmla="+- r 0 dx" />
+ <gd name="ib" fmla="+- b 0 dx" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="dx" t="dx" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <arcTo wR="a" hR="a" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="a" y="b" />
+ </lnTo>
+ <arcTo wR="a" hR="a" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="x1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </round2DiagRect>
+ <round2SameRect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+ <gd name="adj2" fmla="val 0" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+
+ <gd name="tx1" fmla="*/ ss a1 100000" />
+ <gd name="tx2" fmla="+- r 0 tx1" />
+
+ <gd name="bx1" fmla="*/ ss a2 100000" />
+ <gd name="bx2" fmla="+- r 0 bx1" />
+ <gd name="by1" fmla="+- b 0 bx1" />
+ <gd name="d" fmla="+- tx1 0 bx1" />
+ <gd name="tdx" fmla="*/ tx1 29289 100000" />
+ <gd name="bdx" fmla="*/ bx1 29289 100000" />
+ <gd name="il" fmla="?: d tdx bdx" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 bdx" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="tx2" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="bx1" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="tdx" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="tx1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="tx2" y="t" />
+ </lnTo>
+ <arcTo wR="tx1" hR="tx1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="by1" />
+ </lnTo>
+ <arcTo wR="bx1" hR="bx1" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="bx1" y="b" />
+ </lnTo>
+ <arcTo wR="bx1" hR="bx1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="tx1" />
+ </lnTo>
+ <arcTo wR="tx1" hR="tx1" stAng="cd2" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </round2SameRect>
+ <roundRect>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="x1" fmla="*/ ss a 100000" />
+ <gd name="x2" fmla="+- r 0 x1" />
+ <gd name="y2" fmla="+- b 0 x1" />
+ <gd name="il" fmla="*/ x1 29289 100000" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="x1" />
+ </moveTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+ </roundRect>
+ <rtTriangle>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="it" fmla="*/ h 7 12" />
+ <gd name="ir" fmla="*/ w 7 12" />
+ <gd name="ib" fmla="*/ h 11 12" />
+ </gdLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="hc" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="wd12" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="l" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </rtTriangle>
+ <smileyFace>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 4653" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin -4653 adj 4653" />
+ <gd name="x1" fmla="*/ w 4969 21699" />
+
+ <gd name="x2" fmla="*/ w 6215 21600" />
+
+ <gd name="x3" fmla="*/ w 13135 21600" />
+
+ <gd name="x4" fmla="*/ w 16640 21600" />
+
+ <gd name="y1" fmla="*/ h 7570 21600" />
+
+ <gd name="y3" fmla="*/ h 16515 21600" />
+
+ <gd name="dy2" fmla="*/ h a 100000" />
+
+ <gd name="y2" fmla="+- y3 0 dy2" />
+
+ <gd name="y4" fmla="+- y3 dy2 0" />
+
+ <gd name="dy3" fmla="*/ h a 50000" />
+
+ <gd name="y5" fmla="+- y4 dy3 0" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ <gd name="wR" fmla="*/ w 1125 21600" />
+ <gd name="hR" fmla="*/ h 1125 21600" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="-4653" maxY="4653">
+ <pos x="hc" y="y4" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="21600000" />
+ <close />
+ </path>
+ <path fill="darkenLess" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x2" y="y1" />
+ </moveTo>
+ <arcTo wR="wR" hR="hR" stAng="cd2" swAng="21600000" />
+ <moveTo>
+ <pt x="x3" y="y1" />
+ </moveTo>
+ <arcTo wR="wR" hR="hR" stAng="cd2" swAng="21600000" />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x1" y="y2" />
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y5" />
+ <pt x="x4" y="y2" />
+ </quadBezTo>
+ </path>
+ <path fill="none">
+
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="21600000" />
+ <close />
+ </path>
+ </pathLst>
+
+ </smileyFace>
+ <snip1Rect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="*/ ss a 100000" />
+ <gd name="x1" fmla="+- r 0 dx1" />
+ <gd name="it" fmla="*/ dx1 1 2" />
+ <gd name="ir" fmla="+/ x1 r 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="it" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="dx1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </snip1Rect>
+ <snip2DiagRect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 0" />
+ <gd name="adj2" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="lx1" fmla="*/ ss a1 100000" />
+ <gd name="lx2" fmla="+- r 0 lx1" />
+ <gd name="ly1" fmla="+- b 0 lx1" />
+ <gd name="rx1" fmla="*/ ss a2 100000" />
+ <gd name="rx2" fmla="+- r 0 rx1" />
+ <gd name="ry1" fmla="+- b 0 rx1" />
+ <gd name="d" fmla="+- lx1 0 rx1" />
+ <gd name="dx" fmla="?: d lx1 rx1" />
+ <gd name="il" fmla="*/ dx 1 2" />
+
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="lx1" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="rx2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="lx1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="rx2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="rx1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="ly1" />
+ </lnTo>
+ <lnTo>
+ <pt x="lx2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="rx1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="ry1" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="lx1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </snip2DiagRect>
+ <snip2SameRect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+ <gd name="adj2" fmla="val 0" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="tx1" fmla="*/ ss a1 100000" />
+ <gd name="tx2" fmla="+- r 0 tx1" />
+ <gd name="bx1" fmla="*/ ss a2 100000" />
+ <gd name="bx2" fmla="+- r 0 bx1" />
+ <gd name="by1" fmla="+- b 0 bx1" />
+ <gd name="d" fmla="+- tx1 0 bx1" />
+ <gd name="dx" fmla="?: d tx1 bx1" />
+ <gd name="il" fmla="*/ dx 1 2" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="it" fmla="*/ tx1 1 2" />
+ <gd name="ib" fmla="+/ by1 b 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="tx2" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="bx1" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="tx1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="tx2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="tx1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="by1" />
+ </lnTo>
+ <lnTo>
+ <pt x="bx2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="bx1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="by1" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="tx1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </snip2SameRect>
+ <snipRoundRect>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 16667" />
+ <gd name="adj2" fmla="val 16667" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 50000" />
+ <gd name="a2" fmla="pin 0 adj2 50000" />
+ <gd name="x1" fmla="*/ ss a1 100000" />
+ <gd name="dx2" fmla="*/ ss a2 100000" />
+ <gd name="x2" fmla="+- r 0 dx2" />
+ <gd name="il" fmla="*/ x1 29289 100000" />
+
+ <gd name="ir" fmla="+/ x2 r 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="50000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="50000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="il" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="dx2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="x1" />
+ </lnTo>
+ <arcTo wR="x1" hR="x1" stAng="cd2" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </snipRoundRect>
+ <squareTabs>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="md" fmla="mod w h 0" />
+ <gd name="dx" fmla="*/ 1 md 20" />
+
+ <gd name="y1" fmla="+- 0 b dx" />
+
+ <gd name="x1" fmla="+- 0 r dx" />
+
+ </gdLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd2">
+ <pos x="l" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="dx" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="dx" y="dx" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="dx" y="x1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="dx" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="dx" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="dx" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x1" y="dx" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x1" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="dx" t="dx" r="x1" b="y1" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="dx" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="dx" y="dx" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="dx" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="dx" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="dx" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="dx" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="dx" />
+ </lnTo>
+ <close />
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </squareTabs>
+ <star10>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 42533" />
+ <gd name="hf" fmla="val 105146" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="dx1" fmla="*/ swd2 95106 100000" />
+ <gd name="dx2" fmla="*/ swd2 58779 100000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="dy1" fmla="*/ hd2 80902 100000" />
+ <gd name="dy2" fmla="*/ hd2 30902 100000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc dy2 0" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ swd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 80902 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 30902 100000" />
+ <gd name="sdy1" fmla="*/ ihd2 95106 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 58779 100000" />
+ <gd name="sx1" fmla="+- hc 0 iwd2" />
+ <gd name="sx2" fmla="+- hc 0 sdx1" />
+ <gd name="sx3" fmla="+- hc 0 sdx2" />
+ <gd name="sx4" fmla="+- hc sdx2 0" />
+ <gd name="sx5" fmla="+- hc sdx1 0" />
+ <gd name="sx6" fmla="+- hc iwd2 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc sdy2 0" />
+ <gd name="sy4" fmla="+- vc sdy1 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx2" t="sy2" r="sx5" b="sy3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx2" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star10>
+ <star12>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 37500" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="cos wd2 1800000" />
+
+ <gd name="dy1" fmla="sin hd2 3600000" />
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x3" fmla="*/ w 3 4" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y3" fmla="*/ h 3 4" />
+ <gd name="y4" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="cos iwd2 900000" />
+ <gd name="sdx2" fmla="cos iwd2 2700000" />
+ <gd name="sdx3" fmla="cos iwd2 4500000" />
+ <gd name="sdy1" fmla="sin ihd2 4500000" />
+ <gd name="sdy2" fmla="sin ihd2 2700000" />
+ <gd name="sdy3" fmla="sin ihd2 900000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc 0 sdx3" />
+ <gd name="sx4" fmla="+- hc sdx3 0" />
+ <gd name="sx5" fmla="+- hc sdx2 0" />
+ <gd name="sx6" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc 0 sdy3" />
+ <gd name="sy4" fmla="+- vc sdy3 0" />
+ <gd name="sy5" fmla="+- vc sdy2 0" />
+ <gd name="sy6" fmla="+- vc sdy1 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x4" y="hd4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="wd4" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="hd4" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="wd4" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx2" t="sy2" r="sx5" b="sy5" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="hd4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="wd4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="hd4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="wd4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy4" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star12>
+ <star16>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 37500" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="*/ wd2 92388 100000" />
+ <gd name="dx2" fmla="*/ wd2 70711 100000" />
+ <gd name="dx3" fmla="*/ wd2 38268 100000" />
+ <gd name="dy1" fmla="*/ hd2 92388 100000" />
+ <gd name="dy2" fmla="*/ hd2 70711 100000" />
+ <gd name="dy3" fmla="*/ hd2 38268 100000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc dx3 0" />
+ <gd name="x5" fmla="+- hc dx2 0" />
+ <gd name="x6" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc 0 dy3" />
+ <gd name="y4" fmla="+- vc dy3 0" />
+ <gd name="y5" fmla="+- vc dy2 0" />
+ <gd name="y6" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 98079 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 83147 100000" />
+ <gd name="sdx3" fmla="*/ iwd2 55557 100000" />
+ <gd name="sdx4" fmla="*/ iwd2 19509 100000" />
+ <gd name="sdy1" fmla="*/ ihd2 98079 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 83147 100000" />
+ <gd name="sdy3" fmla="*/ ihd2 55557 100000" />
+ <gd name="sdy4" fmla="*/ ihd2 19509 100000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc 0 sdx3" />
+ <gd name="sx4" fmla="+- hc 0 sdx4" />
+ <gd name="sx5" fmla="+- hc sdx4 0" />
+ <gd name="sx6" fmla="+- hc sdx3 0" />
+ <gd name="sx7" fmla="+- hc sdx2 0" />
+ <gd name="sx8" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc 0 sdy3" />
+ <gd name="sy4" fmla="+- vc 0 sdy4" />
+ <gd name="sy5" fmla="+- vc sdy4 0" />
+ <gd name="sy6" fmla="+- vc sdy3 0" />
+ <gd name="sy7" fmla="+- vc sdy2 0" />
+ <gd name="sy8" fmla="+- vc sdy1 0" />
+ <gd name="idx" fmla="cos iwd2 2700000" />
+ <gd name="idy" fmla="sin ihd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x5" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y3" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x5" y="y5" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="y6" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y6" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x2" y="y5" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y4" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x3" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x4" y="y1" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy5" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </star16>
+ <star24>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 37500" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="cos wd2 900000" />
+ <gd name="dx2" fmla="cos wd2 1800000" />
+ <gd name="dx3" fmla="cos wd2 2700000" />
+ <gd name="dx4" fmla="val wd4" />
+ <gd name="dx5" fmla="cos wd2 4500000" />
+ <gd name="dy1" fmla="sin hd2 4500000" />
+ <gd name="dy2" fmla="sin hd2 3600000" />
+ <gd name="dy3" fmla="sin hd2 2700000" />
+ <gd name="dy4" fmla="val hd4" />
+ <gd name="dy5" fmla="sin hd2 900000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc 0 dx4" />
+ <gd name="x5" fmla="+- hc 0 dx5" />
+ <gd name="x6" fmla="+- hc dx5 0" />
+ <gd name="x7" fmla="+- hc dx4 0" />
+ <gd name="x8" fmla="+- hc dx3 0" />
+ <gd name="x9" fmla="+- hc dx2 0" />
+ <gd name="x10" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc 0 dy3" />
+ <gd name="y4" fmla="+- vc 0 dy4" />
+ <gd name="y5" fmla="+- vc 0 dy5" />
+ <gd name="y6" fmla="+- vc dy5 0" />
+ <gd name="y7" fmla="+- vc dy4 0" />
+ <gd name="y8" fmla="+- vc dy3 0" />
+ <gd name="y9" fmla="+- vc dy2 0" />
+ <gd name="y10" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 99144 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 92388 100000" />
+ <gd name="sdx3" fmla="*/ iwd2 79335 100000" />
+ <gd name="sdx4" fmla="*/ iwd2 60876 100000" />
+ <gd name="sdx5" fmla="*/ iwd2 38268 100000" />
+ <gd name="sdx6" fmla="*/ iwd2 13053 100000" />
+ <gd name="sdy1" fmla="*/ ihd2 99144 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 92388 100000" />
+ <gd name="sdy3" fmla="*/ ihd2 79335 100000" />
+ <gd name="sdy4" fmla="*/ ihd2 60876 100000" />
+ <gd name="sdy5" fmla="*/ ihd2 38268 100000" />
+ <gd name="sdy6" fmla="*/ ihd2 13053 100000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc 0 sdx3" />
+ <gd name="sx4" fmla="+- hc 0 sdx4" />
+ <gd name="sx5" fmla="+- hc 0 sdx5" />
+ <gd name="sx6" fmla="+- hc 0 sdx6" />
+ <gd name="sx7" fmla="+- hc sdx6 0" />
+ <gd name="sx8" fmla="+- hc sdx5 0" />
+ <gd name="sx9" fmla="+- hc sdx4 0" />
+ <gd name="sx10" fmla="+- hc sdx3 0" />
+ <gd name="sx11" fmla="+- hc sdx2 0" />
+ <gd name="sx12" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc 0 sdy3" />
+ <gd name="sy4" fmla="+- vc 0 sdy4" />
+ <gd name="sy5" fmla="+- vc 0 sdy5" />
+ <gd name="sy6" fmla="+- vc 0 sdy6" />
+ <gd name="sy7" fmla="+- vc sdy6 0" />
+ <gd name="sy8" fmla="+- vc sdy5 0" />
+ <gd name="sy9" fmla="+- vc sdy4 0" />
+ <gd name="sy10" fmla="+- vc sdy3 0" />
+ <gd name="sy11" fmla="+- vc sdy2 0" />
+ <gd name="sy12" fmla="+- vc sdy1 0" />
+ <gd name="idx" fmla="cos iwd2 2700000" />
+ <gd name="idy" fmla="sin ihd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx9" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx10" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx11" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx12" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx12" y="sy7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx11" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx10" y="sy9" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx9" y="sy10" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y9" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy11" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y10" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy12" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy12" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y10" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy11" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y9" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy10" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy9" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy7" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star24>
+ <star32>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 37500" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="*/ wd2 98079 100000" />
+ <gd name="dx2" fmla="*/ wd2 92388 100000" />
+ <gd name="dx3" fmla="*/ wd2 83147 100000" />
+ <gd name="dx4" fmla="cos wd2 2700000" />
+ <gd name="dx5" fmla="*/ wd2 55557 100000" />
+ <gd name="dx6" fmla="*/ wd2 38268 100000" />
+ <gd name="dx7" fmla="*/ wd2 19509 100000" />
+ <gd name="dy1" fmla="*/ hd2 98079 100000" />
+ <gd name="dy2" fmla="*/ hd2 92388 100000" />
+ <gd name="dy3" fmla="*/ hd2 83147 100000" />
+ <gd name="dy4" fmla="sin hd2 2700000" />
+ <gd name="dy5" fmla="*/ hd2 55557 100000" />
+ <gd name="dy6" fmla="*/ hd2 38268 100000" />
+ <gd name="dy7" fmla="*/ hd2 19509 100000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc 0 dx4" />
+ <gd name="x5" fmla="+- hc 0 dx5" />
+ <gd name="x6" fmla="+- hc 0 dx6" />
+ <gd name="x7" fmla="+- hc 0 dx7" />
+ <gd name="x8" fmla="+- hc dx7 0" />
+ <gd name="x9" fmla="+- hc dx6 0" />
+ <gd name="x10" fmla="+- hc dx5 0" />
+ <gd name="x11" fmla="+- hc dx4 0" />
+ <gd name="x12" fmla="+- hc dx3 0" />
+ <gd name="x13" fmla="+- hc dx2 0" />
+ <gd name="x14" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc 0 dy2" />
+ <gd name="y3" fmla="+- vc 0 dy3" />
+ <gd name="y4" fmla="+- vc 0 dy4" />
+ <gd name="y5" fmla="+- vc 0 dy5" />
+ <gd name="y6" fmla="+- vc 0 dy6" />
+ <gd name="y7" fmla="+- vc 0 dy7" />
+ <gd name="y8" fmla="+- vc dy7 0" />
+ <gd name="y9" fmla="+- vc dy6 0" />
+ <gd name="y10" fmla="+- vc dy5 0" />
+ <gd name="y11" fmla="+- vc dy4 0" />
+ <gd name="y12" fmla="+- vc dy3 0" />
+ <gd name="y13" fmla="+- vc dy2 0" />
+ <gd name="y14" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 99518 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 95694 100000" />
+ <gd name="sdx3" fmla="*/ iwd2 88192 100000" />
+ <gd name="sdx4" fmla="*/ iwd2 77301 100000" />
+ <gd name="sdx5" fmla="*/ iwd2 63439 100000" />
+ <gd name="sdx6" fmla="*/ iwd2 47140 100000" />
+ <gd name="sdx7" fmla="*/ iwd2 29028 100000" />
+ <gd name="sdx8" fmla="*/ iwd2 9802 100000" />
+ <gd name="sdy1" fmla="*/ ihd2 99518 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 95694 100000" />
+ <gd name="sdy3" fmla="*/ ihd2 88192 100000" />
+ <gd name="sdy4" fmla="*/ ihd2 77301 100000" />
+ <gd name="sdy5" fmla="*/ ihd2 63439 100000" />
+ <gd name="sdy6" fmla="*/ ihd2 47140 100000" />
+ <gd name="sdy7" fmla="*/ ihd2 29028 100000" />
+ <gd name="sdy8" fmla="*/ ihd2 9802 100000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc 0 sdx3" />
+ <gd name="sx4" fmla="+- hc 0 sdx4" />
+ <gd name="sx5" fmla="+- hc 0 sdx5" />
+ <gd name="sx6" fmla="+- hc 0 sdx6" />
+ <gd name="sx7" fmla="+- hc 0 sdx7" />
+ <gd name="sx8" fmla="+- hc 0 sdx8" />
+ <gd name="sx9" fmla="+- hc sdx8 0" />
+ <gd name="sx10" fmla="+- hc sdx7 0" />
+ <gd name="sx11" fmla="+- hc sdx6 0" />
+ <gd name="sx12" fmla="+- hc sdx5 0" />
+ <gd name="sx13" fmla="+- hc sdx4 0" />
+ <gd name="sx14" fmla="+- hc sdx3 0" />
+ <gd name="sx15" fmla="+- hc sdx2 0" />
+ <gd name="sx16" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc 0 sdy3" />
+ <gd name="sy4" fmla="+- vc 0 sdy4" />
+ <gd name="sy5" fmla="+- vc 0 sdy5" />
+ <gd name="sy6" fmla="+- vc 0 sdy6" />
+ <gd name="sy7" fmla="+- vc 0 sdy7" />
+ <gd name="sy8" fmla="+- vc 0 sdy8" />
+ <gd name="sy9" fmla="+- vc sdy8 0" />
+ <gd name="sy10" fmla="+- vc sdy7 0" />
+ <gd name="sy11" fmla="+- vc sdy6 0" />
+ <gd name="sy12" fmla="+- vc sdy5 0" />
+ <gd name="sy13" fmla="+- vc sdy4 0" />
+ <gd name="sy14" fmla="+- vc sdy3 0" />
+ <gd name="sy15" fmla="+- vc sdy2 0" />
+ <gd name="sy16" fmla="+- vc sdy1 0" />
+ <gd name="idx" fmla="cos iwd2 2700000" />
+ <gd name="idy" fmla="sin ihd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx9" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx10" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx11" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx12" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x11" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx13" y="sy5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x12" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx14" y="sy6" />
+ </lnTo>
+ <lnTo>
+ <pt x="x13" y="y6" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx15" y="sy7" />
+ </lnTo>
+ <lnTo>
+ <pt x="x14" y="y7" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx16" y="sy8" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx16" y="sy9" />
+ </lnTo>
+ <lnTo>
+ <pt x="x14" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx15" y="sy10" />
+ </lnTo>
+ <lnTo>
+ <pt x="x13" y="y9" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx14" y="sy11" />
+ </lnTo>
+ <lnTo>
+ <pt x="x12" y="y10" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx13" y="sy12" />
+ </lnTo>
+ <lnTo>
+ <pt x="x11" y="y11" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx12" y="sy13" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y12" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx11" y="sy14" />
+ </lnTo>
+ <lnTo>
+ <pt x="x9" y="y13" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx10" y="sy15" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y14" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx9" y="sy16" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx8" y="sy16" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y14" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx7" y="sy15" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y13" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy14" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y12" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy13" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y11" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy12" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y10" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy11" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y9" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy10" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y8" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy9" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star32>
+ <star4>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 12500" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx" fmla="cos iwd2 2700000" />
+ <gd name="sdy" fmla="sin ihd2 2700000" />
+ <gd name="sx1" fmla="+- hc 0 sdx" />
+ <gd name="sx2" fmla="+- hc sdx 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy" />
+ <gd name="sy2" fmla="+- vc sdy 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx1" t="sy1" r="sx2" b="sy2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star4>
+ <star5>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 19098" />
+ <gd name="hf" fmla="val 105146" />
+ <gd name="vf" fmla="val 110557" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="svc" fmla="*/ vc vf 100000" />
+ <gd name="dx1" fmla="cos swd2 1080000" />
+ <gd name="dx2" fmla="cos swd2 18360000" />
+ <gd name="dy1" fmla="sin shd2 1080000" />
+ <gd name="dy2" fmla="sin shd2 18360000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- svc 0 dy1" />
+ <gd name="y2" fmla="+- svc 0 dy2" />
+ <gd name="iwd2" fmla="*/ swd2 a 50000" />
+ <gd name="ihd2" fmla="*/ shd2 a 50000" />
+ <gd name="sdx1" fmla="cos iwd2 20520000" />
+ <gd name="sdx2" fmla="cos iwd2 3240000" />
+ <gd name="sdy1" fmla="sin ihd2 3240000" />
+ <gd name="sdy2" fmla="sin ihd2 20520000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc sdx2 0" />
+ <gd name="sx4" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- svc 0 sdy1" />
+ <gd name="sy2" fmla="+- svc 0 sdy2" />
+ <gd name="sy3" fmla="+- svc ihd2 0" />
+ <gd name="yAdj" fmla="+- svc 0 ihd2" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y2" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="y1" />
+ </cxn>
+ </cxnLst>
+ <rect l="sx1" t="sy1" r="sx4" b="sy3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx2" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </star5>
+ <star6>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 28868" />
+ <gd name="hf" fmla="val 115470" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="dx1" fmla="cos swd2 1800000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc dx1 0" />
+ <gd name="y2" fmla="+- vc hd4 0" />
+ <gd name="iwd2" fmla="*/ swd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx2" fmla="*/ iwd2 1 2" />
+ <gd name="sx1" fmla="+- hc 0 iwd2" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc sdx2 0" />
+ <gd name="sx4" fmla="+- hc iwd2 0" />
+ <gd name="sdy1" fmla="sin ihd2 3600000" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc sdy1 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x2" y="hd4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="hd4" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx1" t="sy1" r="sx4" b="sy2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="hd4" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx2" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="hd4" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="vc" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star6>
+ <star7>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 34601" />
+ <gd name="hf" fmla="val 102572" />
+ <gd name="vf" fmla="val 105210" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="swd2" fmla="*/ wd2 hf 100000" />
+ <gd name="shd2" fmla="*/ hd2 vf 100000" />
+ <gd name="svc" fmla="*/ vc vf 100000" />
+ <gd name="dx1" fmla="*/ swd2 97493 100000" />
+ <gd name="dx2" fmla="*/ swd2 78183 100000" />
+ <gd name="dx3" fmla="*/ swd2 43388 100000" />
+ <gd name="dy1" fmla="*/ shd2 62349 100000" />
+ <gd name="dy2" fmla="*/ shd2 22252 100000" />
+ <gd name="dy3" fmla="*/ shd2 90097 100000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc 0 dx3" />
+ <gd name="x4" fmla="+- hc dx3 0" />
+ <gd name="x5" fmla="+- hc dx2 0" />
+ <gd name="x6" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- svc 0 dy1" />
+ <gd name="y2" fmla="+- svc dy2 0" />
+ <gd name="y3" fmla="+- svc dy3 0" />
+ <gd name="iwd2" fmla="*/ swd2 a 50000" />
+ <gd name="ihd2" fmla="*/ shd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 97493 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 78183 100000" />
+ <gd name="sdx3" fmla="*/ iwd2 43388 100000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc 0 sdx3" />
+ <gd name="sx4" fmla="+- hc sdx3 0" />
+ <gd name="sx5" fmla="+- hc sdx2 0" />
+ <gd name="sx6" fmla="+- hc sdx1 0" />
+ <gd name="sdy1" fmla="*/ ihd2 90097 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 22252 100000" />
+ <gd name="sdy3" fmla="*/ ihd2 62349 100000" />
+ <gd name="sy1" fmla="+- svc 0 sdy1" />
+ <gd name="sy2" fmla="+- svc 0 sdy2" />
+ <gd name="sy3" fmla="+- svc sdy3 0" />
+ <gd name="sy4" fmla="+- svc ihd2 0" />
+ <gd name="yAdj" fmla="+- svc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="x5" y="y1" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x6" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x4" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x3" y="y3" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x2" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx2" t="sy1" r="sx5" b="sy3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx6" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx5" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star7>
+ <star8>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 37500" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000" />
+ <gd name="dx1" fmla="cos wd2 2700000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc dx1 0" />
+ <gd name="dy1" fmla="sin hd2 2700000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="iwd2" fmla="*/ wd2 a 50000" />
+ <gd name="ihd2" fmla="*/ hd2 a 50000" />
+ <gd name="sdx1" fmla="*/ iwd2 92388 100000" />
+ <gd name="sdx2" fmla="*/ iwd2 38268 100000" />
+ <gd name="sdy1" fmla="*/ ihd2 92388 100000" />
+ <gd name="sdy2" fmla="*/ ihd2 38268 100000" />
+ <gd name="sx1" fmla="+- hc 0 sdx1" />
+ <gd name="sx2" fmla="+- hc 0 sdx2" />
+ <gd name="sx3" fmla="+- hc sdx2 0" />
+ <gd name="sx4" fmla="+- hc sdx1 0" />
+ <gd name="sy1" fmla="+- vc 0 sdy1" />
+ <gd name="sy2" fmla="+- vc 0 sdy2" />
+ <gd name="sy3" fmla="+- vc sdy2 0" />
+ <gd name="sy4" fmla="+- vc sdy1 0" />
+ <gd name="yAdj" fmla="+- vc 0 ihd2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="hc" y="yAdj" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x1" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="y1" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x2" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="sx1" t="sy1" r="sx4" b="sy4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="sx1" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx4" y="sy3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx3" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx2" y="sy4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="sx1" y="sy3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </star8>
+ <straightConnector1>
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path fill="none">
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ </path>
+ </pathLst>
+ </straightConnector1>
+ <stripedRightArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+
+ <gd name="adj2" fmla="val 50000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 84375 w ss" />
+
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="x4" fmla="*/ ss 5 32" />
+ <gd name="dx5" fmla="*/ ss a2 100000" />
+ <gd name="x5" fmla="+- r 0 dx5" />
+ <gd name="dy1" fmla="*/ h a1 200000" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="y2" fmla="+- vc dy1 0" />
+ <gd name="dx6" fmla="*/ dy1 dx5 hd2" />
+ <gd name="x6" fmla="+- r 0 dx6" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="100000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x5" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x5" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x5" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x4" t="y1" r="x6" b="y2" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="ssd32" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="ssd32" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="ssd16" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="ssd8" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="ssd8" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="ssd16" y="y2" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x4" y="y1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x5" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="vc" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x5" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </stripedRightArrow>
+ <sun>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 12500 adj 46875" />
+ <gd name="g0" fmla="+- 50000 0 a" />
+ <gd name="g1" fmla="*/ g0 30274 32768" />
+ <gd name="g2" fmla="*/ g0 12540 32768" />
+ <gd name="g3" fmla="+- g1 50000 0" />
+ <gd name="g4" fmla="+- g2 50000 0" />
+ <gd name="g5" fmla="+- 50000 0 g1" />
+ <gd name="g6" fmla="+- 50000 0 g2" />
+ <gd name="g7" fmla="*/ g0 23170 32768" />
+ <gd name="g8" fmla="+- 50000 g7 0" />
+ <gd name="g9" fmla="+- 50000 0 g7" />
+ <gd name="g10" fmla="*/ g5 3 4" />
+ <gd name="g11" fmla="*/ g6 3 4" />
+ <gd name="g12" fmla="+- g10 3662 0" />
+ <gd name="g13" fmla="+- g11 3662 0" />
+ <gd name="g14" fmla="+- g11 12500 0" />
+ <gd name="g15" fmla="+- 100000 0 g10" />
+ <gd name="g16" fmla="+- 100000 0 g12" />
+ <gd name="g17" fmla="+- 100000 0 g13" />
+ <gd name="g18" fmla="+- 100000 0 g14" />
+ <gd name="ox1" fmla="*/ w 18436 21600" />
+ <gd name="oy1" fmla="*/ h 3163 21600" />
+ <gd name="ox2" fmla="*/ w 3163 21600" />
+ <gd name="oy2" fmla="*/ h 18436 21600" />
+ <gd name="x8" fmla="*/ w g8 100000" />
+ <gd name="x9" fmla="*/ w g9 100000" />
+ <gd name="x10" fmla="*/ w g10 100000" />
+ <gd name="x12" fmla="*/ w g12 100000" />
+ <gd name="x13" fmla="*/ w g13 100000" />
+ <gd name="x14" fmla="*/ w g14 100000" />
+ <gd name="x15" fmla="*/ w g15 100000" />
+ <gd name="x16" fmla="*/ w g16 100000" />
+ <gd name="x17" fmla="*/ w g17 100000" />
+ <gd name="x18" fmla="*/ w g18 100000" />
+ <gd name="x19" fmla="*/ w a 100000" />
+ <gd name="wR" fmla="*/ w g0 100000" />
+ <gd name="hR" fmla="*/ h g0 100000" />
+ <gd name="y8" fmla="*/ h g8 100000" />
+ <gd name="y9" fmla="*/ h g9 100000" />
+ <gd name="y10" fmla="*/ h g10 100000" />
+ <gd name="y12" fmla="*/ h g12 100000" />
+ <gd name="y13" fmla="*/ h g13 100000" />
+ <gd name="y14" fmla="*/ h g14 100000" />
+ <gd name="y15" fmla="*/ h g15 100000" />
+ <gd name="y16" fmla="*/ h g16 100000" />
+ <gd name="y17" fmla="*/ h g17 100000" />
+ <gd name="y18" fmla="*/ h g18 100000" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="12500" maxX="46875">
+ <pos x="x19" y="vc" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x9" t="y9" r="x8" b="y8" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="r" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x15" y="y18" />
+ </lnTo>
+ <lnTo>
+ <pt x="x15" y="y14" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="ox1" y="oy1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x16" y="y13" />
+ </lnTo>
+ <lnTo>
+ <pt x="x17" y="y12" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="hc" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x18" y="y10" />
+ </lnTo>
+ <lnTo>
+ <pt x="x14" y="y10" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="ox2" y="oy1" />
+ </moveTo>
+ <lnTo>
+ <pt x="x13" y="y12" />
+ </lnTo>
+ <lnTo>
+ <pt x="x12" y="y13" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <lnTo>
+ <pt x="x10" y="y14" />
+ </lnTo>
+ <lnTo>
+ <pt x="x10" y="y18" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="ox2" y="oy2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x12" y="y17" />
+ </lnTo>
+ <lnTo>
+ <pt x="x13" y="y16" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="hc" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x14" y="y15" />
+ </lnTo>
+ <lnTo>
+ <pt x="x18" y="y15" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="ox1" y="oy2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x17" y="y16" />
+ </lnTo>
+ <lnTo>
+ <pt x="x16" y="y17" />
+ </lnTo>
+ <close />
+ <moveTo>
+ <pt x="x19" y="vc" />
+ </moveTo>
+ <arcTo wR="wR" hR="hR" stAng="cd2" swAng="21600000" />
+ <close />
+ </path>
+ </pathLst>
+
+ </sun>
+ <swooshArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 16667" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+
+
+ <gd name="a1" fmla="pin 1 adj1 75000" />
+
+ <gd name="maxAdj2" fmla="*/ 70000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="ad1" fmla="*/ h a1 100000" />
+ <gd name="ad2" fmla="*/ ss a2 100000" />
+
+ <gd name="xB" fmla="+- r 0 ad2" />
+ <gd name="yB" fmla="+- t ssd8 0" />
+
+ <gd name="alfa" fmla="*/ cd4 1 14" />
+
+ <gd name="dx0" fmla="tan ssd8 alfa" />
+ <gd name="xC" fmla="+- xB 0 dx0" />
+
+ <gd name="dx1" fmla="tan ad1 alfa" />
+
+ <gd name="yF" fmla="+- yB ad1 0" />
+ <gd name="xF" fmla="+- xB dx1 0" />
+
+ <gd name="xE" fmla="+- xF dx0 0" />
+ <gd name="yE" fmla="+- yF ssd8 0" />
+
+ <gd name="dy2" fmla="+- yE 0 t" />
+ <gd name="dy22" fmla="*/ dy2 1 2" />
+ <gd name="dy3" fmla="*/ h 1 20" />
+ <gd name="yD" fmla="+- t dy22 dy3" />
+
+
+ <gd name="dy4" fmla="*/ hd6 1 1" />
+ <gd name="yP1" fmla="+- hd6 dy4 0" />
+ <gd name="xP1" fmla="val wd6" />
+
+
+ <gd name="dy5" fmla="*/ hd6 1 2" />
+ <gd name="yP2" fmla="+- yF dy5 0" />
+ <gd name="xP2" fmla="val wd4" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="1" maxY="75000">
+ <pos x="xF" y="yF" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="xB" y="yB" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="xC" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="yD" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="xE" y="yE" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <quadBezTo>
+ <pt x="xP1" y="yP1" />
+ <pt x="xB" y="yB" />
+ </quadBezTo>
+ <lnTo>
+ <pt x="xC" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="yD" />
+ </lnTo>
+ <lnTo>
+ <pt x="xE" y="yE" />
+ </lnTo>
+ <lnTo>
+ <pt x="xF" y="yF" />
+ </lnTo>
+ <quadBezTo>
+ <pt x="xP2" y="yP2" />
+ <pt x="l" y="b" />
+ </quadBezTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </swooshArrow>
+ <teardrop>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 100000" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 200000" />
+ <gd name="r2" fmla="sqrt 2" />
+ <gd name="tw" fmla="*/ wd2 r2 1" />
+ <gd name="th" fmla="*/ hd2 r2 1" />
+ <gd name="sw" fmla="*/ tw a 100000" />
+ <gd name="sh" fmla="*/ th a 100000" />
+ <gd name="dx1" fmla="cos sw 2700000" />
+ <gd name="dy1" fmla="sin sh 2700000" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc 0 dy1" />
+ <gd name="x2" fmla="+/ hc x1 2" />
+ <gd name="y2" fmla="+/ vc y1 2" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="200000">
+ <pos x="x1" y="t" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="x1" y="y1" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="vc" />
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="cd2" swAng="cd4" />
+ <quadBezTo>
+ <pt x="x2" y="t" />
+ <pt x="x1" y="y1" />
+ </quadBezTo>
+ <quadBezTo>
+ <pt x="r" y="y2" />
+ <pt x="r" y="vc" />
+ </quadBezTo>
+ <arcTo wR="wd2" hR="hd2" stAng="0" swAng="cd4" />
+ <arcTo wR="wd2" hR="hd2" stAng="cd4" swAng="cd4" />
+ <close />
+ </path>
+ </pathLst>
+
+ </teardrop>
+ <trapezoid>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj" fmla="*/ 50000 w ss" />
+ <gd name="a" fmla="pin 0 adj maxAdj" />
+ <gd name="x1" fmla="*/ ss a 200000" />
+ <gd name="x2" fmla="*/ ss a 100000" />
+ <gd name="x3" fmla="+- r 0 x2" />
+ <gd name="x4" fmla="+- r 0 x1" />
+ <gd name="il" fmla="*/ wd3 a maxAdj" />
+ <gd name="it" fmla="*/ hd3 a maxAdj" />
+ <gd name="ir" fmla="+- r 0 il" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="maxAdj">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x4" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </trapezoid>
+ <triangle>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 100000" />
+ <gd name="x1" fmla="*/ w a 200000" />
+ <gd name="x2" fmla="*/ w a 100000" />
+ <gd name="x3" fmla="+- x1 wd2 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="100000">
+ <pos x="x2" y="t" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="x2" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="l" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x2" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="r" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x3" y="vc" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="vc" r="x3" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </triangle>
+ <upArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 64977" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 100000 h ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss h" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dx1" fmla="*/ ss a2 100000" />
+
+ <gd name="dx2" fmla="*/ ss a1 200000" />
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="*/ ss a3 100000" />
+
+ <gd name="dy2" fmla="*/ h a4 100000" />
+
+ <gd name="y2" fmla="+- b 0 dy2" />
+ <gd name="y3" fmla="+/ y2 b 2" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x2" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj4" minY="0" maxY="maxAdj4">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="y2" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </upArrowCallout>
+ <upDownArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 h ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="y2" fmla="*/ ss a2 100000" />
+ <gd name="y3" fmla="+- b 0 y2" />
+ <gd name="dx1" fmla="*/ w a1 200000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc dx1 0" />
+ <gd name="dy1" fmla="*/ x1 y2 wd2" />
+ <gd name="y1" fmla="+- y2 0 dy1" />
+ <gd name="y4" fmla="+- y3 dy1 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="100000">
+ <pos x="x1" y="y3" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y2" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y3" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y3" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x2" y="vc" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ </cxnLst>
+ <rect l="x1" t="y1" r="x2" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </upDownArrow>
+ <upArrow>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 50000" />
+ <gd name="adj2" fmla="val 50000" />
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 100000 h ss" />
+ <gd name="a1" fmla="pin 0 adj1 100000" />
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="dy2" fmla="*/ ss a2 100000" />
+ <gd name="y2" fmla="+- t dy2 0" />
+ <gd name="dx1" fmla="*/ w a1 200000" />
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc dx1 0" />
+ <gd name="dy1" fmla="*/ x1 dy2 wd2" />
+ <gd name="y1" fmla="+- y2 0 dy1" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="100000">
+ <pos x="x1" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj2" minY="0" maxY="maxAdj2">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="y2" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y2" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="x1" t="y1" r="x2" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y2" />
+ </lnTo>
+ <close/>
+ </path>
+ </pathLst>
+ </upArrow>
+ <upDownArrowCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 48123" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="maxAdj2" fmla="*/ 50000 w ss" />
+
+ <gd name="a2" fmla="pin 0 adj2 maxAdj2" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="maxAdj3" fmla="*/ 50000 h ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q2" fmla="*/ a3 ss hd2" />
+
+ <gd name="maxAdj4" fmla="+- 100000 0 q2" />
+
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+ <gd name="dx1" fmla="*/ ss a2 100000" />
+
+ <gd name="dx2" fmla="*/ ss a1 200000" />
+
+ <gd name="x1" fmla="+- hc 0 dx1" />
+ <gd name="x2" fmla="+- hc 0 dx2" />
+ <gd name="x3" fmla="+- hc dx2 0" />
+ <gd name="x4" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="*/ ss a3 100000" />
+
+ <gd name="y4" fmla="+- b 0 y1" />
+
+ <gd name="dy2" fmla="*/ h a4 200000" />
+
+ <gd name="y2" fmla="+- vc 0 dy2" />
+
+ <gd name="y3" fmla="+- vc dy2 0" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="x2" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="maxAdj2">
+ <pos x="x1" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="r" y="y1" />
+ </ahXY>
+ <ahXY gdRefY="adj4" minY="0" maxY="maxAdj4">
+ <pos x="l" y="y2" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="y2" r="r" b="y3" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2" />
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="x3" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x4" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="hc" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y3" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </upDownArrowCallout>
+ <uturnArrow>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 25000" />
+
+ <gd name="adj2" fmla="val 25000" />
+
+ <gd name="adj3" fmla="val 25000" />
+
+ <gd name="adj4" fmla="val 43750" />
+
+ <gd name="adj5" fmla="val 75000" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a2" fmla="pin 0 adj2 25000" />
+ <gd name="maxAdj1" fmla="*/ a2 2 1" />
+ <gd name="a1" fmla="pin 0 adj1 maxAdj1" />
+ <gd name="q2" fmla="*/ a1 ss h" />
+
+ <gd name="q3" fmla="+- 100000 0 q2" />
+
+ <gd name="maxAdj3" fmla="*/ q3 h ss" />
+
+ <gd name="a3" fmla="pin 0 adj3 maxAdj3" />
+ <gd name="q1" fmla="+- a3 a1 0" />
+ <gd name="minAdj5" fmla="*/ q1 ss h" />
+ <gd name="a5" fmla="pin minAdj5 adj5 100000" />
+ <gd name="th" fmla="*/ ss a1 100000" />
+
+ <gd name="aw2" fmla="*/ ss a2 100000" />
+
+ <gd name="th2" fmla="*/ th 1 2" />
+ <gd name="dh2" fmla="+- aw2 0 th2" />
+
+ <gd name="y5" fmla="*/ h a5 100000" />
+
+ <gd name="ah" fmla="*/ ss a3 100000" />
+
+ <gd name="y4" fmla="+- y5 0 ah" />
+ <gd name="x9" fmla="+- r 0 dh2" />
+
+ <gd name="bw" fmla="*/ x9 1 2" />
+ <gd name="bs" fmla="min bw y4" />
+ <gd name="maxAdj4" fmla="*/ bs 100000 ss" />
+ <gd name="a4" fmla="pin 0 adj4 maxAdj4" />
+
+
+ <gd name="bd" fmla="*/ ss a4 100000" />
+
+
+
+ <gd name="bd3" fmla="+- bd 0 th" />
+ <gd name="bd2" fmla="max bd3 0" />
+ <gd name="x3" fmla="+- th bd2 0" />
+
+ <gd name="x8" fmla="+- r 0 aw2" />
+
+ <gd name="x6" fmla="+- x8 0 aw2" />
+
+ <gd name="x7" fmla="+- x6 dh2 0" />
+
+ <gd name="x4" fmla="+- x9 0 bd" />
+
+ <gd name="x5" fmla="+- x7 0 bd2" />
+
+ <gd name="cx" fmla="+/ th x7 2" />
+
+
+
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="0" maxX="maxAdj1">
+ <pos x="th" y="b" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="0" maxX="25000">
+ <pos x="x6" y="b" />
+ </ahXY>
+ <ahXY gdRefY="adj3" minY="0" maxY="maxAdj3">
+ <pos x="x6" y="y4" />
+ </ahXY>
+ <ahXY gdRefX="adj4" minX="0" maxX="maxAdj4">
+ <pos x="bd" y="t" />
+ </ahXY>
+ <ahXY gdRefY="adj5" minY="minAdj5" maxY="100000">
+ <pos x="r" y="y5" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="x6" y="y4" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="x8" y="y5" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="y4" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="cx" y="t" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="th2" y="b" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="b" />
+ </moveTo>
+ <lnTo>
+ <pt x="l" y="bd" />
+ </lnTo>
+ <arcTo wR="bd" hR="bd" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x4" y="t" />
+ </lnTo>
+ <arcTo wR="bd" hR="bd" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="x9" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x8" y="y5" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="y4" />
+ </lnTo>
+ <lnTo>
+ <pt x="x7" y="x3" />
+ </lnTo>
+ <arcTo wR="bd2" hR="bd2" stAng="0" swAng="-5400000" />
+ <lnTo>
+ <pt x="x3" y="th" />
+ </lnTo>
+ <arcTo wR="bd2" hR="bd2" stAng="3cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="th" y="b" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </uturnArrow>
+ <verticalScroll>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 12500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 25000" />
+ <gd name="ch" fmla="*/ ss a 100000" />
+
+ <gd name="ch2" fmla="*/ ch 1 2" />
+
+ <gd name="ch4" fmla="*/ ch 1 4" />
+
+
+
+
+
+ <gd name="x3" fmla="+- ch ch2 0" />
+
+ <gd name="x4" fmla="+- ch ch 0" />
+
+ <gd name="x6" fmla="+- r 0 ch" />
+
+ <gd name="x7" fmla="+- r 0 ch2" />
+
+ <gd name="x5" fmla="+- x6 0 ch2" />
+
+
+
+
+
+ <gd name="y3" fmla="+- b 0 ch" />
+
+ <gd name="y4" fmla="+- b 0 ch2" />
+
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="25000">
+ <pos x="l" y="ch" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="ch" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x6" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="ch" t="ch" r="x6" b="y4" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="ch2" y="b" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="ch2" y="y4" />
+ </lnTo>
+ <arcTo wR="ch4" hR="ch4" stAng="cd4" swAng="-10800000" />
+ <lnTo>
+ <pt x="ch" y="y3" />
+ </lnTo>
+ <lnTo>
+ <pt x="ch" y="ch2" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x7" y="t" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x6" y="ch" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y4" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <close />
+ <moveTo>
+ <pt x="x4" y="ch2" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <arcTo wR="ch4" hR="ch4" stAng="cd4" swAng="cd2" />
+ <close />
+ </path>
+ <path fill="darkenLess" stroke="false" extrusionOk="false">
+
+ <moveTo>
+ <pt x="x4" y="ch2" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <arcTo wR="ch4" hR="ch4" stAng="cd4" swAng="cd2" />
+ <close />
+ <moveTo>
+ <pt x="ch" y="y4" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="3cd4" />
+ <arcTo wR="ch4" hR="ch4" stAng="3cd4" swAng="cd2" />
+ <close />
+ </path>
+ <path fill="none" extrusionOk="false">
+
+ <moveTo>
+ <pt x="ch" y="y3" />
+ </moveTo>
+ <lnTo>
+ <pt x="ch" y="ch2" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x7" y="t" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x6" y="ch" />
+ </lnTo>
+ <lnTo>
+ <pt x="x6" y="y4" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="ch2" y="b" />
+ </lnTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="cd2" />
+ <close />
+ <moveTo>
+ <pt x="x3" y="t" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="3cd4" swAng="cd2" />
+ <arcTo wR="ch4" hR="ch4" stAng="cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="x4" y="ch2" />
+ </lnTo>
+ <moveTo>
+ <pt x="x6" y="ch" />
+ </moveTo>
+ <lnTo>
+ <pt x="x3" y="ch" />
+ </lnTo>
+ <moveTo>
+ <pt x="ch2" y="y3" />
+ </moveTo>
+ <arcTo wR="ch4" hR="ch4" stAng="3cd4" swAng="cd2" />
+ <lnTo>
+ <pt x="ch" y="y4" />
+ </lnTo>
+ <moveTo>
+ <pt x="ch2" y="b" />
+ </moveTo>
+ <arcTo wR="ch2" hR="ch2" stAng="cd4" swAng="-5400000" />
+ <lnTo>
+ <pt x="ch" y="y3" />
+ </lnTo>
+ </path>
+ </pathLst>
+
+ </verticalScroll>
+ <wave>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500" />
+
+ <gd name="adj2" fmla="val 0" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 20000" />
+ <gd name="a2" fmla="pin -10000 adj2 10000" />
+ <gd name="y1" fmla="*/ h a1 100000" />
+
+ <gd name="dy2" fmla="*/ y1 10 3" />
+ <gd name="y2" fmla="+- y1 0 dy2" />
+
+ <gd name="y3" fmla="+- y1 dy2 0" />
+
+ <gd name="y4" fmla="+- b 0 y1" />
+
+ <gd name="y5" fmla="+- y4 0 dy2" />
+
+ <gd name="y6" fmla="+- y4 dy2 0" />
+
+ <gd name="dx1" fmla="*/ w a2 100000" />
+
+ <gd name="of2" fmla="*/ w a2 50000" />
+
+ <gd name="x1" fmla="abs dx1" />
+
+ <gd name="dx2" fmla="?: of2 0 of2" />
+ <gd name="x2" fmla="+- l 0 dx2" />
+
+ <gd name="dx5" fmla="?: of2 of2 0" />
+ <gd name="x5" fmla="+- r 0 dx5" />
+
+ <gd name="dx3" fmla="+/ dx2 x5 3" />
+
+ <gd name="x3" fmla="+- x2 dx3 0" />
+
+ <gd name="x4" fmla="+/ x3 x5 2" />
+
+ <gd name="x6" fmla="+- l dx5 0" />
+
+ <gd name="x10" fmla="+- r dx2 0" />
+
+ <gd name="x7" fmla="+- x6 dx3 0" />
+
+ <gd name="x8" fmla="+/ x7 x10 2" />
+
+ <gd name="x9" fmla="+- r 0 x1" />
+
+ <gd name="xAdj" fmla="+- hc dx1 0" />
+ <gd name="xAdj2" fmla="+- hc 0 dx1" />
+ <gd name="il" fmla="max x2 x6" />
+ <gd name="ir" fmla="min x5 x10" />
+ <gd name="it" fmla="*/ h a1 50000" />
+ <gd name="ib" fmla="+- b 0 it" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="20000">
+ <pos x="l" y="y1" />
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="cd4">
+ <pos x="xAdj2" y="y1" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="x1" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="xAdj" y="y4" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="x9" y="vc" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1" />
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y2" />
+ <pt x="x4" y="y3" />
+ <pt x="x5" y="y1" />
+ </cubicBezTo>
+ <lnTo>
+ <pt x="x10" y="y4" />
+ </lnTo>
+ <cubicBezTo>
+ <pt x="x8" y="y6" />
+ <pt x="x7" y="y5" />
+ <pt x="x6" y="y4" />
+ </cubicBezTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </wave>
+ <wedgeEllipseCallout>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val -20833" />
+ <gd name="adj2" fmla="val 62500" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dxPos" fmla="*/ w adj1 100000" />
+ <gd name="dyPos" fmla="*/ h adj2 100000" />
+ <gd name="xPos" fmla="+- hc dxPos 0" />
+ <gd name="yPos" fmla="+- vc dyPos 0" />
+ <gd name="sdx" fmla="*/ dxPos h 1" />
+ <gd name="sdy" fmla="*/ dyPos w 1" />
+ <gd name="pang" fmla="at2 sdx sdy" />
+ <gd name="stAng" fmla="+- pang 660000 0" />
+ <gd name="enAng" fmla="+- pang 0 660000" />
+ <gd name="dx1" fmla="cos wd2 stAng" />
+ <gd name="dy1" fmla="sin hd2 stAng" />
+ <gd name="x1" fmla="+- hc dx1 0" />
+ <gd name="y1" fmla="+- vc dy1 0" />
+ <gd name="dx2" fmla="cos wd2 enAng" />
+ <gd name="dy2" fmla="sin hd2 enAng" />
+ <gd name="x2" fmla="+- hc dx2 0" />
+ <gd name="y2" fmla="+- vc dy2 0" />
+ <gd name="stAng1" fmla="at2 dx1 dy1" />
+ <gd name="enAng1" fmla="at2 dx2 dy2" />
+ <gd name="swAng1" fmla="+- enAng1 0 stAng1" />
+ <gd name="swAng2" fmla="+- swAng1 21600000 0" />
+ <gd name="swAng" fmla="?: swAng1 swAng1 swAng2" />
+ <gd name="idx" fmla="cos wd2 2700000" />
+ <gd name="idy" fmla="sin hd2 2700000" />
+ <gd name="il" fmla="+- hc 0 idx" />
+ <gd name="ir" fmla="+- hc idx 0" />
+ <gd name="it" fmla="+- vc 0 idy" />
+ <gd name="ib" fmla="+- vc idy 0" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647" gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="xPos" y="yPos" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="il" y="it" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="il" y="ib" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="ir" y="ib" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="3cd4">
+ <pos x="ir" y="it" />
+ </cxn>
+ <cxn ang="pang">
+ <pos x="xPos" y="yPos" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="it" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="xPos" y="yPos" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="y1" />
+ </lnTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng1" swAng="swAng" />
+ <close />
+ </path>
+ </pathLst>
+ </wedgeEllipseCallout>
+ <wedgeRectCallout>
+
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val -20833" />
+
+ <gd name="adj2" fmla="val 62500" />
+
+ </avLst>
+
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dxPos" fmla="*/ w adj1 100000" />
+ <gd name="dyPos" fmla="*/ h adj2 100000" />
+ <gd name="xPos" fmla="+- hc dxPos 0" />
+ <gd name="yPos" fmla="+- vc dyPos 0" />
+ <gd name="dx" fmla="+- xPos 0 hc" />
+ <gd name="dy" fmla="+- yPos 0 vc" />
+ <gd name="dq" fmla="*/ dxPos h w" />
+ <gd name="ady" fmla="abs dyPos" />
+ <gd name="adq" fmla="abs dq" />
+ <gd name="dz" fmla="+- ady 0 adq" />
+ <gd name="xg1" fmla="?: dxPos 7 2" />
+ <gd name="xg2" fmla="?: dxPos 10 5" />
+ <gd name="x1" fmla="*/ w xg1 12" />
+ <gd name="x2" fmla="*/ w xg2 12" />
+ <gd name="yg1" fmla="?: dyPos 7 2" />
+ <gd name="yg2" fmla="?: dyPos 10 5" />
+ <gd name="y1" fmla="*/ h yg1 12" />
+ <gd name="y2" fmla="*/ h yg2 12" />
+ <gd name="t1" fmla="?: dxPos l xPos" />
+ <gd name="xl" fmla="?: dz l t1" />
+ <gd name="t2" fmla="?: dyPos x1 xPos" />
+ <gd name="xt" fmla="?: dz t2 x1" />
+ <gd name="t3" fmla="?: dxPos xPos r" />
+ <gd name="xr" fmla="?: dz r t3" />
+ <gd name="t4" fmla="?: dyPos xPos x1" />
+ <gd name="xb" fmla="?: dz t4 x1" />
+ <gd name="t5" fmla="?: dxPos y1 yPos" />
+ <gd name="yl" fmla="?: dz y1 t5" />
+ <gd name="t6" fmla="?: dyPos t yPos" />
+ <gd name="yt" fmla="?: dz t6 t" />
+ <gd name="t7" fmla="?: dxPos yPos y1" />
+ <gd name="yr" fmla="?: dz y1 t7" />
+ <gd name="t8" fmla="?: dyPos yPos b" />
+ <gd name="yb" fmla="?: dz t8 b" />
+ </gdLst>
+
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647" gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="xPos" y="yPos" />
+ </ahXY>
+ </ahLst>
+
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="xPos" y="yPos" />
+ </cxn>
+ </cxnLst>
+
+ <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t" />
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="xt" y="yt" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xr" y="yr" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="xb" y="yb" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xl" y="yl" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+
+ </wedgeRectCallout>
+ <wedgeRoundRectCallout>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val -20833" />
+ <gd name="adj2" fmla="val 62500" />
+ <gd name="adj3" fmla="val 16667" />
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="dxPos" fmla="*/ w adj1 100000" />
+ <gd name="dyPos" fmla="*/ h adj2 100000" />
+ <gd name="xPos" fmla="+- hc dxPos 0" />
+ <gd name="yPos" fmla="+- vc dyPos 0" />
+ <gd name="dq" fmla="*/ dxPos h w" />
+ <gd name="ady" fmla="abs dyPos" />
+ <gd name="adq" fmla="abs dq" />
+ <gd name="dz" fmla="+- ady 0 adq" />
+ <gd name="xg1" fmla="?: dxPos 7 2" />
+ <gd name="xg2" fmla="?: dxPos 10 5" />
+ <gd name="x1" fmla="*/ w xg1 12" />
+ <gd name="x2" fmla="*/ w xg2 12" />
+ <gd name="yg1" fmla="?: dyPos 7 2" />
+ <gd name="yg2" fmla="?: dyPos 10 5" />
+ <gd name="y1" fmla="*/ h yg1 12" />
+ <gd name="y2" fmla="*/ h yg2 12" />
+ <gd name="t1" fmla="?: dxPos l xPos" />
+ <gd name="xl" fmla="?: dz l t1" />
+ <gd name="t2" fmla="?: dyPos x1 xPos" />
+ <gd name="xt" fmla="?: dz t2 x1" />
+ <gd name="t3" fmla="?: dxPos xPos r" />
+ <gd name="xr" fmla="?: dz r t3" />
+ <gd name="t4" fmla="?: dyPos xPos x1" />
+ <gd name="xb" fmla="?: dz t4 x1" />
+ <gd name="t5" fmla="?: dxPos y1 yPos" />
+ <gd name="yl" fmla="?: dz y1 t5" />
+ <gd name="t6" fmla="?: dyPos t yPos" />
+ <gd name="yt" fmla="?: dz t6 t" />
+ <gd name="t7" fmla="?: dxPos yPos y1" />
+ <gd name="yr" fmla="?: dz y1 t7" />
+ <gd name="t8" fmla="?: dyPos yPos b" />
+ <gd name="yb" fmla="?: dz t8 b" />
+ <gd name="u1" fmla="*/ ss adj3 100000" />
+ <gd name="u2" fmla="+- r 0 u1" />
+ <gd name="v2" fmla="+- b 0 u1" />
+ <gd name="il" fmla="*/ u1 29289 100000" />
+ <gd name="ir" fmla="+- r 0 il" />
+ <gd name="ib" fmla="+- b 0 il" />
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj1" minX="-2147483647" maxX="2147483647" gdRefY="adj2" minY="-2147483647" maxY="2147483647">
+ <pos x="xPos" y="yPos" />
+ </ahXY>
+ </ahLst>
+ <cxnLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <cxn ang="3cd4">
+ <pos x="hc" y="t" />
+ </cxn>
+ <cxn ang="cd2">
+ <pos x="l" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="hc" y="b" />
+ </cxn>
+ <cxn ang="0">
+ <pos x="r" y="vc" />
+ </cxn>
+ <cxn ang="cd4">
+ <pos x="xPos" y="yPos" />
+ </cxn>
+ </cxnLst>
+ <rect l="il" t="il" r="ir" b="ib" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="u1" />
+ </moveTo>
+ <arcTo wR="u1" hR="u1" stAng="cd2" swAng="cd4" />
+ <lnTo>
+ <pt x="x1" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="xt" y="yt" />
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t" />
+ </lnTo>
+ <lnTo>
+ <pt x="u2" y="t" />
+ </lnTo>
+ <arcTo wR="u1" hR="u1" stAng="3cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="r" y="y1" />
+ </lnTo>
+ <lnTo>
+ <pt x="xr" y="yr" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="v2" />
+ </lnTo>
+ <arcTo wR="u1" hR="u1" stAng="0" swAng="cd4" />
+ <lnTo>
+ <pt x="x2" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="xb" y="yb" />
+ </lnTo>
+ <lnTo>
+ <pt x="x1" y="b" />
+ </lnTo>
+ <lnTo>
+ <pt x="u1" y="b" />
+ </lnTo>
+ <arcTo wR="u1" hR="u1" stAng="cd4" swAng="cd4" />
+ <lnTo>
+ <pt x="l" y="y2" />
+ </lnTo>
+ <lnTo>
+ <pt x="xl" y="yl" />
+ </lnTo>
+ <lnTo>
+ <pt x="l" y="y1" />
+ </lnTo>
+ <close />
+ </path>
+ </pathLst>
+ </wedgeRoundRectCallout>
+</presetShapeDefinitons>
diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx
new file mode 100644
index 000000000..cc1f13026
--- /dev/null
+++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "constraintlistcontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_ConstraintLists
+ConstraintListContext::ConstraintListContext( ContextHandler2Helper const & rParent,
+ const LayoutAtomPtr &pNode )
+ : ContextHandler2( rParent )
+ , mpNode( pNode )
+{
+ assert( pNode && "Node must NOT be NULL" );
+}
+
+ConstraintListContext::~ConstraintListContext()
+{
+}
+
+ContextHandlerRef
+ConstraintListContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( constr ):
+ {
+ auto pNode = std::make_shared<ConstraintAtom>(mpNode->getLayoutNode());
+ LayoutAtom::connect(mpNode, pNode);
+
+ Constraint& rConstraint = pNode->getConstraint();
+ rConstraint.mnFor = rAttribs.getToken( XML_for, XML_none );
+ rConstraint.msForName = rAttribs.getString( XML_forName, "" );
+ rConstraint.mnPointType = rAttribs.getToken( XML_ptType, XML_none );
+ rConstraint.mnType = rAttribs.getToken( XML_type, XML_none );
+ rConstraint.mnRefFor = rAttribs.getToken( XML_refFor, XML_none );
+ rConstraint.msRefForName = rAttribs.getString( XML_refForName, "" );
+ rConstraint.mnRefType = rAttribs.getToken( XML_refType, XML_none );
+ rConstraint.mnRefPointType = rAttribs.getToken( XML_refPtType, XML_none );
+ rConstraint.mfFactor = rAttribs.getDouble( XML_fact, 1.0 );
+ rConstraint.mfValue = rAttribs.getDouble( XML_val, 0.0 );
+ rConstraint.mnOperator = rAttribs.getToken( XML_op, XML_none );
+ break;
+ }
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/constraintlistcontext.hxx b/oox/source/drawingml/diagram/constraintlistcontext.hxx
new file mode 100644
index 000000000..ba3b59355
--- /dev/null
+++ b/oox/source/drawingml/diagram/constraintlistcontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_CONSTRAINTLISTCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_CONSTRAINTLISTCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include "diagramlayoutatoms.hxx"
+
+namespace oox::drawingml {
+
+class ConstraintListContext : public ::oox::core::ContextHandler2
+{
+public:
+ ConstraintListContext( ContextHandler2Helper const & rParent, const LayoutAtomPtr &pNode );
+ virtual ~ConstraintListContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override;
+private:
+ LayoutAtomPtr mpNode;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/datamodel.cxx b/oox/source/drawingml/diagram/datamodel.cxx
new file mode 100644
index 000000000..97691af43
--- /dev/null
+++ b/oox/source/drawingml/diagram/datamodel.cxx
@@ -0,0 +1,468 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "datamodel.hxx"
+
+#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textrun.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <editeng/unoprnms.hxx>
+
+#include <unordered_set>
+
+using namespace ::com::sun::star;
+
+namespace oox::drawingml {
+
+Shape* DiagramData::getOrCreateAssociatedShape(const svx::diagram::Point& rPoint, bool bCreateOnDemand) const
+{
+ if(maPointShapeMap.end() == maPointShapeMap.find(rPoint.msModelId))
+ {
+ const_cast<DiagramData*>(this)->maPointShapeMap[rPoint.msModelId] = ShapePtr();
+ }
+
+ const ShapePtr& rShapePtr = maPointShapeMap.find(rPoint.msModelId)->second;
+
+ if(!rShapePtr && bCreateOnDemand)
+ {
+ const_cast<ShapePtr&>(rShapePtr) = std::make_shared<Shape>();
+
+ // If we did create a new oox::drawingml::Shape, directly apply
+ // available data from the Diagram ModelData to it as preparation
+ restoreDataFromModelToShapeAfterReCreation(rPoint, *rShapePtr);
+ }
+
+ return rShapePtr.get();
+}
+
+void DiagramData::restoreDataFromModelToShapeAfterReCreation(const svx::diagram::Point& rPoint, Shape& rNewShape)
+{
+ // If we did create a new oox::drawingml::Shape, directly apply
+ // available data from the Diagram ModelData to it as preparation
+
+ // This is e.g. the Text, but may get more (styles?)
+ if(!rPoint.msTextBody->msText.isEmpty())
+ {
+ TextBodyPtr aNewTextBody(std::make_shared<TextBody>());
+ rNewShape.setTextBody(aNewTextBody);
+ TextRunPtr pTextRun = std::make_shared<TextRun>();
+ pTextRun->getText() = rPoint.msTextBody->msText;
+ aNewTextBody->addParagraph().addRun(pTextRun);
+
+ if(!rPoint.msTextBody->maTextProps.empty())
+ {
+ oox::PropertyMap& rTargetMap(aNewTextBody->getTextProperties().maPropertyMap);
+
+ for (auto const& prop : rPoint.msTextBody->maTextProps)
+ {
+ const sal_Int32 nPropId(oox::PropertyMap::getPropertyId(prop.first));
+ if(nPropId > 0)
+ rTargetMap.setAnyProperty(nPropId, prop.second);
+ }
+ }
+ }
+}
+
+static void addProperty(const OUString& rName,
+ const css::uno::Reference< css::beans::XPropertySetInfo >& xInfo,
+ std::vector< std::pair< OUString, css::uno::Any >>& rTarget,
+ const css::uno::Reference< css::beans::XPropertySet >& xPropSet )
+{
+ if(xInfo->hasPropertyByName(rName))
+ rTarget.push_back(std::pair(OUString(rName), xPropSet->getPropertyValue(rName)));
+}
+
+void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape)
+{
+ const std::vector< ShapePtr >& rChildren(rShape.getChildren());
+
+ if(!rChildren.empty())
+ {
+ // group shape
+ for (auto& child : rChildren)
+ {
+ secureStyleDataFromShapeToModel(*child);
+ }
+
+ // if group shape we are done. Do not secure properties for group shapes
+ return;
+ }
+
+ // we need a XShape
+ const css::uno::Reference< css::drawing::XShape > &rXShape(rShape.getXShape());
+ if(!rXShape)
+ return;
+
+ // we need a ModelID for association
+ if(rShape.getDiagramDataModelID().isEmpty())
+ return;
+
+ // define target to save to
+ svx::diagram::PointStyle* pTarget(nullptr);
+ const bool bIsBackgroundShape(rShape.getDiagramDataModelID() == msBackgroundShapeModelID);
+
+ if(bIsBackgroundShape)
+ {
+ // if BackgroundShape, create properties & set as target
+ if(!maBackgroundShapeStyle)
+ maBackgroundShapeStyle = std::make_shared< svx::diagram::PointStyle >();
+ pTarget = maBackgroundShapeStyle.get();
+ }
+ else
+ {
+ // if Shape, seek association
+ for (auto & point : maPoints)
+ {
+ if(point.msModelId == rShape.getDiagramDataModelID())
+ {
+ // found - create properties & set as target
+ pTarget = point.msPointStylePtr.get();
+
+ // we are done, there is no 2nd shape with the same ModelID by definition
+ break;
+ }
+ }
+ }
+
+ // no target -> nothing to do
+ if(nullptr == pTarget)
+ return;
+
+#ifdef DBG_UTIL
+ // to easier decide which additional properties may/should be preserved,
+ // create a full list of set properties to browse/decide (in debugger)
+ const css::uno::Reference< css::beans::XPropertyState > xAllPropStates(rXShape, css::uno::UNO_QUERY);
+ const css::uno::Reference< css::beans::XPropertySet > xAllPropSet( rXShape, css::uno::UNO_QUERY );
+ const css::uno::Sequence< css::beans::Property > allSequence(xAllPropSet->getPropertySetInfo()->getProperties());
+ std::vector< std::pair< OUString, css::uno::Any >> allSetProps;
+ for (auto& rProp : allSequence)
+ {
+ try
+ {
+ if (xAllPropStates->getPropertyState(rProp.Name) == css::beans::PropertyState::PropertyState_DIRECT_VALUE)
+ {
+ css::uno::Any aValue(xAllPropSet->getPropertyValue(rProp.Name));
+ if(aValue.hasValue())
+ allSetProps.push_back(std::pair(rProp.Name, aValue));
+ }
+ }
+ catch (...)
+ {
+ }
+ }
+#endif
+
+ const css::uno::Reference< css::beans::XPropertySet > xPropSet( rXShape, css::uno::UNO_QUERY );
+ if(!xPropSet)
+ return;
+
+ const css::uno::Reference< css::lang::XServiceInfo > xServiceInfo( rXShape, css::uno::UNO_QUERY );
+ if(!xServiceInfo)
+ return;
+
+ const css::uno::Reference< css::beans::XPropertySetInfo > xInfo(xPropSet->getPropertySetInfo());
+ if (!xInfo.is())
+ return;
+
+ // Note: The Text may also be secured here, so it may also be possible to
+ // secure/store it at PointStyle instead of at TextBody, same maybe evaluated
+ // for the text attributes - where when securing here the attributes would be
+ // in our UNO API format already.
+ // if(xServiceInfo->supportsService("com.sun.star.drawing.Text"))
+ // {
+ // css::uno::Reference< css::text::XText > xText(rXShape, css::uno::UNO_QUERY);
+ // const OUString aText(xText->getString());
+ //
+ // if(!aText.isEmpty())
+ // {
+ // }
+ // }
+
+ // Add all kinds of properties that are needed to re-create the XShape.
+ // For now this is a minimal example-selection, it will need to be extended
+ // over time for all kind of cases/properties
+
+ // text properties
+ if(!bIsBackgroundShape
+ && xServiceInfo->supportsService("com.sun.star.drawing.TextProperties"))
+ {
+ addProperty(UNO_NAME_CHAR_COLOR, xInfo, pTarget->maProperties, xPropSet);
+ addProperty(UNO_NAME_CHAR_HEIGHT, xInfo, pTarget->maProperties, xPropSet);
+ addProperty(UNO_NAME_CHAR_SHADOWED, xInfo, pTarget->maProperties, xPropSet);
+ addProperty(UNO_NAME_CHAR_WEIGHT, xInfo, pTarget->maProperties, xPropSet);
+ }
+
+ // fill properties
+ if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties"))
+ {
+ css::drawing::FillStyle eFillStyle(css::drawing::FillStyle_NONE);
+ if (xInfo->hasPropertyByName(UNO_NAME_FILLSTYLE))
+ xPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= eFillStyle;
+
+ if(css::drawing::FillStyle_NONE != eFillStyle)
+ {
+ addProperty(UNO_NAME_FILLSTYLE, xInfo, pTarget->maProperties, xPropSet);
+
+ switch(eFillStyle)
+ {
+ case css::drawing::FillStyle_SOLID:
+ {
+ addProperty(UNO_NAME_FILLCOLOR, xInfo, pTarget->maProperties, xPropSet);
+ break;
+ }
+ default:
+ case css::drawing::FillStyle_NONE:
+ case css::drawing::FillStyle_GRADIENT:
+ case css::drawing::FillStyle_HATCH:
+ case css::drawing::FillStyle_BITMAP:
+ break;
+ }
+ }
+ }
+
+ // line properties
+ if(!bIsBackgroundShape
+ && xServiceInfo->supportsService("com.sun.star.drawing.LineProperties"))
+ {
+ css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE);
+ if (xInfo->hasPropertyByName(UNO_NAME_LINESTYLE))
+ xPropSet->getPropertyValue(UNO_NAME_LINESTYLE) >>= eLineStyle;
+
+ if(css::drawing::LineStyle_NONE != eLineStyle)
+ {
+ addProperty(UNO_NAME_LINESTYLE, xInfo, pTarget->maProperties, xPropSet);
+ addProperty(UNO_NAME_LINECOLOR, xInfo, pTarget->maProperties, xPropSet);
+ addProperty(UNO_NAME_LINEWIDTH, xInfo, pTarget->maProperties, xPropSet);
+
+ switch(eLineStyle)
+ {
+ case css::drawing::LineStyle_SOLID:
+ break;
+ default:
+ case css::drawing::LineStyle_NONE:
+ case css::drawing::LineStyle_DASH:
+ break;
+ }
+ }
+ }
+}
+
+void DiagramData::secureDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape& rRootShape)
+{
+ const std::vector< ShapePtr >& rChildren(rRootShape.getChildren());
+
+ for (auto& child : rChildren)
+ {
+ secureStyleDataFromShapeToModel(*child);
+ }
+
+ // After Diagram import, parts of the Diagram ModelData is at the
+ // oox::drawingml::Shape. Since these objects are temporary helpers,
+ // secure that data at the Diagram ModelData by copying.
+
+ // This is currently mainly the Text, but may get more (styles?)
+ for (auto & point : maPoints)
+ {
+ Shape* pShapeCandidate(getOrCreateAssociatedShape(point));
+
+ if(nullptr != pShapeCandidate)
+ {
+ if(pShapeCandidate->getTextBody() && !pShapeCandidate->getTextBody()->isEmpty())
+ {
+ point.msTextBody->msText = pShapeCandidate->getTextBody()->toString();
+
+ const uno::Sequence< beans::PropertyValue > aTextProps(
+ pShapeCandidate->getTextBody()->getTextProperties().maPropertyMap.makePropertyValueSequence());
+
+ for (auto const& prop : aTextProps)
+ point.msTextBody->maTextProps.push_back(std::pair(prop.Name, prop.Value));
+ }
+
+ // At this place a mechanism to find missing data should be added:
+ // Create a Shape from so-far secured data & compare it with the
+ // imported one. Report differences to allow extending the mechanism
+ // more easily.
+#ifdef DBG_UTIL
+ // The original is pShapeCandidate, re-create potential new oox::drawingml::Shape
+ // as aNew to be able to compare these
+ ShapePtr aNew(std::make_shared<Shape>());
+ restoreDataFromModelToShapeAfterReCreation(point, *aNew);
+
+ // Unfortunately oox::drawingml::Shape has no operator==. I tried to add
+ // one, but that is too expensive. I stopped at oox::drawingml::Color.
+ // To compare it is necessary to use the debugger, or for single aspects
+ // of the oox data it might be possible to call local dump() methods at
+ // both instances to compare them/their output
+
+ // bool bSame(aNew.get() == pShapeCandidate);
+#endif
+ }
+ }
+}
+
+void DiagramData::restoreStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape)
+{
+ const std::vector< ShapePtr >& rChildren(rShape.getChildren());
+
+ if(!rChildren.empty())
+ {
+ // group shape
+ for (auto& child : rChildren)
+ {
+ restoreStyleDataFromShapeToModel(*child);
+ }
+
+ // if group shape we are done. Do not restore properties for group shapes
+ return;
+ }
+
+ // we need a XShape
+ const css::uno::Reference< css::drawing::XShape > &rXShape(rShape.getXShape());
+ if(!rXShape)
+ return;
+
+ // we need a ModelID for association
+ if(rShape.getDiagramDataModelID().isEmpty())
+ return;
+
+ // define source to save to
+ svx::diagram::PointStyle* pSource(nullptr);
+
+ if(rShape.getDiagramDataModelID() == msBackgroundShapeModelID)
+ {
+ // if BackgroundShape, set BackgroundShapeStyle as source
+ if(maBackgroundShapeStyle)
+ pSource = maBackgroundShapeStyle.get();
+ }
+ else
+ {
+ // if Shape, seek association
+ for (auto & point : maPoints)
+ {
+ if(point.msModelId == rShape.getDiagramDataModelID())
+ {
+ // found - create properties & set as source
+ pSource = point.msPointStylePtr.get();
+
+ // we are done, there is no 2nd shape with the same ModelID by definition
+ break;
+ }
+ }
+ }
+
+ // no source -> nothing to do
+ if(nullptr == pSource)
+ return;
+
+ // get target PropertySet of new XShape
+ css::uno::Reference<css::beans::XPropertySet> xPropSet(rXShape, css::uno::UNO_QUERY);
+ if(!xPropSet)
+ return;
+
+ // apply properties
+ for (auto const& prop : pSource->maProperties)
+ {
+ xPropSet->setPropertyValue(prop.first, prop.second);
+ }
+}
+
+void DiagramData::restoreDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape& rRootShape)
+{
+ const std::vector< ShapePtr >& rChildren(rRootShape.getChildren());
+
+ for (auto& child : rChildren)
+ {
+ restoreStyleDataFromShapeToModel(*child);
+ }
+}
+
+DiagramData::DiagramData()
+: svx::diagram::DiagramData()
+, mpBackgroundShapeFillProperties( std::make_shared<FillProperties>() )
+{
+}
+
+DiagramData::~DiagramData()
+{
+}
+
+static void Connection_dump(const svx::diagram::Connection& rConnection)
+{
+ SAL_INFO(
+ "oox.drawingml",
+ "cnx modelId " << rConnection.msModelId << ", srcId " << rConnection.msSourceId << ", dstId "
+ << rConnection.msDestId << ", parTransId " << rConnection.msParTransId << ", presId "
+ << rConnection.msPresId << ", sibTransId " << rConnection.msSibTransId << ", srcOrd "
+ << rConnection.mnSourceOrder << ", dstOrd " << rConnection.mnDestOrder);
+}
+
+static void Point_dump(const svx::diagram::Point& rPoint, const Shape* pShape)
+{
+ SAL_INFO(
+ "oox.drawingml",
+ "pt text " << pShape << ", cnxId " << rPoint.msCnxId << ", modelId "
+ << rPoint.msModelId << ", type " << rPoint.mnXMLType);
+}
+
+void DiagramData::dump() const
+{
+ SAL_INFO("oox.drawingml", "Dgm: DiagramData # of cnx: " << maConnections.size() );
+ for (const auto& rConnection : maConnections)
+ Connection_dump(rConnection);
+
+ SAL_INFO("oox.drawingml", "Dgm: DiagramData # of pt: " << maPoints.size() );
+ for (const auto& rPoint : maPoints)
+ Point_dump(rPoint, getOrCreateAssociatedShape(rPoint));
+}
+
+void DiagramData::buildDiagramDataModel(bool bClearOoxShapes)
+{
+ if(bClearOoxShapes)
+ {
+ // Delete/remove all existing oox::drawingml::Shape
+ maPointShapeMap.clear();
+ }
+
+ // call parent
+ svx::diagram::DiagramData::buildDiagramDataModel(bClearOoxShapes);
+
+ if(bClearOoxShapes)
+ {
+ // re-create all existing oox::drawingml::Shape
+ svx::diagram::Points& rPoints = getPoints();
+
+ for (auto & point : rPoints)
+ {
+ // Create/get shape. Re-create here, that may also set needed
+ // and available data from the Diagram ModelData at the Shape
+ getOrCreateAssociatedShape(point, true);
+ }
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/datamodel.hxx b/oox/source/drawingml/diagram/datamodel.hxx
new file mode 100644
index 000000000..21137f6e0
--- /dev/null
+++ b/oox/source/drawingml/diagram/datamodel.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODEL_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODEL_HXX
+
+#include <map>
+#include <memory>
+#include <vector>
+
+#include <rtl/ustring.hxx>
+
+#include <svx/diagram/datamodel.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml {
+
+class DiagramData : public svx::diagram::DiagramData
+{
+public:
+ typedef std::map< OUString, ShapePtr > PointShapeMap;
+
+ DiagramData();
+ virtual ~DiagramData();
+
+ // creates temporary processing data from model data
+ virtual void buildDiagramDataModel(bool bClearOoxShapes);
+
+ FillPropertiesPtr& getBackgroundShapeFillProperties() { return mpBackgroundShapeFillProperties; }
+ virtual void dump() const;
+
+ Shape* getOrCreateAssociatedShape(const svx::diagram::Point& rPoint, bool bCreateOnDemand = false) const;
+
+ // get/set data between Diagram DataModel and oox::drawingml::Shape
+ void secureDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape& rRootShape);
+ void restoreDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape& rRootShape);
+ static void restoreDataFromModelToShapeAfterReCreation(const svx::diagram::Point& rPoint, Shape& rNewShape);
+
+protected:
+ void secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape);
+ void restoreStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape);
+
+ // The model definition, the parts *only* available in oox. Also look for already
+ // defined ModelData in svx::diagram::DiagramData
+
+ // - FillStyle for Diagram Background (empty constructed, may stay empty)
+ FillPropertiesPtr mpBackgroundShapeFillProperties;
+
+ // temporary processing data, deleted when using build(). Association
+ // map between oox::drawingml::Shape and svx::diagram::Point ModelData
+ PointShapeMap maPointShapeMap;
+};
+
+// Oox-local definition of DiagramData. Doing and using this on Oox
+// allows to do much less static_cast(s) - if at all from svx::diagram::DiagramData
+typedef std::shared_ptr< DiagramData > OoxDiagramDataPtr;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
new file mode 100644
index 000000000..4f0e3f047
--- /dev/null
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -0,0 +1,385 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "datamodelcontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+
+namespace oox::drawingml {
+
+namespace {
+
+// CT_CxnList
+class CxnListContext
+ : public ContextHandler2
+{
+public:
+ CxnListContext( ContextHandler2Helper const & rParent,
+ svx::diagram::Connections & aConnections )
+ : ContextHandler2( rParent )
+ , mrConnection( aConnections )
+ {
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ case DGM_TOKEN( cxn ):
+ {
+ mrConnection.emplace_back( );
+ svx::diagram::Connection& rConnection=mrConnection.back();
+
+ rConnection.mnXMLType = static_cast<svx::diagram::TypeConstant>(rAttribs.getToken( XML_type, XML_parOf ));
+ rConnection.msModelId = rAttribs.getString( XML_modelId ).get();
+ rConnection.msSourceId = rAttribs.getString( XML_srcId ).get();
+ rConnection.msDestId = rAttribs.getString( XML_destId ).get();
+ rConnection.msPresId = rAttribs.getString( XML_presId ).get();
+ rConnection.msSibTransId = rAttribs.getString( XML_sibTransId ).get();
+ rConnection.msParTransId = rAttribs.getString( XML_parTransId ).get();
+ rConnection.mnSourceOrder = rAttribs.getInteger( XML_srcOrd, 0 );
+ rConnection.mnDestOrder = rAttribs.getInteger( XML_destOrd, 0 );
+
+ // skip CT_extLst
+ return nullptr;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+private:
+ svx::diagram::Connections& mrConnection;
+};
+
+// CT_presLayoutVars
+class PresLayoutVarsContext
+ : public ContextHandler2
+{
+public:
+ PresLayoutVarsContext( ContextHandler2Helper const & rParent,
+ svx::diagram::Point & rPoint ) :
+ ContextHandler2( rParent ),
+ mrPoint( rPoint )
+ {
+ }
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ // TODO
+ case DGM_TOKEN( animLvl ):
+ case DGM_TOKEN( animOne ):
+ break;
+ case DGM_TOKEN( bulletEnabled ):
+ mrPoint.mbBulletEnabled = rAttribs.getBool( XML_val, false );
+ break;
+ case DGM_TOKEN( chMax ):
+ mrPoint.mnMaxChildren = rAttribs.getInteger( XML_val, -1 );
+ break;
+ case DGM_TOKEN( chPref ):
+ mrPoint.mnPreferredChildren = rAttribs.getInteger( XML_val, -1 );
+ break;
+ case DGM_TOKEN( dir ):
+ mrPoint.mnDirection = rAttribs.getToken( XML_val, XML_norm );
+ break;
+ case DGM_TOKEN( hierBranch ):
+ {
+ // need to convert from oox::OptValue to std::optional since 1st is not available in svx
+ const OptValue< sal_Int32 > aOptVal(rAttribs.getToken( XML_val ));
+ if(aOptVal.has())
+ mrPoint.moHierarchyBranch = aOptVal.get();
+ break;
+ }
+ case DGM_TOKEN( orgChart ):
+ mrPoint.mbOrgChartEnabled = rAttribs.getBool( XML_val, false );
+ break;
+ case DGM_TOKEN( resizeHandles ):
+ mrPoint.mnResizeHandles = rAttribs.getToken( XML_val, XML_rel );
+ break;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+private:
+ svx::diagram::Point& mrPoint;
+};
+
+// CT_prSet
+class PropertiesContext
+ : public ContextHandler2
+{
+public:
+ PropertiesContext( ContextHandler2Helper const & rParent,
+ svx::diagram::Point & rPoint,
+ const AttributeList& rAttribs ) :
+ ContextHandler2( rParent ),
+ mrPoint( rPoint )
+ {
+ mrPoint.msColorTransformCategoryId = rAttribs.getString( XML_csCatId, "" );
+ mrPoint.msColorTransformTypeId = rAttribs.getString( XML_csTypeId, "" );
+ mrPoint.msLayoutCategoryId = rAttribs.getString( XML_loCatId, "" );
+ mrPoint.msLayoutTypeId = rAttribs.getString( XML_loTypeId, "" );
+ mrPoint.msPlaceholderText = rAttribs.getString( XML_phldrT, "" );
+ mrPoint.msPresentationAssociationId = rAttribs.getString( XML_presAssocID, "" );
+ mrPoint.msPresentationLayoutName = rAttribs.getString( XML_presName, "" );
+ mrPoint.msPresentationLayoutStyleLabel = rAttribs.getString( XML_presStyleLbl, "" );
+ mrPoint.msQuickStyleCategoryId = rAttribs.getString( XML_qsCatId, "" );
+ mrPoint.msQuickStyleTypeId = rAttribs.getString( XML_qsTypeId, "" );
+
+ mrPoint.mnCustomAngle = rAttribs.getInteger( XML_custAng, -1 );
+ mrPoint.mnPercentageNeighbourWidth = rAttribs.getInteger( XML_custLinFactNeighborX, -1 );
+ mrPoint.mnPercentageNeighbourHeight = rAttribs.getInteger( XML_custLinFactNeighborY, -1 );
+ mrPoint.mnPercentageOwnWidth = rAttribs.getInteger( XML_custLinFactX, -1 );
+ mrPoint.mnPercentageOwnHeight = rAttribs.getInteger( XML_custLinFactY, -1 );
+ mrPoint.mnIncludeAngleScale = rAttribs.getInteger( XML_custRadScaleInc, -1 );
+ mrPoint.mnRadiusScale = rAttribs.getInteger( XML_custRadScaleRad, -1 );
+ mrPoint.mnWidthScale = rAttribs.getInteger( XML_custScaleX, -1 );
+ mrPoint.mnHeightScale = rAttribs.getInteger( XML_custScaleY, -1 );
+ mrPoint.mnWidthOverride = rAttribs.getInteger( XML_custSzX, -1 );
+ mrPoint.mnHeightOverride = rAttribs.getInteger( XML_custSzY, -1 );
+ mrPoint.mnLayoutStyleCount = rAttribs.getInteger( XML_presStyleCnt, -1 );
+ mrPoint.mnLayoutStyleIndex = rAttribs.getInteger( XML_presStyleIdx, -1 );
+
+ mrPoint.mbCoherent3DOffset = rAttribs.getBool( XML_coherent3DOff, false );
+ mrPoint.mbCustomHorizontalFlip = rAttribs.getBool( XML_custFlipHor, false );
+ mrPoint.mbCustomVerticalFlip = rAttribs.getBool( XML_custFlipVert, false );
+ mrPoint.mbCustomText = rAttribs.getBool( XML_custT, false );
+ mrPoint.mbIsPlaceholder = rAttribs.getBool( XML_phldr, false );
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& ) override
+ {
+ switch( aElementToken )
+ {
+ case DGM_TOKEN( presLayoutVars ):
+ return new PresLayoutVarsContext( *this, mrPoint );
+ case DGM_TOKEN( style ):
+ // skip CT_shapeStyle
+ return nullptr;
+ default:
+ break;
+ }
+ return this;
+ }
+
+private:
+ svx::diagram::Point& mrPoint;
+};
+
+// CL_Pt
+class PtContext
+ : public ContextHandler2
+{
+public:
+ PtContext( ContextHandler2Helper const& rParent,
+ const AttributeList& rAttribs,
+ svx::diagram::Point& rPoint,
+ DiagramData& rDiagramData):
+ ContextHandler2( rParent ),
+ mrPoint( rPoint ),
+ mrDiagramData( rDiagramData )
+ {
+ mrPoint.msModelId = rAttribs.getString( XML_modelId ).get();
+
+ // the default type is XML_node
+ const sal_Int32 nType = rAttribs.getToken( XML_type, XML_node );
+ mrPoint.mnXMLType = static_cast<svx::diagram::TypeConstant>(nType);
+
+ // ignore the cxnId unless it is this type. See 5.15.3.1.3 in Primer
+ if( ( nType == XML_parTrans ) || ( nType == XML_sibTrans ) )
+ mrPoint.msCnxId = rAttribs.getString( XML_cxnId ).get();
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ case DGM_TOKEN( extLst ):
+ return nullptr;
+ case DGM_TOKEN( prSet ):
+ return new PropertiesContext( *this, mrPoint, rAttribs );
+ case DGM_TOKEN( spPr ):
+ {
+ Shape* pShape(mrDiagramData.getOrCreateAssociatedShape(mrPoint, true));
+ return new ShapePropertiesContext( *this, *pShape );
+ }
+ case DGM_TOKEN( t ):
+ {
+ Shape* pShape(mrDiagramData.getOrCreateAssociatedShape(mrPoint, true));
+ TextBodyPtr xTextBody = std::make_shared<TextBody>();
+ pShape->setTextBody( xTextBody );
+ return new TextBodyContext( *this, *xTextBody );
+ }
+ default:
+ break;
+ }
+ return this;
+ }
+
+private:
+ svx::diagram::Point& mrPoint;
+ DiagramData& mrDiagramData;
+};
+
+// CT_PtList
+class PtListContext
+ : public ContextHandler2
+{
+public:
+ PtListContext( ContextHandler2Helper const & rParent, svx::diagram::Points& rPoints, DiagramData& rDiagramData) :
+ ContextHandler2( rParent ),
+ mrPoints( rPoints ),
+ mrDiagramData( rDiagramData )
+ {}
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ case DGM_TOKEN( pt ):
+ {
+ // CT_Pt
+ mrPoints.emplace_back( );
+ return new PtContext( *this, rAttribs, mrPoints.back(), mrDiagramData );
+ }
+ default:
+ break;
+ }
+ return this;
+ }
+
+private:
+ svx::diagram::Points& mrPoints;
+ DiagramData& mrDiagramData;
+};
+
+// CT_BackgroundFormatting
+class BackgroundFormattingContext
+ : public ContextHandler2
+{
+public:
+ BackgroundFormattingContext( ContextHandler2Helper const & rParent, OoxDiagramDataPtr const& pModel )
+ : ContextHandler2( rParent )
+ , mpDataModel( pModel )
+ {
+ assert( pModel && "the data model MUST NOT be NULL" );
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( sal_Int32 aElementToken,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ case A_TOKEN( blipFill ):
+ case A_TOKEN( gradFill ):
+ case A_TOKEN( grpFill ):
+ case A_TOKEN( noFill ):
+ case A_TOKEN( pattFill ):
+ case A_TOKEN( solidFill ):
+ // EG_FillProperties
+ return FillPropertiesContext::createFillContext(
+ *this, aElementToken, rAttribs, *mpDataModel->getBackgroundShapeFillProperties() );
+ case A_TOKEN( effectDag ):
+ case A_TOKEN( effectLst ):
+ // TODO
+ // EG_EffectProperties
+ break;
+ default:
+ break;
+ }
+ return this;
+ }
+private:
+ OoxDiagramDataPtr mpDataModel;
+};
+
+}
+
+DataModelContext::DataModelContext( ContextHandler2Helper const& rParent,
+ const OoxDiagramDataPtr& pDataModel )
+ : ContextHandler2( rParent )
+ , mpDataModel( pDataModel )
+{
+ assert( pDataModel && "Data Model must not be NULL" );
+}
+
+DataModelContext::~DataModelContext()
+{
+ // some debug
+ mpDataModel->dump();
+}
+
+ContextHandlerRef
+DataModelContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( cxnLst ):
+ // CT_CxnList
+ return new CxnListContext( *this, mpDataModel->getConnections() );
+ case DGM_TOKEN( ptLst ):
+ // CT_PtList
+ return new PtListContext( *this, mpDataModel->getPoints(), *mpDataModel );
+ case DGM_TOKEN( bg ):
+ // CT_BackgroundFormatting
+ return new BackgroundFormattingContext( *this, mpDataModel );
+ case DGM_TOKEN( whole ):
+ // CT_WholeE2oFormatting
+ // TODO
+ return nullptr;
+ case DGM_TOKEN( extLst ):
+ case A_TOKEN( ext ):
+ break;
+ case DSP_TOKEN( dataModelExt ):
+ mpDataModel->getExtDrawings().push_back( rAttribs.getString( XML_relId ).get() );
+ break;
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/datamodelcontext.hxx b/oox/source/drawingml/diagram/datamodelcontext.hxx
new file mode 100644
index 000000000..9a5c323de
--- /dev/null
+++ b/oox/source/drawingml/diagram/datamodelcontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODELCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODELCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include "datamodel.hxx"
+
+namespace oox::drawingml {
+
+// CT_DataModel
+class DataModelContext final : public ::oox::core::ContextHandler2
+{
+public:
+ DataModelContext( ::oox::core::ContextHandler2Helper const& rParent, const OoxDiagramDataPtr& pDataModelPtr );
+ virtual ~DataModelContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ OoxDiagramDataPtr mpDataModel;
+};
+
+}
+
+#endif // INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODELCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
new file mode 100644
index 000000000..efba958fa
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -0,0 +1,444 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/diagram/diagram.hxx>
+#include "diagram.hxx"
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <sal/log.hxx>
+#include <editeng/unoprnms.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <oox/token/namespaces.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/svdpage.hxx>
+#include <oox/ppt/pptimport.hxx>
+#include <comphelper/xmltools.hxx>
+
+#include "diagramlayoutatoms.hxx"
+#include "layoutatomvisitors.hxx"
+#include "diagramfragmenthandler.hxx"
+
+using namespace ::com::sun::star;
+
+namespace oox::drawingml {
+
+static void sortChildrenByZOrder(const ShapePtr& pShape)
+{
+ std::vector<ShapePtr>& rChildren = pShape->getChildren();
+
+ // Offset the children from their default z-order stacking, if necessary.
+ for (size_t i = 0; i < rChildren.size(); ++i)
+ rChildren[i]->setZOrder(i);
+
+ for (size_t i = 0; i < rChildren.size(); ++i)
+ {
+ const ShapePtr& pChild = rChildren[i];
+ sal_Int32 nZOrderOff = pChild->getZOrderOff();
+ if (nZOrderOff <= 0)
+ continue;
+
+ // Increase my ZOrder by nZOrderOff.
+ pChild->setZOrder(pChild->getZOrder() + nZOrderOff);
+ pChild->setZOrderOff(0);
+
+ for (sal_Int32 j = 0; j < nZOrderOff; ++j)
+ {
+ size_t nIndex = i + j + 1;
+ if (nIndex >= rChildren.size())
+ break;
+
+ // Decrease the ZOrder of the next nZOrderOff elements by one.
+ const ShapePtr& pNext = rChildren[nIndex];
+ pNext->setZOrder(pNext->getZOrder() - 1);
+ }
+ }
+
+ // Now that the ZOrders are adjusted, sort the children.
+ std::sort(rChildren.begin(), rChildren.end(),
+ [](const ShapePtr& a, const ShapePtr& b) { return a->getZOrder() < b->getZOrder(); });
+
+ // Apply also for children.
+ for (const auto& rChild : rChildren)
+ sortChildrenByZOrder(rChild);
+}
+
+/// Removes empty group shapes, now that their spacing influenced the layout.
+static void removeUnneededGroupShapes(const ShapePtr& pShape)
+{
+ std::vector<ShapePtr>& rChildren = pShape->getChildren();
+
+ rChildren.erase(std::remove_if(rChildren.begin(), rChildren.end(),
+ [](const ShapePtr& aChild) {
+ return aChild->getServiceName()
+ == "com.sun.star.drawing.GroupShape"
+ && aChild->getChildren().empty();
+ }),
+ rChildren.end());
+
+ for (const auto& pChild : rChildren)
+ {
+ removeUnneededGroupShapes(pChild);
+ }
+}
+
+
+void Diagram::addTo( const ShapePtr & pParentShape )
+{
+ if (pParentShape->getSize().Width == 0 || pParentShape->getSize().Height == 0)
+ SAL_WARN("oox.drawingml", "Diagram cannot be correctly laid out. Size: "
+ << pParentShape->getSize().Width << "x" << pParentShape->getSize().Height);
+
+ pParentShape->setChildSize(pParentShape->getSize());
+
+ const svx::diagram::Point* pRootPoint = mpData->getRootPoint();
+ if (mpLayout->getNode() && pRootPoint)
+ {
+ // create Shape hierarchy
+ ShapeCreationVisitor aCreationVisitor(*this, pRootPoint, pParentShape);
+ mpLayout->getNode()->setExistingShape(pParentShape);
+ mpLayout->getNode()->accept(aCreationVisitor);
+
+ // layout shapes - now all shapes are created
+ ShapeLayoutingVisitor aLayoutingVisitor(*this, pRootPoint);
+ mpLayout->getNode()->accept(aLayoutingVisitor);
+
+ sortChildrenByZOrder(pParentShape);
+ removeUnneededGroupShapes(pParentShape);
+ }
+
+ ShapePtr pBackground = std::make_shared<Shape>("com.sun.star.drawing.CustomShape");
+ pBackground->setSubType(XML_rect);
+ pBackground->getCustomShapeProperties()->setShapePresetType(XML_rect);
+ pBackground->setSize(pParentShape->getSize());
+ pBackground->getFillProperties() = *mpData->getBackgroundShapeFillProperties();
+ pBackground->setLocked(true);
+
+ // create and set ModelID for BackgroundShape to allow later association
+ getData()->setBackgroundShapeModelID(OStringToOUString(comphelper::xml::generateGUIDString(), RTL_TEXTENCODING_UTF8));
+ pBackground->setDiagramDataModelID(getData()->getBackgroundShapeModelID());
+
+ auto& aChildren = pParentShape->getChildren();
+ aChildren.insert(aChildren.begin(), pBackground);
+}
+
+Diagram::Diagram()
+: maDiagramFontHeights()
+{
+}
+
+uno::Sequence<beans::PropertyValue> Diagram::getDomsAsPropertyValues() const
+{
+ sal_Int32 length = maMainDomMap.size();
+
+ if (maDataRelsMap.hasElements())
+ ++length;
+
+ uno::Sequence<beans::PropertyValue> aValue(length);
+ beans::PropertyValue* pValue = aValue.getArray();
+ for (auto const& mainDom : maMainDomMap)
+ {
+ pValue->Name = mainDom.first;
+ pValue->Value <<= mainDom.second;
+ ++pValue;
+ }
+
+ if (maDataRelsMap.hasElements())
+ {
+ pValue->Name = "OOXDiagramDataRels";
+ pValue->Value <<= maDataRelsMap;
+ ++pValue;
+ }
+
+ return aValue;
+}
+
+using ShapePairs
+ = std::map<std::shared_ptr<drawingml::Shape>, css::uno::Reference<css::drawing::XShape>>;
+
+void Diagram::syncDiagramFontHeights()
+{
+ // Each name represents a group of shapes, for which the font height should have the same
+ // scaling.
+ for (const auto& rNameAndPairs : maDiagramFontHeights)
+ {
+ // Find out the minimum scale within this group.
+ const ShapePairs& rShapePairs = rNameAndPairs.second;
+ sal_Int16 nMinScale = 100;
+ for (const auto& rShapePair : rShapePairs)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(rShapePair.second, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ sal_Int16 nTextFitToSizeScale = 0;
+ xPropertySet->getPropertyValue("TextFitToSizeScale") >>= nTextFitToSizeScale;
+ if (nTextFitToSizeScale > 0 && nTextFitToSizeScale < nMinScale)
+ {
+ nMinScale = nTextFitToSizeScale;
+ }
+ }
+ }
+
+ // Set that minimum scale for all members of the group.
+ if (nMinScale < 100)
+ {
+ for (const auto& rShapePair : rShapePairs)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(rShapePair.second, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ xPropertySet->setPropertyValue("TextFitToSizeScale", uno::Any(nMinScale));
+ }
+ }
+ }
+ }
+
+ // no longer needed after processing
+ maDiagramFontHeights.clear();
+}
+
+static uno::Reference<xml::dom::XDocument> loadFragment(
+ core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath )
+{
+ // load diagramming fragments into DOM representation, that later
+ // gets serialized back to SAX events and parsed
+ return rFilter.importFragment( rFragmentPath );
+}
+
+static uno::Reference<xml::dom::XDocument> loadFragment(
+ core::XmlFilterBase& rFilter,
+ const rtl::Reference< core::FragmentHandler >& rxHandler )
+{
+ return loadFragment( rFilter, rxHandler->getFragmentPath() );
+}
+
+static void importFragment( core::XmlFilterBase& rFilter,
+ const uno::Reference<xml::dom::XDocument>& rXDom,
+ const OUString& rDocName,
+ const DiagramPtr& pDiagram,
+ const rtl::Reference< core::FragmentHandler >& rxHandler )
+{
+ DiagramDomMap& rMainDomMap = pDiagram->getDomMap();
+ rMainDomMap[rDocName] = rXDom;
+
+ uno::Reference<xml::sax::XFastSAXSerializable> xSerializer(
+ rXDom, uno::UNO_QUERY_THROW);
+
+ // now serialize DOM tree into internal data structures
+ rFilter.importFragment( rxHandler, xSerializer );
+}
+
+namespace
+{
+/**
+ * A fragment handler that just counts the number of <dsp:sp> elements in a
+ * fragment.
+ */
+class DiagramShapeCounter : public oox::core::FragmentHandler2
+{
+public:
+ DiagramShapeCounter(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath,
+ sal_Int32& nCounter);
+ oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement,
+ const AttributeList& rAttribs) override;
+
+private:
+ sal_Int32& m_nCounter;
+};
+
+DiagramShapeCounter::DiagramShapeCounter(oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath, sal_Int32& nCounter)
+ : FragmentHandler2(rFilter, rFragmentPath)
+ , m_nCounter(nCounter)
+{
+}
+
+oox::core::ContextHandlerRef DiagramShapeCounter::onCreateContext(sal_Int32 nElement,
+ const AttributeList& /*rAttribs*/)
+{
+ switch (nElement)
+ {
+ case DSP_TOKEN(drawing):
+ case DSP_TOKEN(spTree):
+ return this;
+ case DSP_TOKEN(sp):
+ ++m_nCounter;
+ break;
+ default:
+ break;
+ }
+
+ return nullptr;
+}
+}
+
+void loadDiagram( ShapePtr const & pShape,
+ core::XmlFilterBase& rFilter,
+ const OUString& rDataModelPath,
+ const OUString& rLayoutPath,
+ const OUString& rQStylePath,
+ const OUString& rColorStylePath,
+ const oox::core::Relations& rRelations )
+{
+ DiagramPtr pDiagram = std::make_shared<Diagram>();
+
+ OoxDiagramDataPtr pData = std::make_shared<DiagramData>();
+ pDiagram->setData( pData );
+
+ DiagramLayoutPtr pLayout = std::make_shared<DiagramLayout>(*pDiagram);
+ pDiagram->setLayout( pLayout );
+
+ // set DiagramFontHeights at filter
+ rFilter.setDiagramFontHeights(&pDiagram->getDiagramFontHeights());
+
+ // data
+ if( !rDataModelPath.isEmpty() )
+ {
+ rtl::Reference< core::FragmentHandler > xRefDataModel(
+ new DiagramDataFragmentHandler( rFilter, rDataModelPath, pData ));
+
+ importFragment(rFilter,
+ loadFragment(rFilter,xRefDataModel),
+ "OOXData",
+ pDiagram,
+ xRefDataModel);
+
+ pDiagram->getDataRelsMap() = pShape->resolveRelationshipsOfTypeFromOfficeDoc( rFilter,
+ xRefDataModel->getFragmentPath(), u"image" );
+
+ // Pass the info to pShape
+ for (auto const& extDrawing : pData->getExtDrawings())
+ {
+ OUString aFragmentPath = rRelations.getFragmentPathFromRelId(extDrawing);
+ // Ignore RelIds which don't resolve to a fragment path.
+ if (aFragmentPath.isEmpty())
+ continue;
+
+ sal_Int32 nCounter = 0;
+ rtl::Reference<core::FragmentHandler> xCounter(
+ new DiagramShapeCounter(rFilter, aFragmentPath, nCounter));
+ rFilter.importFragment(xCounter);
+ // Ignore ext drawings which don't actually have any shapes.
+ if (nCounter == 0)
+ continue;
+
+ pShape->addExtDrawingRelId(extDrawing);
+ }
+ }
+
+ // extLst is present, lets bet on that and ignore the rest of the data from here
+ if( pShape->getExtDrawings().empty() )
+ {
+ // layout
+ if( !rLayoutPath.isEmpty() )
+ {
+ rtl::Reference< core::FragmentHandler > xRefLayout(
+ new DiagramLayoutFragmentHandler( rFilter, rLayoutPath, pLayout ));
+
+ importFragment(rFilter,
+ loadFragment(rFilter,xRefLayout),
+ "OOXLayout",
+ pDiagram,
+ xRefLayout);
+ }
+
+ // style
+ if( !rQStylePath.isEmpty() )
+ {
+ rtl::Reference< core::FragmentHandler > xRefQStyle(
+ new DiagramQStylesFragmentHandler( rFilter, rQStylePath, pDiagram->getStyles() ));
+
+ importFragment(rFilter,
+ loadFragment(rFilter,xRefQStyle),
+ "OOXStyle",
+ pDiagram,
+ xRefQStyle);
+ }
+ }
+ else
+ {
+ // We still want to add the XDocuments to the DiagramDomMap
+ DiagramDomMap& rMainDomMap = pDiagram->getDomMap();
+ rMainDomMap[OUString("OOXLayout")] = loadFragment(rFilter,rLayoutPath);
+ rMainDomMap[OUString("OOXStyle")] = loadFragment(rFilter,rQStylePath);
+ }
+
+ // colors
+ if( !rColorStylePath.isEmpty() )
+ {
+ rtl::Reference< core::FragmentHandler > xRefColorStyle(
+ new ColorFragmentHandler( rFilter, rColorStylePath, pDiagram->getColors() ));
+
+ importFragment(rFilter,
+ loadFragment(rFilter,xRefColorStyle),
+ "OOXColor",
+ pDiagram,
+ xRefColorStyle);
+ }
+
+ if( !pData->getExtDrawings().empty() )
+ {
+ const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find("node0");
+ if( aColor != pDiagram->getColors().end() && !aColor->second.maTextFillColors.empty())
+ {
+ // TODO(F1): well, actually, there might be *several* color
+ // definitions in it, after all it's called list.
+ pShape->setFontRefColorForNodes(DiagramColor::getColorByIndex(aColor->second.maTextFillColors, -1));
+ }
+ }
+
+ // collect data, init maps
+ // for Diagram import, do - for now - NOT clear all oox::drawingml::Shape
+ pData->buildDiagramDataModel(false);
+
+ // diagram loaded. now lump together & attach to shape
+ pDiagram->addTo(pShape);
+ pShape->setDiagramDoms(pDiagram->getDomsAsPropertyValues());
+
+ // Get the oox::Theme definition and - if available - move/secure the
+ // original ImportData directly to the Diagram ModelData
+ std::shared_ptr<::oox::drawingml::Theme> aTheme(rFilter.getCurrentThemePtr());
+ if(aTheme)
+ pData->setThemeDocument(aTheme->getFragment()); //getTempFile());
+
+ // Prepare support for the advanced DiagramHelper using Diagram & Theme data
+ pShape->prepareDiagramHelper(pDiagram, rFilter.getCurrentThemePtr());
+}
+
+const oox::drawingml::Color&
+DiagramColor::getColorByIndex(const std::vector<oox::drawingml::Color>& rColors, sal_Int32 nIndex)
+{
+ assert(!rColors.empty());
+ if (nIndex == -1)
+ {
+ return rColors[rColors.size() - 1];
+ }
+
+ return rColors[nIndex % rColors.size()];
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
new file mode 100644
index 000000000..f58c762f6
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagram.hxx
@@ -0,0 +1,171 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAM_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAM_HXX
+
+#include <map>
+#include <memory>
+#include <vector>
+
+#include <rtl/ustring.hxx>
+
+#include "datamodel.hxx"
+#include <oox/drawingml/shape.hxx>
+
+namespace com::sun::star {
+ namespace xml::dom { class XDocument; }
+}
+
+namespace oox::drawingml {
+
+class Diagram;
+class LayoutNode;
+typedef std::shared_ptr< LayoutNode > LayoutNodePtr;
+class LayoutAtom;
+typedef std::shared_ptr< LayoutAtom > LayoutAtomPtr;
+typedef std::map< OUString, css::uno::Reference<css::xml::dom::XDocument> > DiagramDomMap;
+typedef std::map< OUString, LayoutAtomPtr > LayoutAtomMap;
+typedef std::map< const svx::diagram::Point*, ShapePtr > PresPointShapeMap;
+
+class DiagramLayout
+{
+public:
+ DiagramLayout(Diagram& rDgm)
+ : mrDgm(rDgm)
+ {
+ }
+ void setDefStyle( const OUString & sDefStyle )
+ { msDefStyle = sDefStyle; }
+ void setMinVer( const OUString & sMinVer )
+ { msMinVer = sMinVer; }
+ void setUniqueId( const OUString & sUniqueId )
+ { msUniqueId = sUniqueId; }
+ void setTitle( const OUString & sTitle )
+ { msTitle = sTitle; }
+ void setDesc( const OUString & sDesc )
+ { msDesc = sDesc; }
+ Diagram& getDiagram() { return mrDgm; }
+ LayoutNodePtr & getNode()
+ { return mpNode; }
+ const LayoutNodePtr & getNode() const
+ { return mpNode; }
+ OoxDiagramDataPtr& getSampData()
+ { return mpSampData; }
+ const OoxDiagramDataPtr& getSampData() const
+ { return mpSampData; }
+ OoxDiagramDataPtr& getStyleData()
+ { return mpStyleData; }
+ const OoxDiagramDataPtr& getStyleData() const
+ { return mpStyleData; }
+ LayoutAtomMap & getLayoutAtomMap()
+ { return maLayoutAtomMap; }
+ PresPointShapeMap & getPresPointShapeMap()
+ { return maPresPointShapeMap; }
+
+private:
+ Diagram& mrDgm;
+ OUString msDefStyle;
+ OUString msMinVer;
+ OUString msUniqueId;
+
+ OUString msTitle;
+ OUString msDesc;
+ LayoutNodePtr mpNode;
+ OoxDiagramDataPtr mpSampData;
+ OoxDiagramDataPtr mpStyleData;
+ // TODO
+ // catLst
+ // clrData
+
+ LayoutAtomMap maLayoutAtomMap;
+ PresPointShapeMap maPresPointShapeMap;
+};
+
+typedef std::shared_ptr< DiagramLayout > DiagramLayoutPtr;
+
+struct DiagramStyle
+{
+ ShapeStyleRef maFillStyle;
+ ShapeStyleRef maLineStyle;
+ ShapeStyleRef maEffectStyle;
+ ShapeStyleRef maTextStyle;
+};
+
+typedef std::map<OUString,DiagramStyle> DiagramQStyleMap;
+
+struct DiagramColor
+{
+ std::vector<oox::drawingml::Color> maFillColors;
+ std::vector<oox::drawingml::Color> maLineColors;
+ std::vector<oox::drawingml::Color> maEffectColors;
+ std::vector<oox::drawingml::Color> maTextFillColors;
+ std::vector<oox::drawingml::Color> maTextLineColors;
+ std::vector<oox::drawingml::Color> maTextEffectColors;
+
+ static const oox::drawingml::Color&
+ getColorByIndex(const std::vector<oox::drawingml::Color>& rColors, sal_Int32 nIndex);
+};
+
+typedef std::map<OUString,DiagramColor> DiagramColorMap;
+
+class Diagram
+{
+public:
+ explicit Diagram();
+ void setData( OoxDiagramDataPtr& pData )
+ { mpData = pData; }
+ const OoxDiagramDataPtr& getData() const
+ { return mpData; }
+ void setLayout( const DiagramLayoutPtr & pLayout )
+ { mpLayout = pLayout; }
+ const DiagramLayoutPtr& getLayout() const
+ { return mpLayout; }
+
+ DiagramQStyleMap& getStyles() { return maStyles; }
+ const DiagramQStyleMap& getStyles() const { return maStyles; }
+ DiagramColorMap& getColors() { return maColors; }
+ const DiagramColorMap& getColors() const { return maColors; }
+ DiagramDomMap & getDomMap() { return maMainDomMap; }
+ css::uno::Sequence< css::uno::Sequence< css::uno::Any > > & getDataRelsMap() { return maDataRelsMap; }
+ void addTo( const ShapePtr & pShape );
+
+ css::uno::Sequence<css::beans::PropertyValue> getDomsAsPropertyValues() const;
+ oox::core::NamedShapePairs& getDiagramFontHeights() { return maDiagramFontHeights; }
+ void syncDiagramFontHeights();
+
+private:
+ // This contains groups of shapes: automatic font size is the same in each group.
+ oox::core::NamedShapePairs maDiagramFontHeights;
+
+ OoxDiagramDataPtr mpData;
+ DiagramLayoutPtr mpLayout;
+ DiagramQStyleMap maStyles;
+ DiagramColorMap maColors;
+ DiagramDomMap maMainDomMap;
+ css::uno::Sequence< css::uno::Sequence< css::uno::Any > > maDataRelsMap;
+};
+
+typedef std::shared_ptr< Diagram > DiagramPtr;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
new file mode 100644
index 000000000..02d377703
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "diagramdefinitioncontext.hxx"
+#include "datamodel.hxx"
+#include "datamodelcontext.hxx"
+#include "layoutnodecontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_DiagramDefinition
+DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttributes,
+ const DiagramLayoutPtr &pLayout )
+ : ContextHandler2( rParent )
+ , mpLayout( pLayout )
+{
+ mpLayout->setDefStyle( rAttributes.getString( XML_defStyle ).get() );
+ OUString sValue = rAttributes.getString( XML_minVer ).get();
+ if( sValue.isEmpty() )
+ {
+ sValue = "http://schemas.openxmlformats.org/drawingml/2006/diagram";
+ }
+ mpLayout->setMinVer( sValue );
+ mpLayout->setUniqueId( rAttributes.getString( XML_uniqueId ).get() );
+}
+
+DiagramDefinitionContext::~DiagramDefinitionContext()
+{
+ LayoutNodePtr node = mpLayout->getNode();
+ if (node)
+ node->dump();
+}
+
+ContextHandlerRef
+DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( title ):
+ mpLayout->setTitle( rAttribs.getString( XML_val ).get() );
+ break;
+ case DGM_TOKEN( desc ):
+ mpLayout->setDesc( rAttribs.getString( XML_val ).get() );
+ break;
+ case DGM_TOKEN( layoutNode ):
+ {
+ LayoutNodePtr pNode = std::make_shared<LayoutNode>(mpLayout->getDiagram());
+ mpLayout->getNode() = pNode;
+ pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
+ pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
+ pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
+ return new LayoutNodeContext( *this, rAttribs, pNode );
+ }
+ case DGM_TOKEN( clrData ):
+ // TODO, does not matter for the UI. skip.
+ return nullptr;
+ case DGM_TOKEN( sampData ):
+ mpLayout->getSampData() = std::make_shared<DiagramData>();
+ return new DataModelContext( *this, mpLayout->getSampData() );
+ case DGM_TOKEN( styleData ):
+ mpLayout->getStyleData() = std::make_shared<DiagramData>();
+ return new DataModelContext( *this, mpLayout->getStyleData() );
+ case DGM_TOKEN( cat ):
+ case DGM_TOKEN( catLst ):
+ // TODO, does not matter for the UI
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
new file mode 100644
index 000000000..e92460f5d
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMDEFINITIONCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMDEFINITIONCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include "diagram.hxx"
+
+namespace oox::drawingml {
+
+class DiagramDefinitionContext : public ::oox::core::ContextHandler2
+{
+public:
+ DiagramDefinitionContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, const DiagramLayoutPtr &pLayout );
+ virtual ~DiagramDefinitionContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ DiagramLayoutPtr mpLayout;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
new file mode 100644
index 000000000..8ff4af7f0
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
@@ -0,0 +1,234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include "diagramdefinitioncontext.hxx"
+#include "diagramfragmenthandler.hxx"
+#include "datamodelcontext.hxx"
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+
+namespace oox::drawingml {
+
+DiagramDataFragmentHandler::DiagramDataFragmentHandler( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ const OoxDiagramDataPtr& rDataPtr )
+ : FragmentHandler2( rFilter, rFragmentPath )
+ , mpDataPtr( rDataPtr )
+{
+}
+
+DiagramDataFragmentHandler::~DiagramDataFragmentHandler( ) noexcept
+{
+
+}
+
+void SAL_CALL DiagramDataFragmentHandler::endDocument()
+{
+
+}
+
+ContextHandlerRef
+DiagramDataFragmentHandler::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( dataModel ):
+ return new DataModelContext( *this, mpDataPtr );
+ default:
+ break;
+ }
+
+ return this;
+}
+
+DiagramLayoutFragmentHandler::DiagramLayoutFragmentHandler( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ const DiagramLayoutPtr& rDataPtr )
+ : FragmentHandler2( rFilter, rFragmentPath )
+ , mpDataPtr( rDataPtr )
+{
+}
+
+DiagramLayoutFragmentHandler::~DiagramLayoutFragmentHandler( ) noexcept
+{
+
+}
+
+void SAL_CALL DiagramLayoutFragmentHandler::endDocument()
+{
+
+}
+
+ContextHandlerRef
+DiagramLayoutFragmentHandler::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( layoutDef ):
+ return new DiagramDefinitionContext( *this, rAttribs, mpDataPtr );
+ default:
+ break;
+ }
+
+ return this;
+}
+
+DiagramQStylesFragmentHandler::DiagramQStylesFragmentHandler( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ DiagramQStyleMap& rStylesMap ) :
+ FragmentHandler2( rFilter, rFragmentPath ),
+ maStyleEntry(),
+ mrStylesMap( rStylesMap )
+{}
+
+::oox::core::ContextHandlerRef DiagramQStylesFragmentHandler::createStyleMatrixContext(
+ sal_Int32 nElement,
+ const AttributeList& rAttribs,
+ ShapeStyleRef& o_rStyle )
+{
+ o_rStyle.mnThemedIdx = (nElement == A_TOKEN(fontRef)) ?
+ rAttribs.getToken( XML_idx, XML_none ) : rAttribs.getInteger( XML_idx, 0 );
+ return new ColorContext( *this, o_rStyle.maPhClr );
+}
+
+::oox::core::ContextHandlerRef DiagramQStylesFragmentHandler::onCreateContext( sal_Int32 nElement,
+ const AttributeList& rAttribs )
+{
+ // state-table like way of navigating the color fragment. we
+ // currently ignore everything except styleLbl in the styleDef
+ // element
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ return nElement == DGM_TOKEN(styleDef) ? this : nullptr;
+ case DGM_TOKEN(styleDef):
+ return nElement == DGM_TOKEN(styleLbl) ? this : nullptr;
+ case DGM_TOKEN(styleLbl):
+ return nElement == DGM_TOKEN(style) ? this : nullptr;
+ case DGM_TOKEN(style):
+ {
+ switch( nElement )
+ {
+ case A_TOKEN(lnRef): // CT_StyleMatrixReference
+ return createStyleMatrixContext(nElement,rAttribs,
+ maStyleEntry.maLineStyle);
+ case A_TOKEN(fillRef): // CT_StyleMatrixReference
+ return createStyleMatrixContext(nElement,rAttribs,
+ maStyleEntry.maFillStyle);
+ case A_TOKEN(effectRef): // CT_StyleMatrixReference
+ return createStyleMatrixContext(nElement,rAttribs,
+ maStyleEntry.maEffectStyle);
+ case A_TOKEN(fontRef): // CT_FontReference
+ return createStyleMatrixContext(nElement,rAttribs,
+ maStyleEntry.maTextStyle);
+ }
+ return nullptr;
+ }
+ }
+
+ return nullptr;
+}
+
+void DiagramQStylesFragmentHandler::onStartElement( const AttributeList& rAttribs )
+{
+ if( getCurrentElement() == DGM_TOKEN( styleLbl ) )
+ {
+ maStyleName = rAttribs.getString( XML_name, OUString() );
+ maStyleEntry = mrStylesMap[maStyleName];
+ }
+}
+
+void DiagramQStylesFragmentHandler::onEndElement( )
+{
+ if( getCurrentElement() == DGM_TOKEN(styleLbl) )
+ mrStylesMap[maStyleName] = maStyleEntry;
+}
+
+ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ DiagramColorMap& rColorsMap ) :
+ FragmentHandler2(rFilter,rFragmentPath),
+ maColorEntry(),
+ mrColorsMap(rColorsMap)
+{}
+
+::oox::core::ContextHandlerRef ColorFragmentHandler::onCreateContext( sal_Int32 nElement,
+ const AttributeList& /*rAttribs*/ )
+{
+ // state-table like way of navigating the color fragment. we
+ // currently ignore everything except styleLbl in the colorsDef
+ // element
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ return nElement == DGM_TOKEN(colorsDef) ? this : nullptr;
+ case DGM_TOKEN(colorsDef):
+ return nElement == DGM_TOKEN(styleLbl) ? this : nullptr;
+ case DGM_TOKEN(styleLbl):
+ {
+ switch( nElement )
+ {
+ // the actual colors - defer to color fragment handlers.
+
+ case DGM_TOKEN(fillClrLst):
+ return new ColorsContext( *this, maColorEntry.maFillColors );
+ case DGM_TOKEN(linClrLst):
+ return new ColorsContext( *this, maColorEntry.maLineColors );
+ case DGM_TOKEN(effectClrLst):
+ return new ColorsContext( *this, maColorEntry.maEffectColors );
+ case DGM_TOKEN(txFillClrLst):
+ return new ColorsContext( *this, maColorEntry.maTextFillColors );
+ case DGM_TOKEN(txLinClrLst):
+ return new ColorsContext( *this, maColorEntry.maTextLineColors );
+ case DGM_TOKEN(txEffectClrLst):
+ return new ColorsContext( *this, maColorEntry.maTextEffectColors );
+ }
+ break;
+ }
+ }
+
+ return nullptr;
+}
+
+void ColorFragmentHandler::onStartElement( const AttributeList& rAttribs )
+{
+ if( getCurrentElement() == DGM_TOKEN(styleLbl) )
+ {
+ maColorName = rAttribs.getString( XML_name, OUString() );
+ maColorEntry = mrColorsMap[maColorName];
+ }
+}
+
+void ColorFragmentHandler::onEndElement( )
+{
+ if( getCurrentElement() == DGM_TOKEN(styleLbl) )
+ mrColorsMap[maColorName] = maColorEntry;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
new file mode 100644
index 000000000..eb51d6407
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMFRAGMENTHANDLER_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+
+#include "diagram.hxx"
+
+namespace oox::drawingml {
+
+class DiagramDataFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ DiagramDataFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const OoxDiagramDataPtr& rDataPtr);
+ virtual ~DiagramDataFragmentHandler() noexcept override;
+
+ virtual void SAL_CALL endDocument() override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ OoxDiagramDataPtr mpDataPtr;
+};
+
+class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ DiagramLayoutFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const DiagramLayoutPtr& rDataPtr);
+ virtual ~DiagramLayoutFragmentHandler() noexcept override;
+
+ virtual void SAL_CALL endDocument() override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ DiagramLayoutPtr mpDataPtr;
+};
+
+class DiagramQStylesFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ DiagramQStylesFragmentHandler(
+ oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ DiagramQStyleMap& rStylesMap );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+ virtual void onStartElement( const AttributeList& rAttribs ) override;
+ virtual void onEndElement() override;
+
+private:
+ ::oox::core::ContextHandlerRef createStyleMatrixContext(sal_Int32 nElement,
+ const AttributeList& rAttribs,
+ ShapeStyleRef& o_rStyle);
+
+ OUString maStyleName;
+ DiagramStyle maStyleEntry;
+ DiagramQStyleMap& mrStylesMap;
+};
+
+class ColorFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ ColorFragmentHandler(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ DiagramColorMap& rColorMap );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+ virtual void onStartElement( const AttributeList& rAttribs ) override;
+ virtual void onEndElement() override;
+
+private:
+ OUString maColorName;
+ DiagramColor maColorEntry;
+ DiagramColorMap& mrColorsMap;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramhelper.cxx b/oox/source/drawingml/diagram/diagramhelper.cxx
new file mode 100644
index 000000000..7b746e067
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramhelper.cxx
@@ -0,0 +1,269 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "diagramhelper.hxx"
+#include "diagram.hxx"
+
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <oox/shape/ShapeFilterBase.hxx>
+#include <oox/ppt/pptimport.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <svx/svdmodel.hxx>
+#include <comphelper/processfactory.hxx>
+#include <oox/drawingml/themefragmenthandler.hxx>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+
+using namespace ::com::sun::star;
+
+namespace oox::drawingml {
+
+bool AdvancedDiagramHelper::hasDiagramData() const
+{
+ return mpDiagramPtr && mpDiagramPtr->getData();
+}
+
+AdvancedDiagramHelper::AdvancedDiagramHelper(
+ const std::shared_ptr< Diagram >& rDiagramPtr,
+ const std::shared_ptr<::oox::drawingml::Theme>& rTheme,
+ css::awt::Size aImportSize)
+: svx::diagram::IDiagramHelper()
+, mpDiagramPtr(rDiagramPtr)
+, mpThemePtr(rTheme)
+, maImportSize(aImportSize)
+{
+}
+
+AdvancedDiagramHelper::~AdvancedDiagramHelper()
+{
+}
+
+void AdvancedDiagramHelper::reLayout(SdrObjGroup& rTarget)
+{
+ if(!mpDiagramPtr)
+ {
+ return;
+ }
+
+ // Rescue/remember geometric transformation of existing Diagram
+ basegfx::B2DHomMatrix aTransformation;
+ basegfx::B2DPolyPolygon aPolyPolygon;
+ rTarget.TRGetBaseGeometry(aTransformation, aPolyPolygon);
+
+ // create temporary oox::Shape as target. No longer needed is to keep/remember
+ // the original oox::Shape to do that. Use original Size and Pos from initial import
+ // to get the same layout(s)
+ oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
+ pShapePtr->setDiagramType();
+ pShapePtr->setSize(maImportSize);
+
+ // Re-create the oox::Shapes for the diagram content
+ mpDiagramPtr->addTo(pShapePtr);
+
+ // Delete all existing shapes in that group to prepare re-creation
+ rTarget.getChildrenOfSdrObject()->ClearSdrObjList();
+
+ // For re-creation we need to use ::addShape functionality from the
+ // oox import filter since currently Shape import is very tightly
+ // coupled to Shape creation. It converts a oox::Shape representation
+ // combined with an oox::Theme to incarnated XShapes representing the
+ // Diagram.
+ // To use that functionality, we have to create a temporary filter
+ // (based on ShapeFilterBase). Problems are that this needs to know
+ // the oox:Theme and a ComponentModel from TargetDocument.
+ // The DiagramHelper holds/delivers the oox::Theme to use, so
+ // it does not need to be re-imported from oox repeatedly.
+ // The ComponentModel can be derived from the existing XShape/GroupShape
+ // when knowing where to get it from, making it independent from app.
+ //
+ // NOTE: Using another (buffered) oox::Theme would allow to re-create
+ // using another theming in the future.
+ // NOTE: The incarnation of import filter (ShapeFilterBase) is only
+ // used for XShape creation, no xml snippets/data gets imported
+ // here. XShape creation may be isolated in the future.
+ SdrModel& rModel(rTarget.getSdrModelFromSdrObject());
+ uno::Reference< uno::XInterface > const & rUnoModel(rModel.getUnoModel());
+ css::uno::Reference<css::uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
+ rtl::Reference<oox::shape::ShapeFilterBase> xFilter(new oox::shape::ShapeFilterBase(xContext));
+
+ // set oox::Theme at Filter. All LineStyle/FillStyle/Colors/Attributes
+ // will be taken from there
+ if(UseDiagramThemeData())
+ xFilter->setCurrentTheme(getOrCreateThemePtr(xFilter));
+
+ css::uno::Reference< css::lang::XComponent > aComponentModel( rUnoModel, uno::UNO_QUERY );
+ xFilter->setTargetDocument(aComponentModel);
+
+ // set DiagramFontHeights
+ xFilter->setDiagramFontHeights(&mpDiagramPtr->getDiagramFontHeights());
+
+ // Prepare the target for the to-be-created XShapes
+ uno::Reference<drawing::XShapes> xShapes(rTarget.getUnoShape(), uno::UNO_QUERY_THROW);
+
+ for (auto const& child : pShapePtr->getChildren())
+ {
+ // Create all sub-shapes. This will recursively create needed geometry using
+ // filter-internal ::createShapes
+ child->addShape(
+ *xFilter,
+ xFilter->getCurrentTheme(),
+ xShapes,
+ aTransformation,
+ pShapePtr->getFillProperties());
+ }
+
+ // sync FontHeights
+ mpDiagramPtr->syncDiagramFontHeights();
+
+ // re-apply secured data from ModelData
+ if(UseDiagramModelData())
+ mpDiagramPtr->getData()->restoreDataFromShapeToModelAfterDiagramImport(*pShapePtr);
+
+ // Re-apply remembered geometry
+ rTarget.TRSetBaseGeometry(aTransformation, aPolyPolygon);
+}
+
+OUString AdvancedDiagramHelper::getString() const
+{
+ if(hasDiagramData())
+ {
+ return mpDiagramPtr->getData()->getString();
+ }
+
+ return OUString();
+}
+
+std::vector<std::pair<OUString, OUString>> AdvancedDiagramHelper::getChildren(const OUString& rParentId) const
+{
+ if(hasDiagramData())
+ {
+ return mpDiagramPtr->getData()->getChildren(rParentId);
+ }
+
+ return std::vector<std::pair<OUString, OUString>>();
+}
+
+OUString AdvancedDiagramHelper::addNode(const OUString& rText)
+{
+ OUString aRetval;
+
+ if(hasDiagramData())
+ {
+ aRetval = mpDiagramPtr->getData()->addNode(rText);
+
+ // reset temporary buffered ModelData association lists & rebuild them
+ // and the Diagram DataModel
+ mpDiagramPtr->getData()->buildDiagramDataModel(true);
+
+ // also reset temporary buffered layout data - that might
+ // still refer to changed oox::Shape data
+ mpDiagramPtr->getLayout()->getPresPointShapeMap().clear();
+ }
+
+ return aRetval;
+}
+
+bool AdvancedDiagramHelper::removeNode(const OUString& rNodeId)
+{
+ bool bRetval(false);
+
+ if(hasDiagramData())
+ {
+ bRetval = mpDiagramPtr->getData()->removeNode(rNodeId);
+
+ // reset temporary buffered ModelData association lists & rebuild them
+ // and the Diagram DataModel
+ mpDiagramPtr->getData()->buildDiagramDataModel(true);
+
+ // also reset temporary buffered layout data - that might
+ // still refer to changed oox::Shape data
+ mpDiagramPtr->getLayout()->getPresPointShapeMap().clear();
+ }
+
+ return bRetval;
+}
+
+svx::diagram::DiagramDataStatePtr AdvancedDiagramHelper::extractDiagramDataState() const
+{
+ if(!mpDiagramPtr)
+ {
+ return svx::diagram::DiagramDataStatePtr();
+ }
+
+ return mpDiagramPtr->getData()->extractDiagramDataState();
+}
+
+void AdvancedDiagramHelper::applyDiagramDataState(const svx::diagram::DiagramDataStatePtr& rState)
+{
+ if(!mpDiagramPtr)
+ {
+ return;
+ }
+
+ mpDiagramPtr->getData()->applyDiagramDataState(rState);
+}
+
+void AdvancedDiagramHelper::doAnchor(SdrObjGroup& rTarget, ::oox::drawingml::Shape& rRootShape)
+{
+ if(!mpDiagramPtr)
+ {
+ return;
+ }
+
+ mpDiagramPtr->syncDiagramFontHeights();
+
+ // After Diagram import, parts of the Diagram ModelData is at the
+ // oox::drawingml::Shape. Since these objects are temporary helpers,
+ // secure that data at the Diagram ModelData by copying.
+ mpDiagramPtr->getData()->secureDataFromShapeToModelAfterDiagramImport(rRootShape);
+
+ anchorToSdrObjGroup(rTarget);
+}
+
+std::shared_ptr< ::oox::drawingml::Theme > AdvancedDiagramHelper::getOrCreateThemePtr(
+ rtl::Reference< oox::shape::ShapeFilterBase >& rxFilter) const
+{
+ // (Re-)Use already existing Theme if existing/imported if possible.
+ // If not, re-import Theme if data is available and thus possible
+ if(hasDiagramData() && (ForceThemePtrRecreation() || !mpThemePtr))
+ {
+ // get the originally imported dom::XDocument
+ const uno::Reference< css::xml::dom::XDocument >& xThemeDocument(mpDiagramPtr->getData()->getThemeDocument());
+
+ if(xThemeDocument)
+ {
+ // reset local Theme ModelData *always* to get rid of former data that would
+ // else be added additionally
+ const_cast<AdvancedDiagramHelper*>(this)->mpThemePtr = std::make_shared<oox::drawingml::Theme>();
+
+ // import Theme ModelData
+ rxFilter->importFragment(
+ new ThemeFragmentHandler(
+ *rxFilter, OUString(), *mpThemePtr ),
+ uno::Reference< css::xml::sax::XFastSAXSerializable >(
+ xThemeDocument,
+ uno::UNO_QUERY_THROW));
+ }
+ }
+
+ return mpThemePtr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramhelper.hxx b/oox/source/drawingml/diagram/diagramhelper.hxx
new file mode 100644
index 000000000..85ca4c457
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramhelper.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_DIAGRAM_DIAGRAMHELPER_HXX
+#define INCLUDED_OOX_DRAWINGML_DIAGRAM_DIAGRAMHELPER_HXX
+
+#include <rtl/ustring.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/shape/ShapeFilterBase.hxx>
+#include <svx/svdogrp.hxx>
+#include <svx/diagram/IDiagramHelper.hxx>
+
+namespace svx { namespace diagram {
+ class DiagramDataState;
+}}
+
+namespace oox::drawingml {
+
+class Diagram;
+
+// Advanced DiagramHelper
+//
+// This helper tries to hold all necessary data to re-layout
+// all XShapes/SdrObjects of an already imported Diagram. The
+// Diagram holds the SmarArt model data before it gets layouted,
+// while Theme holds the oox Fill/Line/Style definitions to
+// apply.
+// Re-Layouting (re-creating) is rather complex, for detailed
+// information see ::reLayout implementation.
+// This helper class may/should be extended to:
+// - deliver representative data from the Diagram-Model
+// - modify it eventually
+// - im/export Diagram model to other representations
+class AdvancedDiagramHelper final : public svx::diagram::IDiagramHelper
+{
+ const std::shared_ptr< Diagram > mpDiagramPtr;
+ std::shared_ptr<::oox::drawingml::Theme> mpThemePtr;
+
+ css::awt::Size maImportSize;
+
+ bool hasDiagramData() const;
+
+public:
+ AdvancedDiagramHelper(
+ const std::shared_ptr< Diagram >& rDiagramPtr,
+ const std::shared_ptr<::oox::drawingml::Theme>& rTheme,
+ css::awt::Size aImportSize);
+ virtual ~AdvancedDiagramHelper();
+
+ // re-create XShapes
+ virtual void reLayout(SdrObjGroup& rTarget) override;
+
+ // get text representation of data tree
+ virtual OUString getString() const override;
+
+ // get children of provided data node
+ // use empty string for top-level nodes
+ // returns vector of (id, text)
+ virtual std::vector<std::pair<OUString, OUString>> getChildren(const OUString& rParentId) const override;
+
+ // add/remove new top-level node to data model, returns its id
+ virtual OUString addNode(const OUString& rText) override;
+ virtual bool removeNode(const OUString& rNodeId) override;
+
+ // Undo/Redo helpers to extract/restore Diagram-defining data
+ virtual std::shared_ptr< svx::diagram::DiagramDataState > extractDiagramDataState() const override;
+ virtual void applyDiagramDataState(const std::shared_ptr< svx::diagram::DiagramDataState >& rState) override;
+
+ void doAnchor(SdrObjGroup& rTarget, ::oox::drawingml::Shape& rRootShape);
+ std::shared_ptr< ::oox::drawingml::Theme > getOrCreateThemePtr(
+ rtl::Reference< oox::shape::ShapeFilterBase>& rxFilter ) const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
new file mode 100644
index 000000000..a904797a4
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -0,0 +1,2047 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "diagramlayoutatoms.hxx"
+
+#include <set>
+
+#include "layoutatomvisitorbase.hxx"
+
+#include <basegfx/numeric/ftools.hxx>
+#include <sal/log.hxx>
+
+#include <o3tl/unit_conversion.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/properties.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textrun.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::oox::core;
+
+namespace
+{
+/// Looks up the value of the rInternalName -> nProperty key in rProperties.
+oox::OptValue<sal_Int32> findProperty(const oox::drawingml::LayoutPropertyMap& rProperties,
+ const OUString& rInternalName, sal_Int32 nProperty)
+{
+ oox::OptValue<sal_Int32> oRet;
+
+ auto it = rProperties.find(rInternalName);
+ if (it != rProperties.end())
+ {
+ const oox::drawingml::LayoutProperty& rProperty = it->second;
+ auto itProperty = rProperty.find(nProperty);
+ if (itProperty != rProperty.end())
+ oRet = itProperty->second;
+ }
+
+ return oRet;
+}
+
+/**
+ * Determines if nUnit is a font unit (measured in points) or not (measured in
+ * millimeters).
+ */
+bool isFontUnit(sal_Int32 nUnit)
+{
+ return nUnit == oox::XML_primFontSz || nUnit == oox::XML_secFontSz;
+}
+
+/// Determines which UNO property should be set for a given constraint type.
+sal_Int32 getPropertyFromConstraint(sal_Int32 nConstraint)
+{
+ switch (nConstraint)
+ {
+ case oox::XML_lMarg:
+ return oox::PROP_TextLeftDistance;
+ case oox::XML_rMarg:
+ return oox::PROP_TextRightDistance;
+ case oox::XML_tMarg:
+ return oox::PROP_TextUpperDistance;
+ case oox::XML_bMarg:
+ return oox::PROP_TextLowerDistance;
+ }
+
+ return 0;
+}
+
+/**
+ * Determines if pShape is (or contains) a presentation of a data node of type
+ * nType.
+ */
+bool containsDataNodeType(const oox::drawingml::ShapePtr& pShape, sal_Int32 nType)
+{
+ if (pShape->getDataNodeType() == nType)
+ return true;
+
+ for (const auto& pChild : pShape->getChildren())
+ {
+ if (containsDataNodeType(pChild, nType))
+ return true;
+ }
+
+ return false;
+}
+}
+
+namespace oox::drawingml {
+void SnakeAlg::layoutShapeChildren(const AlgAtom& rAlg, const ShapePtr& rShape,
+ const std::vector<Constraint>& rConstraints)
+{
+ if (rShape->getChildren().empty() || rShape->getSize().Width == 0
+ || rShape->getSize().Height == 0)
+ return;
+
+ // Parse constraints.
+ double fChildAspectRatio = rShape->getChildren()[0]->getAspectRatio();
+ double fShapeHeight = rShape->getSize().Height;
+ double fShapeWidth = rShape->getSize().Width;
+ // Check if we have a child aspect ratio. If so, need to shrink one dimension to
+ // achieve that ratio.
+ if (fChildAspectRatio && fShapeHeight && fChildAspectRatio < (fShapeWidth / fShapeHeight))
+ {
+ fShapeWidth = fShapeHeight * fChildAspectRatio;
+ }
+
+ double fSpaceFromConstraint = 1.0;
+ LayoutPropertyMap aPropertiesByName;
+ std::map<sal_Int32, LayoutProperty> aPropertiesByType;
+ LayoutProperty& rParent = aPropertiesByName[""];
+ rParent[XML_w] = fShapeWidth;
+ rParent[XML_h] = fShapeHeight;
+ for (const auto& rConstr : rConstraints)
+ {
+ if (rConstr.mnRefType == XML_w || rConstr.mnRefType == XML_h)
+ {
+ if (rConstr.mnType == XML_sp && rConstr.msForName.isEmpty())
+ fSpaceFromConstraint = rConstr.mfFactor;
+ }
+
+ auto itRefForName = aPropertiesByName.find(rConstr.msRefForName);
+ if (itRefForName == aPropertiesByName.end())
+ {
+ continue;
+ }
+
+ auto it = itRefForName->second.find(rConstr.mnRefType);
+ if (it == itRefForName->second.end())
+ {
+ continue;
+ }
+
+ if (rConstr.mfValue != 0.0)
+ {
+ continue;
+ }
+
+ sal_Int32 nValue = it->second * rConstr.mfFactor;
+
+ if (rConstr.mnPointType == XML_none)
+ {
+ aPropertiesByName[rConstr.msForName][rConstr.mnType] = nValue;
+ }
+ else
+ {
+ aPropertiesByType[rConstr.mnPointType][rConstr.mnType] = nValue;
+ }
+ }
+
+ std::vector<sal_Int32> aShapeWidths(rShape->getChildren().size());
+ for (size_t i = 0; i < rShape->getChildren().size(); ++i)
+ {
+ ShapePtr pChild = rShape->getChildren()[i];
+ if (!pChild->getDataNodeType())
+ {
+ // TODO handle the case when the requirement applies by name, not by point type.
+ aShapeWidths[i] = fShapeWidth;
+ continue;
+ }
+
+ auto itNodeType = aPropertiesByType.find(pChild->getDataNodeType());
+ if (itNodeType == aPropertiesByType.end())
+ {
+ aShapeWidths[i] = fShapeWidth;
+ continue;
+ }
+
+ auto it = itNodeType->second.find(XML_w);
+ if (it == itNodeType->second.end())
+ {
+ aShapeWidths[i] = fShapeWidth;
+ continue;
+ }
+
+ aShapeWidths[i] = it->second;
+ }
+
+ bool bSpaceFromConstraints = fSpaceFromConstraint != 1.0;
+
+ const AlgAtom::ParamMap& rMap = rAlg.getMap();
+ const sal_Int32 nDir = rMap.count(XML_grDir) ? rMap.find(XML_grDir)->second : XML_tL;
+ sal_Int32 nIncX = 1;
+ sal_Int32 nIncY = 1;
+ bool bHorizontal = true;
+ switch (nDir)
+ {
+ case XML_tL:
+ nIncX = 1;
+ nIncY = 1;
+ break;
+ case XML_tR:
+ nIncX = -1;
+ nIncY = 1;
+ break;
+ case XML_bL:
+ nIncX = 1;
+ nIncY = -1;
+ bHorizontal = false;
+ break;
+ case XML_bR:
+ nIncX = -1;
+ nIncY = -1;
+ bHorizontal = false;
+ break;
+ }
+
+ sal_Int32 nCount = rShape->getChildren().size();
+ // Defaults in case not provided by constraints.
+ double fSpace = bSpaceFromConstraints ? fSpaceFromConstraint : 0.3;
+ double fAspectRatio = 0.54; // diagram should not spill outside, earlier it was 0.6
+
+ sal_Int32 nCol = 1;
+ sal_Int32 nRow = 1;
+ sal_Int32 nMaxRowWidth = 0;
+ if (nCount <= fChildAspectRatio)
+ // Child aspect ratio request (width/height) is N, and we have at most N shapes.
+ // This means we don't need multiple columns.
+ nRow = nCount;
+ else
+ {
+ for (; nRow < nCount; nRow++)
+ {
+ nCol = std::ceil(static_cast<double>(nCount) / nRow);
+ sal_Int32 nRowWidth = 0;
+ for (sal_Int32 i = 0; i < nCol; ++i)
+ {
+ if (i >= nCount)
+ {
+ break;
+ }
+
+ nRowWidth += aShapeWidths[i];
+ }
+ double fTotalShapesHeight = fShapeHeight * nRow;
+ if (nRowWidth && fTotalShapesHeight / nRowWidth >= fAspectRatio)
+ {
+ if (nRowWidth > nMaxRowWidth)
+ {
+ nMaxRowWidth = nRowWidth;
+ }
+ break;
+ }
+ }
+ }
+
+ SAL_INFO("oox.drawingml", "Snake layout grid: " << nCol << "x" << nRow);
+
+ sal_Int32 nWidth = rShape->getSize().Width / (nCol + (nCol - 1) * fSpace);
+ awt::Size aChildSize(nWidth, nWidth * fAspectRatio);
+ if (nCol == 1 && nRow > 1)
+ {
+ // We have a single column, so count the height based on the parent height, not
+ // based on width.
+ // Space occurs inside children; also double amount of space is needed outside (on
+ // both sides), if the factor comes from a constraint.
+ sal_Int32 nNumSpaces = -1;
+ if (bSpaceFromConstraints)
+ nNumSpaces += 4;
+ sal_Int32 nHeight = rShape->getSize().Height / (nRow + (nRow + nNumSpaces) * fSpace);
+
+ if (fChildAspectRatio > 1)
+ {
+ // Shrink width if the aspect ratio requires it.
+ nWidth = std::min(rShape->getSize().Width,
+ static_cast<sal_Int32>(nHeight * fChildAspectRatio));
+ aChildSize = awt::Size(nWidth, nHeight);
+ }
+
+ bHorizontal = false;
+ }
+
+ awt::Point aCurrPos(0, 0);
+ if (nIncX == -1)
+ aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
+ if (nIncY == -1)
+ aCurrPos.Y = rShape->getSize().Height - aChildSize.Height;
+ else if (bSpaceFromConstraints)
+ {
+ if (!bHorizontal)
+ {
+ // Initial vertical offset to have upper spacing (outside, so double amount).
+ aCurrPos.Y = aChildSize.Height * fSpace * 2;
+ }
+ }
+
+ sal_Int32 nStartX = aCurrPos.X;
+ sal_Int32 nColIdx = 0, index = 0;
+
+ const sal_Int32 aContDir
+ = rMap.count(XML_contDir) ? rMap.find(XML_contDir)->second : XML_sameDir;
+
+ switch (aContDir)
+ {
+ case XML_sameDir:
+ {
+ sal_Int32 nRowHeight = 0;
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ aCurrShape->setPosition(aCurrPos);
+ awt::Size aCurrSize(aChildSize);
+ // aShapeWidths items are a portion of nMaxRowWidth. We want the same ratio,
+ // based on the original parent width, ignoring the aspect ratio request.
+ bool bWidthsFromConstraints
+ = nCount >= 2 && rShape->getChildren()[1]->getDataNodeType() == XML_sibTrans;
+ if (bWidthsFromConstraints && nMaxRowWidth)
+ {
+ double fWidthFactor = static_cast<double>(aShapeWidths[index]) / nMaxRowWidth;
+ // We can only work from constraints if spacing is represented by a real
+ // child shape.
+ aCurrSize.Width = rShape->getSize().Width * fWidthFactor;
+ }
+ if (fChildAspectRatio)
+ {
+ aCurrSize.Height = aCurrSize.Width / fChildAspectRatio;
+
+ // Child shapes are not allowed to leave their parent.
+ aCurrSize.Height = std::min<sal_Int32>(
+ aCurrSize.Height, rShape->getSize().Height / (nRow + (nRow - 1) * fSpace));
+ }
+ if (aCurrSize.Height > nRowHeight)
+ {
+ nRowHeight = aCurrSize.Height;
+ }
+ aCurrShape->setSize(aCurrSize);
+ aCurrShape->setChildSize(aCurrSize);
+
+ index++; // counts index of child, helpful for positioning.
+
+ if (index % nCol == 0 || ((index / nCol) + 1) != nRow)
+ aCurrPos.X += nIncX * (aCurrSize.Width + fSpace * aCurrSize.Width);
+
+ if (++nColIdx == nCol) // condition for next row
+ {
+ // if last row, then position children according to number of shapes.
+ if ((index + 1) % nCol != 0 && (index + 1) >= 3
+ && ((index + 1) / nCol + 1) == nRow && nCount != nRow * nCol)
+ {
+ // position first child of last row
+ if (bWidthsFromConstraints)
+ {
+ aCurrPos.X = nStartX;
+ }
+ else
+ {
+ // Can assume that all child shape has the same width.
+ aCurrPos.X
+ = nStartX
+ + (nIncX * (aCurrSize.Width + fSpace * aCurrSize.Width)) / 2;
+ }
+ }
+ else
+ // if not last row, positions first child of that row
+ aCurrPos.X = nStartX;
+ aCurrPos.Y += nIncY * (nRowHeight + fSpace * nRowHeight);
+ nColIdx = 0;
+ nRowHeight = 0;
+ }
+
+ // positions children in the last row.
+ if (index % nCol != 0 && index >= 3 && ((index / nCol) + 1) == nRow)
+ aCurrPos.X += (nIncX * (aCurrSize.Width + fSpace * aCurrSize.Width));
+ }
+ break;
+ }
+ case XML_revDir:
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ aCurrShape->setPosition(aCurrPos);
+ aCurrShape->setSize(aChildSize);
+ aCurrShape->setChildSize(aChildSize);
+
+ index++; // counts index of child, helpful for positioning.
+
+ /*
+ index%col -> tests node is at last column
+ ((index/nCol)+1)!=nRow) -> tests node is at last row or not
+ ((index/nCol)+1)%2!=0 -> tests node is at row which is multiple of 2, important for revDir
+ num!=nRow*nCol -> tests how last row nodes should be spread.
+ */
+
+ if ((index % nCol == 0 || ((index / nCol) + 1) != nRow)
+ && ((index / nCol) + 1) % 2 != 0)
+ aCurrPos.X += (aChildSize.Width + fSpace * aChildSize.Width);
+ else if (index % nCol != 0
+ && ((index / nCol) + 1) != nRow) // child other than placed at last column
+ aCurrPos.X -= (aChildSize.Width + fSpace * aChildSize.Width);
+
+ if (++nColIdx == nCol) // condition for next row
+ {
+ // if last row, then position children according to number of shapes.
+ if ((index + 1) % nCol != 0 && (index + 1) >= 4
+ && ((index + 1) / nCol + 1) == nRow && nCount != nRow * nCol
+ && ((index / nCol) + 1) % 2 == 0)
+ // position first child of last row
+ aCurrPos.X -= aChildSize.Width * 3 / 2;
+ else if ((index + 1) % nCol != 0 && (index + 1) >= 4
+ && ((index + 1) / nCol + 1) == nRow && nCount != nRow * nCol
+ && ((index / nCol) + 1) % 2 != 0)
+ aCurrPos.X = nStartX
+ + (nIncX * (aChildSize.Width + fSpace * aChildSize.Width)) / 2;
+ else if (((index / nCol) + 1) % 2 != 0)
+ aCurrPos.X = nStartX;
+
+ aCurrPos.Y += nIncY * (aChildSize.Height + fSpace * aChildSize.Height);
+ nColIdx = 0;
+ }
+
+ // positions children in the last row.
+ if (index % nCol != 0 && index >= 3 && ((index / nCol) + 1) == nRow
+ && ((index / nCol) + 1) % 2 == 0)
+ //if row%2=0 then start from left else
+ aCurrPos.X -= (nIncX * (aChildSize.Width + fSpace * aChildSize.Width));
+ else if (index % nCol != 0 && index >= 3 && ((index / nCol) + 1) == nRow
+ && ((index / nCol) + 1) % 2 != 0)
+ // start from right
+ aCurrPos.X += (nIncX * (aChildSize.Width + fSpace * aChildSize.Width));
+ }
+ break;
+ }
+}
+
+void PyraAlg::layoutShapeChildren(const ShapePtr& rShape)
+{
+ if (rShape->getChildren().empty() || rShape->getSize().Width == 0
+ || rShape->getSize().Height == 0)
+ return;
+
+ // const sal_Int32 nDir = maMap.count(XML_linDir) ? maMap.find(XML_linDir)->second : XML_fromT;
+ // const sal_Int32 npyraAcctPos = maMap.count(XML_pyraAcctPos) ? maMap.find(XML_pyraAcctPos)->second : XML_bef;
+ // const sal_Int32 ntxDir = maMap.count(XML_txDir) ? maMap.find(XML_txDir)->second : XML_fromT;
+ // const sal_Int32 npyraLvlNode = maMap.count(XML_pyraLvlNode) ? maMap.find(XML_pyraLvlNode)->second : XML_level;
+ // uncomment when use in code.
+
+ sal_Int32 nCount = rShape->getChildren().size();
+ double fAspectRatio = 0.32;
+
+ awt::Size aChildSize = rShape->getSize();
+ aChildSize.Width /= nCount;
+ aChildSize.Height /= nCount;
+
+ awt::Point aCurrPos(0, 0);
+ aCurrPos.X = fAspectRatio * aChildSize.Width * (nCount - 1);
+ aCurrPos.Y = fAspectRatio * aChildSize.Height;
+
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ aCurrShape->setPosition(aCurrPos);
+ if (nCount > 1)
+ {
+ aCurrPos.X -= aChildSize.Height / (nCount - 1);
+ }
+ aChildSize.Width += aChildSize.Height;
+ aCurrShape->setSize(aChildSize);
+ aCurrShape->setChildSize(aChildSize);
+ aCurrPos.Y += (aChildSize.Height);
+ }
+}
+
+bool CompositeAlg::inferFromLayoutProperty(const LayoutProperty& rMap, sal_Int32 nRefType,
+ sal_Int32& rValue)
+{
+ switch (nRefType)
+ {
+ case XML_r:
+ {
+ auto it = rMap.find(XML_l);
+ if (it == rMap.end())
+ {
+ return false;
+ }
+ sal_Int32 nLeft = it->second;
+ it = rMap.find(XML_w);
+ if (it == rMap.end())
+ {
+ return false;
+ }
+ rValue = nLeft + it->second;
+ return true;
+ }
+ default:
+ break;
+ }
+
+ return false;
+}
+
+void CompositeAlg::applyConstraintToLayout(const Constraint& rConstraint,
+ LayoutPropertyMap& rProperties)
+{
+ // TODO handle the case when we have ptType="...", not forName="...".
+ if (rConstraint.msForName.isEmpty())
+ {
+ return;
+ }
+
+ const LayoutPropertyMap::const_iterator aRef = rProperties.find(rConstraint.msRefForName);
+ if (aRef == rProperties.end())
+ return;
+
+ const LayoutProperty::const_iterator aRefType = aRef->second.find(rConstraint.mnRefType);
+ sal_Int32 nInferredValue = 0;
+ if (aRefType != aRef->second.end())
+ {
+ // Reference is found directly.
+ rProperties[rConstraint.msForName][rConstraint.mnType]
+ = aRefType->second * rConstraint.mfFactor;
+ }
+ else if (inferFromLayoutProperty(aRef->second, rConstraint.mnRefType, nInferredValue))
+ {
+ // Reference can be inferred.
+ rProperties[rConstraint.msForName][rConstraint.mnType]
+ = nInferredValue * rConstraint.mfFactor;
+ }
+ else
+ {
+ // Reference not found, assume a fixed value.
+ // Values are never in EMU, while oox::drawingml::Shape position and size are always in
+ // EMU.
+ const double fValue = o3tl::convert(rConstraint.mfValue,
+ isFontUnit(rConstraint.mnRefType) ? o3tl::Length::pt
+ : o3tl::Length::mm,
+ o3tl::Length::emu);
+ rProperties[rConstraint.msForName][rConstraint.mnType] = fValue;
+ }
+}
+
+void CompositeAlg::layoutShapeChildren(AlgAtom& rAlg, const ShapePtr& rShape,
+ const std::vector<Constraint>& rConstraints)
+{
+ LayoutPropertyMap aProperties;
+ LayoutProperty& rParent = aProperties[""];
+
+ sal_Int32 nParentXOffset = 0;
+
+ // Track min/max vertical positions, so we can center everything at the end, if needed.
+ sal_Int32 nVertMin = std::numeric_limits<sal_Int32>::max();
+ sal_Int32 nVertMax = 0;
+
+ if (rAlg.getAspectRatio() != 1.0)
+ {
+ rParent[XML_w] = rShape->getSize().Width;
+ rParent[XML_h] = rShape->getSize().Height;
+ rParent[XML_l] = 0;
+ rParent[XML_t] = 0;
+ rParent[XML_r] = rShape->getSize().Width;
+ rParent[XML_b] = rShape->getSize().Height;
+ }
+ else
+ {
+ // Shrink width to be only as large as height.
+ rParent[XML_w] = std::min(rShape->getSize().Width, rShape->getSize().Height);
+ rParent[XML_h] = rShape->getSize().Height;
+ if (rParent[XML_w] < rShape->getSize().Width)
+ nParentXOffset = (rShape->getSize().Width - rParent[XML_w]) / 2;
+ rParent[XML_l] = nParentXOffset;
+ rParent[XML_t] = 0;
+ rParent[XML_r] = rShape->getSize().Width - rParent[XML_l];
+ rParent[XML_b] = rShape->getSize().Height;
+ }
+
+ for (const auto& rConstr : rConstraints)
+ {
+ // Apply direct constraints for all layout nodes.
+ applyConstraintToLayout(rConstr, aProperties);
+ }
+
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ // Apply constraints from the current layout node for this child shape.
+ // Previous child shapes may have changed aProperties.
+ for (const auto& rConstr : rConstraints)
+ {
+ if (rConstr.msForName != aCurrShape->getInternalName())
+ {
+ continue;
+ }
+
+ applyConstraintToLayout(rConstr, aProperties);
+ }
+
+ // Apply constraints from the child layout node for this child shape.
+ // This builds on top of the own parent state + the state of previous shapes in the
+ // same composite algorithm.
+ const LayoutNode& rLayoutNode = rAlg.getLayoutNode();
+ for (const auto& pDirectChild : rLayoutNode.getChildren())
+ {
+ auto pLayoutNode = dynamic_cast<LayoutNode*>(pDirectChild.get());
+ if (!pLayoutNode)
+ {
+ continue;
+ }
+
+ if (pLayoutNode->getName() != aCurrShape->getInternalName())
+ {
+ continue;
+ }
+
+ for (const auto& pChild : pLayoutNode->getChildren())
+ {
+ auto pConstraintAtom = dynamic_cast<ConstraintAtom*>(pChild.get());
+ if (!pConstraintAtom)
+ {
+ continue;
+ }
+
+ const Constraint& rConstraint = pConstraintAtom->getConstraint();
+ if (!rConstraint.msForName.isEmpty())
+ {
+ continue;
+ }
+
+ if (!rConstraint.msRefForName.isEmpty())
+ {
+ continue;
+ }
+
+ // Either an absolute value or a factor of a property.
+ if (rConstraint.mfValue == 0.0 && rConstraint.mnRefType == XML_none)
+ {
+ continue;
+ }
+
+ Constraint aConstraint(rConstraint);
+ aConstraint.msForName = pLayoutNode->getName();
+ aConstraint.msRefForName = pLayoutNode->getName();
+
+ applyConstraintToLayout(aConstraint, aProperties);
+ }
+ }
+
+ awt::Size aSize = rShape->getSize();
+ awt::Point aPos(0, 0);
+
+ const LayoutPropertyMap::const_iterator aPropIt
+ = aProperties.find(aCurrShape->getInternalName());
+ if (aPropIt != aProperties.end())
+ {
+ const LayoutProperty& rProp = aPropIt->second;
+ LayoutProperty::const_iterator it, it2;
+
+ if ((it = rProp.find(XML_w)) != rProp.end())
+ aSize.Width = std::min(it->second, rShape->getSize().Width);
+ if ((it = rProp.find(XML_h)) != rProp.end())
+ aSize.Height = std::min(it->second, rShape->getSize().Height);
+
+ if ((it = rProp.find(XML_l)) != rProp.end())
+ aPos.X = it->second;
+ else if ((it = rProp.find(XML_ctrX)) != rProp.end())
+ aPos.X = it->second - aSize.Width / 2;
+ else if ((it = rProp.find(XML_r)) != rProp.end())
+ aPos.X = it->second - aSize.Width;
+
+ if ((it = rProp.find(XML_t)) != rProp.end())
+ aPos.Y = it->second;
+ else if ((it = rProp.find(XML_ctrY)) != rProp.end())
+ aPos.Y = it->second - aSize.Height / 2;
+ else if ((it = rProp.find(XML_b)) != rProp.end())
+ aPos.Y = it->second - aSize.Height;
+
+ if ((it = rProp.find(XML_l)) != rProp.end() && (it2 = rProp.find(XML_r)) != rProp.end())
+ aSize.Width = it2->second - it->second;
+ if ((it = rProp.find(XML_t)) != rProp.end() && (it2 = rProp.find(XML_b)) != rProp.end())
+ aSize.Height = it2->second - it->second;
+
+ aPos.X += nParentXOffset;
+ aSize.Width = std::min(aSize.Width, rShape->getSize().Width - aPos.X);
+ aSize.Height = std::min(aSize.Height, rShape->getSize().Height - aPos.Y);
+ }
+ else
+ SAL_WARN("oox.drawingml", "composite layout properties not found for shape "
+ << aCurrShape->getInternalName());
+
+ aCurrShape->setSize(aSize);
+ aCurrShape->setChildSize(aSize);
+ aCurrShape->setPosition(aPos);
+
+ nVertMin = std::min(aPos.Y, nVertMin);
+ nVertMax = std::max(aPos.Y + aSize.Height, nVertMax);
+
+ NamedShapePairs& rDiagramFontHeights
+ = rAlg.getLayoutNode().getDiagram().getDiagramFontHeights();
+ auto it = rDiagramFontHeights.find(aCurrShape->getInternalName());
+ if (it != rDiagramFontHeights.end())
+ {
+ // Internal name matches: put drawingml::Shape to the relevant group, for
+ // synchronized font height handling.
+ it->second.insert({ aCurrShape, {} });
+ }
+ }
+
+ // See if all vertical space is used or we have to center the content.
+ if (!(nVertMin >= 0 && nVertMin <= nVertMax && nVertMax <= rParent[XML_h]))
+ return;
+
+ sal_Int32 nDiff = rParent[XML_h] - (nVertMax - nVertMin);
+ if (nDiff > 0)
+ {
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ awt::Point aPosition = aCurrShape->getPosition();
+ aPosition.Y += nDiff / 2;
+ aCurrShape->setPosition(aPosition);
+ }
+ }
+}
+
+IteratorAttr::IteratorAttr( )
+ : mnCnt( -1 )
+ , mbHideLastTrans( true )
+ , mnPtType( 0 )
+ , mnSt( 0 )
+ , mnStep( 1 )
+{
+}
+
+void IteratorAttr::loadFromXAttr( const Reference< XFastAttributeList >& xAttr )
+{
+ AttributeList attr( xAttr );
+ maAxis = attr.getTokenList(XML_axis);
+ mnCnt = attr.getInteger( XML_cnt, -1 );
+ mbHideLastTrans = attr.getBool( XML_hideLastTrans, true );
+ mnSt = attr.getInteger( XML_st, 0 );
+ mnStep = attr.getInteger( XML_step, 1 );
+
+ // better to keep first token instead of error when multiple values
+ std::vector<sal_Int32> aPtTypes = attr.getTokenList(XML_ptType);
+ mnPtType = aPtTypes.empty() ? XML_all : aPtTypes.front();
+}
+
+ConditionAttr::ConditionAttr()
+ : mnFunc( 0 )
+ , mnArg( 0 )
+ , mnOp( 0 )
+ , mnVal( 0 )
+{
+}
+
+void ConditionAttr::loadFromXAttr( const Reference< XFastAttributeList >& xAttr )
+{
+ mnFunc = xAttr->getOptionalValueToken( XML_func, 0 );
+ mnArg = xAttr->getOptionalValueToken( XML_arg, XML_none );
+ mnOp = xAttr->getOptionalValueToken( XML_op, 0 );
+ msVal = xAttr->getOptionalValue( XML_val );
+ mnVal = xAttr->getOptionalValueToken( XML_val, 0 );
+}
+
+void LayoutAtom::dump(int level)
+{
+ SAL_INFO("oox.drawingml", "level = " << level << " - " << msName << " of type " << typeid(*this).name() );
+ for (const auto& pAtom : getChildren())
+ pAtom->dump(level + 1);
+}
+
+ForEachAtom::ForEachAtom(LayoutNode& rLayoutNode, const Reference< XFastAttributeList >& xAttributes) :
+ LayoutAtom(rLayoutNode)
+{
+ maIter.loadFromXAttr(xAttributes);
+}
+
+void ForEachAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+LayoutAtomPtr ForEachAtom::getRefAtom()
+{
+ if (!msRef.isEmpty())
+ {
+ const LayoutAtomMap& rLayoutAtomMap = getLayoutNode().getDiagram().getLayout()->getLayoutAtomMap();
+ LayoutAtomMap::const_iterator pRefAtom = rLayoutAtomMap.find(msRef);
+ if (pRefAtom != rLayoutAtomMap.end())
+ return pRefAtom->second;
+ else
+ SAL_WARN("oox.drawingml", "ForEach reference \"" << msRef << "\" not found");
+ }
+ return LayoutAtomPtr();
+}
+
+void ChooseAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+ConditionAtom::ConditionAtom(LayoutNode& rLayoutNode, bool isElse, const Reference< XFastAttributeList >& xAttributes) :
+ LayoutAtom(rLayoutNode),
+ mIsElse(isElse)
+{
+ maIter.loadFromXAttr( xAttributes );
+ maCond.loadFromXAttr( xAttributes );
+}
+
+bool ConditionAtom::compareResult(sal_Int32 nOperator, sal_Int32 nFirst, sal_Int32 nSecond)
+{
+ switch (nOperator)
+ {
+ case XML_equ: return nFirst == nSecond;
+ case XML_gt: return nFirst > nSecond;
+ case XML_gte: return nFirst >= nSecond;
+ case XML_lt: return nFirst < nSecond;
+ case XML_lte: return nFirst <= nSecond;
+ case XML_neq: return nFirst != nSecond;
+ default:
+ SAL_WARN("oox.drawingml", "unsupported operator: " << nOperator);
+ return false;
+ }
+}
+
+namespace
+{
+/**
+ * Takes the connection list from rLayoutNode, navigates from rFrom on an edge
+ * of type nType, using a direction determined by bSourceToDestination.
+ */
+OUString navigate(LayoutNode& rLayoutNode, svx::diagram::TypeConstant nType, std::u16string_view rFrom,
+ bool bSourceToDestination)
+{
+ for (const auto& rConnection : rLayoutNode.getDiagram().getData()->getConnections())
+ {
+ if (rConnection.mnXMLType != nType)
+ continue;
+
+ if (bSourceToDestination)
+ {
+ if (rConnection.msSourceId == rFrom)
+ return rConnection.msDestId;
+ }
+ else
+ {
+ if (rConnection.msDestId == rFrom)
+ return rConnection.msSourceId;
+ }
+ }
+
+ return OUString();
+}
+
+sal_Int32 calcMaxDepth(std::u16string_view rNodeName, const svx::diagram::Connections& rConnections)
+{
+ sal_Int32 nMaxLength = 0;
+ for (auto const& aCxn : rConnections)
+ if (aCxn.mnXMLType == svx::diagram::TypeConstant::XML_parOf && aCxn.msSourceId == rNodeName)
+ nMaxLength = std::max(nMaxLength, calcMaxDepth(aCxn.msDestId, rConnections) + 1);
+
+ return nMaxLength;
+}
+}
+
+sal_Int32 ConditionAtom::getNodeCount(const svx::diagram::Point* pPresPoint) const
+{
+ sal_Int32 nCount = 0;
+ OUString sNodeId = pPresPoint->msPresentationAssociationId;
+
+ // HACK: special case - count children of first child
+ if (maIter.maAxis.size() == 2 && maIter.maAxis[0] == XML_ch && maIter.maAxis[1] == XML_ch)
+ sNodeId = navigate(mrLayoutNode, svx::diagram::TypeConstant::XML_parOf, sNodeId, /*bSourceToDestination*/ true);
+
+ if (!sNodeId.isEmpty())
+ {
+ for (const auto& aCxn : mrLayoutNode.getDiagram().getData()->getConnections())
+ if (aCxn.mnXMLType == svx::diagram::TypeConstant::XML_parOf && aCxn.msSourceId == sNodeId)
+ nCount++;
+ }
+
+ return nCount;
+}
+
+bool ConditionAtom::getDecision(const svx::diagram::Point* pPresPoint) const
+{
+ if (mIsElse)
+ return true;
+ if (!pPresPoint)
+ return false;
+
+ switch (maCond.mnFunc)
+ {
+ case XML_var:
+ {
+ if (maCond.mnArg == XML_dir)
+ return compareResult(maCond.mnOp, pPresPoint->mnDirection, maCond.mnVal);
+ else if (maCond.mnArg == XML_hierBranch)
+ {
+ sal_Int32 nHierarchyBranch = pPresPoint->moHierarchyBranch.value_or(XML_std);
+ if (!pPresPoint->moHierarchyBranch.has_value())
+ {
+ // If <dgm:hierBranch> is missing in the current presentation
+ // point, ask the parent.
+ OUString aParent = navigate(mrLayoutNode, svx::diagram::TypeConstant::XML_presParOf, pPresPoint->msModelId,
+ /*bSourceToDestination*/ false);
+ DiagramData::PointNameMap& rPointNameMap
+ = mrLayoutNode.getDiagram().getData()->getPointNameMap();
+ auto it = rPointNameMap.find(aParent);
+ if (it != rPointNameMap.end())
+ {
+ const svx::diagram::Point* pParent = it->second;
+ if (pParent->moHierarchyBranch.has_value())
+ nHierarchyBranch = pParent->moHierarchyBranch.value();
+ }
+ }
+ return compareResult(maCond.mnOp, nHierarchyBranch, maCond.mnVal);
+ }
+ break;
+ }
+
+ case XML_cnt:
+ return compareResult(maCond.mnOp, getNodeCount(pPresPoint), maCond.msVal.toInt32());
+
+ case XML_maxDepth:
+ {
+ sal_Int32 nMaxDepth = calcMaxDepth(pPresPoint->msPresentationAssociationId, mrLayoutNode.getDiagram().getData()->getConnections());
+ return compareResult(maCond.mnOp, nMaxDepth, maCond.msVal.toInt32());
+ }
+
+ case XML_depth:
+ case XML_pos:
+ case XML_revPos:
+ case XML_posEven:
+ case XML_posOdd:
+ // TODO
+ default:
+ SAL_WARN("oox.drawingml", "unknown function " << maCond.mnFunc);
+ break;
+ }
+
+ return true;
+}
+
+void ConditionAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+void ConstraintAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+void RuleAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+void ConstraintAtom::parseConstraint(std::vector<Constraint>& rConstraints,
+ bool bRequireForName) const
+{
+ // Allowlist for cases where empty forName is handled.
+ if (bRequireForName)
+ {
+ switch (maConstraint.mnType)
+ {
+ case XML_sp:
+ case XML_lMarg:
+ case XML_rMarg:
+ case XML_tMarg:
+ case XML_bMarg:
+ bRequireForName = false;
+ break;
+ }
+ switch (maConstraint.mnPointType)
+ {
+ case XML_sibTrans:
+ bRequireForName = false;
+ break;
+ }
+ }
+
+ if (bRequireForName && maConstraint.msForName.isEmpty())
+ return;
+
+ // accepting only basic equality constraints
+ if ((maConstraint.mnOperator == XML_none || maConstraint.mnOperator == XML_equ)
+ && maConstraint.mnType != XML_none)
+ {
+ rConstraints.push_back(maConstraint);
+ }
+}
+
+void RuleAtom::parseRule(std::vector<Rule>& rRules) const
+{
+ if (!maRule.msForName.isEmpty())
+ {
+ rRules.push_back(maRule);
+ }
+}
+
+void AlgAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+sal_Int32 AlgAtom::getConnectorType()
+{
+ sal_Int32 nConnRout = 0;
+ sal_Int32 nBegSty = 0;
+ sal_Int32 nEndSty = 0;
+ if (maMap.count(oox::XML_connRout))
+ nConnRout = maMap.find(oox::XML_connRout)->second;
+ if (maMap.count(oox::XML_begSty))
+ nBegSty = maMap.find(oox::XML_begSty)->second;
+ if (maMap.count(oox::XML_endSty))
+ nEndSty = maMap.find(oox::XML_endSty)->second;
+
+ if (nConnRout == oox::XML_bend)
+ return 0; // was oox::XML_bentConnector3 - connectors are hidden in org chart as they don't work anyway
+ if (nBegSty == oox::XML_arr && nEndSty == oox::XML_arr)
+ return oox::XML_leftRightArrow;
+ if (nBegSty == oox::XML_arr)
+ return oox::XML_leftArrow;
+ if (nEndSty == oox::XML_arr)
+ return oox::XML_rightArrow;
+
+ return oox::XML_rightArrow;
+}
+
+sal_Int32 AlgAtom::getVerticalShapesCount(const ShapePtr& rShape)
+{
+ if (rShape->getChildren().empty())
+ return (rShape->getSubType() != XML_conn) ? 1 : 0;
+
+ sal_Int32 nDir = XML_fromL;
+ if (mnType == XML_hierRoot)
+ nDir = XML_fromT;
+ else if (maMap.count(XML_linDir))
+ nDir = maMap.find(XML_linDir)->second;
+
+ const sal_Int32 nSecDir = maMap.count(XML_secLinDir) ? maMap.find(XML_secLinDir)->second : 0;
+
+ sal_Int32 nCount = 0;
+ if (nDir == XML_fromT || nDir == XML_fromB)
+ {
+ for (const ShapePtr& pChild : rShape->getChildren())
+ nCount += pChild->getVerticalShapesCount();
+ }
+ else if ((nDir == XML_fromL || nDir == XML_fromR) && nSecDir == XML_fromT)
+ {
+ for (const ShapePtr& pChild : rShape->getChildren())
+ nCount += pChild->getVerticalShapesCount();
+ nCount = (nCount + 1) / 2;
+ }
+ else
+ {
+ for (const ShapePtr& pChild : rShape->getChildren())
+ nCount = std::max(nCount, pChild->getVerticalShapesCount());
+ }
+
+ return nCount;
+}
+
+namespace
+{
+/// Does the first data node of this shape have customized text properties?
+bool HasCustomText(const ShapePtr& rShape, LayoutNode& rLayoutNode)
+{
+ const PresPointShapeMap& rPresPointShapeMap
+ = rLayoutNode.getDiagram().getLayout()->getPresPointShapeMap();
+ const DiagramData::StringMap& rPresOfNameMap
+ = rLayoutNode.getDiagram().getData()->getPresOfNameMap();
+ const DiagramData::PointNameMap& rPointNameMap
+ = rLayoutNode.getDiagram().getData()->getPointNameMap();
+ // Get the first presentation node of the shape.
+ const svx::diagram::Point* pPresNode = nullptr;
+ for (const auto& rPair : rPresPointShapeMap)
+ {
+ if (rPair.second == rShape)
+ {
+ pPresNode = rPair.first;
+ break;
+ }
+ }
+ // Get the first data node of the presentation node.
+ svx::diagram::Point* pDataNode = nullptr;
+ if (pPresNode)
+ {
+ auto itPresToData = rPresOfNameMap.find(pPresNode->msModelId);
+ if (itPresToData != rPresOfNameMap.end())
+ {
+ for (const auto& rPair : itPresToData->second)
+ {
+ const DiagramData::SourceIdAndDepth& rItem = rPair.second;
+ auto it = rPointNameMap.find(rItem.msSourceId);
+ if (it != rPointNameMap.end())
+ {
+ pDataNode = it->second;
+ break;
+ }
+ }
+ }
+ }
+
+ // If we have a data node, see if its text is customized or not.
+ if (pDataNode)
+ {
+ return pDataNode->mbCustomText;
+ }
+
+ return false;
+}
+}
+
+void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>& rConstraints,
+ const std::vector<Rule>& rRules)
+{
+ if (mnType != XML_lin)
+ {
+ // TODO Handle spacing from constraints for non-lin algorithms as well.
+ rShape->getChildren().erase(
+ std::remove_if(rShape->getChildren().begin(), rShape->getChildren().end(),
+ [](const ShapePtr& aChild) {
+ return aChild->getServiceName() == "com.sun.star.drawing.GroupShape"
+ && aChild->getChildren().empty();
+ }),
+ rShape->getChildren().end());
+ }
+
+ switch(mnType)
+ {
+ case XML_composite:
+ {
+ CompositeAlg::layoutShapeChildren(*this, rShape, rConstraints);
+ break;
+ }
+
+ case XML_conn:
+ {
+ if (rShape->getSubType() == XML_conn)
+ {
+ // There is no shape type "conn", replace it by an arrow based
+ // on the direction of the parent linear layout.
+ sal_Int32 nType = getConnectorType();
+
+ rShape->setSubType(nType);
+ rShape->getCustomShapeProperties()->setShapePresetType(nType);
+ }
+
+ // Parse constraints to adjust the size.
+ std::vector<Constraint> aDirectConstraints;
+ const LayoutNode& rLayoutNode = getLayoutNode();
+ for (const auto& pChild : rLayoutNode.getChildren())
+ {
+ auto pConstraintAtom = dynamic_cast<ConstraintAtom*>(pChild.get());
+ if (pConstraintAtom)
+ pConstraintAtom->parseConstraint(aDirectConstraints, /*bRequireForName=*/false);
+ }
+
+ LayoutPropertyMap aProperties;
+ LayoutProperty& rParent = aProperties[""];
+ rParent[XML_w] = rShape->getSize().Width;
+ rParent[XML_h] = rShape->getSize().Height;
+ rParent[XML_l] = 0;
+ rParent[XML_t] = 0;
+ rParent[XML_r] = rShape->getSize().Width;
+ rParent[XML_b] = rShape->getSize().Height;
+ for (const auto& rConstr : aDirectConstraints)
+ {
+ const LayoutPropertyMap::const_iterator aRef
+ = aProperties.find(rConstr.msRefForName);
+ if (aRef != aProperties.end())
+ {
+ const LayoutProperty::const_iterator aRefType
+ = aRef->second.find(rConstr.mnRefType);
+ if (aRefType != aRef->second.end())
+ aProperties[rConstr.msForName][rConstr.mnType]
+ = aRefType->second * rConstr.mfFactor;
+ }
+ }
+ awt::Size aSize;
+ aSize.Width = rParent[XML_w];
+ aSize.Height = rParent[XML_h];
+ // keep center position
+ awt::Point aPos = rShape->getPosition();
+ aPos.X += (rShape->getSize().Width - aSize.Width) / 2;
+ aPos.Y += (rShape->getSize().Height - aSize.Height) / 2;
+ rShape->setPosition(aPos);
+ rShape->setSize(aSize);
+ break;
+ }
+
+ case XML_cycle:
+ {
+ if (rShape->getChildren().empty())
+ break;
+
+ const sal_Int32 nStartAngle = maMap.count(XML_stAng) ? maMap.find(XML_stAng)->second : 0;
+ const sal_Int32 nSpanAngle = maMap.count(XML_spanAng) ? maMap.find(XML_spanAng)->second : 360;
+ const sal_Int32 nRotationPath = maMap.count(XML_rotPath) ? maMap.find(XML_rotPath)->second : XML_none;
+ const sal_Int32 nctrShpMap = maMap.count(XML_ctrShpMap) ? maMap.find(XML_ctrShpMap)->second : XML_none;
+ const awt::Size aCenter(rShape->getSize().Width / 2, rShape->getSize().Height / 2);
+ const awt::Size aChildSize(rShape->getSize().Width / 4, rShape->getSize().Height / 4);
+ const awt::Size aConnectorSize(rShape->getSize().Width / 12, rShape->getSize().Height / 12);
+ const sal_Int32 nRadius = std::min(
+ (rShape->getSize().Width - aChildSize.Width) / 2,
+ (rShape->getSize().Height - aChildSize.Height) / 2);
+
+ std::vector<oox::drawingml::ShapePtr> aCycleChildren = rShape->getChildren();
+
+ if (nctrShpMap == XML_fNode)
+ {
+ // first node placed in center, others around
+ oox::drawingml::ShapePtr pCenterShape = aCycleChildren.front();
+ aCycleChildren.erase(aCycleChildren.begin());
+ const awt::Point aCurrPos(aCenter.Width - aChildSize.Width / 2,
+ aCenter.Height - aChildSize.Height / 2);
+ pCenterShape->setPosition(aCurrPos);
+ pCenterShape->setSize(aChildSize);
+ pCenterShape->setChildSize(aChildSize);
+ }
+
+ const sal_Int32 nShapes = aCycleChildren.size();
+ if (nShapes)
+ {
+ const sal_Int32 nConnectorRadius = nRadius * cos(basegfx::deg2rad(nSpanAngle / nShapes));
+ const sal_Int32 nConnectorAngle = nSpanAngle > 0 ? 0 : 180;
+
+ sal_Int32 idx = 0;
+ for (auto & aCurrShape : aCycleChildren)
+ {
+ const double fAngle = static_cast<double>(idx)*nSpanAngle/nShapes + nStartAngle;
+ awt::Size aCurrSize = aChildSize;
+ sal_Int32 nCurrRadius = nRadius;
+ if (aCurrShape->getSubType() == XML_conn)
+ {
+ aCurrSize = aConnectorSize;
+ nCurrRadius = nConnectorRadius;
+ }
+ const awt::Point aCurrPos(
+ aCenter.Width + nCurrRadius*sin(basegfx::deg2rad(fAngle)) - aCurrSize.Width/2,
+ aCenter.Height - nCurrRadius*cos(basegfx::deg2rad(fAngle)) - aCurrSize.Height/2);
+
+ aCurrShape->setPosition(aCurrPos);
+ aCurrShape->setSize(aCurrSize);
+ aCurrShape->setChildSize(aCurrSize);
+
+ if (nRotationPath == XML_alongPath)
+ aCurrShape->setRotation(fAngle * PER_DEGREE);
+
+ // connectors should be handled in conn, but we don't have
+ // reference to previous and next child, so it's easier here
+ if (aCurrShape->getSubType() == XML_conn)
+ aCurrShape->setRotation((nConnectorAngle + fAngle) * PER_DEGREE);
+
+ idx++;
+ }
+ }
+ break;
+ }
+
+ case XML_hierChild:
+ case XML_hierRoot:
+ {
+ if (rShape->getChildren().empty() || rShape->getSize().Width == 0 || rShape->getSize().Height == 0)
+ break;
+
+ // hierRoot is the manager -> employees vertical linear path,
+ // hierChild is the first employee -> last employee horizontal
+ // linear path.
+ sal_Int32 nDir = XML_fromL;
+ if (mnType == XML_hierRoot)
+ nDir = XML_fromT;
+ else if (maMap.count(XML_linDir))
+ nDir = maMap.find(XML_linDir)->second;
+
+ const sal_Int32 nSecDir = maMap.count(XML_secLinDir) ? maMap.find(XML_secLinDir)->second : 0;
+
+ sal_Int32 nCount = rShape->getChildren().size();
+
+ if (mnType == XML_hierChild)
+ {
+ // Connectors should not influence the size of non-connect shapes.
+ nCount = std::count_if(
+ rShape->getChildren().begin(), rShape->getChildren().end(),
+ [](const ShapePtr& pShape) { return pShape->getSubType() != XML_conn; });
+ }
+
+ const double fSpaceWidth = 0.1;
+ const double fSpaceHeight = 0.3;
+
+ if (mnType == XML_hierRoot && nCount == 3)
+ {
+ // Order assistant nodes above employee nodes.
+ std::vector<ShapePtr>& rChildren = rShape->getChildren();
+ if (!containsDataNodeType(rChildren[1], XML_asst)
+ && containsDataNodeType(rChildren[2], XML_asst))
+ std::swap(rChildren[1], rChildren[2]);
+ }
+
+ sal_Int32 nHorizontalShapesCount = 1;
+ if (nSecDir == XML_fromT)
+ nHorizontalShapesCount = 2;
+ else if (nDir == XML_fromL || nDir == XML_fromR)
+ nHorizontalShapesCount = nCount;
+
+ awt::Size aChildSize = rShape->getSize();
+ aChildSize.Height /= (rShape->getVerticalShapesCount() + (rShape->getVerticalShapesCount() - 1) * fSpaceHeight);
+ aChildSize.Width /= (nHorizontalShapesCount + (nHorizontalShapesCount - 1) * fSpaceWidth);
+
+ awt::Size aConnectorSize = aChildSize;
+ aConnectorSize.Width = 1;
+
+ awt::Point aChildPos(0, 0);
+
+ // indent children to show they are descendants, not siblings
+ if (mnType == XML_hierChild && nHorizontalShapesCount == 1)
+ {
+ const double fChildIndent = 0.1;
+ aChildPos.X = aChildSize.Width * fChildIndent;
+ aChildSize.Width *= (1 - 2 * fChildIndent);
+ }
+
+ sal_Int32 nIdx = 0;
+ sal_Int32 nRowHeight = 0;
+ for (auto& pChild : rShape->getChildren())
+ {
+ pChild->setPosition(aChildPos);
+
+ if (mnType == XML_hierChild && pChild->getSubType() == XML_conn)
+ {
+ // Connectors should not influence the position of
+ // non-connect shapes.
+ pChild->setSize(aConnectorSize);
+ pChild->setChildSize(aConnectorSize);
+ continue;
+ }
+
+ awt::Size aCurrSize = aChildSize;
+ aCurrSize.Height *= pChild->getVerticalShapesCount() + (pChild->getVerticalShapesCount() - 1) * fSpaceHeight;
+
+ pChild->setSize(aCurrSize);
+ pChild->setChildSize(aCurrSize);
+
+ if (nDir == XML_fromT || nDir == XML_fromB)
+ aChildPos.Y += aCurrSize.Height + aChildSize.Height * fSpaceHeight;
+ else
+ aChildPos.X += aCurrSize.Width + aCurrSize.Width * fSpaceWidth;
+
+ nRowHeight = std::max(nRowHeight, aCurrSize.Height);
+
+ if (nSecDir == XML_fromT && nIdx % 2 == 1)
+ {
+ aChildPos.X = 0;
+ aChildPos.Y += nRowHeight + aChildSize.Height * fSpaceHeight;
+ nRowHeight = 0;
+ }
+
+ nIdx++;
+ }
+
+ break;
+ }
+
+ case XML_lin:
+ {
+ // spread children evenly across one axis, stretch across second
+
+ if (rShape->getChildren().empty() || rShape->getSize().Width == 0 || rShape->getSize().Height == 0)
+ break;
+
+ const sal_Int32 nDir = maMap.count(XML_linDir) ? maMap.find(XML_linDir)->second : XML_fromL;
+ const sal_Int32 nIncX = nDir==XML_fromL ? 1 : (nDir==XML_fromR ? -1 : 0);
+ const sal_Int32 nIncY = nDir==XML_fromT ? 1 : (nDir==XML_fromB ? -1 : 0);
+
+ double fCount = rShape->getChildren().size();
+ sal_Int32 nConnectorAngle = 0;
+ switch (nDir)
+ {
+ case XML_fromL: nConnectorAngle = 0; break;
+ case XML_fromR: nConnectorAngle = 180; break;
+ case XML_fromT: nConnectorAngle = 270; break;
+ case XML_fromB: nConnectorAngle = 90; break;
+ }
+
+ awt::Size aSpaceSize;
+
+ // Find out which constraint is relevant for which (internal) name.
+ LayoutPropertyMap aProperties;
+ for (const auto& rConstraint : rConstraints)
+ {
+ if (rConstraint.msForName.isEmpty())
+ continue;
+
+ LayoutProperty& rProperty = aProperties[rConstraint.msForName];
+ if (rConstraint.mnType == XML_w)
+ {
+ rProperty[XML_w] = rShape->getSize().Width * rConstraint.mfFactor;
+ if (rProperty[XML_w] > rShape->getSize().Width)
+ {
+ rProperty[XML_w] = rShape->getSize().Width;
+ }
+ }
+ if (rConstraint.mnType == XML_h)
+ {
+ rProperty[XML_h] = rShape->getSize().Height * rConstraint.mfFactor;
+ if (rProperty[XML_h] > rShape->getSize().Height)
+ {
+ rProperty[XML_h] = rShape->getSize().Height;
+ }
+ }
+
+ if (rConstraint.mnType == XML_primFontSz && rConstraint.mnFor == XML_des
+ && rConstraint.mnOperator == XML_equ)
+ {
+ NamedShapePairs& rDiagramFontHeights
+ = getLayoutNode().getDiagram().getDiagramFontHeights();
+ auto it = rDiagramFontHeights.find(rConstraint.msForName);
+ if (it == rDiagramFontHeights.end())
+ {
+ // Start tracking all shapes with this internal name: they'll have the same
+ // font height.
+ rDiagramFontHeights[rConstraint.msForName] = {};
+ }
+ }
+
+ // TODO: get values from differently named constraints as well
+ if (rConstraint.msForName == "sp" || rConstraint.msForName == "space" || rConstraint.msForName == "sibTrans")
+ {
+ if (rConstraint.mnType == XML_w)
+ aSpaceSize.Width = rShape->getSize().Width * rConstraint.mfFactor;
+ if (rConstraint.mnType == XML_h)
+ aSpaceSize.Height = rShape->getSize().Height * rConstraint.mfFactor;
+ }
+ }
+
+ // first approximation of children size
+ std::set<OUString> aChildrenToShrink;
+ for (const auto& rRule : rRules)
+ {
+ // Consider rules: when scaling down, only change children where the rule allows
+ // doing so.
+ aChildrenToShrink.insert(rRule.msForName);
+ }
+
+ if (nDir == XML_fromT || nDir == XML_fromB)
+ {
+ // TODO consider rules for vertical linear layout as well.
+ aChildrenToShrink.clear();
+ }
+
+ if (!aChildrenToShrink.empty())
+ {
+ // Have scaling info from rules: then only count scaled children.
+ // Also count children which are a fraction of a scaled child.
+ std::set<OUString> aChildrenToShrinkDeps;
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ if (aChildrenToShrink.find(aCurrShape->getInternalName())
+ == aChildrenToShrink.end())
+ {
+ if (fCount > 1.0)
+ {
+ fCount -= 1.0;
+
+ bool bIsDependency = false;
+ double fFactor = 0;
+ for (const auto& rConstraint : rConstraints)
+ {
+ if (rConstraint.msForName != aCurrShape->getInternalName())
+ {
+ continue;
+ }
+
+ if ((nDir == XML_fromL || nDir == XML_fromR) && rConstraint.mnType != XML_w)
+ {
+ continue;
+ }
+ if ((nDir == XML_fromL || nDir == XML_fromR) && rConstraint.mnType == XML_w)
+ {
+ fFactor = rConstraint.mfFactor;
+ }
+
+ if ((nDir == XML_fromT || nDir == XML_fromB) && rConstraint.mnType != XML_h)
+ {
+ continue;
+ }
+ if ((nDir == XML_fromT || nDir == XML_fromB) && rConstraint.mnType == XML_h)
+ {
+ fFactor = rConstraint.mfFactor;
+ }
+
+ if (aChildrenToShrink.find(rConstraint.msRefForName) == aChildrenToShrink.end())
+ {
+ continue;
+ }
+
+ // At this point we have a child with a size which is a factor of an
+ // other child which will be scaled.
+ fCount += rConstraint.mfFactor;
+ aChildrenToShrinkDeps.insert(aCurrShape->getInternalName());
+ bIsDependency = true;
+ break;
+ }
+
+ if (!bIsDependency && aCurrShape->getServiceName() == "com.sun.star.drawing.GroupShape")
+ {
+ bool bScaleDownEmptySpacing = false;
+ if (nDir == XML_fromL || nDir == XML_fromR)
+ {
+ oox::OptValue<sal_Int32> oWidth = findProperty(aProperties, aCurrShape->getInternalName(), XML_w);
+ bScaleDownEmptySpacing = oWidth.has() && oWidth.get() > 0;
+ }
+ if (!bScaleDownEmptySpacing && (nDir == XML_fromT || nDir == XML_fromB))
+ {
+ oox::OptValue<sal_Int32> oHeight = findProperty(aProperties, aCurrShape->getInternalName(), XML_h);
+ bScaleDownEmptySpacing = oHeight.has() && oHeight.get() > 0;
+ }
+ if (bScaleDownEmptySpacing && aCurrShape->getChildren().empty())
+ {
+ fCount += fFactor;
+ aChildrenToShrinkDeps.insert(aCurrShape->getInternalName());
+ }
+ }
+ }
+ }
+ }
+
+ aChildrenToShrink.insert(aChildrenToShrinkDeps.begin(), aChildrenToShrinkDeps.end());
+
+ // No manual spacing: spacings are children as well.
+ aSpaceSize = awt::Size();
+ }
+ else
+ {
+ // TODO Handle spacing from constraints without rules as well.
+ rShape->getChildren().erase(
+ std::remove_if(rShape->getChildren().begin(), rShape->getChildren().end(),
+ [](const ShapePtr& aChild) {
+ return aChild->getServiceName()
+ == "com.sun.star.drawing.GroupShape"
+ && aChild->getChildren().empty();
+ }),
+ rShape->getChildren().end());
+ fCount = rShape->getChildren().size();
+ }
+ awt::Size aChildSize = rShape->getSize();
+ if (nDir == XML_fromL || nDir == XML_fromR)
+ aChildSize.Width /= fCount;
+ else if (nDir == XML_fromT || nDir == XML_fromB)
+ aChildSize.Height /= fCount;
+
+ awt::Point aCurrPos(0, 0);
+ if (nIncX == -1)
+ aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
+ if (nIncY == -1)
+ aCurrPos.Y = rShape->getSize().Height - aChildSize.Height;
+
+ // See if children requested more than 100% space in total: scale
+ // down in that case.
+ awt::Size aTotalSize;
+ for (const auto & aCurrShape : rShape->getChildren())
+ {
+ oox::OptValue<sal_Int32> oWidth = findProperty(aProperties, aCurrShape->getInternalName(), XML_w);
+ oox::OptValue<sal_Int32> oHeight = findProperty(aProperties, aCurrShape->getInternalName(), XML_h);
+ awt::Size aSize = aChildSize;
+ if (oWidth.has())
+ aSize.Width = oWidth.get();
+ if (oHeight.has())
+ aSize.Height = oHeight.get();
+ aTotalSize.Width += aSize.Width;
+ aTotalSize.Height += aSize.Height;
+ }
+
+ aTotalSize.Width += (fCount-1) * aSpaceSize.Width;
+ aTotalSize.Height += (fCount-1) * aSpaceSize.Height;
+
+ double fWidthScale = 1.0;
+ double fHeightScale = 1.0;
+ if (nIncX && aTotalSize.Width > rShape->getSize().Width)
+ fWidthScale = static_cast<double>(rShape->getSize().Width) / aTotalSize.Width;
+ if (nIncY && aTotalSize.Height > rShape->getSize().Height)
+ fHeightScale = static_cast<double>(rShape->getSize().Height) / aTotalSize.Height;
+ aSpaceSize.Width *= fWidthScale;
+ aSpaceSize.Height *= fHeightScale;
+
+ for (auto& aCurrShape : rShape->getChildren())
+ {
+ // Extract properties relevant for this shape from constraints.
+ oox::OptValue<sal_Int32> oWidth = findProperty(aProperties, aCurrShape->getInternalName(), XML_w);
+ oox::OptValue<sal_Int32> oHeight = findProperty(aProperties, aCurrShape->getInternalName(), XML_h);
+
+ awt::Size aSize = aChildSize;
+ if (oWidth.has())
+ aSize.Width = oWidth.get();
+ if (oHeight.has())
+ aSize.Height = oHeight.get();
+ if (aChildrenToShrink.empty()
+ || aChildrenToShrink.find(aCurrShape->getInternalName())
+ != aChildrenToShrink.end())
+ {
+ aSize.Width *= fWidthScale;
+ }
+ if (aChildrenToShrink.empty()
+ || aChildrenToShrink.find(aCurrShape->getInternalName())
+ != aChildrenToShrink.end())
+ {
+ aSize.Height *= fHeightScale;
+ }
+ aCurrShape->setSize(aSize);
+ aCurrShape->setChildSize(aSize);
+
+ // center in the other axis - probably some parameter controls it
+ if (nIncX)
+ aCurrPos.Y = (rShape->getSize().Height - aSize.Height) / 2;
+ if (nIncY)
+ aCurrPos.X = (rShape->getSize().Width - aSize.Width) / 2;
+ if (aCurrPos.X < 0)
+ {
+ aCurrPos.X = 0;
+ }
+ if (aCurrPos.Y < 0)
+ {
+ aCurrPos.Y = 0;
+ }
+
+ aCurrShape->setPosition(aCurrPos);
+
+ aCurrPos.X += nIncX * (aSize.Width + aSpaceSize.Width);
+ aCurrPos.Y += nIncY * (aSize.Height + aSpaceSize.Height);
+
+ // connectors should be handled in conn, but we don't have
+ // reference to previous and next child, so it's easier here
+ if (aCurrShape->getSubType() == XML_conn)
+ aCurrShape->setRotation(nConnectorAngle * PER_DEGREE);
+ }
+
+ // Newer shapes are behind older ones by default. Reverse this if requested.
+ sal_Int32 nChildOrder = XML_b;
+ const LayoutNode* pParentLayoutNode = nullptr;
+ for (LayoutAtomPtr pAtom = getParent(); pAtom; pAtom = pAtom->getParent())
+ {
+ auto pLayoutNode = dynamic_cast<LayoutNode*>(pAtom.get());
+ if (pLayoutNode)
+ {
+ pParentLayoutNode = pLayoutNode;
+ break;
+ }
+ }
+ if (pParentLayoutNode)
+ {
+ nChildOrder = pParentLayoutNode->getChildOrder();
+ }
+ if (nChildOrder == XML_t)
+ {
+ std::reverse(rShape->getChildren().begin(), rShape->getChildren().end());
+ }
+
+ break;
+ }
+
+ case XML_pyra:
+ {
+ PyraAlg::layoutShapeChildren(rShape);
+ break;
+ }
+
+ case XML_snake:
+ {
+ SnakeAlg::layoutShapeChildren(*this, rShape, rConstraints);
+ break;
+ }
+
+ case XML_sp:
+ {
+ // HACK: Handled one level higher. Or rather, planned to
+ // HACK: text should appear only in tx node; we're assigning it earlier, so let's remove it here
+ rShape->setTextBody(TextBodyPtr());
+ break;
+ }
+
+ case XML_tx:
+ {
+ // adjust text alignment
+
+ // Parse constraints, only self margins as a start.
+ double fFontSize = 0;
+ for (const auto& rConstr : rConstraints)
+ {
+ if (rConstr.mnRefType == XML_w)
+ {
+ if (!rConstr.msForName.isEmpty())
+ continue;
+
+ sal_Int32 nProperty = getPropertyFromConstraint(rConstr.mnType);
+ if (!nProperty)
+ continue;
+
+ // PowerPoint takes size as points, but gives margin as MMs.
+ double fFactor = convertPointToMms(rConstr.mfFactor);
+
+ // DrawingML works in EMUs, UNO API works in MM100s.
+ sal_Int32 nValue = o3tl::convert(rShape->getSize().Width * fFactor,
+ o3tl::Length::emu, o3tl::Length::mm100);
+
+ rShape->getShapeProperties().setProperty(nProperty, nValue);
+ }
+ if (rConstr.mnType == XML_primFontSz)
+ fFontSize = rConstr.mfValue;
+ }
+
+ TextBodyPtr pTextBody = rShape->getTextBody();
+ if (!pTextBody || pTextBody->isEmpty())
+ break;
+
+ // adjust text size to fit shape
+ if (fFontSize != 0)
+ {
+ for (auto& aParagraph : pTextBody->getParagraphs())
+ for (auto& aRun : aParagraph->getRuns())
+ if (!aRun->getTextCharacterProperties().moHeight.has())
+ aRun->getTextCharacterProperties().moHeight = fFontSize * 100;
+ }
+
+ if (!HasCustomText(rShape, getLayoutNode()))
+ {
+ // No customized text properties: enable autofit.
+ pTextBody->getTextProperties().maPropertyMap.setProperty(
+ PROP_TextFitToSize, drawing::TextFitToSizeType_AUTOFIT);
+ }
+
+ // ECMA-376-1:2016 21.4.7.5 ST_AutoTextRotation (Auto Text Rotation)
+ const sal_Int32 nautoTxRot = maMap.count(XML_autoTxRot) ? maMap.find(XML_autoTxRot)->second : XML_upr;
+ sal_Int32 nShapeRot = rShape->getRotation();
+ while (nShapeRot < 0)
+ nShapeRot += 360 * PER_DEGREE;
+ while (nShapeRot > 360 * PER_DEGREE)
+ nShapeRot -= 360 * PER_DEGREE;
+
+ switch(nautoTxRot)
+ {
+ case XML_upr:
+ {
+ int n90x = 0;
+ if (nShapeRot >= 315 * PER_DEGREE)
+ /* keep 0 */;
+ else if (nShapeRot > 225 * PER_DEGREE)
+ n90x = -3;
+ else if (nShapeRot >= 135 * PER_DEGREE)
+ n90x = -2;
+ else if (nShapeRot > 45 * PER_DEGREE)
+ n90x = -1;
+ pTextBody->getTextProperties().moRotation = n90x * 90 * PER_DEGREE;
+ }
+ break;
+ case XML_grav:
+ {
+ if (nShapeRot > (90 * PER_DEGREE) && nShapeRot < (270 * PER_DEGREE))
+ pTextBody->getTextProperties().moRotation = -180 * PER_DEGREE;
+ }
+ break;
+ case XML_none:
+ break;
+ }
+
+ const sal_Int32 atxAnchorVert = maMap.count(XML_txAnchorVert) ? maMap.find(XML_txAnchorVert)->second : XML_mid;
+
+ switch(atxAnchorVert)
+ {
+ case XML_t:
+ pTextBody->getTextProperties().meVA = css::drawing::TextVerticalAdjust_TOP;
+ break;
+ case XML_b:
+ pTextBody->getTextProperties().meVA = css::drawing::TextVerticalAdjust_BOTTOM;
+ break;
+ case XML_mid:
+ // text centered vertically by default
+ default:
+ pTextBody->getTextProperties().meVA = css::drawing::TextVerticalAdjust_CENTER;
+ break;
+ }
+
+ pTextBody->getTextProperties().maPropertyMap.setProperty(PROP_TextVerticalAdjust, pTextBody->getTextProperties().meVA);
+
+ // normalize list level
+ sal_Int32 nBaseLevel = pTextBody->getParagraphs().front()->getProperties().getLevel();
+ for (auto & aParagraph : pTextBody->getParagraphs())
+ {
+ if (aParagraph->getProperties().getLevel() < nBaseLevel)
+ nBaseLevel = aParagraph->getProperties().getLevel();
+ }
+
+ // Start bullets at:
+ // 1 - top level
+ // 2 - with children (default)
+ int nStartBulletsAtLevel = 2;
+ ParamMap::const_iterator aBulletLvl = maMap.find(XML_stBulletLvl);
+ if (aBulletLvl != maMap.end())
+ nStartBulletsAtLevel = aBulletLvl->second;
+ nStartBulletsAtLevel--;
+
+ bool isBulletList = false;
+ for (auto & aParagraph : pTextBody->getParagraphs())
+ {
+ sal_Int32 nLevel = aParagraph->getProperties().getLevel() - nBaseLevel;
+ aParagraph->getProperties().setLevel(nLevel);
+ if (nLevel >= nStartBulletsAtLevel)
+ {
+ if (!aParagraph->getProperties().getParaLeftMargin().has_value())
+ {
+ sal_Int32 nLeftMargin
+ = o3tl::convert(285750 * (nLevel - nStartBulletsAtLevel + 1),
+ o3tl::Length::emu, o3tl::Length::mm100);
+ aParagraph->getProperties().getParaLeftMargin() = nLeftMargin;
+ }
+
+ if (!aParagraph->getProperties().getFirstLineIndentation().has_value())
+ aParagraph->getProperties().getFirstLineIndentation()
+ = o3tl::convert(-285750, o3tl::Length::emu, o3tl::Length::mm100);
+
+ // It is not possible to change the bullet style for text.
+ aParagraph->getProperties().getBulletList().setBulletChar(u"•");
+ aParagraph->getProperties().getBulletList().setSuffixNone();
+ isBulletList = true;
+ }
+ }
+
+ // explicit alignment
+ ParamMap::const_iterator aDir = maMap.find(XML_parTxLTRAlign);
+ // TODO: XML_parTxRTLAlign
+ if (aDir != maMap.end())
+ {
+ css::style::ParagraphAdjust aAlignment = GetParaAdjust(aDir->second);
+ for (auto & aParagraph : pTextBody->getParagraphs())
+ aParagraph->getProperties().setParaAdjust(aAlignment);
+ }
+ else if (!isBulletList)
+ {
+ // if not list use default alignment - centered
+ for (auto & aParagraph : pTextBody->getParagraphs())
+ aParagraph->getProperties().setParaAdjust(css::style::ParagraphAdjust::ParagraphAdjust_CENTER);
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ SAL_INFO(
+ "oox.drawingml",
+ "Layouting shape " << rShape->getInternalName() << ", alg type: " << mnType << ", ("
+ << rShape->getPosition().X << "," << rShape->getPosition().Y << ","
+ << rShape->getSize().Width << "," << rShape->getSize().Height << ")");
+}
+
+void LayoutNode::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+bool LayoutNode::setupShape( const ShapePtr& rShape, const svx::diagram::Point* pPresNode, sal_Int32 nCurrIdx ) const
+{
+ SAL_INFO(
+ "oox.drawingml",
+ "Filling content from layout node named \"" << msName
+ << "\", modelId \"" << pPresNode->msModelId << "\"");
+
+ // have the presentation node - now, need the actual data node:
+ const DiagramData::StringMap::const_iterator aNodeName = mrDgm.getData()->getPresOfNameMap().find(
+ pPresNode->msModelId);
+ if( aNodeName != mrDgm.getData()->getPresOfNameMap().end() )
+ {
+ // Calculate the depth of what is effectively the topmost element.
+ sal_Int32 nMinDepth = std::numeric_limits<sal_Int32>::max();
+ for (const auto& rPair : aNodeName->second)
+ {
+ if (rPair.second.mnDepth < nMinDepth)
+ nMinDepth = rPair.second.mnDepth;
+ }
+
+ for (const auto& rPair : aNodeName->second)
+ {
+ const DiagramData::SourceIdAndDepth& rItem = rPair.second;
+ DiagramData::PointNameMap& rMap = mrDgm.getData()->getPointNameMap();
+ // pPresNode is the presentation node of the aDataNode2 data node.
+ DiagramData::PointNameMap::const_iterator aDataNode2 = rMap.find(rItem.msSourceId);
+ if (aDataNode2 == rMap.end())
+ {
+ //busted, skip it
+ continue;
+ }
+
+ Shape* pDataNode2Shape(mrDgm.getData()->getOrCreateAssociatedShape(*aDataNode2->second));
+ if (nullptr == pDataNode2Shape)
+ {
+ //busted, skip it
+ continue;
+ }
+
+ rShape->setDataNodeType(aDataNode2->second->mnXMLType);
+
+ if (rItem.mnDepth == 0)
+ {
+ // grab shape attr from topmost element(s)
+ rShape->getShapeProperties() = pDataNode2Shape->getShapeProperties();
+ rShape->getLineProperties() = pDataNode2Shape->getLineProperties();
+ rShape->getFillProperties() = pDataNode2Shape->getFillProperties();
+ rShape->getCustomShapeProperties() = pDataNode2Shape->getCustomShapeProperties();
+ rShape->setMasterTextListStyle( pDataNode2Shape->getMasterTextListStyle() );
+
+ SAL_INFO(
+ "oox.drawingml",
+ "Custom shape with preset type "
+ << (rShape->getCustomShapeProperties()
+ ->getShapePresetType())
+ << " added for layout node named \"" << msName
+ << "\"");
+ }
+ else if (rItem.mnDepth == nMinDepth)
+ {
+ // If no real topmost element, then take properties from the one that's the closest
+ // to topmost.
+ rShape->getLineProperties() = pDataNode2Shape->getLineProperties();
+ rShape->getFillProperties() = pDataNode2Shape->getFillProperties();
+ }
+
+ // append text with right outline level
+ if( pDataNode2Shape->getTextBody() &&
+ !pDataNode2Shape->getTextBody()->getParagraphs().empty() &&
+ !pDataNode2Shape->getTextBody()->getParagraphs().front()->getRuns().empty() )
+ {
+ TextBodyPtr pTextBody=rShape->getTextBody();
+ if( !pTextBody )
+ {
+ pTextBody = std::make_shared<TextBody>();
+
+ // also copy text attrs
+ pTextBody->getTextListStyle() =
+ pDataNode2Shape->getTextBody()->getTextListStyle();
+ pTextBody->getTextProperties() =
+ pDataNode2Shape->getTextBody()->getTextProperties();
+
+ rShape->setTextBody(pTextBody);
+ }
+
+ const TextParagraphVector& rSourceParagraphs
+ = pDataNode2Shape->getTextBody()->getParagraphs();
+ for (const auto& pSourceParagraph : rSourceParagraphs)
+ {
+ TextParagraph& rPara = pTextBody->addParagraph();
+ if (rItem.mnDepth != -1)
+ rPara.getProperties().setLevel(rItem.mnDepth);
+
+ for (const auto& pRun : pSourceParagraph->getRuns())
+ rPara.addRun(pRun);
+ const TextBodyPtr& rBody = pDataNode2Shape->getTextBody();
+ rPara.getProperties().apply(rBody->getParagraphs().front()->getProperties());
+ }
+ }
+ }
+ }
+ else
+ {
+ SAL_INFO(
+ "oox.drawingml",
+ "ShapeCreationVisitor::visit: no data node name found while"
+ " processing shape type "
+ << rShape->getCustomShapeProperties()->getShapePresetType()
+ << " for layout node named \"" << msName << "\"");
+ Shape* pPresNodeShape(mrDgm.getData()->getOrCreateAssociatedShape(*pPresNode));
+ if (nullptr != pPresNodeShape)
+ rShape->getFillProperties().assignUsed(pPresNodeShape->getFillProperties());
+ }
+
+ // TODO(Q1): apply styling & coloring - take presentation
+ // point's presStyleLbl for both style & color
+ // if not found use layout node's styleLbl
+ // however, docs are a bit unclear on this
+ OUString aStyleLabel = pPresNode->msPresentationLayoutStyleLabel;
+ if (aStyleLabel.isEmpty())
+ aStyleLabel = msStyleLabel;
+ if( !aStyleLabel.isEmpty() )
+ {
+ const DiagramQStyleMap::const_iterator aStyle = mrDgm.getStyles().find(aStyleLabel);
+ if( aStyle != mrDgm.getStyles().end() )
+ {
+ const DiagramStyle& rStyle = aStyle->second;
+ rShape->getShapeStyleRefs()[XML_fillRef] = rStyle.maFillStyle;
+ rShape->getShapeStyleRefs()[XML_lnRef] = rStyle.maLineStyle;
+ rShape->getShapeStyleRefs()[XML_effectRef] = rStyle.maEffectStyle;
+ rShape->getShapeStyleRefs()[XML_fontRef] = rStyle.maTextStyle;
+ }
+ else
+ {
+ SAL_WARN("oox.drawingml", "Style " << aStyleLabel << " not found");
+ }
+
+ const DiagramColorMap::const_iterator aColor = mrDgm.getColors().find(aStyleLabel);
+ if( aColor != mrDgm.getColors().end() )
+ {
+ // Take the nth color from the color list in case we are the nth shape in a
+ // <dgm:forEach> loop.
+ const DiagramColor& rColor=aColor->second;
+ if( !rColor.maFillColors.empty() )
+ rShape->getShapeStyleRefs()[XML_fillRef].maPhClr = DiagramColor::getColorByIndex(rColor.maFillColors, nCurrIdx);
+ if( !rColor.maLineColors.empty() )
+ rShape->getShapeStyleRefs()[XML_lnRef].maPhClr = DiagramColor::getColorByIndex(rColor.maLineColors, nCurrIdx);
+ if( !rColor.maEffectColors.empty() )
+ rShape->getShapeStyleRefs()[XML_effectRef].maPhClr = DiagramColor::getColorByIndex(rColor.maEffectColors, nCurrIdx);
+ if( !rColor.maTextFillColors.empty() )
+ rShape->getShapeStyleRefs()[XML_fontRef].maPhClr = DiagramColor::getColorByIndex(rColor.maTextFillColors, nCurrIdx);
+ }
+ }
+
+ // even if no data node found, successful anyway. it's
+ // contained at the layoutnode
+ return true;
+}
+
+const LayoutNode* LayoutNode::getParentLayoutNode() const
+{
+ for (LayoutAtomPtr pAtom = getParent(); pAtom; pAtom = pAtom->getParent())
+ {
+ auto pLayoutNode = dynamic_cast<LayoutNode*>(pAtom.get());
+ if (pLayoutNode)
+ return pLayoutNode;
+ }
+
+ return nullptr;
+}
+
+void ShapeAtom::accept( LayoutAtomVisitor& rVisitor )
+{
+ rVisitor.visit(*this);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
new file mode 100644
index 000000000..cf8078923
--- /dev/null
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -0,0 +1,372 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMLAYOUTATOMS_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAMLAYOUTATOMS_HXX
+
+#include <map>
+#include <memory>
+
+#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+
+#include "diagram.hxx"
+
+namespace oox::drawingml {
+
+class DiagramLayout;
+typedef std::shared_ptr< DiagramLayout > DiagramLayoutPtr;
+
+// AG_IteratorAttributes
+struct IteratorAttr
+{
+ IteratorAttr();
+
+ // not sure this belong here, but wth
+ void loadFromXAttr( const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes );
+
+ std::vector<sal_Int32> maAxis;
+ sal_Int32 mnCnt;
+ bool mbHideLastTrans;
+ sal_Int32 mnPtType;
+ sal_Int32 mnSt;
+ sal_Int32 mnStep;
+};
+
+struct ConditionAttr
+{
+ ConditionAttr();
+
+ // not sure this belong here, but wth
+ void loadFromXAttr( const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes );
+
+ OUString msVal;
+ sal_Int32 mnFunc;
+ sal_Int32 mnArg;
+ sal_Int32 mnOp;
+ sal_Int32 mnVal;
+};
+
+/// Constraints allow you to specify an ideal (or starting point) size for each shape.
+struct Constraint
+{
+ OUString msForName;
+ OUString msRefForName;
+ double mfFactor;
+ double mfValue;
+ sal_Int32 mnFor;
+ sal_Int32 mnPointType;
+ sal_Int32 mnType;
+ sal_Int32 mnRefFor;
+ sal_Int32 mnRefType;
+ sal_Int32 mnRefPointType;
+ sal_Int32 mnOperator;
+};
+
+/// Rules allow you to specify what to do when constraints can't be fully satisfied.
+struct Rule
+{
+ OUString msForName;
+};
+
+typedef std::map<sal_Int32, sal_Int32> LayoutProperty;
+typedef std::map<OUString, LayoutProperty> LayoutPropertyMap;
+
+struct LayoutAtomVisitor;
+class LayoutAtom;
+class LayoutNode;
+
+typedef std::shared_ptr< LayoutAtom > LayoutAtomPtr;
+
+/** abstract Atom for the layout */
+class LayoutAtom
+{
+public:
+ LayoutAtom(LayoutNode& rLayoutNode) : mrLayoutNode(rLayoutNode) {}
+ virtual ~LayoutAtom() { }
+
+ LayoutNode& getLayoutNode()
+ { return mrLayoutNode; }
+
+ /** visitor acceptance
+ */
+ virtual void accept( LayoutAtomVisitor& ) = 0;
+
+ void setName( const OUString& sName )
+ { msName = sName; }
+ const OUString& getName() const
+ { return msName; }
+
+private:
+ void addChild( const LayoutAtomPtr & pNode )
+ { mpChildNodes.push_back( pNode ); }
+ void setParent(const LayoutAtomPtr& pParent) { mpParent = pParent; }
+
+public:
+ const std::vector<LayoutAtomPtr>& getChildren() const
+ { return mpChildNodes; }
+
+ LayoutAtomPtr getParent() const { return mpParent.lock(); }
+
+ static void connect(const LayoutAtomPtr& pParent, const LayoutAtomPtr& pChild)
+ {
+ pParent->addChild(pChild);
+ pChild->setParent(pParent);
+ }
+
+ // dump for debug
+ void dump(int level = 0);
+
+protected:
+ LayoutNode& mrLayoutNode;
+ std::vector< LayoutAtomPtr > mpChildNodes;
+ std::weak_ptr<LayoutAtom> mpParent;
+ OUString msName;
+};
+
+class ConstraintAtom
+ : public LayoutAtom
+{
+public:
+ ConstraintAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode) {}
+ virtual void accept( LayoutAtomVisitor& ) override;
+ Constraint& getConstraint()
+ { return maConstraint; }
+ void parseConstraint(std::vector<Constraint>& rConstraints, bool bRequireForName) const;
+private:
+ Constraint maConstraint;
+};
+
+/// Represents one <dgm:rule> element.
+class RuleAtom
+ : public LayoutAtom
+{
+public:
+ RuleAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode) {}
+ virtual void accept( LayoutAtomVisitor& ) override;
+ Rule& getRule()
+ { return maRule; }
+ void parseRule(std::vector<Rule>& rRules) const;
+private:
+ Rule maRule;
+};
+
+class AlgAtom
+ : public LayoutAtom
+{
+public:
+ AlgAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode), mnType(0), maMap() {}
+
+ typedef std::map<sal_Int32,sal_Int32> ParamMap;
+
+ virtual void accept( LayoutAtomVisitor& ) override;
+
+ void setType( sal_Int32 nToken )
+ { mnType = nToken; }
+ const ParamMap& getMap() const { return maMap; }
+ void addParam( sal_Int32 nType, sal_Int32 nVal )
+ { maMap[nType]=nVal; }
+ sal_Int32 getVerticalShapesCount(const ShapePtr& rShape);
+ void layoutShape( const ShapePtr& rShape,
+ const std::vector<Constraint>& rConstraints,
+ const std::vector<Rule>& rRules );
+
+ void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; }
+
+ double getAspectRatio() const { return mfAspectRatio; }
+
+private:
+ sal_Int32 mnType;
+ ParamMap maMap;
+ /// Aspect ratio is not integer, so not part of maMap.
+ double mfAspectRatio = 0;
+
+ /// Determines the connector shape type for conn algorithm
+ sal_Int32 getConnectorType();
+};
+
+typedef std::shared_ptr< AlgAtom > AlgAtomPtr;
+
+/// Finds optimal grid to layout children that have fixed aspect ratio.
+class SnakeAlg
+{
+public:
+ static void layoutShapeChildren(const AlgAtom& rAlg, const ShapePtr& rShape,
+ const std::vector<Constraint>& rConstraints);
+};
+
+/**
+ * Lays out child layout nodes along a vertical path and works with the trapezoid shape to create a
+ * pyramid.
+ */
+class PyraAlg
+{
+public:
+ static void layoutShapeChildren(const ShapePtr& rShape);
+};
+
+/**
+ * Specifies the size and position for all child layout nodes.
+ */
+class CompositeAlg
+{
+public:
+ static void layoutShapeChildren(AlgAtom& rAlg, const ShapePtr& rShape,
+ const std::vector<Constraint>& rConstraints);
+
+private:
+ /**
+ * Apply rConstraint to the rProperties shared layout state.
+ *
+ * Note that the order in which constraints are applied matters, given that constraints can refer to
+ * each other, and in case A depends on B and A is applied before B, the effect of A won't be
+ * updated when B is applied.
+ */
+ static void applyConstraintToLayout(const Constraint& rConstraint,
+ LayoutPropertyMap& rProperties);
+
+ /**
+ * Decides if a certain reference type (e.g. "right") can be inferred from the available properties
+ * in rMap (e.g. left and width). Returns true if rValue is written to.
+ */
+ static bool inferFromLayoutProperty(const LayoutProperty& rMap, sal_Int32 nRefType,
+ sal_Int32& rValue);
+};
+
+class ForEachAtom
+ : public LayoutAtom
+{
+public:
+ explicit ForEachAtom(LayoutNode& rLayoutNode, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
+
+ IteratorAttr & iterator()
+ { return maIter; }
+ void setRef(const OUString& rsRef)
+ { msRef = rsRef; }
+ const OUString& getRef() const
+ { return msRef; }
+ virtual void accept( LayoutAtomVisitor& ) override;
+ LayoutAtomPtr getRefAtom();
+
+private:
+ IteratorAttr maIter;
+ OUString msRef;
+};
+
+typedef std::shared_ptr< ForEachAtom > ForEachAtomPtr;
+
+class ConditionAtom
+ : public LayoutAtom
+{
+public:
+ explicit ConditionAtom(LayoutNode& rLayoutNode, bool isElse, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
+ virtual void accept( LayoutAtomVisitor& ) override;
+ bool getDecision(const svx::diagram::Point* pPresPoint) const;
+
+private:
+ static bool compareResult(sal_Int32 nOperator, sal_Int32 nFirst, sal_Int32 nSecond);
+ sal_Int32 getNodeCount(const svx::diagram::Point* pPresPoint) const;
+
+ bool mIsElse;
+ IteratorAttr maIter;
+ ConditionAttr maCond;
+};
+
+typedef std::shared_ptr< ConditionAtom > ConditionAtomPtr;
+
+/** "choose" statements. Atoms will be tested in order. */
+class ChooseAtom
+ : public LayoutAtom
+{
+public:
+ ChooseAtom(LayoutNode& rLayoutNode)
+ : LayoutAtom(rLayoutNode)
+ {}
+ virtual void accept( LayoutAtomVisitor& ) override;
+};
+
+class LayoutNode
+ : public LayoutAtom
+{
+public:
+ typedef std::map<sal_Int32, OUString> VarMap;
+
+ LayoutNode(Diagram& rDgm)
+ : LayoutAtom(*this)
+ , mrDgm(rDgm)
+ , mnChildOrder(0)
+ {
+ }
+ Diagram& getDiagram() { return mrDgm; }
+ virtual void accept( LayoutAtomVisitor& ) override;
+ VarMap & variables()
+ { return mVariables; }
+ void setMoveWith( const OUString & sName )
+ { msMoveWith = sName; }
+ void setStyleLabel( const OUString & sLabel )
+ { msStyleLabel = sLabel; }
+ void setChildOrder( sal_Int32 nOrder )
+ { mnChildOrder = nOrder; }
+ sal_Int32 getChildOrder() const { return mnChildOrder; }
+ void setExistingShape( const ShapePtr& pShape )
+ { mpExistingShape = pShape; }
+ const ShapePtr& getExistingShape() const
+ { return mpExistingShape; }
+ const std::vector<ShapePtr> & getNodeShapes() const
+ { return mpNodeShapes; }
+ void addNodeShape(const ShapePtr& pShape)
+ { mpNodeShapes.push_back(pShape); }
+
+ bool setupShape( const ShapePtr& rShape,
+ const svx::diagram::Point* pPresNode,
+ sal_Int32 nCurrIdx ) const;
+
+ const LayoutNode* getParentLayoutNode() const;
+
+private:
+ Diagram& mrDgm;
+ VarMap mVariables;
+ OUString msMoveWith;
+ OUString msStyleLabel;
+ ShapePtr mpExistingShape;
+ std::vector<ShapePtr> mpNodeShapes;
+ sal_Int32 mnChildOrder;
+};
+
+typedef std::shared_ptr< LayoutNode > LayoutNodePtr;
+
+class ShapeAtom
+ : public LayoutAtom
+{
+public:
+ ShapeAtom(LayoutNode& rLayoutNode, const ShapePtr& pShape) : LayoutAtom(rLayoutNode), mpShapeTemplate(pShape) {}
+ virtual void accept( LayoutAtomVisitor& ) override;
+ const ShapePtr& getShapeTemplate() const
+ { return mpShapeTemplate; }
+
+private:
+ ShapePtr mpShapeTemplate;
+};
+
+typedef std::shared_ptr< ShapeAtom > ShapeAtomPtr;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx b/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
new file mode 100644
index 000000000..b7f5a5963
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "layoutatomvisitorbase.hxx"
+
+#include <sal/log.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace oox::drawingml {
+
+void LayoutAtomVisitorBase::defaultVisit(LayoutAtom const& rAtom)
+{
+ for (const auto& pAtom : rAtom.getChildren())
+ pAtom->accept(*this);
+}
+
+void LayoutAtomVisitorBase::visit(ChooseAtom& rAtom)
+{
+ for (const auto& pChild : rAtom.getChildren())
+ {
+ const ConditionAtomPtr pCond = std::dynamic_pointer_cast<ConditionAtom>(pChild);
+ if (pCond && pCond->getDecision(mpCurrentNode))
+ {
+ SAL_INFO("oox.drawingml", "Entering if node: " << pCond->getName());
+ pCond->accept(*this);
+ break;
+ }
+ }
+}
+
+void LayoutAtomVisitorBase::visit(ConditionAtom& rAtom)
+{
+ defaultVisit(rAtom);
+}
+
+void LayoutAtomVisitorBase::visit(ForEachAtom& rAtom)
+{
+ if (!rAtom.getRef().isEmpty())
+ {
+ if (LayoutAtomPtr pRefAtom = rAtom.getRefAtom())
+ pRefAtom->accept(*this);
+ return;
+ }
+
+ if (rAtom.iterator().mbHideLastTrans && !rAtom.iterator().maAxis.empty() && rAtom.iterator().maAxis[0] == XML_followSib)
+ {
+ // If last transition is hidden and the axis is the follow sibling,
+ // then the last atom should not be visited.
+ if (mnCurrIdx + mnCurrStep >= mnCurrCnt)
+ return;
+ }
+
+ sal_Int32 nChildren = 1;
+ // Approximate the non-assistant type with the node type.
+ if (rAtom.iterator().mnPtType == XML_node || rAtom.iterator().mnPtType == XML_nonAsst)
+ {
+ // count child data nodes - check all child Atoms for "name"
+ // attribute that is contained in diagram's
+ // getPointsPresNameMap()
+ ShallowPresNameVisitor aVisitor(mrDgm, mpCurrentNode);
+ for (const auto& pAtom : rAtom.getChildren())
+ pAtom->accept(aVisitor);
+ nChildren = aVisitor.getCount();
+ }
+
+ const sal_Int32 nCnt = std::min(
+ nChildren,
+ rAtom.iterator().mnCnt==-1 ? nChildren : rAtom.iterator().mnCnt);
+
+ const sal_Int32 nOldIdx = mnCurrIdx;
+ const sal_Int32 nOldStep = mnCurrStep;
+ const sal_Int32 nOldCnt = mnCurrCnt;
+ const sal_Int32 nStep = rAtom.iterator().mnStep;
+ mnCurrStep = nStep;
+ mnCurrCnt = nCnt;
+ for( mnCurrIdx=0; mnCurrIdx<nCnt && nStep>0; mnCurrIdx+=nStep )
+ {
+ // TODO there is likely some conditions
+ for (const auto& pAtom : rAtom.getChildren())
+ pAtom->accept(*this);
+ }
+
+ // and restore idx
+ mnCurrIdx = nOldIdx;
+ mnCurrStep = nOldStep;
+ mnCurrCnt = nOldCnt;
+}
+
+void LayoutAtomVisitorBase::visit(LayoutNode& rAtom)
+{
+ // TODO: deduplicate code in descendants
+
+ // stop processing if it's not a child of previous LayoutNode
+
+ const DiagramData::PointsNameMap::const_iterator aDataNode
+ = mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
+ if (aDataNode == mrDgm.getData()->getPointsPresNameMap().end()
+ || mnCurrIdx >= static_cast<sal_Int32>(aDataNode->second.size()))
+ return;
+
+ const svx::diagram::Point* pNewNode = aDataNode->second.at(mnCurrIdx);
+ if (!mpCurrentNode || !pNewNode)
+ return;
+
+ bool bIsChild = false;
+ for (const auto& aConnection : mrDgm.getData()->getConnections())
+ if (aConnection.msSourceId == mpCurrentNode->msModelId
+ && aConnection.msDestId == pNewNode->msModelId)
+ bIsChild = true;
+
+ if (!bIsChild)
+ return;
+
+ const svx::diagram::Point* pPreviousNode = mpCurrentNode;
+ mpCurrentNode = pNewNode;
+
+ defaultVisit(rAtom);
+
+ mpCurrentNode = pPreviousNode;
+}
+
+void ShallowPresNameVisitor::visit(ConstraintAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShallowPresNameVisitor::visit(RuleAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShallowPresNameVisitor::visit(AlgAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShallowPresNameVisitor::visit(ForEachAtom& rAtom)
+{
+ defaultVisit(rAtom);
+}
+
+void ShallowPresNameVisitor::visit(LayoutNode& rAtom)
+{
+ DiagramData::PointsNameMap::const_iterator aDataNode =
+ mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
+ if( aDataNode != mrDgm.getData()->getPointsPresNameMap().end() )
+ mnCnt = std::max(mnCnt,
+ aDataNode->second.size());
+}
+
+void ShallowPresNameVisitor::visit(ShapeAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx b/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
new file mode 100644
index 000000000..49c83f674
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTATOMVISITORBASE_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTATOMVISITORBASE_HXX
+
+#include "diagram.hxx"
+#include "diagramlayoutatoms.hxx"
+
+namespace oox::drawingml {
+
+struct LayoutAtomVisitor
+{
+ virtual ~LayoutAtomVisitor() {}
+ virtual void visit(ConstraintAtom& rAtom) = 0;
+ virtual void visit(RuleAtom& rAtom) = 0;
+ virtual void visit(AlgAtom& rAtom) = 0;
+ virtual void visit(ForEachAtom& rAtom) = 0;
+ virtual void visit(ConditionAtom& rAtom) = 0;
+ virtual void visit(ChooseAtom& rAtom) = 0;
+ virtual void visit(LayoutNode& rAtom) = 0;
+ virtual void visit(ShapeAtom& rAtom) = 0;
+};
+
+// basic visitor implementation that follows if/else and for-each nodes
+// and keeps track of current position in data tree
+class LayoutAtomVisitorBase : public LayoutAtomVisitor
+{
+public:
+ LayoutAtomVisitorBase(const Diagram& rDgm, const svx::diagram::Point* pRootPoint) :
+ mrDgm(rDgm),
+ mpCurrentNode(pRootPoint),
+ mnCurrIdx(0),
+ mnCurrStep(0),
+ mnCurrCnt(0),
+ meLookFor(LAYOUT_NODE)
+ {}
+
+ void defaultVisit(LayoutAtom const& rAtom);
+
+ using LayoutAtomVisitor::visit;
+ virtual void visit(ForEachAtom& rAtom) override;
+ virtual void visit(ConditionAtom& rAtom) override;
+ virtual void visit(ChooseAtom& rAtom) override;
+ virtual void visit(LayoutNode& rAtom) override;
+
+protected:
+ const Diagram& mrDgm;
+ const svx::diagram::Point* mpCurrentNode;
+ sal_Int32 mnCurrIdx;
+ sal_Int32 mnCurrStep;
+ sal_Int32 mnCurrCnt;
+ enum {LAYOUT_NODE, CONSTRAINT, ALGORITHM, RULE} meLookFor;
+};
+
+class ShallowPresNameVisitor : public LayoutAtomVisitorBase
+{
+public:
+ explicit ShallowPresNameVisitor(const Diagram& rDgm, const svx::diagram::Point* pRootPoint) :
+ LayoutAtomVisitorBase(rDgm, pRootPoint),
+ mnCnt(0)
+ {}
+
+ using LayoutAtomVisitorBase::visit;
+ virtual void visit(ConstraintAtom& rAtom) override;
+ virtual void visit(RuleAtom& rAtom) override;
+ virtual void visit(AlgAtom& rAtom) override;
+ virtual void visit(ForEachAtom& rAtom) override;
+ virtual void visit(LayoutNode& rAtom) override;
+ virtual void visit(ShapeAtom& rAtom) override;
+
+ size_t getCount() const { return mnCnt; }
+
+private:
+ size_t mnCnt;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
new file mode 100644
index 000000000..f34d93d98
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -0,0 +1,269 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "layoutatomvisitors.hxx"
+
+#include <drawingml/customshapeproperties.hxx>
+
+#include <sal/log.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::oox::core;
+
+namespace oox::drawingml
+{
+void ShapeCreationVisitor::visit(ConstraintAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeCreationVisitor::visit(RuleAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeCreationVisitor::visit(AlgAtom& rAtom)
+{
+ if (meLookFor == ALGORITHM)
+ {
+ mpParentShape->setAspectRatio(rAtom.getAspectRatio());
+ mpParentShape->setVerticalShapesCount(rAtom.getVerticalShapesCount(mpParentShape));
+ }
+}
+
+void ShapeCreationVisitor::visit(LayoutNode& rAtom)
+{
+ if (meLookFor != LAYOUT_NODE)
+ return;
+
+ // stop processing if it's not a child of previous LayoutNode
+
+ const DiagramData::PointsNameMap::const_iterator aDataNode
+ = mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
+ if (aDataNode == mrDgm.getData()->getPointsPresNameMap().end()
+ || mnCurrIdx >= static_cast<sal_Int32>(aDataNode->second.size()))
+ return;
+
+ const svx::diagram::Point* pNewNode = aDataNode->second.at(mnCurrIdx);
+ if (!mpCurrentNode || !pNewNode)
+ return;
+
+ bool bIsChild = false;
+ for (const auto& aConnection : mrDgm.getData()->getConnections())
+ if (aConnection.msSourceId == mpCurrentNode->msModelId
+ && aConnection.msDestId == pNewNode->msModelId)
+ bIsChild = true;
+
+ if (!bIsChild)
+ return;
+
+ ShapePtr pCurrParent(mpParentShape);
+
+ if (rAtom.getExistingShape())
+ {
+ // reuse existing shape
+ ShapePtr pShape = rAtom.getExistingShape();
+ if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
+ {
+ pShape->setInternalName(rAtom.getName());
+ rAtom.addNodeShape(pShape);
+ mrDgm.getLayout()->getPresPointShapeMap()[pNewNode] = pShape;
+ }
+ }
+ else
+ {
+ ShapeTemplateVisitor aTemplateVisitor(mrDgm, pNewNode);
+ aTemplateVisitor.defaultVisit(rAtom);
+ ShapePtr pShape = aTemplateVisitor.getShapeCopy();
+
+ if (pShape)
+ {
+ SAL_INFO("oox.drawingml",
+ "processing shape type "
+ << (pShape->getCustomShapeProperties()->getShapePresetType()));
+
+ if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
+ {
+ pShape->setInternalName(rAtom.getName());
+ pCurrParent->addChild(pShape);
+ pCurrParent = pShape;
+ rAtom.addNodeShape(pShape);
+ mrDgm.getLayout()->getPresPointShapeMap()[pNewNode] = pShape;
+ }
+ }
+ else
+ {
+ SAL_WARN("oox.drawingml",
+ "ShapeCreationVisitor::visit: no shape set while processing layoutnode named "
+ << rAtom.getName());
+ }
+ }
+
+ const svx::diagram::Point* pPreviousNode = mpCurrentNode;
+ mpCurrentNode = pNewNode;
+
+ // set new parent for children
+ ShapePtr pPreviousParent(mpParentShape);
+ mpParentShape = pCurrParent;
+
+ // process children
+ meLookFor = LAYOUT_NODE;
+ defaultVisit(rAtom);
+
+ meLookFor = ALGORITHM;
+ defaultVisit(rAtom);
+ meLookFor = LAYOUT_NODE;
+
+ // restore parent
+ mpParentShape = pPreviousParent;
+ mpCurrentNode = pPreviousNode;
+}
+
+void ShapeCreationVisitor::visit(ShapeAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeTemplateVisitor::visit(ConstraintAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeTemplateVisitor::visit(RuleAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeTemplateVisitor::visit(AlgAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeTemplateVisitor::visit(ForEachAtom& /*rAtom*/)
+{
+ // stop processing
+}
+
+void ShapeTemplateVisitor::visit(LayoutNode& /*rAtom*/)
+{
+ // stop processing - only traverse Condition/Choose atoms
+}
+
+void ShapeTemplateVisitor::visit(ShapeAtom& rAtom)
+{
+ if (mpShape)
+ {
+ SAL_WARN("oox.drawingml", "multiple shapes encountered inside LayoutNode");
+ return;
+ }
+
+ const ShapePtr& pCurrShape(rAtom.getShapeTemplate());
+
+ // TODO(F3): cloned shape shares all properties by reference,
+ // don't change them!
+ mpShape = std::make_shared<Shape>(pCurrShape);
+ // Fill properties have to be changed as sometimes only the presentation node contains the blip
+ // fill, unshare those.
+ mpShape->cloneFillProperties();
+
+ // add/set ModelID from current node to allow later association
+ if (mpCurrentNode)
+ mpShape->setDiagramDataModelID(mpCurrentNode->msModelId);
+}
+
+void ShapeLayoutingVisitor::visit(ConstraintAtom& rAtom)
+{
+ if (meLookFor == CONSTRAINT)
+ rAtom.parseConstraint(maConstraints, /*bRequireForName=*/true);
+}
+
+void ShapeLayoutingVisitor::visit(RuleAtom& rAtom)
+{
+ if (meLookFor == RULE)
+ rAtom.parseRule(maRules);
+}
+
+void ShapeLayoutingVisitor::visit(AlgAtom& rAtom)
+{
+ if (meLookFor == ALGORITHM)
+ {
+ const PresPointShapeMap aMap
+ = rAtom.getLayoutNode().getDiagram().getLayout()->getPresPointShapeMap();
+ auto pShape = aMap.find(mpCurrentNode);
+ if (pShape != aMap.end())
+ rAtom.layoutShape(pShape->second, maConstraints, maRules);
+ }
+}
+
+void ShapeLayoutingVisitor::visit(LayoutNode& rAtom)
+{
+ if (meLookFor != LAYOUT_NODE)
+ return;
+
+ // stop processing if it's not a child of previous LayoutNode
+
+ const DiagramData::PointsNameMap::const_iterator aDataNode
+ = mrDgm.getData()->getPointsPresNameMap().find(rAtom.getName());
+ if (aDataNode == mrDgm.getData()->getPointsPresNameMap().end()
+ || mnCurrIdx >= static_cast<sal_Int32>(aDataNode->second.size()))
+ return;
+
+ const svx::diagram::Point* pNewNode = aDataNode->second.at(mnCurrIdx);
+ if (!mpCurrentNode || !pNewNode)
+ return;
+
+ bool bIsChild = false;
+ for (const auto& aConnection : mrDgm.getData()->getConnections())
+ if (aConnection.msSourceId == mpCurrentNode->msModelId
+ && aConnection.msDestId == pNewNode->msModelId)
+ bIsChild = true;
+
+ if (!bIsChild)
+ return;
+
+ size_t nParentConstraintsNumber = maConstraints.size();
+
+ const svx::diagram::Point* pPreviousNode = mpCurrentNode;
+ mpCurrentNode = pNewNode;
+
+ // process alg atoms first, nested layout nodes afterwards
+ meLookFor = CONSTRAINT;
+ defaultVisit(rAtom);
+ meLookFor = RULE;
+ defaultVisit(rAtom);
+ meLookFor = ALGORITHM;
+ defaultVisit(rAtom);
+ meLookFor = LAYOUT_NODE;
+ defaultVisit(rAtom);
+
+ mpCurrentNode = pPreviousNode;
+
+ // delete added constraints, keep parent constraints
+ maConstraints.erase(maConstraints.begin() + nParentConstraintsNumber, maConstraints.end());
+}
+
+void ShapeLayoutingVisitor::visit(ShapeAtom& /*rAtom*/)
+{
+ // stop processing
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.hxx b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
new file mode 100644
index 000000000..c04fb1d97
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTATOMVISITORS_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTATOMVISITORS_HXX
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include "diagram.hxx"
+#include "diagramlayoutatoms.hxx"
+#include "layoutatomvisitorbase.hxx"
+
+namespace oox::drawingml {
+
+class ShapeCreationVisitor : public LayoutAtomVisitorBase
+{
+public:
+ ShapeCreationVisitor(const Diagram& rDgm,
+ const svx::diagram::Point* pRootPoint,
+ const ShapePtr& rParentShape) :
+ LayoutAtomVisitorBase(rDgm, pRootPoint),
+ mpParentShape(rParentShape)
+ {}
+
+ using LayoutAtomVisitorBase::visit;
+ virtual void visit(ConstraintAtom& rAtom) override;
+ virtual void visit(RuleAtom& rAtom) override;
+ virtual void visit(AlgAtom& rAtom) override;
+ virtual void visit(LayoutNode& rAtom) override;
+ virtual void visit(ShapeAtom& rAtom) override;
+
+private:
+ ShapePtr mpParentShape;
+};
+
+class ShapeTemplateVisitor : public LayoutAtomVisitorBase
+{
+public:
+ ShapeTemplateVisitor(const Diagram& rDgm, const svx::diagram::Point* pRootPoint)
+ : LayoutAtomVisitorBase(rDgm, pRootPoint)
+ {}
+
+ using LayoutAtomVisitorBase::visit;
+ virtual void visit(ConstraintAtom& rAtom) override;
+ virtual void visit(RuleAtom& rAtom) override;
+ virtual void visit(AlgAtom& rAtom) override;
+ virtual void visit(ForEachAtom& rAtom) override;
+ virtual void visit(LayoutNode& rAtom) override;
+ virtual void visit(ShapeAtom& rAtom) override;
+
+ ShapePtr const & getShapeCopy() const
+ { return mpShape; }
+
+private:
+ ShapePtr mpShape;
+};
+
+class ShapeLayoutingVisitor : public LayoutAtomVisitorBase
+{
+public:
+ ShapeLayoutingVisitor(const Diagram& rDgm, const svx::diagram::Point* pRootPoint) :
+ LayoutAtomVisitorBase(rDgm, pRootPoint)
+ {}
+
+ using LayoutAtomVisitorBase::visit;
+ virtual void visit(ConstraintAtom& rAtom) override;
+ virtual void visit(RuleAtom& rAtom) override;
+ virtual void visit(AlgAtom& rAtom) override;
+ virtual void visit(LayoutNode& rAtom) override;
+ virtual void visit(ShapeAtom& rAtom) override;
+
+private:
+ std::vector<Constraint> maConstraints;
+ std::vector<Rule> maRules;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
new file mode 100644
index 000000000..93f927531
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -0,0 +1,309 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "layoutnodecontext.hxx"
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/drawingml/shapecontext.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include "constraintlistcontext.hxx"
+#include "rulelistcontext.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <sal/log.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+namespace {
+
+class IfContext
+ : public LayoutNodeContext
+{
+public:
+ IfContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs,
+ const ConditionAtomPtr& pAtom )
+ : LayoutNodeContext( rParent, rAttribs, pAtom )
+ {}
+};
+
+class AlgorithmContext
+ : public ContextHandler2
+{
+public:
+ AlgorithmContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, const AlgAtomPtr & pNode )
+ : ContextHandler2( rParent )
+ , mnRevision( 0 )
+ , mpNode( pNode )
+ {
+ mnRevision = rAttribs.getInteger( XML_rev, 0 );
+ pNode->setType(rAttribs.getToken(XML_type, 0));
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElement )
+ {
+ case DGM_TOKEN( param ):
+ {
+ sal_Int32 nType = rAttribs.getToken(XML_type, 0);
+ switch (nType)
+ {
+ case XML_ar:
+ mpNode->setAspectRatio(rAttribs.getDouble(XML_val, 0));
+ break;
+ default:
+ const sal_Int32 nValTok = rAttribs.getToken(XML_val, 0);
+ mpNode->addParam(nType, nValTok > 0 ? nValTok
+ : rAttribs.getInteger(XML_val, 0));
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+private:
+ sal_Int32 mnRevision;
+ AlgAtomPtr mpNode;
+};
+
+class ChooseContext
+ : public ContextHandler2
+{
+public:
+ ChooseContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, const LayoutAtomPtr & pNode )
+ : ContextHandler2( rParent )
+ , mpNode( pNode )
+ {
+ msName = rAttribs.getString( XML_name ).get();
+ }
+
+ virtual ContextHandlerRef
+ onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs ) override
+ {
+ switch( aElement )
+ {
+ case DGM_TOKEN( if ):
+ {
+ // CT_When
+ ConditionAtomPtr pNode = std::make_shared<ConditionAtom>(mpNode->getLayoutNode(), false, rAttribs.getFastAttributeList());
+ LayoutAtom::connect(mpNode, pNode);
+ return new IfContext( *this, rAttribs, pNode );
+ }
+ case DGM_TOKEN( else ):
+ {
+ // CT_Otherwise
+ ConditionAtomPtr pNode = std::make_shared<ConditionAtom>(mpNode->getLayoutNode(), true, rAttribs.getFastAttributeList());
+ LayoutAtom::connect(mpNode, pNode);
+ return new IfContext( *this, rAttribs, pNode );
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+private:
+ OUString msName;
+ LayoutAtomPtr mpNode;
+};
+
+class ForEachContext
+ : public LayoutNodeContext
+{
+public:
+ ForEachContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, const ForEachAtomPtr& pAtom )
+ : LayoutNodeContext( rParent, rAttribs, pAtom )
+ {
+ pAtom->setRef(rAttribs.getString(XML_ref).get());
+ pAtom->iterator().loadFromXAttr( rAttribs.getFastAttributeList() );
+
+ LayoutAtomMap& rLayoutAtomMap = pAtom->getLayoutNode().getDiagram().getLayout()->getLayoutAtomMap();
+ rLayoutAtomMap[pAtom->getName()] = pAtom;
+ }
+};
+
+// CT_LayoutVariablePropertySet
+class LayoutVariablePropertySetContext
+ : public ContextHandler2
+{
+public:
+ LayoutVariablePropertySetContext( ContextHandler2Helper const & rParent, LayoutNode::VarMap & aVar )
+ : ContextHandler2( rParent )
+ , mVariables( aVar )
+ {
+ }
+
+ virtual ContextHandlerRef onCreateContext( ::sal_Int32 aElement, const AttributeList& rAttribs ) override
+ {
+ mVariables[ getBaseToken(aElement) ] = rAttribs.getString( XML_val ).get();
+ return this;
+ }
+private:
+ LayoutNode::VarMap & mVariables;
+};
+
+}
+
+// CT_LayoutNode
+LayoutNodeContext::LayoutNodeContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs,
+ const LayoutAtomPtr& pAtom )
+ : ContextHandler2( rParent )
+ , mpNode( pAtom )
+{
+ assert( pAtom && "Node must NOT be NULL" );
+ mpNode->setName( rAttribs.getString( XML_name ).get() );
+}
+
+LayoutNodeContext::~LayoutNodeContext()
+{
+}
+
+ContextHandlerRef
+LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+{
+ switch( aElement )
+ {
+ case DGM_TOKEN( layoutNode ):
+ {
+ LayoutNodePtr pNode = std::make_shared<LayoutNode>(mpNode->getLayoutNode().getDiagram());
+ LayoutAtom::connect(mpNode, pNode);
+
+ if (rAttribs.hasAttribute(XML_chOrder))
+ {
+ pNode->setChildOrder(rAttribs.getToken(XML_chOrder, XML_b));
+ }
+ else
+ {
+ for (LayoutAtomPtr pAtom = mpNode; pAtom; pAtom = pAtom->getParent())
+ {
+ auto pLayoutNode = dynamic_cast<LayoutNode*>(pAtom.get());
+ if (pLayoutNode)
+ {
+ pNode->setChildOrder(pLayoutNode->getChildOrder());
+ break;
+ }
+ }
+ }
+
+ pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
+ pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
+ return new LayoutNodeContext( *this, rAttribs, pNode );
+ }
+ case DGM_TOKEN( shape ):
+ {
+ ShapePtr pShape;
+
+ if( rAttribs.hasAttribute( XML_type ) )
+ {
+ pShape = std::make_shared<Shape>("com.sun.star.drawing.CustomShape");
+ if (!rAttribs.getBool(XML_hideGeom, false))
+ {
+ const sal_Int32 nType(rAttribs.getToken( XML_type, XML_obj ));
+ pShape->setSubType( nType );
+ pShape->getCustomShapeProperties()->setShapePresetType( nType );
+ }
+ }
+ else
+ {
+ pShape = std::make_shared<Shape>("com.sun.star.drawing.GroupShape");
+ }
+
+ pShape->setDiagramRotation(rAttribs.getInteger(XML_rot, 0) * PER_DEGREE);
+
+ pShape->setZOrderOff(rAttribs.getInteger(XML_zOrderOff, 0));
+
+ ShapeAtomPtr pAtom = std::make_shared<ShapeAtom>(mpNode->getLayoutNode(), pShape);
+ LayoutAtom::connect(mpNode, pAtom);
+ return new ShapeContext( *this, ShapePtr(), pShape );
+ }
+ case DGM_TOKEN( extLst ):
+ return nullptr;
+ case DGM_TOKEN( alg ):
+ {
+ // CT_Algorithm
+ AlgAtomPtr pAtom = std::make_shared<AlgAtom>(mpNode->getLayoutNode());
+ LayoutAtom::connect(mpNode, pAtom);
+ return new AlgorithmContext( *this, rAttribs, pAtom );
+ }
+ case DGM_TOKEN( choose ):
+ {
+ // CT_Choose
+ LayoutAtomPtr pAtom = std::make_shared<ChooseAtom>(mpNode->getLayoutNode());
+ LayoutAtom::connect(mpNode, pAtom);
+ return new ChooseContext( *this, rAttribs, pAtom );
+ }
+ case DGM_TOKEN( forEach ):
+ {
+ // CT_ForEach
+ ForEachAtomPtr pAtom = std::make_shared<ForEachAtom>(mpNode->getLayoutNode(), rAttribs.getFastAttributeList());
+ LayoutAtom::connect(mpNode, pAtom);
+ return new ForEachContext( *this, rAttribs, pAtom );
+ }
+ case DGM_TOKEN( constrLst ):
+ // CT_Constraints
+ return new ConstraintListContext( *this, mpNode );
+ case DGM_TOKEN( presOf ):
+ {
+ // CT_PresentationOf
+ // TODO
+ IteratorAttr aIterator;
+ aIterator.loadFromXAttr(rAttribs.getFastAttributeList());
+ break;
+ }
+ case DGM_TOKEN( ruleLst ):
+ // CT_Rules
+ return new RuleListContext( *this, mpNode );
+ case DGM_TOKEN( varLst ):
+ {
+ LayoutNodePtr pNode(std::dynamic_pointer_cast<LayoutNode>(mpNode));
+ if( pNode )
+ {
+ return new LayoutVariablePropertySetContext( *this, pNode->variables() );
+ }
+ else
+ {
+ SAL_WARN("oox", "OOX: encountered a varLst in a non layoutNode context" );
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.hxx b/oox/source/drawingml/diagram/layoutnodecontext.hxx
new file mode 100644
index 000000000..3499f5704
--- /dev/null
+++ b/oox/source/drawingml/diagram/layoutnodecontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTNODECONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTNODECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include "diagramlayoutatoms.hxx"
+
+namespace oox::drawingml {
+
+class LayoutNodeContext : public ::oox::core::ContextHandler2
+{
+public:
+ LayoutNodeContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, const LayoutAtomPtr &pNode );
+ virtual ~LayoutNodeContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+private:
+ LayoutAtomPtr mpNode;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/rulelistcontext.cxx b/oox/source/drawingml/diagram/rulelistcontext.cxx
new file mode 100644
index 000000000..76518ca9e
--- /dev/null
+++ b/oox/source/drawingml/diagram/rulelistcontext.cxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "rulelistcontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml
+{
+RuleListContext::RuleListContext(ContextHandler2Helper const& rParent, const LayoutAtomPtr& pNode)
+ : ContextHandler2(rParent)
+ , mpNode(pNode)
+{
+ assert(pNode);
+}
+
+RuleListContext::~RuleListContext() = default;
+
+core::ContextHandlerRef RuleListContext::onCreateContext(sal_Int32 nElement,
+ const AttributeList& rAttribs)
+{
+ switch (nElement)
+ {
+ case DGM_TOKEN(rule):
+ {
+ auto pNode = std::make_shared<RuleAtom>(mpNode->getLayoutNode());
+ LayoutAtom::connect(mpNode, pNode);
+
+ Rule& rRule = pNode->getRule();
+ rRule.msForName = rAttribs.getString(XML_forName, "");
+ break;
+ }
+ default:
+ break;
+ }
+
+ return this;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/diagram/rulelistcontext.hxx b/oox/source/drawingml/diagram/rulelistcontext.hxx
new file mode 100644
index 000000000..83a86c49e
--- /dev/null
+++ b/oox/source/drawingml/diagram/rulelistcontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <oox/core/contexthandler2.hxx>
+#include "diagramlayoutatoms.hxx"
+
+namespace oox::drawingml
+{
+/// Handles one <dgm:ruleLst> element.
+class RuleListContext : public oox::core::ContextHandler2
+{
+public:
+ RuleListContext(ContextHandler2Helper const& rParent, const LayoutAtomPtr& pNode);
+ ~RuleListContext() override;
+
+ oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement,
+ const AttributeList& rAttribs) override;
+
+private:
+ LayoutAtomPtr mpNode;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx
new file mode 100644
index 000000000..fc2f28d90
--- /dev/null
+++ b/oox/source/drawingml/drawingmltypes.cxx
@@ -0,0 +1,419 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+
+#include <o3tl/string_view.hxx>
+#include <osl/diagnose.h>
+#include <sax/tools/converter.hxx>
+#include <oox/token/tokens.hxx>
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::xml::sax::XFastAttributeList;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::geometry;
+using namespace ::com::sun::star::style;
+
+namespace oox::drawingml {
+
+/** converts EMUs into 1/100th mmm */
+sal_Int32 GetCoordinate( sal_Int32 nValue )
+{
+ return o3tl::convert(nValue, o3tl::Length::emu, o3tl::Length::mm100);
+}
+
+/** converts an emu string into 1/100th mmm */
+sal_Int32 GetCoordinate( std::u16string_view sValue )
+{
+ sal_Int32 nRet = 0;
+ if( !::sax::Converter::convertNumber( nRet, sValue ) )
+ nRet = 0;
+ return GetCoordinate( nRet );
+}
+
+/** converts 1/100mm to EMU */
+sal_Int32 GetPointFromCoordinate( sal_Int32 nValue )
+{
+ return o3tl::convert(nValue, o3tl::Length::mm100, o3tl::Length::emu);
+}
+
+/** converts a ST_Percentage % string into 1/1000th of % */
+sal_Int32 GetPercent( std::u16string_view sValue )
+{
+ sal_Int32 nRet = 0;
+ if( !::sax::Converter::convertNumber( nRet, sValue ) )
+ nRet = 0;
+
+ return nRet;
+}
+
+double GetPositiveFixedPercentage( const OUString& sValue )
+{
+ double fPercent = sValue.toFloat() / 100000.;
+ return fPercent;
+}
+
+/** converts the attributes from a CT_TLPoint into an awt Point with 1/1000% */
+awt::Point GetPointPercent( const Reference< XFastAttributeList >& xAttribs )
+{
+ return awt::Point(GetPercent(xAttribs->getOptionalValue(XML_x)), GetPercent(xAttribs->getOptionalValue(XML_y)));
+}
+
+/** converts the ST_TextFontSize to point */
+float GetTextSize( std::u16string_view sValue )
+{
+ float fRet = 0;
+ sal_Int32 nRet;
+ if( ::sax::Converter::convertNumber( nRet, sValue ) )
+ fRet = static_cast< float >( static_cast< double >( nRet ) / 100.0 );
+ return fRet;
+}
+
+/** converts the ST_TextSpacingPoint to 1/100mm */
+sal_Int32 GetTextSpacingPoint( std::u16string_view sValue )
+{
+ sal_Int32 nRet;
+ if( ::sax::Converter::convertNumber( nRet, sValue, (SAL_MIN_INT32 + 360) / 254, (SAL_MAX_INT32 - 360) / 254 ) )
+ nRet = GetTextSpacingPoint( nRet );
+ return nRet;
+}
+
+sal_Int32 GetTextSpacingPoint(sal_Int32 nValue)
+{
+ if (nValue > 0)
+ nValue = (nValue * 254 + 360);
+ else if (nValue < 0)
+ nValue = (nValue * 254 - 360);
+ return nValue / 720;
+}
+
+float GetFontHeight( sal_Int32 nHeight )
+{
+ // convert 1/100 points to points
+ return static_cast< float >( nHeight / 100.0 );
+}
+
+sal_Int16 GetFontUnderline( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_none: return awt::FontUnderline::NONE;
+ case XML_dash: return awt::FontUnderline::DASH;
+ case XML_dashHeavy: return awt::FontUnderline::BOLDDASH;
+ case XML_dashLong: return awt::FontUnderline::LONGDASH;
+ case XML_dashLongHeavy: return awt::FontUnderline::BOLDLONGDASH;
+ case XML_dbl: return awt::FontUnderline::DOUBLE;
+ case XML_dotDash: return awt::FontUnderline::DASHDOT;
+ case XML_dotDashHeavy: return awt::FontUnderline::BOLDDASHDOT;
+ case XML_dotDotDash: return awt::FontUnderline::DASHDOTDOT;
+ case XML_dotDotDashHeavy: return awt::FontUnderline::BOLDDASHDOTDOT;
+ case XML_dotted: return awt::FontUnderline::DOTTED;
+ case XML_dottedHeavy: return awt::FontUnderline::BOLDDOTTED;
+ case XML_heavy: return awt::FontUnderline::BOLD;
+ case XML_sng: return awt::FontUnderline::SINGLE;
+ case XML_wavy: return awt::FontUnderline::WAVE;
+ case XML_wavyDbl: return awt::FontUnderline::DOUBLEWAVE;
+ case XML_wavyHeavy: return awt::FontUnderline::BOLDWAVE;
+// case XML_words: // TODO
+ }
+ return awt::FontUnderline::DONTKNOW;
+}
+
+sal_Int16 GetFontStrikeout( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_dblStrike: return awt::FontStrikeout::DOUBLE;
+ case XML_noStrike: return awt::FontStrikeout::NONE;
+ case XML_sngStrike: return awt::FontStrikeout::SINGLE;
+ }
+ return awt::FontStrikeout::DONTKNOW;
+}
+
+sal_Int16 GetCaseMap( sal_Int32 nToken )
+{
+ switch( nToken )
+ {
+ case XML_all: return CaseMap::UPPERCASE;
+ case XML_small: return CaseMap::SMALLCAPS;
+ }
+ return CaseMap::NONE;
+}
+
+/** converts a paragraph align to a ParaAdjust */
+ParagraphAdjust GetParaAdjust( sal_Int32 nAlign )
+{
+ OSL_ASSERT((nAlign & sal_Int32(0xFFFF0000))==0);
+ ParagraphAdjust nEnum;
+ switch( nAlign )
+ {
+ case XML_ctr:
+ nEnum = ParagraphAdjust_CENTER;
+ break;
+ case XML_just:
+ case XML_justLow:
+ nEnum = ParagraphAdjust_BLOCK;
+ break;
+ case XML_r:
+ nEnum = ParagraphAdjust_RIGHT;
+ break;
+ case XML_thaiDist:
+ case XML_dist:
+ nEnum = ParagraphAdjust_STRETCH;
+ break;
+ case XML_l:
+ default:
+ nEnum = ParagraphAdjust_LEFT;
+ break;
+ }
+ return nEnum;
+}
+
+TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken )
+{
+ TextVerticalAdjust aVertAdjust;
+ switch( nToken )
+ {
+ case XML_b:
+ aVertAdjust = TextVerticalAdjust_BOTTOM;
+ break;
+ case XML_dist:
+ case XML_just:
+ case XML_ctr:
+ aVertAdjust = TextVerticalAdjust_CENTER;
+ break;
+ case XML_t:
+ default:
+ aVertAdjust = TextVerticalAdjust_TOP;
+ break;
+ }
+ return aVertAdjust;
+}
+
+const char* GetTextVerticalAdjust( TextVerticalAdjust eAdjust )
+{
+ const char* sVerticalAdjust = nullptr;
+ switch( eAdjust )
+ {
+ case TextVerticalAdjust_BOTTOM:
+ sVerticalAdjust = "b";
+ break;
+ case TextVerticalAdjust_CENTER:
+ sVerticalAdjust = "ctr";
+ break;
+ case TextVerticalAdjust_TOP:
+ default:
+ sVerticalAdjust = "t";
+ break;
+ }
+ return sVerticalAdjust;
+}
+
+TabAlign GetTabAlign( sal_Int32 aToken )
+{
+ OSL_ASSERT((aToken & sal_Int32(0xFFFF0000))==0);
+ TabAlign nEnum;
+ switch( aToken )
+ {
+ case XML_ctr:
+ nEnum = TabAlign_CENTER;
+ break;
+ case XML_dec:
+ nEnum = TabAlign_DECIMAL;
+ break;
+ case XML_l:
+ nEnum = TabAlign_LEFT;
+ break;
+ case XML_r:
+ nEnum = TabAlign_RIGHT;
+ break;
+ default:
+ nEnum = TabAlign_DEFAULT;
+ break;
+ }
+ return nEnum;
+}
+
+const char* GetHatchPattern( const drawing::Hatch& rHatch )
+{
+ const char* sPattern = nullptr;
+ const sal_Int32 nAngle = rHatch.Angle > 1800 ? rHatch.Angle - 1800 : rHatch.Angle;
+ // Angle ~ 0° (horizontal)
+ if( (nAngle >= 0 && nAngle < 225) || nAngle >= 1575 )
+ {
+ switch( rHatch.Style )
+ {
+ case drawing::HatchStyle_SINGLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "ltHorz";
+ else
+ sPattern = "horz";
+
+ break;
+ }
+ case drawing::HatchStyle_DOUBLE:
+ case drawing::HatchStyle_TRIPLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "smGrid";
+ else
+ sPattern = "lgGrid";
+
+ break;
+ }
+ default: break;
+ }
+ }
+ // Angle ~ 45° (upward diagonal)
+ else if( nAngle < 675 )
+ {
+ switch( rHatch.Style )
+ {
+ case drawing::HatchStyle_SINGLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "ltUpDiag";
+ else
+ sPattern = "wdUpDiag";
+
+ break;
+ }
+ case drawing::HatchStyle_DOUBLE:
+ case drawing::HatchStyle_TRIPLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "smCheck";
+ else
+ sPattern = "openDmnd";
+
+ break;
+ }
+ default: break;
+ }
+ }
+ // Angle ~ 90° (vertical)
+ else if( nAngle < 1125 )
+ {
+ switch( rHatch.Style )
+ {
+ case drawing::HatchStyle_SINGLE:
+ {
+ // dkVert is imported as Distance = 25, ltVert as Distance = 50, export them accordingly.
+ if( rHatch.Distance < 50 )
+ sPattern = "dkVert";
+ else if( rHatch.Distance < 75 )
+ sPattern = "ltVert";
+ else
+ sPattern = "vert";
+
+ break;
+ }
+ case drawing::HatchStyle_DOUBLE:
+ case drawing::HatchStyle_TRIPLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "smGrid";
+ else
+ sPattern = "lgGrid";
+
+ break;
+ }
+ default: break;
+ }
+ }
+ // Angle ~ 135° (downward diagonal)
+ else if( nAngle < 1575 )
+ {
+ switch( rHatch.Style )
+ {
+ case drawing::HatchStyle_SINGLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "ltDnDiag";
+ else
+ sPattern = "wdDnDiag";
+
+ break;
+ }
+ case drawing::HatchStyle_DOUBLE:
+ case drawing::HatchStyle_TRIPLE:
+ {
+ if( rHatch.Distance < 75 )
+ sPattern = "smCheck";
+ else
+ sPattern = "openDmnd";
+
+ break;
+ }
+ default: break;
+ }
+ }
+ return sPattern;
+}
+
+namespace
+{
+// ISO/IEC-29500 Part 1 ST_Percentage, and [MS-OI29500] 2.1.1324
+sal_Int32 GetST_Percentage(std::u16string_view s)
+{
+ if (o3tl::ends_with(s, u"%"))
+ return std::round(o3tl::toDouble(s) * 1000);
+ return o3tl::toInt32(s);
+}
+}
+
+/** converts the attributes from a CT_RelativeRect to an IntegerRectangle2D */
+IntegerRectangle2D GetRelativeRect( const Reference< XFastAttributeList >& xAttribs )
+{
+ IntegerRectangle2D r;
+
+ r.X1 = GetST_Percentage(xAttribs->getOptionalValue( XML_l ));
+ r.Y1 = GetST_Percentage(xAttribs->getOptionalValue( XML_t ));
+ r.X2 = GetST_Percentage(xAttribs->getOptionalValue( XML_r ));
+ r.Y2 = GetST_Percentage(xAttribs->getOptionalValue( XML_b ));
+
+ return r;
+}
+
+/** converts the attributes from a CT_Size2D into an awt Size with 1/100thmm */
+awt::Size GetSize2D( const Reference< XFastAttributeList >& xAttribs )
+{
+ return awt::Size( GetCoordinate( xAttribs->getOptionalValue( XML_cx ) ), GetCoordinate( xAttribs->getOptionalValue( XML_cy ) ) );
+}
+
+IndexRange GetIndexRange( const Reference< XFastAttributeList >& xAttributes )
+{
+ IndexRange range;
+ range.start = xAttributes->getOptionalValue( XML_st ).toInt32();
+ range.end = xAttributes->getOptionalValue( XML_end ).toInt32();
+ return range;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
new file mode 100644
index 000000000..88d69a16d
--- /dev/null
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "effectproperties.hxx"
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/token/properties.hxx>
+
+#include <basegfx/numeric/ftools.hxx>
+#include <comphelper/propertyvalue.hxx>
+
+#include <algorithm>
+
+namespace oox::drawingml {
+
+void EffectGlowProperties ::assignUsed(const EffectGlowProperties& rSourceProps)
+{
+ moGlowRad.assignIfUsed( rSourceProps.moGlowRad );
+ moGlowColor.assignIfUsed( rSourceProps.moGlowColor );
+}
+
+void EffectSoftEdgeProperties::assignUsed(const EffectSoftEdgeProperties& rSourceProps)
+{
+ moRad.assignIfUsed(rSourceProps.moRad);
+}
+
+void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourceProps)
+{
+ moShadowDist.assignIfUsed( rSourceProps.moShadowDist );
+ moShadowDir.assignIfUsed( rSourceProps.moShadowDir );
+ moShadowSx.assignIfUsed( rSourceProps.moShadowSx );
+ moShadowSy.assignIfUsed( rSourceProps.moShadowSy );
+ moShadowColor.assignIfUsed( rSourceProps.moShadowColor );
+ moShadowBlur.assignIfUsed( rSourceProps.moShadowBlur );
+
+}
+
+void EffectProperties::assignUsed( const EffectProperties& rSourceProps )
+{
+ maShadow.assignUsed(rSourceProps.maShadow);
+ maGlow.assignUsed(rSourceProps.maGlow);
+ maSoftEdge.assignUsed(rSourceProps.maSoftEdge);
+ if (!rSourceProps.m_Effects.empty())
+ {
+ m_Effects.clear();
+ m_Effects.reserve(rSourceProps.m_Effects.size());
+ for (auto const& it : rSourceProps.m_Effects)
+ {
+ m_Effects.push_back(std::make_unique<Effect>(*it));
+ }
+ }
+}
+
+void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper ) const
+{
+ for (auto const& it : m_Effects)
+ {
+ if( it->msName == "outerShdw" )
+ {
+ sal_Int32 nAttrDir = 0, nAttrDist = 0;
+ sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000; // If shadow size is %100=100000 (means equal to object's size), sx sy is not exists,
+ // Default values of sx, sy should be 100000 in this case.
+ sal_Int32 nAttrBlur = 0;
+
+ std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( "dir" );
+ if( attribIt != it->maAttribs.end() )
+ attribIt->second >>= nAttrDir;
+
+ attribIt = it->maAttribs.find( "dist" );
+ if( attribIt != it->maAttribs.end() )
+ attribIt->second >>= nAttrDist;
+
+ attribIt = it->maAttribs.find( "sx" );
+ if( attribIt != it->maAttribs.end() )
+ attribIt->second >>= nAttrSizeX;
+
+ attribIt = it->maAttribs.find( "sy" );
+ if( attribIt != it->maAttribs.end() )
+ attribIt->second >>= nAttrSizeY;
+
+ attribIt = it->maAttribs.find( "blurRad" );
+ if( attribIt != it->maAttribs.end() )
+ attribIt->second >>= nAttrBlur;
+
+ // Negative X or Y dist indicates left or up, respectively
+ // Negative X or Y dist indicates left or up, respectively
+ double nAngle = basegfx::deg2rad(static_cast<double>(nAttrDir) / PER_DEGREE);
+ sal_Int32 nDist = convertEmuToHmm( nAttrDist );
+ sal_Int32 nXDist = cos(nAngle) * nDist;
+ sal_Int32 nYDist = sin(nAngle) * nDist;
+
+
+ rPropMap.setProperty( PROP_Shadow, true );
+ rPropMap.setProperty( PROP_ShadowXDistance, nXDist);
+ rPropMap.setProperty( PROP_ShadowYDistance, nYDist);
+ rPropMap.setProperty( PROP_ShadowSizeX, nAttrSizeX);
+ rPropMap.setProperty( PROP_ShadowSizeY, nAttrSizeY);
+ rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper ) );
+ rPropMap.setProperty( PROP_ShadowTransparence, it->moColor.getTransparency());
+ rPropMap.setProperty( PROP_ShadowBlur, convertEmuToHmm(nAttrBlur));
+
+ }
+ }
+}
+
+css::beans::PropertyValue Effect::getEffect()
+{
+ css::beans::PropertyValue aRet;
+ if( msName.isEmpty() )
+ return aRet;
+
+ css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() );
+ std::transform(maAttribs.begin(), maAttribs.end(), aSeq.getArray(),
+ [](const auto& attrib)
+ { return comphelper::makePropertyValue(attrib.first, attrib.second); });
+
+ aRet.Name = msName;
+ aRet.Value <<= aSeq;
+
+ return aRet;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/effectproperties.hxx b/oox/source/drawingml/effectproperties.hxx
new file mode 100644
index 000000000..b588b9f7c
--- /dev/null
+++ b/oox/source/drawingml/effectproperties.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+
+#include <oox/drawingml/color.hxx>
+#include <oox/helper/propertymap.hxx>
+
+#include <memory>
+#include <vector>
+#include <map>
+
+namespace oox::drawingml {
+
+struct EffectGlowProperties
+{
+ OptValue< sal_Int64 > moGlowRad; // size of glow effect
+ Color moGlowColor;
+ // TODO saturation and luminance missing
+
+ void assignUsed( const EffectGlowProperties& rSourceProps );
+};
+
+struct EffectSoftEdgeProperties
+{
+ OptValue<sal_Int64> moRad; // size of effect
+
+ void assignUsed(const EffectSoftEdgeProperties& rSourceProps);
+};
+
+struct EffectShadowProperties
+{
+ OptValue< sal_Int64 > moShadowDist;
+ OptValue< sal_Int64 > moShadowDir;
+ OptValue< sal_Int64 > moShadowSx;
+ OptValue< sal_Int64 > moShadowSy;
+ Color moShadowColor;
+ OptValue< sal_Int64 > moShadowBlur; // size of blur effect
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const EffectShadowProperties& rSourceProps );
+};
+
+struct Effect
+{
+ OUString msName;
+ std::map< OUString, css::uno::Any > maAttribs;
+ Color moColor;
+
+ css::beans::PropertyValue getEffect();
+};
+
+struct EffectProperties
+{
+ EffectShadowProperties maShadow;
+ EffectGlowProperties maGlow;
+ EffectSoftEdgeProperties maSoftEdge;
+
+ /** Stores all effect properties, including those not supported by core yet */
+ std::vector<std::unique_ptr<Effect>> m_Effects;
+
+ EffectProperties() {}
+ EffectProperties(EffectProperties const& rOther)
+ {
+ assignUsed(rOther);
+ }
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const EffectProperties& rSourceProps );
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ PropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper ) const;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
new file mode 100644
index 000000000..ea972c742
--- /dev/null
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <drawingml/effectpropertiescontext.hxx>
+#include "effectproperties.hxx"
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+// CT_EffectProperties
+
+namespace oox::drawingml {
+
+EffectPropertiesContext::EffectPropertiesContext( ContextHandler2Helper const& rParent,
+ EffectProperties& rEffectProperties ) noexcept
+: ContextHandler2( rParent )
+, mrEffectProperties( rEffectProperties )
+{
+}
+
+EffectPropertiesContext::~EffectPropertiesContext()
+{
+}
+
+void EffectPropertiesContext::saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs )
+{
+ if( rAttribs.hasAttribute( XML_algn ) )
+ rEffect.maAttribs["algn"] <<= rAttribs.getString( XML_algn, "" );
+ if( rAttribs.hasAttribute( XML_blurRad ) )
+ rEffect.maAttribs["blurRad"] <<= rAttribs.getInteger( XML_blurRad, 0 );
+ if( rAttribs.hasAttribute( XML_dir ) )
+ rEffect.maAttribs["dir"] <<= rAttribs.getInteger( XML_dir, 0 );
+ if( rAttribs.hasAttribute( XML_dist ) )
+ rEffect.maAttribs["dist"] <<= rAttribs.getInteger( XML_dist, 0 );
+ if( rAttribs.hasAttribute( XML_kx ) )
+ rEffect.maAttribs["kx"] <<= rAttribs.getInteger( XML_kx, 0 );
+ if( rAttribs.hasAttribute( XML_ky ) )
+ rEffect.maAttribs["ky"] <<= rAttribs.getInteger( XML_ky, 0 );
+ if( rAttribs.hasAttribute( XML_rotWithShape ) )
+ rEffect.maAttribs["rotWithShape"] <<= rAttribs.getInteger( XML_rotWithShape, 0 );
+ if( rAttribs.hasAttribute( XML_sx ) )
+ rEffect.maAttribs["sx"] <<= rAttribs.getInteger( XML_sx, 0 );
+ if( rAttribs.hasAttribute( XML_sy ) )
+ rEffect.maAttribs["sy"] <<= rAttribs.getInteger( XML_sy, 0 );
+ if( rAttribs.hasAttribute( XML_rad ) )
+ rEffect.maAttribs["rad"] <<= rAttribs.getInteger( XML_rad, 0 );
+ if( rAttribs.hasAttribute( XML_endA ) )
+ rEffect.maAttribs["endA"] <<= rAttribs.getInteger( XML_endA, 0 );
+ if( rAttribs.hasAttribute( XML_endPos ) )
+ rEffect.maAttribs["endPos"] <<= rAttribs.getInteger( XML_endPos, 0 );
+ if( rAttribs.hasAttribute( XML_fadeDir ) )
+ rEffect.maAttribs["fadeDir"] <<= rAttribs.getInteger( XML_fadeDir, 0 );
+ if( rAttribs.hasAttribute( XML_stA ) )
+ rEffect.maAttribs["stA"] <<= rAttribs.getInteger( XML_stA, 0 );
+ if( rAttribs.hasAttribute( XML_stPos ) )
+ rEffect.maAttribs["stPos"] <<= rAttribs.getInteger( XML_stPos, 0 );
+ if( rAttribs.hasAttribute( XML_grow ) )
+ rEffect.maAttribs["grow"] <<= rAttribs.getInteger( XML_grow, 0 );
+}
+
+ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ sal_Int32 nPos = mrEffectProperties.m_Effects.size();
+ mrEffectProperties.m_Effects.push_back(std::make_unique<Effect>());
+ switch( nElement )
+ {
+ case A_TOKEN( outerShdw ):
+ {
+ mrEffectProperties.m_Effects[nPos]->msName = "outerShdw";
+ saveUnsupportedAttribs(*mrEffectProperties.m_Effects[nPos], rAttribs);
+
+ mrEffectProperties.maShadow.moShadowDist = rAttribs.getInteger( XML_dist, 0 );
+ mrEffectProperties.maShadow.moShadowDir = rAttribs.getInteger( XML_dir, 0 );
+ mrEffectProperties.maShadow.moShadowSx = rAttribs.getInteger( XML_sx, 0 );
+ mrEffectProperties.maShadow.moShadowSy = rAttribs.getInteger( XML_sy, 0 );
+ mrEffectProperties.maShadow.moShadowBlur = rAttribs.getInteger( XML_blurRad, 0 );
+ return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor);
+ }
+ break;
+ case A_TOKEN( innerShdw ):
+ {
+ mrEffectProperties.m_Effects[nPos]->msName = "innerShdw";
+ saveUnsupportedAttribs(*mrEffectProperties.m_Effects[nPos], rAttribs);
+
+ mrEffectProperties.maShadow.moShadowDist = rAttribs.getInteger( XML_dist, 0 );
+ mrEffectProperties.maShadow.moShadowDir = rAttribs.getInteger( XML_dir, 0 );
+ return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor);
+ }
+ break;
+ case A_TOKEN( glow ):
+ {
+ mrEffectProperties.maGlow.moGlowRad = rAttribs.getInteger( XML_rad, 0 );
+ // undo push_back to effects
+ mrEffectProperties.m_Effects.pop_back();
+ return new ColorContext(*this, mrEffectProperties.maGlow.moGlowColor);
+
+ }
+ case A_TOKEN( softEdge ):
+ {
+ mrEffectProperties.maSoftEdge.moRad = rAttribs.getInteger(XML_rad, 0);
+ return this; // no inner elements
+ }
+ case A_TOKEN( reflection ):
+ case A_TOKEN( blur ):
+ {
+ if (nElement == A_TOKEN(reflection))
+ mrEffectProperties.m_Effects[nPos]->msName = "reflection";
+ else if( nElement == A_TOKEN( blur ) )
+ mrEffectProperties.m_Effects[nPos]->msName = "blur";
+ saveUnsupportedAttribs(*mrEffectProperties.m_Effects[nPos], rAttribs);
+ return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor);
+ }
+ break;
+ }
+
+ mrEffectProperties.m_Effects.pop_back();
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/embeddedwavaudiofile.cxx b/oox/source/drawingml/embeddedwavaudiofile.cxx
new file mode 100644
index 000000000..613e34ccb
--- /dev/null
+++ b/oox/source/drawingml/embeddedwavaudiofile.cxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/embeddedwavaudiofile.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml
+{
+// CT_EmbeddedWAVAudioFile
+OUString getEmbeddedWAVAudioFile(const core::Relations& rRelations, const AttributeList& rAttribs)
+{
+ if (rAttribs.getBool(XML_builtIn, false))
+ return rAttribs.getString(XML_name).get();
+ else
+ return rRelations.getFragmentPathFromRelId(rAttribs.getString(R_TOKEN(embed)).get());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
new file mode 100644
index 000000000..9ae39b8cf
--- /dev/null
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -0,0 +1,1257 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/fillproperties.hxx>
+
+#include <iterator>
+
+#include <comphelper/propertyvalue.hxx>
+#include <drawingml/graphicproperties.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/BitmapFilter.hxx>
+#include <vcl/BitmapMonochromeFilter.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/graphic/XGraphicTransformer.hpp>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <drawingml/hatchmap.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::graphic;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::geometry::IntegerRectangle2D;
+
+namespace oox::drawingml {
+
+namespace {
+
+Reference< XGraphic > lclCheckAndApplyDuotoneTransform(const BlipFillProperties& aBlipProps, uno::Reference<graphic::XGraphic> const & xGraphic,
+ const GraphicHelper& rGraphicHelper, const ::Color nPhClr)
+{
+ if (aBlipProps.maDuotoneColors[0].isUsed() && aBlipProps.maDuotoneColors[1].isUsed())
+ {
+ ::Color nColor1 = aBlipProps.maDuotoneColors[0].getColor( rGraphicHelper, nPhClr );
+ ::Color nColor2 = aBlipProps.maDuotoneColors[1].getColor( rGraphicHelper, nPhClr );
+
+ uno::Reference<graphic::XGraphicTransformer> xTransformer(aBlipProps.mxFillGraphic, uno::UNO_QUERY);
+ if (xTransformer.is())
+ return xTransformer->applyDuotone(xGraphic, sal_Int32(nColor1), sal_Int32(nColor2));
+ }
+ return xGraphic;
+}
+
+Reference< XGraphic > lclRotateGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, Degree10 nRotation)
+{
+ ::Graphic aGraphic(xGraphic);
+ ::Graphic aReturnGraphic;
+
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+ const ::Color& aColor = ::Color(0x00);
+ aBitmapEx.Rotate(nRotation, aColor);
+ aReturnGraphic = ::Graphic(aBitmapEx);
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+ return aReturnGraphic.GetXGraphic();
+}
+
+using Quotients = std::tuple<double, double, double, double>;
+Quotients getQuotients(geometry::IntegerRectangle2D aRelRect, double hDiv, double vDiv)
+{
+ return { aRelRect.X1 / hDiv, aRelRect.Y1 / vDiv, aRelRect.X2 / hDiv, aRelRect.Y2 / vDiv };
+}
+
+// ECMA-376 Part 1 20.1.8.55 srcRect (Source Rectangle)
+std::optional<Quotients> CropQuotientsFromSrcRect(geometry::IntegerRectangle2D aSrcRect)
+{
+ aSrcRect.X1 = std::max(aSrcRect.X1, sal_Int32(0));
+ aSrcRect.X2 = std::max(aSrcRect.X2, sal_Int32(0));
+ aSrcRect.Y1 = std::max(aSrcRect.Y1, sal_Int32(0));
+ aSrcRect.Y2 = std::max(aSrcRect.Y2, sal_Int32(0));
+ if (aSrcRect.X1 + aSrcRect.X2 >= 100'000 || aSrcRect.Y1 + aSrcRect.Y2 >= 100'000)
+ return {}; // Cropped everything
+ return getQuotients(aSrcRect, 100'000.0, 100'000.0);
+}
+
+// ECMA-376 Part 1 20.1.8.30 fillRect (Fill Rectangle)
+std::optional<Quotients> CropQuotientsFromFillRect(geometry::IntegerRectangle2D aFillRect)
+{
+ aFillRect.X1 = std::min(aFillRect.X1, sal_Int32(0));
+ aFillRect.X2 = std::min(aFillRect.X2, sal_Int32(0));
+ aFillRect.Y1 = std::min(aFillRect.Y1, sal_Int32(0));
+ aFillRect.Y2 = std::min(aFillRect.Y2, sal_Int32(0));
+ // Negative divisor and negative relative offset give positive value wanted in lclCropGraphic
+ return getQuotients(aFillRect, -100'000.0 + aFillRect.X1 + aFillRect.X2,
+ -100'000.0 + aFillRect.Y1 + aFillRect.Y2);
+}
+
+// Crops a piece of the bitmap. lclCropGraphic doesn't handle growing.
+Reference<XGraphic> lclCropGraphic(uno::Reference<graphic::XGraphic> const& xGraphic,
+ std::optional<Quotients> quotients)
+{
+ ::Graphic aGraphic(xGraphic);
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx;
+ if (quotients)
+ {
+ aBitmapEx = aGraphic.GetBitmapEx();
+
+ const Size bmpSize = aBitmapEx.GetSizePixel();
+ const auto& [qx1, qy1, qx2, qy2] = *quotients;
+ const tools::Long l = std::round(bmpSize.Width() * qx1);
+ const tools::Long t = std::round(bmpSize.Height() * qy1);
+ const tools::Long r = std::round(bmpSize.Width() * qx2);
+ const tools::Long b = std::round(bmpSize.Height() * qy2);
+
+ aBitmapEx.Crop({ l, t, bmpSize.Width() - r - 1, bmpSize.Height() - b - 1 });
+ }
+
+ ::Graphic aReturnGraphic(aBitmapEx);
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+ return aReturnGraphic.GetXGraphic();
+}
+
+Reference< XGraphic > lclMirrorGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, bool bFlipH, bool bFlipV)
+{
+ ::Graphic aGraphic(xGraphic);
+ ::Graphic aReturnGraphic;
+
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+ BmpMirrorFlags nMirrorFlags = BmpMirrorFlags::NONE;
+
+ if(bFlipH)
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
+ if(bFlipV)
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
+
+ aBitmapEx.Mirror(nMirrorFlags);
+
+ aReturnGraphic = ::Graphic(aBitmapEx);
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+ return aReturnGraphic.GetXGraphic();
+}
+
+Reference< XGraphic > lclGreysScaleGraphic(uno::Reference<graphic::XGraphic> const & xGraphic)
+{
+ ::Graphic aGraphic(xGraphic);
+ ::Graphic aReturnGraphic;
+
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+ aBitmapEx.Convert(BmpConversion::N8BitGreys);
+
+ aReturnGraphic = ::Graphic(aBitmapEx);
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+ return aReturnGraphic.GetXGraphic();
+}
+
+/// Applies the graphic Black&White (Monochrome) effect with the imported threshold
+Reference<XGraphic> lclApplyBlackWhiteEffect(const BlipFillProperties& aBlipProps,
+ const uno::Reference<graphic::XGraphic>& xGraphic)
+{
+ const auto& oBiLevelThreshold = aBlipProps.moBiLevelThreshold;
+ if (oBiLevelThreshold.has())
+ {
+ sal_uInt8 nThreshold
+ = static_cast<sal_uInt8>(oBiLevelThreshold.get() * 255 / MAX_PERCENT);
+
+ ::Graphic aGraphic(xGraphic);
+ ::Graphic aReturnGraphic;
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+ AlphaMask aMask(aBitmapEx.GetAlpha());
+
+ BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap());
+ BitmapFilter::Filter(aTmpBmpEx, BitmapMonochromeFilter{ nThreshold });
+
+ aReturnGraphic = ::Graphic(BitmapEx(aTmpBmpEx.GetBitmap(), aMask));
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+ return aReturnGraphic.GetXGraphic();
+ }
+ return xGraphic;
+}
+
+Reference< XGraphic > lclCheckAndApplyChangeColorTransform(const BlipFillProperties &aBlipProps, uno::Reference<graphic::XGraphic> const & xGraphic,
+ const GraphicHelper& rGraphicHelper, const ::Color nPhClr)
+{
+ if( aBlipProps.maColorChangeFrom.isUsed() && aBlipProps.maColorChangeTo.isUsed() )
+ {
+ ::Color nFromColor = aBlipProps.maColorChangeFrom.getColor( rGraphicHelper, nPhClr );
+ ::Color nToColor = aBlipProps.maColorChangeTo.getColor( rGraphicHelper, nPhClr );
+ if ( (nFromColor != nToColor) || aBlipProps.maColorChangeTo.hasTransparency() )
+ {
+ sal_Int16 nToTransparence = aBlipProps.maColorChangeTo.getTransparency();
+ sal_Int8 nToAlpha = static_cast< sal_Int8 >( (100 - nToTransparence) * 2.55 );
+
+ sal_uInt8 nTolerance = 9;
+ Graphic aGraphic{ xGraphic };
+ if( aGraphic.IsGfxLink() )
+ {
+ // tdf#149670: Try to guess tolerance depending on image format
+ switch (aGraphic.GetGfxLink().GetType())
+ {
+ case GfxLinkType::NativeJpg:
+ nTolerance = 15;
+ break;
+ case GfxLinkType::NativePng:
+ case GfxLinkType::NativeTif:
+ nTolerance = 1;
+ break;
+ case GfxLinkType::NativeBmp:
+ nTolerance = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
+ uno::Reference<graphic::XGraphicTransformer> xTransformer(aBlipProps.mxFillGraphic, uno::UNO_QUERY);
+ if (xTransformer.is())
+ return xTransformer->colorChange(xGraphic, sal_Int32(nFromColor), nTolerance, sal_Int32(nToColor), nToAlpha);
+ }
+ }
+ return xGraphic;
+}
+
+uno::Reference<graphic::XGraphic> applyBrightnessContrast(uno::Reference<graphic::XGraphic> const & xGraphic, sal_Int32 brightness, sal_Int32 contrast)
+{
+ uno::Reference<graphic::XGraphicTransformer> xTransformer(xGraphic, uno::UNO_QUERY);
+ if (xTransformer.is())
+ return xTransformer->applyBrightnessContrast(xGraphic, brightness, contrast, true);
+ return xGraphic;
+}
+
+BitmapMode lclGetBitmapMode( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_tile: return BitmapMode_REPEAT;
+ case XML_stretch: return BitmapMode_STRETCH;
+ }
+
+ // tdf#128596 Default value is XML_tile for MSO.
+ return BitmapMode_REPEAT;
+}
+
+RectanglePoint lclGetRectanglePoint( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_tl: return RectanglePoint_LEFT_TOP;
+ case XML_t: return RectanglePoint_MIDDLE_TOP;
+ case XML_tr: return RectanglePoint_RIGHT_TOP;
+ case XML_l: return RectanglePoint_LEFT_MIDDLE;
+ case XML_ctr: return RectanglePoint_MIDDLE_MIDDLE;
+ case XML_r: return RectanglePoint_RIGHT_MIDDLE;
+ case XML_bl: return RectanglePoint_LEFT_BOTTOM;
+ case XML_b: return RectanglePoint_MIDDLE_BOTTOM;
+ case XML_br: return RectanglePoint_RIGHT_BOTTOM;
+ }
+ return RectanglePoint_LEFT_TOP;
+}
+
+awt::Size lclGetOriginalSize( const GraphicHelper& rGraphicHelper, const Reference< XGraphic >& rxGraphic )
+{
+ awt::Size aSizeHmm( 0, 0 );
+ try
+ {
+ Reference< beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
+ if( xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm )
+ {
+ if( !aSizeHmm.Width && !aSizeHmm.Height )
+ { // MAPMODE_PIXEL USED :-(
+ awt::Size aSourceSizePixel( 0, 0 );
+ if( xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel )
+ aSizeHmm = rGraphicHelper.convertScreenPixelToHmm( aSourceSizePixel );
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ }
+ return aSizeHmm;
+}
+
+/**
+ * Looks for a last gradient transition and possibly sets a gradient border
+ * based on that.
+ */
+void extractGradientBorderFromStops(const GradientFillProperties& rGradientProps,
+ const GraphicHelper& rGraphicHelper, ::Color nPhClr,
+ awt::Gradient& rGradient)
+{
+ if (rGradientProps.maGradientStops.size() <= 1)
+ return;
+
+ auto it = rGradientProps.maGradientStops.rbegin();
+ double fLastPos = it->first;
+ Color aLastColor = it->second;
+ ++it;
+ double fLastButOnePos = it->first;
+ Color aLastButOneColor = it->second;
+ if (!aLastColor.equals(aLastButOneColor, rGraphicHelper, nPhClr))
+ return;
+
+ // Last transition has the same color, we can map that to a border.
+ rGradient.Border = rtl::math::round((fLastPos - fLastButOnePos) * 100);
+}
+
+} // namespace
+
+void GradientFillProperties::assignUsed( const GradientFillProperties& rSourceProps )
+{
+ if( !rSourceProps.maGradientStops.empty() )
+ maGradientStops = rSourceProps.maGradientStops;
+ moFillToRect.assignIfUsed( rSourceProps.moFillToRect );
+ moTileRect.assignIfUsed( rSourceProps.moTileRect );
+ moGradientPath.assignIfUsed( rSourceProps.moGradientPath );
+ moShadeAngle.assignIfUsed( rSourceProps.moShadeAngle );
+ moShadeFlip.assignIfUsed( rSourceProps.moShadeFlip );
+ moShadeScaled.assignIfUsed( rSourceProps.moShadeScaled );
+ moRotateWithShape.assignIfUsed( rSourceProps.moRotateWithShape );
+}
+
+void PatternFillProperties::assignUsed( const PatternFillProperties& rSourceProps )
+{
+ maPattFgColor.assignIfUsed( rSourceProps.maPattFgColor );
+ maPattBgColor.assignIfUsed( rSourceProps.maPattBgColor );
+ moPattPreset.assignIfUsed( rSourceProps.moPattPreset );
+}
+
+void BlipFillProperties::assignUsed( const BlipFillProperties& rSourceProps )
+{
+ if(rSourceProps.mxFillGraphic.is())
+ mxFillGraphic = rSourceProps.mxFillGraphic;
+ moBitmapMode.assignIfUsed( rSourceProps.moBitmapMode );
+ moFillRect.assignIfUsed( rSourceProps.moFillRect );
+ moTileOffsetX.assignIfUsed( rSourceProps.moTileOffsetX );
+ moTileOffsetY.assignIfUsed( rSourceProps.moTileOffsetY );
+ moTileScaleX.assignIfUsed( rSourceProps.moTileScaleX );
+ moTileScaleY.assignIfUsed( rSourceProps.moTileScaleY );
+ moTileAlign.assignIfUsed( rSourceProps.moTileAlign );
+ moTileFlip.assignIfUsed( rSourceProps.moTileFlip );
+ moRotateWithShape.assignIfUsed( rSourceProps.moRotateWithShape );
+ moColorEffect.assignIfUsed( rSourceProps.moColorEffect );
+ moBrightness.assignIfUsed( rSourceProps.moBrightness );
+ moContrast.assignIfUsed( rSourceProps.moContrast );
+ moBiLevelThreshold.assignIfUsed( rSourceProps.moBiLevelThreshold );
+ maColorChangeFrom.assignIfUsed( rSourceProps.maColorChangeFrom );
+ maColorChangeTo.assignIfUsed( rSourceProps.maColorChangeTo );
+ maDuotoneColors[0].assignIfUsed( rSourceProps.maDuotoneColors[0] );
+ maDuotoneColors[1].assignIfUsed( rSourceProps.maDuotoneColors[1] );
+ maEffect.assignUsed( rSourceProps.maEffect );
+ moAlphaModFix.assignIfUsed(rSourceProps.moAlphaModFix);
+}
+
+void FillProperties::assignUsed( const FillProperties& rSourceProps )
+{
+ moFillType.assignIfUsed( rSourceProps.moFillType );
+ maFillColor.assignIfUsed( rSourceProps.maFillColor );
+ moUseBgFill.assignIfUsed( rSourceProps.moUseBgFill );
+ maGradientProps.assignUsed( rSourceProps.maGradientProps );
+ maPatternProps.assignUsed( rSourceProps.maPatternProps );
+ maBlipProps.assignUsed( rSourceProps.maBlipProps );
+}
+
+Color FillProperties::getBestSolidColor() const
+{
+ Color aSolidColor;
+ if( moFillType.has() ) switch( moFillType.get() )
+ {
+ case XML_solidFill:
+ aSolidColor = maFillColor;
+ break;
+ case XML_gradFill:
+ if( !maGradientProps.maGradientStops.empty() )
+ {
+ GradientFillProperties::GradientStopMap::const_iterator aGradientStop =
+ maGradientProps.maGradientStops.begin();
+ if (maGradientProps.maGradientStops.size() > 2)
+ ++aGradientStop;
+ aSolidColor = aGradientStop->second;
+ }
+ break;
+ case XML_pattFill:
+ aSolidColor = maPatternProps.maPattBgColor.isUsed() ? maPatternProps.maPattBgColor : maPatternProps.maPattFgColor;
+ break;
+ }
+ return aSolidColor;
+}
+
+void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, ::Color nPhClr, sal_Int16 nPhClrTheme,
+ bool bFlipH, bool bFlipV, bool bIsCustomShape) const
+{
+ if( !moFillType.has() )
+ return;
+
+ FillStyle eFillStyle = FillStyle_NONE;
+ OSL_ASSERT((moFillType.get() & sal_Int32(0xFFFF0000))==0);
+ switch( moFillType.get() )
+ {
+ case XML_noFill:
+ {
+ eFillStyle = FillStyle_NONE;
+ rPropMap.setProperty(ShapeProperty::FillUseSlideBackground, moUseBgFill.get(false));
+ }
+ break;
+
+ case XML_solidFill:
+ if( maFillColor.isUsed() )
+ {
+ ::Color aFillColor = maFillColor.getColor(rGraphicHelper, nPhClr);
+ rPropMap.setProperty(ShapeProperty::FillColor, aFillColor);
+ if( maFillColor.hasTransparency() )
+ rPropMap.setProperty( ShapeProperty::FillTransparency, maFillColor.getTransparency() );
+
+ if (aFillColor == nPhClr)
+ {
+ rPropMap.setProperty(PROP_FillColorTheme, nPhClrTheme);
+ }
+ else if (maFillColor.getTintOrShade() == 0)
+ {
+ rPropMap.setProperty(PROP_FillColorTheme, maFillColor.getSchemeColorIndex());
+ rPropMap.setProperty(PROP_FillColorLumMod, maFillColor.getLumMod());
+ rPropMap.setProperty(PROP_FillColorLumOff, maFillColor.getLumOff());
+ }
+
+ eFillStyle = FillStyle_SOLID;
+ }
+ break;
+
+ case XML_gradFill:
+ // do not create gradient struct if property is not supported...
+ if( rPropMap.supportsProperty( ShapeProperty::FillGradient ) )
+ {
+ sal_Int32 nEndTrans = 0;
+ sal_Int32 nStartTrans = 0;
+ awt::Gradient aGradient;
+ aGradient.Angle = 900;
+ aGradient.StartIntensity = 100;
+ aGradient.EndIntensity = 100;
+
+ // Old code, values in aGradient overwritten in many cases by newer code below
+ if( maGradientProps.maGradientStops.size() > 1 )
+ {
+ aGradient.StartColor = sal_Int32(maGradientProps.maGradientStops.begin()->second.getColor( rGraphicHelper, nPhClr ));
+ aGradient.EndColor = sal_Int32(maGradientProps.maGradientStops.rbegin()->second.getColor( rGraphicHelper, nPhClr ));
+ if( maGradientProps.maGradientStops.rbegin()->second.hasTransparency() )
+ nEndTrans = maGradientProps.maGradientStops.rbegin()->second.getTransparency()*255/100;
+ if( maGradientProps.maGradientStops.begin()->second.hasTransparency() )
+ nStartTrans = maGradientProps.maGradientStops.begin()->second.getTransparency()*255/100;
+ }
+
+ // "rotate with shape" set to false -> do not rotate
+ if ( !maGradientProps.moRotateWithShape.get( true ) )
+ nShapeRotation = 0;
+
+ if( maGradientProps.moGradientPath.has() )
+ {
+ IntegerRectangle2D aFillToRect = maGradientProps.moFillToRect.get( IntegerRectangle2D( 0, 0, MAX_PERCENT, MAX_PERCENT ) );
+ sal_Int32 nCenterX = (MAX_PERCENT + aFillToRect.X1 - aFillToRect.X2) / 2;
+ aGradient.XOffset = getLimitedValue<sal_Int16, sal_Int32>(
+ nCenterX / PER_PERCENT, 0, 100);
+ sal_Int32 nCenterY = (MAX_PERCENT + aFillToRect.Y1 - aFillToRect.Y2) / 2;
+ aGradient.YOffset = getLimitedValue<sal_Int16, sal_Int32>(
+ nCenterY / PER_PERCENT, 0, 100);
+
+ if( maGradientProps.moGradientPath.get() == XML_circle )
+ {
+ // Style should be radial at least when the horizontal center is at 50%.
+ // Otherwise import as a linear gradient, because it is the most similar to the MSO radial style.
+ aGradient.Style = awt::GradientStyle_LINEAR;
+ if( aGradient.XOffset == 100 && aGradient.YOffset == 100 )
+ aGradient.Angle = 450;
+ else if( aGradient.XOffset == 0 && aGradient.YOffset == 100 )
+ aGradient.Angle = 3150;
+ else if( aGradient.XOffset == 100 && aGradient.YOffset == 0 )
+ aGradient.Angle = 1350;
+ else if( aGradient.XOffset == 0 && aGradient.YOffset == 0 )
+ aGradient.Angle = 2250;
+ else
+ aGradient.Style = awt::GradientStyle_RADIAL;
+ }
+ else
+ {
+ aGradient.Style = awt::GradientStyle_RECT;
+ }
+
+ ::std::swap( aGradient.StartColor, aGradient.EndColor );
+ ::std::swap( nStartTrans, nEndTrans );
+
+ extractGradientBorderFromStops(maGradientProps, rGraphicHelper, nPhClr,
+ aGradient);
+ }
+ else if (!maGradientProps.maGradientStops.empty())
+ {
+ // A copy of the gradient stops for local modification
+ GradientFillProperties::GradientStopMap aGradientStops(maGradientProps.maGradientStops);
+
+ // Add a fake gradient stop at 0% and 100% if necessary, so that the gradient always starts
+ // at 0% and ends at 100%, to make following logic clearer (?).
+ auto a0 = aGradientStops.find( 0.0 );
+ if( a0 == aGradientStops.end() )
+ {
+ // temp variable required
+ Color aFirstColor(aGradientStops.begin()->second);
+ aGradientStops.emplace( 0.0, aFirstColor );
+ }
+
+ auto a1 = aGradientStops.find( 1.0 );
+ if( a1 == aGradientStops.end() )
+ {
+ // ditto
+ Color aLastColor(aGradientStops.rbegin()->second);
+ aGradientStops.emplace( 1.0, aLastColor );
+ }
+
+ // Check if the gradient is symmetric, which we will emulate with an "axial" gradient.
+ bool bSymmetric(true);
+ {
+ GradientFillProperties::GradientStopMap::const_iterator aItA( aGradientStops.begin() );
+ GradientFillProperties::GradientStopMap::const_iterator aItZ(std::prev(aGradientStops.end()));
+ assert(aItZ != aGradientStops.end());
+ while( bSymmetric && aItA->first < aItZ->first )
+ {
+ if (!aItA->second.equals(aItZ->second, rGraphicHelper, nPhClr))
+ bSymmetric = false;
+ else
+ {
+ ++aItA;
+ aItZ = std::prev(aItZ);
+ }
+ }
+ // Don't be fooled if the middlemost stop isn't at 0.5.
+ if( bSymmetric && aItA == aItZ && aItA->first != 0.5 )
+ bSymmetric = false;
+
+ // If symmetric, do the rest of the logic for just a half.
+ if( bSymmetric )
+ {
+ // aItZ already points to the colour for the middle, but insert a fake stop at the
+ // exact middle if necessary.
+ if( aItA->first != aItZ->first )
+ {
+ Color aMiddleColor = aItZ->second;
+ auto a05 = aGradientStops.find( 0.5 );
+
+ if( a05 != aGradientStops.end() )
+ a05->second = aMiddleColor;
+ else
+ aGradientStops.emplace( 0.5, aMiddleColor );
+ }
+ // Drop the rest of the stops
+ while( aGradientStops.rbegin()->first > 0.5 )
+ aGradientStops.erase( aGradientStops.rbegin()->first );
+ }
+ }
+
+ SAL_INFO("oox.drawingml.gradient", "symmetric: " << (bSymmetric ? "YES" : "NO") <<
+ ", number of stops: " << aGradientStops.size());
+ size_t nIndex = 0;
+ for (auto const& gradientStop : aGradientStops)
+ SAL_INFO("oox.drawingml.gradient", " " << nIndex++ << ": " <<
+ gradientStop.first << ": " <<
+ std::hex << sal_Int32(gradientStop.second.getColor( rGraphicHelper, nPhClr )) << std::dec <<
+ "@" << (100 - gradientStop.second.getTransparency()) << "%");
+
+ // Now estimate the simple LO style gradient (only two stops, at n% and 100%, where n ==
+ // the "border") that best emulates the gradient between begin() and prior(end()).
+
+ // First look for the largest segment in the gradient.
+ GradientFillProperties::GradientStopMap::iterator aIt(aGradientStops.begin());
+ double nWidestWidth = -1;
+ GradientFillProperties::GradientStopMap::iterator aWidestSegmentStart;
+ ++aIt;
+ while( aIt != aGradientStops.end() )
+ {
+ if (aIt->first - std::prev(aIt)->first > nWidestWidth)
+ {
+ nWidestWidth = aIt->first - std::prev(aIt)->first;
+ aWidestSegmentStart = std::prev(aIt);
+ }
+ ++aIt;
+ }
+ assert( nWidestWidth > 0 );
+
+ double nBorder = 0;
+ bool bSwap(false);
+
+ // Do we have just two segments, and either one is of uniform colour, or three or more
+ // segments, and the widest one is the first or last one, and is it of uniform colour? If
+ // so, deduce the border from it, and drop that segment.
+ if( aGradientStops.size() == 3 &&
+ aGradientStops.begin()->second.getColor(rGraphicHelper, nPhClr) == std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) &&
+ aGradientStops.begin()->second.getTransparency() == std::next(aGradientStops.begin())->second.getTransparency())
+ {
+ // Two segments, first is uniformly coloured
+ SAL_INFO("oox.drawingml.gradient", "two segments, first is uniformly coloured");
+ nBorder = std::next(aGradientStops.begin())->first - aGradientStops.begin()->first;
+ aGradientStops.erase(aGradientStops.begin());
+ aWidestSegmentStart = aGradientStops.begin();
+ }
+ else if( !bSymmetric &&
+ aGradientStops.size() == 3 &&
+ std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) == std::prev(aGradientStops.end())->second.getColor(rGraphicHelper, nPhClr) &&
+ std::next(aGradientStops.begin())->second.getTransparency() == std::prev(aGradientStops.end())->second.getTransparency())
+ {
+ // Two segments, second is uniformly coloured
+ SAL_INFO("oox.drawingml.gradient", "two segments, second is uniformly coloured");
+ auto aNext = std::next(aGradientStops.begin());
+ auto aPrev = std::prev(aGradientStops.end());
+ assert(aPrev != aGradientStops.end());
+ nBorder = aPrev->first - aNext->first;
+ aGradientStops.erase(aNext);
+ aWidestSegmentStart = aGradientStops.begin();
+ bSwap = true;
+ nShapeRotation = 180*60000 - nShapeRotation;
+ }
+ else if( !bSymmetric &&
+ aGradientStops.size() >= 4 &&
+ aWidestSegmentStart->second.getColor( rGraphicHelper, nPhClr ) == std::next(aWidestSegmentStart)->second.getColor(rGraphicHelper, nPhClr) &&
+ aWidestSegmentStart->second.getTransparency() == std::next(aWidestSegmentStart)->second.getTransparency() &&
+ ( aWidestSegmentStart == aGradientStops.begin() ||
+ std::next(aWidestSegmentStart) == std::prev(aGradientStops.end())))
+ {
+ // Not symmetric, three or more segments, the widest is first or last and is uniformly coloured
+ SAL_INFO("oox.drawingml.gradient", "first or last segment is widest and is uniformly coloured");
+ nBorder = std::next(aWidestSegmentStart)->first - aWidestSegmentStart->first;
+
+ // If it's the last segment that is uniformly coloured, rotate the gradient 180
+ // degrees and swap start and end colours
+ if (std::next(aWidestSegmentStart) == std::prev(aGradientStops.end()))
+ {
+ bSwap = true;
+ nShapeRotation = 180*60000 - nShapeRotation;
+ }
+
+ aGradientStops.erase( aWidestSegmentStart++ );
+
+ // Look for which is widest now
+ aIt = std::next(aGradientStops.begin());
+ nWidestWidth = -1;
+ while( aIt != aGradientStops.end() )
+ {
+ if (aIt->first - std::prev(aIt)->first > nWidestWidth)
+ {
+ nWidestWidth = aIt->first - std::prev(aIt)->first;
+ aWidestSegmentStart = std::prev(aIt);
+ }
+ ++aIt;
+ }
+ }
+ SAL_INFO("oox.drawingml.gradient", "widest segment start: " << aWidestSegmentStart->first << ", border: " << nBorder);
+ assert( (!bSymmetric && !bSwap) || !(bSymmetric && bSwap) );
+
+ // Now we have a potential border and a largest segment. Use those.
+
+ aGradient.Style = bSymmetric ? awt::GradientStyle_AXIAL : awt::GradientStyle_LINEAR;
+ sal_Int32 nShadeAngle = maGradientProps.moShadeAngle.get( 0 );
+ // Adjust for flips
+ if ( bFlipH )
+ nShadeAngle = 180*60000 - nShadeAngle;
+ if ( bFlipV )
+ nShadeAngle = -nShadeAngle;
+ sal_Int32 nDmlAngle = nShadeAngle + nShapeRotation;
+ // convert DrawingML angle (in 1/60000 degrees) to API angle (in 1/10 degrees)
+ aGradient.Angle = static_cast< sal_Int16 >( (8100 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 );
+ Color aStartColor, aEndColor;
+
+ // Make a note where the widest segment stops, because we will try to grow it next.
+ auto aWidestSegmentEnd = std::next(aWidestSegmentStart);
+
+ // Try to grow the widest segment backwards: if a previous segment has the same
+ // color, just different transparency, include it.
+ while (aWidestSegmentStart != aGradientStops.begin())
+ {
+ auto it = std::prev(aWidestSegmentStart);
+ if (it->second.getColor(rGraphicHelper, nPhClr)
+ != aWidestSegmentStart->second.getColor(rGraphicHelper, nPhClr))
+ {
+ break;
+ }
+
+ aWidestSegmentStart = it;
+ }
+
+ // Try to grow the widest segment forward: if a next segment has the same
+ // color, just different transparency, include it.
+ while (aWidestSegmentEnd != std::prev(aGradientStops.end()))
+ {
+ auto it = std::next(aWidestSegmentEnd);
+ if (it->second.getColor(rGraphicHelper, nPhClr)
+ != aWidestSegmentEnd->second.getColor(rGraphicHelper, nPhClr))
+ {
+ break;
+ }
+
+ aWidestSegmentEnd = it;
+ }
+
+ assert(aWidestSegmentEnd != aGradientStops.end());
+
+ if( bSymmetric )
+ {
+ aStartColor = aWidestSegmentEnd->second;
+ aEndColor = aWidestSegmentStart->second;
+ nBorder *= 2;
+ }
+ else if( bSwap )
+ {
+ aStartColor = aWidestSegmentEnd->second;
+ aEndColor = aWidestSegmentStart->second;
+ }
+ else
+ {
+ aStartColor = aWidestSegmentStart->second;
+ aEndColor = aWidestSegmentEnd->second;
+ }
+
+ SAL_INFO("oox.drawingml.gradient", "start color: " << std::hex << sal_Int32(aStartColor.getColor( rGraphicHelper, nPhClr )) << std::dec <<
+ "@" << (100-aStartColor.getTransparency()) << "%"
+ ", end color: " << std::hex << sal_Int32(aEndColor.getColor( rGraphicHelper, nPhClr )) << std::dec <<
+ "@" << (100-aEndColor.getTransparency()) << "%");
+
+ aGradient.StartColor = sal_Int32(aStartColor.getColor( rGraphicHelper, nPhClr ));
+ aGradient.EndColor = sal_Int32(aEndColor.getColor( rGraphicHelper, nPhClr ));
+
+ nStartTrans = aStartColor.hasTransparency() ? aStartColor.getTransparency()*255/100 : 0;
+ nEndTrans = aEndColor.hasTransparency() ? aEndColor.getTransparency()*255/100 : 0;
+
+ aGradient.Border = rtl::math::round(100*nBorder);
+ }
+
+ // push gradient or named gradient to property map
+ if( rPropMap.setProperty( ShapeProperty::FillGradient, aGradient ) )
+ eFillStyle = FillStyle_GRADIENT;
+
+ // push gradient transparency to property map
+ if( nStartTrans != 0 || nEndTrans != 0 )
+ {
+ awt::Gradient aGrad(aGradient);
+ uno::Any aVal;
+ aGrad.EndColor = static_cast<sal_Int32>( nEndTrans | nEndTrans << 8 | nEndTrans << 16 );
+ aGrad.StartColor = static_cast<sal_Int32>( nStartTrans | nStartTrans << 8 | nStartTrans << 16 );
+ aVal <<= aGrad;
+ rPropMap.setProperty( ShapeProperty::GradientTransparency, aGrad );
+ }
+
+ }
+ break;
+
+ case XML_blipFill:
+ // do not start complex graphic transformation if property is not supported...
+ if (maBlipProps.mxFillGraphic.is() && rPropMap.supportsProperty(ShapeProperty::FillBitmap))
+ {
+ uno::Reference<graphic::XGraphic> xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, maBlipProps.mxFillGraphic, rGraphicHelper, nPhClr);
+ // TODO: "rotate with shape" is not possible with our current core
+
+ if (xGraphic.is())
+ {
+ if (maBlipProps.moColorEffect.get(XML_TOKEN_INVALID) == XML_grayscl)
+ xGraphic = lclGreysScaleGraphic(xGraphic);
+
+ if (rPropMap.supportsProperty(ShapeProperty::FillBitmapName) &&
+ rPropMap.setProperty(ShapeProperty::FillBitmapName, xGraphic))
+ {
+ eFillStyle = FillStyle_BITMAP;
+ }
+ else if (rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic))
+ {
+ eFillStyle = FillStyle_BITMAP;
+ }
+ }
+
+ // set other bitmap properties, if bitmap has been inserted into the map
+ if( eFillStyle == FillStyle_BITMAP )
+ {
+ // bitmap mode (single, repeat, stretch)
+ BitmapMode eBitmapMode = lclGetBitmapMode( maBlipProps.moBitmapMode.get( XML_TOKEN_INVALID ) );
+ rPropMap.setProperty( ShapeProperty::FillBitmapMode, eBitmapMode );
+
+ // additional settings for repeated bitmap
+ if( eBitmapMode == BitmapMode_REPEAT )
+ {
+ // anchor position inside bitmap
+ RectanglePoint eRectPoint = lclGetRectanglePoint( maBlipProps.moTileAlign.get( XML_tl ) );
+ rPropMap.setProperty( ShapeProperty::FillBitmapRectanglePoint, eRectPoint );
+
+ awt::Size aOriginalSize = lclGetOriginalSize(rGraphicHelper, maBlipProps.mxFillGraphic);
+ if( (aOriginalSize.Width > 0) && (aOriginalSize.Height > 0) )
+ {
+ // size of one bitmap tile (given as 1/1000 percent of bitmap size), convert to 1/100 mm
+ double fScaleX = maBlipProps.moTileScaleX.get( MAX_PERCENT ) / static_cast< double >( MAX_PERCENT );
+ sal_Int32 nFillBmpSizeX = getLimitedValue< sal_Int32, double >( aOriginalSize.Width * fScaleX, 1, SAL_MAX_INT32 );
+ rPropMap.setProperty( ShapeProperty::FillBitmapSizeX, nFillBmpSizeX );
+ double fScaleY = maBlipProps.moTileScaleY.get( MAX_PERCENT ) / static_cast< double >( MAX_PERCENT );
+ sal_Int32 nFillBmpSizeY = getLimitedValue< sal_Int32, double >( aOriginalSize.Height * fScaleY, 1, SAL_MAX_INT32 );
+ rPropMap.setProperty( ShapeProperty::FillBitmapSizeY, nFillBmpSizeY );
+
+ // offset of the first bitmap tile (given as EMUs), convert to percent
+ sal_Int16 nTileOffsetX = getDoubleIntervalValue< sal_Int16 >( std::round( maBlipProps.moTileOffsetX.get( 0 ) / 3.6 / aOriginalSize.Width ), 0, 100 );
+ rPropMap.setProperty( ShapeProperty::FillBitmapOffsetX, nTileOffsetX );
+ sal_Int16 nTileOffsetY = getDoubleIntervalValue< sal_Int16 >( std::round( maBlipProps.moTileOffsetY.get( 0 ) / 3.6 / aOriginalSize.Height ), 0, 100 );
+ rPropMap.setProperty( ShapeProperty::FillBitmapOffsetY, nTileOffsetY );
+ }
+ }
+ else if ( eBitmapMode == BitmapMode_STRETCH && maBlipProps.moFillRect.has() )
+ {
+ geometry::IntegerRectangle2D aFillRect( maBlipProps.moFillRect.get() );
+ awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic ) );
+ if ( aOriginalSize.Width && aOriginalSize.Height )
+ {
+ text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
+ if ( aFillRect.X1 )
+ aGraphCrop.Left = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Width ) * aFillRect.X1 ) / 100000 );
+ if ( aFillRect.Y1 )
+ aGraphCrop.Top = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Height ) * aFillRect.Y1 ) / 100000 );
+ if ( aFillRect.X2 )
+ aGraphCrop.Right = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Width ) * aFillRect.X2 ) / 100000 );
+ if ( aFillRect.Y2 )
+ aGraphCrop.Bottom = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Height ) * aFillRect.Y2 ) / 100000 );
+
+ bool bHasCropValues = aGraphCrop.Left != 0 || aGraphCrop.Right !=0 || aGraphCrop.Top != 0 || aGraphCrop.Bottom != 0;
+ // Negative GraphicCrop values means "crop" here.
+ bool bNeedCrop = aGraphCrop.Left <= 0 && aGraphCrop.Right <= 0 && aGraphCrop.Top <= 0 && aGraphCrop.Bottom <= 0;
+
+ if(bIsCustomShape && bHasCropValues && bNeedCrop)
+ {
+ // Physically crop the image
+ // In this case, don't set the PROP_GraphicCrop because that
+ // would lead to applying the crop twice after roundtrip
+ xGraphic = lclCropGraphic(xGraphic, CropQuotientsFromFillRect(aFillRect));
+ if (rPropMap.supportsProperty(ShapeProperty::FillBitmapName))
+ rPropMap.setProperty(ShapeProperty::FillBitmapName, xGraphic);
+ else
+ rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic);
+ }
+ else
+ rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
+ }
+ }
+ }
+
+ if (maBlipProps.moAlphaModFix.has())
+ rPropMap.setProperty(ShapeProperty::FillTransparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT)));
+ }
+ break;
+
+ case XML_pattFill:
+ {
+ if( rPropMap.supportsProperty( ShapeProperty::FillHatch ) )
+ {
+ Color aColor( maPatternProps.maPattFgColor );
+ if( aColor.isUsed() && maPatternProps.moPattPreset.has() )
+ {
+ eFillStyle = FillStyle_HATCH;
+ rPropMap.setProperty( ShapeProperty::FillHatch, createHatch( maPatternProps.moPattPreset.get(), aColor.getColor( rGraphicHelper, nPhClr ) ) );
+ if( aColor.hasTransparency() )
+ rPropMap.setProperty( ShapeProperty::FillTransparency, aColor.getTransparency() );
+
+ // Set background color for hatch
+ if(maPatternProps.maPattBgColor.isUsed())
+ {
+ aColor = maPatternProps.maPattBgColor;
+ rPropMap.setProperty( ShapeProperty::FillBackground, aColor.getTransparency() != 100 );
+ rPropMap.setProperty( ShapeProperty::FillColor, aColor.getColor( rGraphicHelper, nPhClr ) );
+ }
+ }
+ else if ( maPatternProps.maPattBgColor.isUsed() )
+ {
+ aColor = maPatternProps.maPattBgColor;
+ rPropMap.setProperty( ShapeProperty::FillColor, aColor.getColor( rGraphicHelper, nPhClr ) );
+ if( aColor.hasTransparency() )
+ rPropMap.setProperty( ShapeProperty::FillTransparency, aColor.getTransparency() );
+ eFillStyle = FillStyle_SOLID;
+ }
+ }
+ }
+ break;
+
+ case XML_grpFill:
+ // todo
+ eFillStyle = FillStyle_NONE;
+ break;
+ }
+
+ // set final fill style property
+ rPropMap.setProperty( ShapeProperty::FillStyle, eFillStyle );
+}
+
+void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, bool bFlipH, bool bFlipV) const
+{
+ sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
+ sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
+ ColorMode eColorMode = ColorMode_STANDARD;
+
+ switch( maBlipProps.moColorEffect.get( XML_TOKEN_INVALID ) )
+ {
+ case XML_biLevel: eColorMode = ColorMode_MONO; break;
+ case XML_grayscl: eColorMode = ColorMode_GREYS; break;
+ }
+
+ if (maBlipProps.mxFillGraphic.is())
+ {
+ // created transformed graphic
+ uno::Reference<graphic::XGraphic> xGraphic = lclCheckAndApplyChangeColorTransform(maBlipProps, maBlipProps.mxFillGraphic, rGraphicHelper, API_RGB_TRANSPARENT);
+ xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, xGraphic, rGraphicHelper, API_RGB_TRANSPARENT);
+
+ if( eColorMode == ColorMode_MONO )
+ {
+ // ColorMode_MONO is the same with MSO's biLevel with 50000 (50%) threshold,
+ // when threshold isn't 50000 bake the effect instead.
+ if( maBlipProps.moBiLevelThreshold.get() != 50000 )
+ {
+ xGraphic = lclApplyBlackWhiteEffect(maBlipProps, xGraphic);
+ eColorMode = ColorMode_STANDARD;
+ }
+ }
+
+ if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast == -70)
+ {
+ // map MSO 'washout' to our Watermark colormode
+ eColorMode = ColorMode_WATERMARK;
+ nBrightness = 0;
+ nContrast = 0;
+ }
+ else if( nBrightness != 0 && nContrast != 0 )
+ {
+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness,
+ // while MSO apparently applies half of brightness before contrast and half after. So if only
+ // contrast or brightness need to be altered, the result is the same, but if both are involved,
+ // there's no way to map that, so just force a conversion of the image.
+ xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast );
+ nBrightness = 0;
+ nContrast = 0;
+ }
+
+ // cropping
+ if ( maBlipProps.moClipRect.has() )
+ {
+ geometry::IntegerRectangle2D oClipRect( maBlipProps.moClipRect.get() );
+ awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic ) );
+ if ( aOriginalSize.Width && aOriginalSize.Height )
+ {
+ text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
+ if ( oClipRect.X1 )
+ aGraphCrop.Left = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X1 ) / 100000 );
+ if ( oClipRect.Y1 )
+ aGraphCrop.Top = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y1 ) / 100000 );
+ if ( oClipRect.X2 )
+ aGraphCrop.Right = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X2 ) / 100000 );
+ if ( oClipRect.Y2 )
+ aGraphCrop.Bottom = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y2 ) / 100000 );
+ rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
+
+ bool bHasCropValues = aGraphCrop.Left != 0 || aGraphCrop.Right !=0 || aGraphCrop.Top != 0 || aGraphCrop.Bottom != 0;
+ // Positive GraphicCrop values means "crop" here.
+ bool bNeedCrop = aGraphCrop.Left >= 0 && aGraphCrop.Right >= 0 && aGraphCrop.Top >= 0 && aGraphCrop.Bottom >= 0;
+
+ if(mbIsCustomShape && bHasCropValues && bNeedCrop)
+ {
+ xGraphic = lclCropGraphic(xGraphic, CropQuotientsFromSrcRect(oClipRect));
+ }
+ }
+ }
+
+ if(mbIsCustomShape)
+ {
+ // it is a cropped graphic.
+ rPropMap.setProperty(PROP_FillStyle, FillStyle_BITMAP);
+ rPropMap.setProperty(PROP_FillBitmapMode, BitmapMode_STRETCH);
+
+ // It is a bitmap filled and rotated graphic.
+ // When custom shape is rotated, bitmap have to be rotated too.
+ if(rPropMap.hasProperty(PROP_RotateAngle))
+ {
+ tools::Long nAngle = rPropMap.getProperty(PROP_RotateAngle).get<tools::Long>();
+ xGraphic = lclRotateGraphic(xGraphic, Degree10(nAngle/10) );
+ }
+
+ // We have not core feature that flips graphic in the shape.
+ // Here we are applying flip property to bitmap directly.
+ if(bFlipH || bFlipV)
+ xGraphic = lclMirrorGraphic(xGraphic, bFlipH, bFlipV );
+
+ if(eColorMode == ColorMode_GREYS)
+ xGraphic = lclGreysScaleGraphic( xGraphic );
+
+ rPropMap.setProperty(PROP_FillBitmap, xGraphic);
+ }
+ else
+ rPropMap.setProperty(PROP_Graphic, xGraphic);
+
+
+ if ( maBlipProps.moAlphaModFix.has() )
+ {
+ rPropMap.setProperty(PROP_Transparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT)));
+ }
+ }
+ rPropMap.setProperty(PROP_GraphicColorMode, eColorMode);
+
+ // brightness and contrast
+ if( nBrightness != 0 )
+ rPropMap.setProperty(PROP_AdjustLuminance, nBrightness);
+ if( nContrast != 0 )
+ rPropMap.setProperty(PROP_AdjustContrast, nContrast);
+
+ // Media content
+ if (!m_sMediaPackageURL.isEmpty())
+ {
+ rPropMap.setProperty(PROP_MediaURL, m_sMediaPackageURL);
+ if (m_xMediaStream.is())
+ rPropMap.setProperty(PROP_PrivateStream, m_xMediaStream);
+ }
+}
+
+bool ArtisticEffectProperties::isEmpty() const
+{
+ return msName.isEmpty();
+}
+
+css::beans::PropertyValue ArtisticEffectProperties::getEffect()
+{
+ css::beans::PropertyValue aRet;
+ if( msName.isEmpty() )
+ return aRet;
+
+ css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() + 1 );
+ auto pSeq = aSeq.getArray();
+ sal_uInt32 i = 0;
+ for (auto const& attrib : maAttribs)
+ {
+ pSeq[i].Name = attrib.first;
+ pSeq[i].Value = attrib.second;
+ i++;
+ }
+
+ if( mrOleObjectInfo.maEmbeddedData.hasElements() )
+ {
+ css::uno::Sequence< css::beans::PropertyValue > aGraphicSeq{
+ comphelper::makePropertyValue("Id", mrOleObjectInfo.maProgId),
+ comphelper::makePropertyValue("Data", mrOleObjectInfo.maEmbeddedData)
+ };
+
+ pSeq[i].Name = "OriginalGraphic";
+ pSeq[i].Value <<= aGraphicSeq;
+ }
+
+ aRet.Name = msName;
+ aRet.Value <<= aSeq;
+
+ return aRet;
+}
+
+void ArtisticEffectProperties::assignUsed( const ArtisticEffectProperties& rSourceProps )
+{
+ if( !rSourceProps.isEmpty() )
+ {
+ msName = rSourceProps.msName;
+ maAttribs = rSourceProps.maAttribs;
+ }
+}
+
+OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken )
+{
+ switch( nToken )
+ {
+ // effects
+ case OOX_TOKEN( a14, artisticBlur ): return "artisticBlur";
+ case OOX_TOKEN( a14, artisticCement ): return "artisticCement";
+ case OOX_TOKEN( a14, artisticChalkSketch ): return "artisticChalkSketch";
+ case OOX_TOKEN( a14, artisticCrisscrossEtching ): return "artisticCrisscrossEtching";
+ case OOX_TOKEN( a14, artisticCutout ): return "artisticCutout";
+ case OOX_TOKEN( a14, artisticFilmGrain ): return "artisticFilmGrain";
+ case OOX_TOKEN( a14, artisticGlass ): return "artisticGlass";
+ case OOX_TOKEN( a14, artisticGlowDiffused ): return "artisticGlowDiffused";
+ case OOX_TOKEN( a14, artisticGlowEdges ): return "artisticGlowEdges";
+ case OOX_TOKEN( a14, artisticLightScreen ): return "artisticLightScreen";
+ case OOX_TOKEN( a14, artisticLineDrawing ): return "artisticLineDrawing";
+ case OOX_TOKEN( a14, artisticMarker ): return "artisticMarker";
+ case OOX_TOKEN( a14, artisticMosiaicBubbles ): return "artisticMosiaicBubbles";
+ case OOX_TOKEN( a14, artisticPaintStrokes ): return "artisticPaintStrokes";
+ case OOX_TOKEN( a14, artisticPaintBrush ): return "artisticPaintBrush";
+ case OOX_TOKEN( a14, artisticPastelsSmooth ): return "artisticPastelsSmooth";
+ case OOX_TOKEN( a14, artisticPencilGrayscale ): return "artisticPencilGrayscale";
+ case OOX_TOKEN( a14, artisticPencilSketch ): return "artisticPencilSketch";
+ case OOX_TOKEN( a14, artisticPhotocopy ): return "artisticPhotocopy";
+ case OOX_TOKEN( a14, artisticPlasticWrap ): return "artisticPlasticWrap";
+ case OOX_TOKEN( a14, artisticTexturizer ): return "artisticTexturizer";
+ case OOX_TOKEN( a14, artisticWatercolorSponge ): return "artisticWatercolorSponge";
+ case OOX_TOKEN( a14, brightnessContrast ): return "brightnessContrast";
+ case OOX_TOKEN( a14, colorTemperature ): return "colorTemperature";
+ case OOX_TOKEN( a14, saturation ): return "saturation";
+ case OOX_TOKEN( a14, sharpenSoften ): return "sharpenSoften";
+
+ // attributes
+ case XML_visible: return "visible";
+ case XML_trans: return "trans";
+ case XML_crackSpacing: return "crackSpacing";
+ case XML_pressure: return "pressure";
+ case XML_numberOfShades: return "numberOfShades";
+ case XML_grainSize: return "grainSize";
+ case XML_intensity: return "intensity";
+ case XML_smoothness: return "smoothness";
+ case XML_gridSize: return "gridSize";
+ case XML_pencilSize: return "pencilSize";
+ case XML_size: return "size";
+ case XML_brushSize: return "brushSize";
+ case XML_scaling: return "scaling";
+ case XML_detail: return "detail";
+ case XML_bright: return "bright";
+ case XML_contrast: return "contrast";
+ case XML_colorTemp: return "colorTemp";
+ case XML_sat: return "sat";
+ case XML_amount: return "amount";
+ }
+ SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString: unexpected token " << nToken );
+ return OUString();
+}
+
+sal_Int32 ArtisticEffectProperties::getEffectToken( const OUString& sName )
+{
+ // effects
+ if( sName == "artisticBlur" )
+ return XML_artisticBlur;
+ else if( sName == "artisticCement" )
+ return XML_artisticCement;
+ else if( sName == "artisticChalkSketch" )
+ return XML_artisticChalkSketch;
+ else if( sName == "artisticCrisscrossEtching" )
+ return XML_artisticCrisscrossEtching;
+ else if( sName == "artisticCutout" )
+ return XML_artisticCutout;
+ else if( sName == "artisticFilmGrain" )
+ return XML_artisticFilmGrain;
+ else if( sName == "artisticGlass" )
+ return XML_artisticGlass;
+ else if( sName == "artisticGlowDiffused" )
+ return XML_artisticGlowDiffused;
+ else if( sName == "artisticGlowEdges" )
+ return XML_artisticGlowEdges;
+ else if( sName == "artisticLightScreen" )
+ return XML_artisticLightScreen;
+ else if( sName == "artisticLineDrawing" )
+ return XML_artisticLineDrawing;
+ else if( sName == "artisticMarker" )
+ return XML_artisticMarker;
+ else if( sName == "artisticMosiaicBubbles" )
+ return XML_artisticMosiaicBubbles;
+ else if( sName == "artisticPaintStrokes" )
+ return XML_artisticPaintStrokes;
+ else if( sName == "artisticPaintBrush" )
+ return XML_artisticPaintBrush;
+ else if( sName == "artisticPastelsSmooth" )
+ return XML_artisticPastelsSmooth;
+ else if( sName == "artisticPencilGrayscale" )
+ return XML_artisticPencilGrayscale;
+ else if( sName == "artisticPencilSketch" )
+ return XML_artisticPencilSketch;
+ else if( sName == "artisticPhotocopy" )
+ return XML_artisticPhotocopy;
+ else if( sName == "artisticPlasticWrap" )
+ return XML_artisticPlasticWrap;
+ else if( sName == "artisticTexturizer" )
+ return XML_artisticTexturizer;
+ else if( sName == "artisticWatercolorSponge" )
+ return XML_artisticWatercolorSponge;
+ else if( sName == "brightnessContrast" )
+ return XML_brightnessContrast;
+ else if( sName == "colorTemperature" )
+ return XML_colorTemperature;
+ else if( sName == "saturation" )
+ return XML_saturation;
+ else if( sName == "sharpenSoften" )
+ return XML_sharpenSoften;
+
+ // attributes
+ else if( sName == "visible" )
+ return XML_visible;
+ else if( sName == "trans" )
+ return XML_trans;
+ else if( sName == "crackSpacing" )
+ return XML_crackSpacing;
+ else if( sName == "pressure" )
+ return XML_pressure;
+ else if( sName == "numberOfShades" )
+ return XML_numberOfShades;
+ else if( sName == "grainSize" )
+ return XML_grainSize;
+ else if( sName == "intensity" )
+ return XML_intensity;
+ else if( sName == "smoothness" )
+ return XML_smoothness;
+ else if( sName == "gridSize" )
+ return XML_gridSize;
+ else if( sName == "pencilSize" )
+ return XML_pencilSize;
+ else if( sName == "size" )
+ return XML_size;
+ else if( sName == "brushSize" )
+ return XML_brushSize;
+ else if( sName == "scaling" )
+ return XML_scaling;
+ else if( sName == "detail" )
+ return XML_detail;
+ else if( sName == "bright" )
+ return XML_bright;
+ else if( sName == "contrast" )
+ return XML_contrast;
+ else if( sName == "colorTemp" )
+ return XML_colorTemp;
+ else if( sName == "sat" )
+ return XML_sat;
+ else if( sName == "amount" )
+ return XML_amount;
+
+ SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectToken - unexpected token name: " << sName );
+ return XML_none;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
new file mode 100644
index 000000000..2e5ce5dc4
--- /dev/null
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -0,0 +1,341 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <oox/drawingml/graphicshapecontext.hxx>
+
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+
+#include <drawingml/embeddedwavaudiofile.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/graphicproperties.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <oox/drawingml/diagram/diagram.hxx>
+#include <drawingml/table/tablecontext.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <drawingml/transform2dcontext.hxx>
+#include <oox/ppt/pptshapegroupcontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::oox::core;
+
+static uno::Reference<io::XInputStream>
+lcl_GetMediaStream(const OUString& rStream, const oox::core::XmlFilterBase& rFilter)
+{
+ if (rStream.isEmpty())
+ return nullptr;
+
+ Reference< XInputStream > xInStrm( rFilter.openInputStream(rStream), UNO_SET_THROW );
+ return xInStrm;
+}
+
+static OUString lcl_GetMediaReference(std::u16string_view rStream)
+{
+ return rStream.empty() ? OUString() : OUString::Concat("vnd.sun.star.Package:") + rStream;
+}
+
+namespace oox::drawingml {
+
+// CT_Picture
+
+GraphicShapeContext::GraphicShapeContext( ContextHandler2Helper const & rParent, const ShapePtr& pMasterShapePtr, const ShapePtr& pShapePtr )
+: ShapeContext( rParent, pMasterShapePtr, pShapePtr )
+{
+}
+
+ContextHandlerRef GraphicShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( getBaseToken( aElementToken ) )
+ {
+ // CT_ShapeProperties
+ case XML_xfrm:
+ return new Transform2DContext( *this, rAttribs, *mpShapePtr );
+ case XML_blipFill:
+ return new BlipFillContext( *this, rAttribs, mpShapePtr->getGraphicProperties().maBlipProps );
+ case XML_wavAudioFile:
+ {
+ OUString const path(getEmbeddedWAVAudioFile(getRelations(), rAttribs));
+ Reference<XInputStream> xMediaStream = lcl_GetMediaStream(path, getFilter());
+ if (xMediaStream.is())
+ {
+ mpShapePtr->getGraphicProperties().m_xMediaStream = xMediaStream;
+ mpShapePtr->getGraphicProperties().m_sMediaPackageURL = lcl_GetMediaReference(path);
+ }
+ }
+ break;
+ case XML_audioFile:
+ case XML_videoFile:
+ {
+ OUString rPath = getRelations().getFragmentPathFromRelId(
+ rAttribs.getString(R_TOKEN(link)).get() );
+ if (!rPath.isEmpty())
+ {
+ Reference<XInputStream> xMediaStream = lcl_GetMediaStream(rPath, getFilter());
+ if (xMediaStream.is()) // embedded media file
+ {
+ mpShapePtr->getGraphicProperties().m_xMediaStream = xMediaStream;
+ mpShapePtr->getGraphicProperties().m_sMediaPackageURL
+ = lcl_GetMediaReference(rPath);
+ }
+ }
+ else
+ {
+ rPath = getRelations().getExternalTargetFromRelId(
+ rAttribs.getString(R_TOKEN(link)).get());
+ if (!rPath.isEmpty()) // linked media file
+ mpShapePtr->getGraphicProperties().m_sMediaPackageURL
+ = getFilter().getAbsoluteUrl(rPath);
+ }
+ }
+ break;
+ }
+
+ if ((getNamespace( aElementToken ) == NMSP_vml) && mpShapePtr)
+ {
+ mpShapePtr->setServiceName("com.sun.star.drawing.CustomShape");
+ CustomShapePropertiesPtr pCstmShpProps
+ (mpShapePtr->getCustomShapeProperties());
+
+ pCstmShpProps->setShapePresetType( getBaseToken( aElementToken ) );
+ }
+
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
+}
+
+// CT_GraphicalObjectFrameContext
+
+GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler2Helper& rParent, const ShapePtr& pMasterShapePtr, const ShapePtr& pShapePtr, bool bEmbedShapesInChart ) :
+ ShapeContext( rParent, pMasterShapePtr, pShapePtr ),
+ mbEmbedShapesInChart( bEmbedShapesInChart ),
+ mpParent(&rParent)
+{
+}
+
+ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( getBaseToken( aElementToken ) )
+ {
+ // CT_ShapeProperties
+ case XML_nvGraphicFramePr: // CT_GraphicalObjectFrameNonVisual
+ break;
+ case XML_xfrm: // CT_Transform2D
+ return new Transform2DContext( *this, rAttribs, *mpShapePtr );
+ case XML_graphic: // CT_GraphicalObject
+ return this;
+
+ case XML_graphicData : // CT_GraphicalObjectData
+ {
+ OUString sUri( rAttribs.getString( XML_uri ).get() );
+ if ( sUri == "http://schemas.openxmlformats.org/presentationml/2006/ole" ||
+ sUri == "http://purl.oclc.org/ooxml/presentationml/ole" )
+ return new OleObjectGraphicDataContext( *this, mpShapePtr );
+ else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/diagram" ||
+ sUri == "http://purl.oclc.org/ooxml/drawingml/diagram" )
+ return new DiagramGraphicDataContext( *this, mpShapePtr );
+ else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/chart" ||
+ sUri == "http://purl.oclc.org/ooxml/drawingml/chart" )
+ return new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart );
+ else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/table" ||
+ sUri == "http://purl.oclc.org/ooxml/drawingml/table" )
+ return new table::TableContext( *this, mpShapePtr );
+ else
+ {
+ SAL_WARN("oox.drawingml", "OOX: Ignore graphicsData of :" << sUri );
+ return nullptr;
+ }
+ }
+ break;
+ }
+
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
+}
+
+void GraphicalObjectFrameContext::onEndElement()
+{
+ if( getCurrentElement() == PPT_TOKEN( graphicFrame ) && mpParent )
+ {
+ oox::ppt::PPTShapeGroupContext* pParent = dynamic_cast<oox::ppt::PPTShapeGroupContext*>(mpParent);
+ if( pParent )
+ pParent->importExtDrawings();
+ }
+}
+
+OleObjectGraphicDataContext::OleObjectGraphicDataContext( ContextHandler2Helper const & rParent, const ShapePtr& xShape ) :
+ ShapeContext( rParent, ShapePtr(), xShape ),
+ mrOleObjectInfo( xShape->setOleObjectType() )
+{
+}
+
+OleObjectGraphicDataContext::~OleObjectGraphicDataContext()
+{
+ /* Register the OLE shape at the VML drawing, this prevents that the
+ related VML shape converts the OLE object by itself. */
+ if( !mrOleObjectInfo.maShapeId.isEmpty() )
+ if( ::oox::vml::Drawing* pVmlDrawing = getFilter().getVmlDrawing() )
+ pVmlDrawing->registerOleObject( mrOleObjectInfo );
+}
+
+ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case PPT_TOKEN( oleObj ):
+ {
+ mrOleObjectInfo.maShapeId = rAttribs.getXString( XML_spid, OUString() );
+ const Relation* pRelation = getRelations().getRelationFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ OSL_ENSURE( pRelation, "OleObjectGraphicDataContext::createFastChildContext - missing relation for OLE object" );
+ if( pRelation )
+ {
+ mrOleObjectInfo.mbLinked = pRelation->mbExternal;
+ if( pRelation->mbExternal )
+ {
+ mrOleObjectInfo.maTargetLink = getFilter().getAbsoluteUrl( pRelation->maTarget );
+ }
+ else
+ {
+ OUString aFragmentPath = getFragmentPathFromRelation( *pRelation );
+ if( !aFragmentPath.isEmpty() )
+ getFilter().importBinaryData( mrOleObjectInfo.maEmbeddedData, aFragmentPath );
+ }
+ }
+ mrOleObjectInfo.maName = rAttribs.getXString( XML_name, OUString() );
+ mrOleObjectInfo.maProgId = rAttribs.getXString( XML_progId, OUString() );
+ mrOleObjectInfo.mbShowAsIcon = rAttribs.getBool( XML_showAsIcon, false );
+ mrOleObjectInfo.mbHasPicture = false; // Initialize as false
+ return this;
+ }
+ break;
+
+ case PPT_TOKEN( embed ):
+ OSL_ENSURE( !mrOleObjectInfo.mbLinked, "OleObjectGraphicDataContext::createFastChildContext - unexpected child element" );
+ break;
+
+ case PPT_TOKEN( link ):
+ OSL_ENSURE( mrOleObjectInfo.mbLinked, "OleObjectGraphicDataContext::createFastChildContext - unexpected child element" );
+ mrOleObjectInfo.mbAutoUpdate = rAttribs.getBool( XML_updateAutomatic, false );
+ break;
+ case PPT_TOKEN( pic ):
+ mrOleObjectInfo.mbHasPicture = true; // Set true if ole object has picture element.
+ return new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr );
+ }
+ SAL_WARN("oox", "OleObjectGraphicDataContext::onCreateContext: unhandled element: "
+ << getBaseToken(nElement));
+ return nullptr;
+}
+
+void OleObjectGraphicDataContext::onEndElement()
+{
+ if( getCurrentElement() == PPT_TOKEN( oleObj ) && !isMCEStateEmpty() )
+ {
+ if (getMCEState() == MCE_STATE::FoundChoice && !mrOleObjectInfo.mbHasPicture
+ && mrOleObjectInfo.maShapeId.isEmpty())
+ setMCEState( MCE_STATE::Started );
+ }
+}
+
+DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler2Helper const & rParent, const ShapePtr& pShapePtr )
+: ShapeContext( rParent, ShapePtr(), pShapePtr )
+{
+ pShapePtr->setDiagramType();
+}
+
+DiagramGraphicDataContext::~DiagramGraphicDataContext()
+{
+}
+
+ContextHandlerRef DiagramGraphicDataContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case DGM_TOKEN( relIds ):
+ {
+ msDm = rAttribs.getString( R_TOKEN( dm ) ).get();
+ msLo = rAttribs.getString( R_TOKEN( lo ) ).get();
+ msQs = rAttribs.getString( R_TOKEN( qs ) ).get();
+ msCs = rAttribs.getString( R_TOKEN( cs ) ).get();
+ loadDiagram(mpShapePtr,
+ getFilter(),
+ getFragmentPathFromRelId( msDm ),
+ getFragmentPathFromRelId( msLo ),
+ getFragmentPathFromRelId( msQs ),
+ getFragmentPathFromRelId( msCs ),
+ getRelations());
+ SAL_INFO("oox.drawingml", "DiagramGraphicDataContext::onCreateContext: added shape " << mpShapePtr->getName()
+ << " of type " << mpShapePtr->getServiceName()
+ << ", position: " << mpShapePtr->getPosition().X
+ << "," << mpShapePtr->getPosition().Y
+ << ", size: " << mpShapePtr->getSize().Width
+ << "x" << mpShapePtr->getSize().Height);
+
+ // No DrawingML fallback, need to warn the user at the end.
+ if (mpShapePtr->getExtDrawings().empty())
+ getFilter().setMissingExtDrawing();
+ else
+ {
+ for (const auto& rRelId : mpShapePtr->getExtDrawings())
+ {
+ // An invalid fallback reference is as bad as a missing one.
+ if (getFragmentPathFromRelId(rRelId).isEmpty())
+ {
+ getFilter().setMissingExtDrawing();
+ break;
+ }
+ }
+ }
+
+ break;
+ }
+ default:
+ break;
+ }
+
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
+}
+
+ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler2Helper const & rParent, const ShapePtr& rxShape, bool bEmbedShapes ) :
+ ShapeContext( rParent, ShapePtr(), rxShape ),
+ mrChartShapeInfo( rxShape->setChartType( bEmbedShapes ) )
+{
+}
+
+ContextHandlerRef ChartGraphicDataContext::onCreateContext( ::sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( nElement == C_TOKEN( chart ) )
+ {
+ mrChartShapeInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/guidcontext.cxx b/oox/source/drawingml/guidcontext.cxx
new file mode 100644
index 000000000..022359562
--- /dev/null
+++ b/oox/source/drawingml/guidcontext.cxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/guidcontext.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+GuidContext::GuidContext( ContextHandler2Helper const & rParent, OUString& rGuidId )
+: ContextHandler2( rParent )
+, mrGuidId( rGuidId )
+{
+}
+void GuidContext::onCharacters( const OUString& aChars )
+{
+ mrGuidId += aChars;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
new file mode 100644
index 000000000..352eb7bf5
--- /dev/null
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -0,0 +1,166 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "hyperlinkcontext.hxx"
+
+#include <com/sun/star/xml/sax/XFastContextHandler.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/core/relations.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <o3tl/string_view.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, PropertyMap& aProperties )
+ : ContextHandler2( rParent )
+ , maProperties(aProperties)
+{
+ OUString sURL, sHref;
+ OUString aRelId = rAttribs.getString( R_TOKEN( id ) ).get();
+ if ( !aRelId.isEmpty() )
+ {
+ sHref = getRelations().getExternalTargetFromRelId( aRelId );
+ if( !sHref.isEmpty() )
+ {
+ sURL = getFilter().getAbsoluteUrl( sHref );
+ }
+ else
+ {
+ // not sure if we also need to set sHref to the internal target
+ sURL = getRelations().getInternalTargetFromRelId( aRelId );
+ }
+ }
+ OUString sTooltip = rAttribs.getString( R_TOKEN( tooltip ) ).get();
+ if ( !sTooltip.isEmpty() )
+ maProperties.setProperty(PROP_Representation, sTooltip);
+ OUString sFrame = rAttribs.getString( R_TOKEN( tgtFrame ) ).get();
+ if( !sFrame.isEmpty() )
+ maProperties.setProperty(PROP_TargetFrame, sFrame);
+ OUString aAction = rAttribs.getString( XML_action ).get();
+ if ( !aAction.isEmpty() )
+ {
+ // reserved values of the unrestricted string aAction:
+ // ppaction://customshow?id=SHOW_ID // custom presentation
+ // ppaction://hlinkfile // external file via r:id
+ // ppaction://hlinkpres?slideindex=SLIDE_NUM // external presentation via r:id
+ // ppaction://hlinkshowjump?jump=endshow
+ // ppaction://hlinkshowjump?jump=firstslide
+ // ppaction://hlinkshowjump?jump=lastslide
+ // ppaction://hlinkshowjump?jump=lastslideviewed
+ // ppaction://hlinkshowjump?jump=nextslide
+ // ppaction://hlinkshowjump?jump=previousslide
+ // ppaction://hlinksldjump
+ // ppaction://macro?name=MACRO_NAME
+ // ppaction://program
+
+ static const OUStringLiteral sPPAction( u"ppaction://" );
+ if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
+ {
+ OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
+ sal_Int32 nIndex = aPPAct.indexOf( '?' );
+ OUString aPPAction( nIndex > 0 ? aPPAct.copy( 0, nIndex ) : aPPAct );
+
+ if ( aPPAction.match( "hlinkshowjump" ) )
+ {
+ static const OUStringLiteral sJump( u"jump=" );
+ if ( aPPAct.match( sJump, nIndex + 1 ) )
+ {
+ std::u16string_view aDestination( aPPAct.subView( nIndex + 1 + sJump.getLength() ) );
+ sURL += OUString::Concat("#action?jump=") + aDestination;
+ }
+ }
+ else if ( aPPAction.match( "hlinksldjump" ) )
+ {
+ sHref = sURL;
+
+ sal_Int32 nIndex2 = 0;
+ while ( nIndex2 < sHref.getLength() )
+ {
+ sal_Unicode nChar = sHref[ nIndex2 ];
+ if ( ( nChar >= '0' ) && ( nChar <= '9' ) )
+ break;
+ nIndex2++;
+ }
+ if ( nIndex2 && ( nIndex2 != sHref.getLength() ) )
+ {
+ sal_Int32 nLength = 1;
+ while( ( nIndex2 + nLength ) < sHref.getLength() )
+ {
+ sal_Unicode nChar = sHref[ nIndex2 + nLength ];
+ if ( ( nChar < '0' ) || ( nChar > '9' ) )
+ break;
+ nLength++;
+ }
+ sal_Int32 nPageNumber = o3tl::toInt32(sHref.subView( nIndex2, nLength ));
+ if ( nPageNumber )
+ {
+ const OUString aSlideType( sHref.copy( 0, nIndex2 ) );
+ if ( aSlideType.match( "slide" ) )
+ sURL = "#Slide " + OUString::number( nPageNumber );
+ else if ( aSlideType.match( "notesSlide" ) )
+ sURL = "#Notes " + OUString::number( nPageNumber );
+// else: todo for other types such as notesMaster or slideMaster as they can't be referenced easily
+ }
+ }
+ }
+ }
+ }
+ if ( !sURL.isEmpty() )
+ maProperties.setProperty(PROP_URL, sURL);
+
+ // TODO unhandled
+ // XML_invalidUrl
+ // XML_history
+ // XML_highlightClick
+ // XML_endSnd
+}
+
+HyperLinkContext::~HyperLinkContext()
+{
+}
+
+ContextHandlerRef HyperLinkContext::onCreateContext(
+ ::sal_Int32 aElement, const AttributeList& )
+{
+ switch( aElement )
+ {
+ case A_TOKEN( extLst ):
+ maProperties.setProperty(PROP_CharColor, XML_fillcolor);
+ break;
+ case A_TOKEN( snd ):
+ // TODO use getEmbeddedWAVAudioFile() here
+ break;
+ }
+
+ return this;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/hyperlinkcontext.hxx b/oox/source/drawingml/hyperlinkcontext.hxx
new file mode 100644
index 000000000..6c7fe6c80
--- /dev/null
+++ b/oox/source/drawingml/hyperlinkcontext.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_HYPERLINKCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_HYPERLINKCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { class PropertyMap; }
+
+namespace oox::drawingml {
+
+class HyperLinkContext final : public ::oox::core::ContextHandler2
+{
+public:
+ HyperLinkContext(
+ ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ PropertyMap& aProperties );
+ virtual ~HyperLinkContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ PropertyMap& maProperties;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx
new file mode 100644
index 000000000..2d10e8287
--- /dev/null
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -0,0 +1,538 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <comphelper/sequence.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <osl/diagnose.h>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
+
+
+namespace oox::drawingml {
+
+namespace {
+
+void lclSetDashData( LineDash& orLineDash, sal_Int16 nDots, sal_Int32 nDotLen,
+ sal_Int16 nDashes, sal_Int32 nDashLen, sal_Int32 nDistance )
+{
+ orLineDash.Dots = nDots;
+ orLineDash.DotLen = nDotLen;
+ orLineDash.Dashes = nDashes;
+ orLineDash.DashLen = nDashLen;
+ orLineDash.Distance = nDistance;
+}
+
+/** Converts the specified preset dash to API dash.
+ */
+void lclConvertPresetDash(LineDash& orLineDash, sal_Int32 nPresetDash)
+{
+ switch( nPresetDash )
+ {
+ case XML_dot: lclSetDashData( orLineDash, 1, 1, 0, 0, 3 ); break;
+ case XML_dash: lclSetDashData( orLineDash, 1, 4, 0, 0, 3 ); break;
+ case XML_dashDot: lclSetDashData( orLineDash, 1, 4, 1, 1, 3 ); break;
+
+ case XML_lgDash: lclSetDashData( orLineDash, 1, 8, 0, 0, 3 ); break;
+ case XML_lgDashDot: lclSetDashData( orLineDash, 1, 8, 1, 1, 3 ); break;
+ case XML_lgDashDotDot: lclSetDashData( orLineDash, 1, 8, 2, 1, 3 ); break;
+
+ case XML_sysDot: lclSetDashData( orLineDash, 1, 1, 0, 0, 1 ); break;
+ case XML_sysDash: lclSetDashData( orLineDash, 1, 3, 0, 0, 1 ); break;
+ case XML_sysDashDot: lclSetDashData( orLineDash, 1, 3, 1, 1, 1 ); break;
+ case XML_sysDashDotDot: lclSetDashData( orLineDash, 1, 3, 2, 1, 1 ); break;
+
+ default:
+ OSL_FAIL( "lclConvertPresetDash - unsupported preset dash" );
+ lclSetDashData( orLineDash, 1, 4, 0, 0, 3 );
+ }
+ orLineDash.DotLen *= 100;
+ orLineDash.DashLen *= 100;
+ orLineDash.Distance *= 100;
+}
+
+/** Converts the passed custom dash to API dash. rCustomDash should not be empty.
+ * We assume, that there exist only two length values and the distance is the same
+ * for all dashes. Other kind of dash stop sequences cannot be represented, neither
+ * in model nor in ODF.
+ */
+void lclConvertCustomDash(LineDash& orLineDash, const LineProperties::DashStopVector& rCustomDash)
+{
+ OSL_ASSERT(!rCustomDash.empty());
+ // Assume all dash stops have the same sp values.
+ orLineDash.Distance = rCustomDash[0].second;
+ // First kind of dashes go to "Dots"
+ orLineDash.DotLen = rCustomDash[0].first;
+ orLineDash.Dots = 0;
+ for(const auto& rIt : rCustomDash)
+ {
+ if (rIt.first != orLineDash.DotLen)
+ break;
+ ++orLineDash.Dots;
+ }
+ // All others go to "Dashes", we cannot handle more than two kinds.
+ orLineDash.Dashes = rCustomDash.size() - orLineDash.Dots;
+ if (orLineDash.Dashes > 0)
+ orLineDash.DashLen = rCustomDash[orLineDash.Dots].first;
+ else
+ orLineDash.DashLen = 0;
+
+ // convert to API, e.g. 123% is 123000 in MS Office and 123 in our API
+ orLineDash.DotLen = orLineDash.DotLen / 1000;
+ orLineDash.DashLen = orLineDash.DashLen / 1000;
+ orLineDash.Distance = orLineDash.Distance / 1000;
+}
+
+/** LibreOffice uses value 0, if a length attribute is missing in the
+ * style definition, but treats it as 100%.
+ * LibreOffice uses absolute values in some style definitions. Try to
+ * reconstruct them from the imported relative values.
+ */
+void lclRecoverStandardDashStyles(LineDash& orLineDash, sal_Int32 nLineWidth)
+{
+ sal_uInt16 nDots = orLineDash.Dots;
+ sal_uInt16 nDashes = orLineDash.Dashes;
+ sal_uInt32 nDotLen = orLineDash.DotLen;
+ sal_uInt32 nDashLen = orLineDash.DashLen;
+ sal_uInt32 nDistance = orLineDash.Distance;
+ // Use same ersatz for hairline as in export.
+ double fWidthHelp = nLineWidth == 0 ? 26.95/100.0 : nLineWidth / 100.0;
+ // start with (var) cases, because they have no rounding problems
+ // "Fine Dashed", "Line Style 9" and "Dashed (var)" need no recover
+ if (nDots == 3 && nDotLen == 197 &&nDashes == 3 && nDashLen == 100 && nDistance == 100)
+ { // "3 Dashes 3 Dots (var)"
+ orLineDash.DashLen = 0;
+ }
+ else if (nDots == 1 && nDotLen == 100 && nDashes == 0 && nDistance == 50)
+ { // "Ultrafine Dotted (var)"
+ orLineDash.DotLen = 0;
+ }
+ else if (nDots == 2 && nDashes == 0 && nDotLen == nDistance
+ && std::abs(nDistance * fWidthHelp - 51.0) < fWidthHelp)
+ { // "Ultrafine Dashed"
+ orLineDash.Dots = 1;
+ orLineDash.DotLen = 51;
+ orLineDash.Dashes = 1;
+ orLineDash.DashLen = 51;
+ orLineDash.Distance = 51;
+ orLineDash.Style = orLineDash.Style == DashStyle_ROUNDRELATIVE ? DashStyle_ROUND : DashStyle_RECT;
+ }
+ else if (nDots == 2 && nDashes == 3 && std::abs(nDotLen * fWidthHelp - 51.0) < fWidthHelp
+ && std::abs(nDashLen * fWidthHelp - 254.0) < fWidthHelp
+ && std::abs(nDistance * fWidthHelp - 127.0) < fWidthHelp)
+ { // "Ultrafine 2 Dots 3 Dashes"
+ orLineDash.DotLen = 51;
+ orLineDash.DashLen = 254;
+ orLineDash.Distance = 127;
+ orLineDash.Style = orLineDash.Style == DashStyle_ROUNDRELATIVE ? DashStyle_ROUND : DashStyle_RECT;
+ }
+ else if (nDots == 1 && nDotLen == 100 && nDashes == 0
+ && std::abs(nDistance * fWidthHelp - 457.0) < fWidthHelp)
+ { // "Fine Dotted"
+ orLineDash.DotLen = 0;
+ orLineDash.Distance = 457;
+ orLineDash.Style = orLineDash.Style == DashStyle_ROUNDRELATIVE ? DashStyle_ROUND : DashStyle_RECT;
+ }
+ else if (nDots == 1 && nDashes == 10 && nDashLen == 100
+ && std::abs(nDistance * fWidthHelp - 152.0) < fWidthHelp)
+ { // "Line with Fine Dots"
+ orLineDash.DotLen = 2007;
+ orLineDash.DashLen = 0;
+ orLineDash.Distance = 152;
+ orLineDash.Style = orLineDash.Style == DashStyle_ROUNDRELATIVE ? DashStyle_ROUND : DashStyle_RECT;
+ }
+ else if (nDots == 2 && nDotLen == 100 && nDashes == 1 && nDashLen == nDistance
+ && std::abs(nDistance * fWidthHelp - 203.0) < fWidthHelp)
+ { // "2 Dots 1 Dash"
+ orLineDash.DotLen = 0;
+ orLineDash.DashLen = 203;
+ orLineDash.Distance = 203;
+ orLineDash.Style = orLineDash.Style == DashStyle_ROUNDRELATIVE ? DashStyle_ROUND : DashStyle_RECT;
+ }
+}
+
+DashStyle lclGetDashStyle( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ // MS Office dashing is always relative to line width
+ switch( nToken )
+ {
+ case XML_rnd: return DashStyle_ROUNDRELATIVE;
+ case XML_sq: return DashStyle_RECTRELATIVE; // default in OOXML
+ case XML_flat: return DashStyle_RECTRELATIVE; // default in MS Office
+ }
+ return DashStyle_RECTRELATIVE;
+}
+
+LineCap lclGetLineCap( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_rnd: return LineCap_ROUND;
+ case XML_sq: return LineCap_SQUARE; // default in OOXML
+ case XML_flat: return LineCap_BUTT; // default in MS Office
+ }
+ return LineCap_BUTT;
+}
+
+LineJoint lclGetLineJoint( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_round: return LineJoint_ROUND;
+ case XML_bevel: return LineJoint_BEVEL;
+ case XML_miter: return LineJoint_MITER;
+ }
+ return LineJoint_ROUND;
+}
+
+const sal_Int32 OOX_ARROWSIZE_SMALL = 0;
+const sal_Int32 OOX_ARROWSIZE_MEDIUM = 1;
+const sal_Int32 OOX_ARROWSIZE_LARGE = 2;
+
+sal_Int32 lclGetArrowSize( sal_Int32 nToken )
+{
+ OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0);
+ switch( nToken )
+ {
+ case XML_sm: return OOX_ARROWSIZE_SMALL;
+ case XML_med: return OOX_ARROWSIZE_MEDIUM;
+ case XML_lg: return OOX_ARROWSIZE_LARGE;
+ }
+ return OOX_ARROWSIZE_MEDIUM;
+}
+
+void lclPushMarkerProperties( ShapePropertyMap& rPropMap,
+ const LineArrowProperties& rArrowProps, sal_Int32 nLineWidth, bool bLineEnd )
+{
+ /* Store the marker polygon and the marker name in a single value, to be
+ able to pass both to the ShapePropertyMap::setProperty() function. */
+ NamedValue aNamedMarker;
+
+ OUStringBuffer aBuffer;
+ sal_Int32 nMarkerWidth = 0;
+ bool bMarkerCenter = false;
+ sal_Int32 nArrowType = rArrowProps.moArrowType.get( XML_none );
+ OSL_ASSERT((nArrowType & sal_Int32(0xFFFF0000))==0);
+ switch( nArrowType )
+ {
+ case XML_triangle:
+ aBuffer.append( "msArrowEnd" );
+ break;
+ case XML_arrow:
+ aBuffer.append( "msArrowOpenEnd" );
+ break;
+ case XML_stealth:
+ aBuffer.append( "msArrowStealthEnd" );
+ break;
+ case XML_diamond:
+ aBuffer.append( "msArrowDiamondEnd" );
+ bMarkerCenter = true;
+ break;
+ case XML_oval:
+ aBuffer.append( "msArrowOvalEnd" );
+ bMarkerCenter = true;
+ break;
+ }
+
+ if( !aBuffer.isEmpty() )
+ {
+ bool bIsArrow = nArrowType == XML_arrow;
+ sal_Int32 nLength = lclGetArrowSize( rArrowProps.moArrowLength.get( XML_med ) );
+ sal_Int32 nWidth = lclGetArrowSize( rArrowProps.moArrowWidth.get( XML_med ) );
+
+ sal_Int32 nNameIndex = nWidth * 3 + nLength + 1;
+ aBuffer.append( ' ' ).append( nNameIndex );
+ if (bIsArrow)
+ {
+ // Arrow marker form depends also on line width
+ aBuffer.append(' ').append(nLineWidth);
+ }
+ OUString aMarkerName = aBuffer.makeStringAndClear();
+
+ double fArrowLength = 1.0;
+ switch( nLength )
+ {
+ case OOX_ARROWSIZE_SMALL: fArrowLength = (bIsArrow ? 2.5 : 2.0); break;
+ case OOX_ARROWSIZE_MEDIUM: fArrowLength = (bIsArrow ? 3.5 : 3.0); break;
+ case OOX_ARROWSIZE_LARGE: fArrowLength = (bIsArrow ? 5.5 : 5.0); break;
+ }
+ double fArrowWidth = 1.0;
+ switch( nWidth )
+ {
+ case OOX_ARROWSIZE_SMALL: fArrowWidth = (bIsArrow ? 2.5 : 2.0); break;
+ case OOX_ARROWSIZE_MEDIUM: fArrowWidth = (bIsArrow ? 3.5 : 3.0); break;
+ case OOX_ARROWSIZE_LARGE: fArrowWidth = (bIsArrow ? 5.5 : 5.0); break;
+ }
+ // set arrow width relative to line width
+ sal_Int32 nBaseLineWidth = ::std::max< sal_Int32 >( nLineWidth, 70 );
+ nMarkerWidth = static_cast<sal_Int32>( fArrowWidth * nBaseLineWidth );
+
+ /* Test if the marker already exists in the marker table, do not
+ create it again in this case. If markers are inserted explicitly
+ instead by their name, the polygon will be created always.
+ TODO: this can be optimized by using a map. */
+ if( !rPropMap.hasNamedLineMarkerInTable( aMarkerName ) )
+ {
+ // pass X and Y as percentage to OOX_ARROW_POINT
+ auto OOX_ARROW_POINT = [fArrowLength, fArrowWidth]( double x, double y ) { return awt::Point( static_cast< sal_Int32 >( fArrowWidth * x ), static_cast< sal_Int32 >( fArrowLength * y ) ); };
+ // tdf#100491 Arrow line marker, unlike other markers, depends on line width.
+ // So calculate width of half line (more convenient during drawing) taking into account
+ // further conversions/scaling done in OOX_ARROW_POINT and scaling to nMarkerWidth.
+ const double fArrowLineHalfWidth = ::std::max< double >( 100.0 * 0.5 * nLineWidth / nMarkerWidth, 1 );
+
+ ::std::vector< awt::Point > aPoints;
+ OSL_ASSERT((rArrowProps.moArrowType.get() & sal_Int32(0xFFFF0000))==0);
+ switch( rArrowProps.moArrowType.get() )
+ {
+ case XML_triangle:
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 100, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 0, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ break;
+ case XML_arrow:
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 100, 100 - fArrowLineHalfWidth * 1.5) );
+ aPoints.push_back( OOX_ARROW_POINT( 100 - fArrowLineHalfWidth * 1.5, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50.0 + fArrowLineHalfWidth, 5.5 * fArrowLineHalfWidth) );
+ aPoints.push_back( OOX_ARROW_POINT( 50.0 + fArrowLineHalfWidth, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50.0 - fArrowLineHalfWidth, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50.0 - fArrowLineHalfWidth, 5.5 * fArrowLineHalfWidth) );
+ aPoints.push_back( OOX_ARROW_POINT( fArrowLineHalfWidth * 1.5, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 0, 100 - fArrowLineHalfWidth * 1.5) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ break;
+ case XML_stealth:
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 100, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 60 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 0, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ break;
+ case XML_diamond:
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 100, 50 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 0, 50 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ break;
+ case XML_oval:
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 75, 7 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 93, 25 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 100, 50 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 93, 75 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 75, 93 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 100 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 25, 93 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 7, 75 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 0, 50 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 7, 25 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 25, 7 ) );
+ aPoints.push_back( OOX_ARROW_POINT( 50, 0 ) );
+ break;
+ }
+
+ OSL_ENSURE( !aPoints.empty(), "lclPushMarkerProperties - missing arrow coordinates" );
+ if( !aPoints.empty() )
+ {
+ PolyPolygonBezierCoords aMarkerCoords;
+ aMarkerCoords.Coordinates = { comphelper::containerToSequence( aPoints ) };
+
+ ::std::vector< PolygonFlags > aFlags( aPoints.size(), PolygonFlags_NORMAL );
+ aMarkerCoords.Flags = { comphelper::containerToSequence( aFlags ) };
+
+ aNamedMarker.Name = aMarkerName;
+ aNamedMarker.Value <<= aMarkerCoords;
+ }
+ }
+ else
+ {
+ /* Named marker object exists already in the marker table, pass
+ its name only. This will set the name as property value, but
+ does not create a new object in the marker table. */
+ aNamedMarker.Name = aMarkerName;
+ }
+ }
+
+ // push the properties (filled aNamedMarker.Name indicates valid marker)
+ if( aNamedMarker.Name.isEmpty() )
+ return;
+
+ if( bLineEnd )
+ {
+ rPropMap.setProperty( ShapeProperty::LineEnd, aNamedMarker );
+ rPropMap.setProperty( ShapeProperty::LineEndWidth, nMarkerWidth );
+ rPropMap.setProperty( ShapeProperty::LineEndCenter, bMarkerCenter );
+ }
+ else
+ {
+ rPropMap.setProperty( ShapeProperty::LineStart, aNamedMarker );
+ rPropMap.setProperty( ShapeProperty::LineStartWidth, nMarkerWidth );
+ rPropMap.setProperty( ShapeProperty::LineStartCenter, bMarkerCenter );
+ }
+}
+
+} // namespace
+
+void LineArrowProperties::assignUsed( const LineArrowProperties& rSourceProps )
+{
+ moArrowType.assignIfUsed( rSourceProps.moArrowType );
+ moArrowWidth.assignIfUsed( rSourceProps.moArrowWidth );
+ moArrowLength.assignIfUsed( rSourceProps.moArrowLength );
+}
+
+void LineProperties::assignUsed( const LineProperties& rSourceProps )
+{
+ maStartArrow.assignUsed( rSourceProps.maStartArrow );
+ maEndArrow.assignUsed( rSourceProps.maEndArrow );
+ maLineFill.assignUsed( rSourceProps.maLineFill );
+ if( !rSourceProps.maCustomDash.empty() )
+ maCustomDash = rSourceProps.maCustomDash;
+ moLineWidth.assignIfUsed( rSourceProps.moLineWidth );
+ moPresetDash.assignIfUsed( rSourceProps.moPresetDash );
+ moLineCompound.assignIfUsed( rSourceProps.moLineCompound );
+ moLineCap.assignIfUsed( rSourceProps.moLineCap );
+ moLineJoint.assignIfUsed( rSourceProps.moLineJoint );
+}
+
+void LineProperties::pushToPropMap( ShapePropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper, ::Color nPhClr ) const
+{
+ // line fill type must exist, otherwise ignore other properties
+ if( !maLineFill.moFillType.has() )
+ return;
+
+ // line style (our core only supports none and solid)
+ drawing::LineStyle eLineStyle = (maLineFill.moFillType.get() == XML_noFill) ? drawing::LineStyle_NONE : drawing::LineStyle_SOLID;
+
+ // line width in 1/100mm
+ sal_Int32 nLineWidth = getLineWidth(); // includes conversion from EMUs to 1/100mm
+ rPropMap.setProperty( ShapeProperty::LineWidth, nLineWidth );
+
+ // line cap type
+ LineCap eLineCap = moLineCap.has() ? lclGetLineCap( moLineCap.get() ) : LineCap_BUTT;
+ if( moLineCap.has() )
+ rPropMap.setProperty( ShapeProperty::LineCap, eLineCap );
+
+ // create line dash from preset dash token or dash stop vector (not for invisible line)
+ if( (eLineStyle != drawing::LineStyle_NONE) && (moPresetDash.differsFrom( XML_solid ) || !maCustomDash.empty()) )
+ {
+ LineDash aLineDash;
+ aLineDash.Style = lclGetDashStyle( moLineCap.get( XML_flat ) );
+
+ if(moPresetDash.differsFrom(XML_solid))
+ lclConvertPresetDash(aLineDash, moPresetDash.get(XML_dash));
+ else // !maCustomDash.empty()
+ {
+ lclConvertCustomDash(aLineDash, maCustomDash);
+ lclRecoverStandardDashStyles(aLineDash, nLineWidth);
+ }
+
+ // In MS Office (2020) for preset dash style line caps round and square are included in dash length.
+ // For custom dash style round line cap is included, square line cap is added. In ODF line caps are
+ // always added to dash length. Tweak the length accordingly.
+ if (eLineCap == LineCap_ROUND || (eLineCap == LineCap_SQUARE && maCustomDash.empty()))
+ {
+ // Cannot use -100 because that results in 0 length in some cases and
+ // LibreOffice interprets 0 length as 100%.
+ if (aLineDash.DotLen >= 100 || aLineDash.DashLen >= 100)
+ aLineDash.Distance += 99;
+ if (aLineDash.DotLen >= 100)
+ aLineDash.DotLen -= 99;
+ if (aLineDash.DashLen >= 100)
+ aLineDash.DashLen -= 99;
+ }
+
+ if( rPropMap.setProperty( ShapeProperty::LineDash, aLineDash ) )
+ eLineStyle = drawing::LineStyle_DASH;
+ }
+
+ // set final line style property
+ rPropMap.setProperty( ShapeProperty::LineStyle, eLineStyle );
+
+ // line joint type
+ if( moLineJoint.has() )
+ rPropMap.setProperty( ShapeProperty::LineJoint, lclGetLineJoint( moLineJoint.get() ) );
+
+ // line color and transparence
+ Color aLineColor = maLineFill.getBestSolidColor();
+ if( aLineColor.isUsed() )
+ {
+ rPropMap.setProperty( ShapeProperty::LineColor, aLineColor.getColor( rGraphicHelper, nPhClr ) );
+ if( aLineColor.hasTransparency() )
+ rPropMap.setProperty( ShapeProperty::LineTransparency, aLineColor.getTransparency() );
+ }
+
+ // line markers
+ lclPushMarkerProperties( rPropMap, maStartArrow, nLineWidth, false );
+ lclPushMarkerProperties( rPropMap, maEndArrow, nLineWidth, true );
+}
+
+drawing::LineStyle LineProperties::getLineStyle() const
+{
+ // rules to calculate the line style inferred from the code in LineProperties::pushToPropMap
+ return (maLineFill.moFillType.get() == XML_noFill) ?
+ drawing::LineStyle_NONE :
+ (moPresetDash.differsFrom( XML_solid ) || (!moPresetDash && !maCustomDash.empty())) ?
+ drawing::LineStyle_DASH :
+ drawing::LineStyle_SOLID;
+}
+
+drawing::LineCap LineProperties::getLineCap() const
+{
+ if( moLineCap.has() )
+ return lclGetLineCap( moLineCap.get() );
+
+ return drawing::LineCap_BUTT;
+}
+
+drawing::LineJoint LineProperties::getLineJoint() const
+{
+ if( moLineJoint.has() )
+ return lclGetLineJoint( moLineJoint.get() );
+
+ return drawing::LineJoint_NONE;
+}
+
+sal_Int32 LineProperties::getLineWidth() const
+{
+ return convertEmuToHmm( moLineWidth.get( 0 ) );
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx
new file mode 100644
index 000000000..19f713421
--- /dev/null
+++ b/oox/source/drawingml/linepropertiescontext.cxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/linepropertiescontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+// CT_LineProperties
+
+namespace oox::drawingml {
+
+LinePropertiesContext::LinePropertiesContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs,
+ LineProperties& rLineProperties ) noexcept
+: ContextHandler2( rParent )
+, mrLineProperties( rLineProperties )
+{
+ mrLineProperties.moLineWidth = rAttribs.getInteger( XML_w );
+ mrLineProperties.moLineCompound = rAttribs.getToken( XML_cmpd );
+ mrLineProperties.moLineCap = rAttribs.getToken( XML_cap );
+}
+
+LinePropertiesContext::~LinePropertiesContext()
+{
+}
+
+ContextHandlerRef LinePropertiesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ // LineFillPropertiesGroup
+ case A_TOKEN( noFill ):
+ case A_TOKEN( solidFill ):
+ case A_TOKEN( gradFill ):
+ case A_TOKEN( pattFill ):
+ return FillPropertiesContext::createFillContext( *this, nElement, rAttribs, mrLineProperties.maLineFill );
+ break;
+
+ // LineDashPropertiesGroup
+ case A_TOKEN( prstDash ): // CT_PresetLineDashProperties
+ mrLineProperties.moPresetDash = rAttribs.getToken( XML_val );
+ break;
+ case A_TOKEN( custDash ): // CT_DashStopList
+ return this;
+ case A_TOKEN( ds ):
+ {
+ // 'a:ds' has 2 attributes : 'd' and 'sp'
+ // both are of type 'a:ST_PositivePercentage'
+ // according to the specs Office will read percentages formatted with a trailing percent sign
+ // or formatted as 1000th of a percent without a trailing percent sign, but only write percentages
+ // as 1000th's of a percent without a trailing percent sign.
+ // The code below takes care of both scenarios by converting to '1000th of a percent' always
+ OUString aStr;
+ sal_Int32 nDash = 0;
+ aStr = rAttribs.getString( XML_d, "" );
+ if ( aStr.endsWith("%") )
+ {
+ // Ends with a '%'
+ aStr = aStr.copy(0, aStr.getLength() - 1);
+ aStr = aStr.trim();
+ nDash = aStr.toInt32();
+
+ // Convert to 1000th of a percent
+ nDash *= 1000;
+ }
+ else
+ {
+ nDash = rAttribs.getInteger( XML_d, 0 );
+ }
+
+ sal_Int32 nSp = 0;
+ aStr = rAttribs.getString( XML_sp, "" );
+ if ( aStr.endsWith("%") )
+ {
+ // Ends with a '%'
+ aStr = aStr.copy(0, aStr.getLength() - 1);
+ aStr = aStr.trim();
+ nSp = aStr.toInt32();
+
+ // Convert to 1000th of a percent
+ nSp *= 1000;
+ }
+ else
+ {
+ nSp = rAttribs.getInteger( XML_sp, 0 );
+ }
+
+ mrLineProperties.maCustomDash.emplace_back( nDash, nSp );
+ }
+ break;
+
+ // LineJoinPropertiesGroup
+ case A_TOKEN( round ):
+ case A_TOKEN( bevel ):
+ case A_TOKEN( miter ):
+ mrLineProperties.moLineJoint = getBaseToken( nElement );
+ break;
+
+ case A_TOKEN( headEnd ): // CT_LineEndProperties
+ case A_TOKEN( tailEnd ): // CT_LineEndProperties
+ { // ST_LineEndType
+ bool bTailEnd = nElement == A_TOKEN( tailEnd );
+ LineArrowProperties& rArrowProps = bTailEnd ? mrLineProperties.maEndArrow : mrLineProperties.maStartArrow;
+ rArrowProps.moArrowType = rAttribs.getToken( XML_type );
+ rArrowProps.moArrowWidth = rAttribs.getToken( XML_w );
+ rArrowProps.moArrowLength = rAttribs.getToken( XML_len );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/misccontexts.cxx b/oox/source/drawingml/misccontexts.cxx
new file mode 100644
index 000000000..66d92ec06
--- /dev/null
+++ b/oox/source/drawingml/misccontexts.cxx
@@ -0,0 +1,386 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/misccontexts.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <vcl/GraphicExternalLink.hxx>
+#include <vcl/graph.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using ::oox::core::ContextHandler2;
+using ::oox::core::ContextHandlerRef;
+
+namespace oox::drawingml {
+
+SolidFillContext::SolidFillContext( ContextHandler2Helper const & rParent,
+ FillProperties& rFillProps ) :
+ ColorContext( rParent, rFillProps.maFillColor )
+{
+}
+
+GradientFillContext::GradientFillContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, GradientFillProperties& rGradientProps ) :
+ ContextHandler2( rParent ),
+ mrGradientProps( rGradientProps )
+{
+ mrGradientProps.moShadeFlip = rAttribs.getToken( XML_flip );
+ mrGradientProps.moRotateWithShape = rAttribs.getBool( XML_rotWithShape );
+}
+
+ContextHandlerRef GradientFillContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( gsLst ):
+ return this; // for gs elements
+
+ case A_TOKEN( gs ):
+ if( rAttribs.hasAttribute( XML_pos ) )
+ {
+ double fPosition = getLimitedValue< double >( rAttribs.getDouble( XML_pos, 0.0 ) / 100000.0, 0.0, 1.0 );
+ auto aElement = mrGradientProps.maGradientStops.emplace( fPosition, Color() );
+ return new ColorContext( *this, aElement->second );
+ }
+ break;
+
+ case A_TOKEN( lin ):
+ mrGradientProps.moShadeAngle = rAttribs.getInteger( XML_ang );
+ mrGradientProps.moShadeScaled = rAttribs.getBool( XML_scaled );
+ break;
+
+ case A_TOKEN( path ):
+ // always set a path type, this disables linear gradient in conversion
+ mrGradientProps.moGradientPath = rAttribs.getToken( XML_path, XML_rect );
+ return this; // for fillToRect element
+
+ case A_TOKEN( fillToRect ):
+ mrGradientProps.moFillToRect = GetRelativeRect( rAttribs.getFastAttributeList() );
+ break;
+
+ case A_TOKEN( tileRect ):
+ mrGradientProps.moTileRect = GetRelativeRect( rAttribs.getFastAttributeList() );
+ break;
+ }
+ return nullptr;
+}
+
+PatternFillContext::PatternFillContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, PatternFillProperties& rPatternProps ) :
+ ContextHandler2( rParent ),
+ mrPatternProps( rPatternProps )
+{
+ mrPatternProps.moPattPreset = rAttribs.getToken( XML_prst );
+}
+
+ContextHandlerRef PatternFillContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( bgClr ):
+ return new ColorContext( *this, mrPatternProps.maPattBgColor );
+ case A_TOKEN( fgClr ):
+ return new ColorContext( *this, mrPatternProps.maPattFgColor );
+ }
+ return nullptr;
+}
+
+ColorChangeContext::ColorChangeContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps )
+{
+ mrBlipProps.maColorChangeFrom.setUnused();
+ mrBlipProps.maColorChangeTo.setUnused();
+ mbUseAlpha = rAttribs.getBool( XML_useA, true );
+}
+
+ColorChangeContext::~ColorChangeContext()
+{
+ if( !mbUseAlpha )
+ mrBlipProps.maColorChangeTo.clearTransparence();
+}
+
+ContextHandlerRef ColorChangeContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( clrFrom ):
+ return new ColorContext( *this, mrBlipProps.maColorChangeFrom );
+ case A_TOKEN( clrTo ):
+ return new ColorContext( *this, mrBlipProps.maColorChangeTo );
+ }
+ return nullptr;
+}
+
+BlipContext::BlipContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps )
+{
+ if( rAttribs.hasAttribute( R_TOKEN( embed ) ) )
+ {
+ // internal picture URL
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( embed ), OUString() ) );
+ if (!aFragmentPath.isEmpty())
+ mrBlipProps.mxFillGraphic = getFilter().getGraphicHelper().importEmbeddedGraphic( aFragmentPath );
+ }
+ else if( rAttribs.hasAttribute( R_TOKEN( link ) ) )
+ {
+ // external URL
+
+ // we will embed this link, this is better than just doing nothing...
+ // TODO: import this graphic as real link, but this requires some
+ // code rework.
+ OUString aRelId = rAttribs.getString( R_TOKEN( link ), OUString() );
+ OUString aTargetLink = getFilter().getAbsoluteUrl( getRelations().getExternalTargetFromRelId( aRelId ) );
+ GraphicExternalLink aLink(aTargetLink);
+ Graphic aGraphic(aLink);
+ mrBlipProps.mxFillGraphic = aGraphic.GetXGraphic();
+ }
+}
+
+ContextHandlerRef BlipContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( biLevel ):
+ mrBlipProps.moBiLevelThreshold = rAttribs.getInteger( XML_thresh );
+ mrBlipProps.moColorEffect = getBaseToken(nElement);
+ break;
+
+ case A_TOKEN( grayscl ):
+ mrBlipProps.moColorEffect = getBaseToken( nElement );
+ break;
+
+ case A_TOKEN( clrChange ):
+ return new ColorChangeContext( *this, rAttribs, mrBlipProps );
+
+ case A_TOKEN( duotone ):
+ return new DuotoneContext( *this, mrBlipProps );
+
+ case A_TOKEN( extLst ):
+ return new BlipExtensionContext( *this, mrBlipProps );
+
+ case A_TOKEN( lum ):
+ mrBlipProps.moBrightness = rAttribs.getInteger( XML_bright );
+ mrBlipProps.moContrast = rAttribs.getInteger( XML_contrast );
+ break;
+ case A_TOKEN( alphaModFix ):
+ mrBlipProps.moAlphaModFix = rAttribs.getInteger(XML_amt);
+ break;
+ }
+ return nullptr;
+}
+
+DuotoneContext::DuotoneContext( ContextHandler2Helper const & rParent,
+ BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps ),
+ mnColorIndex( 0 )
+{
+ mrBlipProps.maDuotoneColors[0].setUnused();
+ mrBlipProps.maDuotoneColors[1].setUnused();
+}
+
+DuotoneContext::~DuotoneContext()
+{
+}
+
+::oox::core::ContextHandlerRef DuotoneContext::onCreateContext(
+ sal_Int32 /*nElement*/, const AttributeList& /*rAttribs*/ )
+{
+ if( mnColorIndex < 2 )
+ return new ColorValueContext( *this, mrBlipProps.maDuotoneColors[mnColorIndex++] );
+ return nullptr;
+}
+
+BlipFillContext::BlipFillContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps )
+{
+ mrBlipProps.moRotateWithShape = rAttribs.getBool( XML_rotWithShape );
+}
+
+ContextHandlerRef BlipFillContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( blip ):
+ return new BlipContext( *this, rAttribs, mrBlipProps );
+
+ case A_TOKEN( srcRect ):
+ mrBlipProps.moClipRect = GetRelativeRect( rAttribs.getFastAttributeList() );
+ break;
+
+ case A_TOKEN( tile ):
+ mrBlipProps.moBitmapMode = getBaseToken( nElement );
+ mrBlipProps.moTileOffsetX = rAttribs.getInteger( XML_tx );
+ mrBlipProps.moTileOffsetY = rAttribs.getInteger( XML_ty );
+ mrBlipProps.moTileScaleX = rAttribs.getInteger( XML_sx );
+ mrBlipProps.moTileScaleY = rAttribs.getInteger( XML_sy );
+ mrBlipProps.moTileAlign = rAttribs.getToken( XML_algn );
+ mrBlipProps.moTileFlip = rAttribs.getToken( XML_flip );
+ break;
+
+ case A_TOKEN( stretch ):
+ mrBlipProps.moBitmapMode = getBaseToken( nElement );
+ return this; // for fillRect element
+
+ case A_TOKEN( fillRect ):
+ mrBlipProps.moFillRect = GetRelativeRect( rAttribs.getFastAttributeList() );
+ break;
+ }
+ return nullptr;
+}
+
+FillPropertiesContext::FillPropertiesContext( ContextHandler2Helper const & rParent, FillProperties& rFillProps ) :
+ ContextHandler2( rParent ),
+ mrFillProps( rFillProps )
+{
+}
+
+ContextHandlerRef FillPropertiesContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ return createFillContext( *this, nElement, rAttribs, mrFillProps );
+}
+
+ContextHandlerRef FillPropertiesContext::createFillContext(
+ ContextHandler2Helper const & rParent, sal_Int32 nElement,
+ const AttributeList& rAttribs, FillProperties& rFillProps )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; };
+ case A_TOKEN( solidFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new SolidFillContext( rParent, rFillProps ); };
+ case A_TOKEN( gradFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new GradientFillContext( rParent, rAttribs, rFillProps.maGradientProps ); };
+ case A_TOKEN( pattFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new PatternFillContext( rParent, rAttribs, rFillProps.maPatternProps ); };
+ case A_TOKEN( blipFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new BlipFillContext( rParent, rAttribs, rFillProps.maBlipProps ); };
+ case A_TOKEN( grpFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; // TODO
+ }
+ return nullptr;
+}
+
+SimpleFillPropertiesContext::SimpleFillPropertiesContext( ContextHandler2Helper const & rParent, Color& rColor ) :
+ FillPropertiesContext( rParent, *this ),
+ mrColor( rColor )
+{
+}
+
+SimpleFillPropertiesContext::~SimpleFillPropertiesContext()
+{
+ mrColor = getBestSolidColor();
+}
+
+BlipExtensionContext::BlipExtensionContext( ContextHandler2Helper const & rParent, BlipFillProperties& rBlipProps ) :
+ ContextHandler2( rParent ),
+ mrBlipProps( rBlipProps )
+{
+}
+
+BlipExtensionContext::~BlipExtensionContext()
+{
+}
+
+ContextHandlerRef BlipExtensionContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( ext ):
+ return new BlipExtensionContext( *this, mrBlipProps );
+
+ case OOX_TOKEN( a14, imgProps ):
+ return new ArtisticEffectContext( *this, mrBlipProps.maEffect );
+ }
+ return nullptr;
+}
+
+ArtisticEffectContext::ArtisticEffectContext( ContextHandler2Helper const & rParent, ArtisticEffectProperties& rEffect ) :
+ ContextHandler2( rParent ),
+ maEffect( rEffect )
+{
+}
+
+ArtisticEffectContext::~ArtisticEffectContext()
+{
+}
+
+ContextHandlerRef ArtisticEffectContext::onCreateContext(
+ sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // containers
+ if( nElement == OOX_TOKEN( a14, imgLayer ) )
+ {
+ if( rAttribs.hasAttribute( R_TOKEN( embed ) ) )
+ {
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( embed ), OUString() ) );
+ if( !aFragmentPath.isEmpty() )
+ {
+ getFilter().importBinaryData( maEffect.mrOleObjectInfo.maEmbeddedData, aFragmentPath );
+ maEffect.mrOleObjectInfo.maProgId = aFragmentPath;
+ }
+ }
+ return new ArtisticEffectContext( *this, maEffect );
+ }
+ if( nElement == OOX_TOKEN( a14, imgEffect ) )
+ return new ArtisticEffectContext( *this, maEffect );
+
+ // effects
+ maEffect.msName = ArtisticEffectProperties::getEffectString( nElement );
+ if( maEffect.isEmpty() )
+ return nullptr;
+
+ // effect attributes
+ sal_Int32 const aAttribs[19] = {
+ XML_visible, XML_trans, XML_crackSpacing, XML_pressure, XML_numberOfShades,
+ XML_grainSize, XML_intensity, XML_smoothness, XML_gridSize, XML_pencilSize,
+ XML_size, XML_brushSize, XML_scaling, XML_detail, XML_bright, XML_contrast,
+ XML_colorTemp, XML_sat, XML_amount
+ };
+ for(sal_Int32 nAttrib : aAttribs)
+ {
+ if( rAttribs.hasAttribute( nAttrib ) )
+ {
+ OUString sName = ArtisticEffectProperties::getEffectString( nAttrib );
+ if( !sName.isEmpty() )
+ maEffect.maAttribs[sName] <<= rAttribs.getInteger( nAttrib, 0 );
+ }
+ }
+
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/objectdefaultcontext.cxx b/oox/source/drawingml/objectdefaultcontext.cxx
new file mode 100644
index 000000000..bdb30090e
--- /dev/null
+++ b/oox/source/drawingml/objectdefaultcontext.cxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/objectdefaultcontext.hxx>
+#include <drawingml/spdefcontext.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+objectDefaultContext::objectDefaultContext( ContextHandler2Helper const & rParent, Theme& rTheme )
+: ContextHandler2( rParent )
+, mrTheme( rTheme )
+{
+}
+
+ContextHandlerRef objectDefaultContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& /* rAttribs */ )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( spDef ):
+ return new spDefContext( *this, mrTheme.getSpDef() );
+ case A_TOKEN( lnDef ):
+ return new spDefContext( *this, mrTheme.getLnDef() );
+ case A_TOKEN( txDef ):
+ return new spDefContext( *this, mrTheme.getTxDef() );
+ }
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/presetgeometrynames.cxx b/oox/source/drawingml/presetgeometrynames.cxx
new file mode 100644
index 000000000..04dff605c
--- /dev/null
+++ b/oox/source/drawingml/presetgeometrynames.cxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
+#include <unordered_map>
+#include <cstring>
+#include <drawingml/presetgeometrynames.hxx>
+#include <memory>
+
+namespace
+{
+typedef std::unordered_map<const char*, const char*, rtl::CStringHash, rtl::CStringEqual>
+ PresetGeometryHashMap;
+
+struct PresetGeometryName
+{
+ const char* pMsoName;
+ const char* pFontworkType;
+};
+
+const PresetGeometryName pPresetGeometryNameArray[]
+ = { { "textNoShape", "" },
+ { "textPlain", "fontwork-plain-text" },
+ { "textStop", "fontwork-stop" },
+ { "textTriangle", "fontwork-triangle-up" },
+ { "textTriangleInverted", "fontwork-triangle-down" },
+ { "textChevron", "fontwork-chevron-up" },
+ { "textChevronInverted", "fontwork-chevron-down" },
+ { "textRingInside", "mso-spt142" },
+ { "textRingOutside", "mso-spt143" },
+ { "textArchUp", "fontwork-arch-up-curve" },
+ { "textArchDown", "fontwork-arch-down-curve" },
+ { "textCircle", "fontwork-circle-curve" },
+ { "textButton", "fontwork-open-circle-curve" },
+ { "textArchUpPour", "fontwork-arch-up-pour" },
+ { "textArchDownPour", "fontwork-arch-down-pour" },
+ { "textCirclePour", "fontwork-circle-pour" },
+ { "textButtonPour", "fontwork-open-circle-pour" },
+ { "textCurveUp", "fontwork-curve-up" },
+ { "textCurveDown", "fontwork-curve-down" },
+ { "textCanUp", "mso-spt174" },
+ { "textCanDown", "mso-spt175" },
+ { "textWave1", "fontwork-wave" },
+ { "textWave2", "mso-spt157" },
+ { "textDoubleWave1", "mso-spt158" },
+ { "textWave4", "mso-spt159" },
+ { "textInflate", "fontwork-inflate" },
+ { "textDeflate", "mso-spt161" },
+ { "textInflateBottom", "mso-spt162" },
+ { "textDeflateBottom", "mso-spt163" },
+ { "textInflateTop", "mso-spt164" },
+ { "textDeflateTop", "mso-spt165" },
+ { "textDeflateInflate", "mso-spt166" },
+ { "textDeflateInflateDeflate", "mso-spt167" },
+ { "textFadeRight", "fontwork-fade-right" },
+ { "textFadeLeft", "fontwork-fade-left" },
+ { "textFadeUp", "fontwork-fade-up" },
+ { "textFadeDown", "fontwork-fade-down" },
+ { "textSlantUp", "fontwork-slant-up" },
+ { "textSlantDown", "fontwork-slant-down" },
+ { "textCascadeUp", "fontwork-fade-up-and-right" },
+ { "textCascadeDown", "fontwork-fade-up-and-left" } };
+}
+
+OUString PresetGeometryTypeNames::GetFontworkType(const OUString& rMsoType)
+{
+ static const PresetGeometryHashMap s_HashMap = []() {
+ PresetGeometryHashMap aH;
+ for (const auto& item : pPresetGeometryNameArray)
+ aH[item.pMsoName] = item.pFontworkType;
+ return aH;
+ }();
+ const char* pRetValue = "";
+ int i, nLen = rMsoType.getLength();
+ std::unique_ptr<char[]> pBuf(new char[nLen + 1]);
+ for (i = 0; i < nLen; i++)
+ pBuf[i] = static_cast<char>(rMsoType[i]);
+ pBuf[i] = 0;
+ PresetGeometryHashMap::const_iterator aHashIter(s_HashMap.find(pBuf.get()));
+ if (aHashIter != s_HashMap.end())
+ pRetValue = (*aHashIter).second;
+
+ return OUString(pRetValue, strlen(pRetValue), RTL_TEXTENCODING_ASCII_US);
+}
+
+OUString PresetGeometryTypeNames::GetMsoName(const OUString& rFontworkType)
+{
+ static const PresetGeometryHashMap s_HashMapInv = []() {
+ PresetGeometryHashMap aHInv;
+ for (const auto& item : pPresetGeometryNameArray)
+ aHInv[item.pFontworkType] = item.pMsoName;
+ return aHInv;
+ }();
+ const char* pRetValue = "";
+ int i, nLen = rFontworkType.getLength();
+ std::unique_ptr<char[]> pBuf(new char[nLen + 1]);
+ for (i = 0; i < nLen; i++)
+ pBuf[i] = static_cast<char>(rFontworkType[i]);
+ pBuf[i] = 0;
+ PresetGeometryHashMap::const_iterator aHashIter(s_HashMapInv.find(pBuf.get()));
+ if (aHashIter != s_HashMapInv.end())
+ pRetValue = (*aHashIter).second;
+
+ return OUString(pRetValue, strlen(pRetValue), RTL_TEXTENCODING_ASCII_US);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/source/drawingml/scene3dcontext.cxx b/oox/source/drawingml/scene3dcontext.cxx
new file mode 100644
index 000000000..e17893472
--- /dev/null
+++ b/oox/source/drawingml/scene3dcontext.cxx
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/scene3dcontext.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+Scene3DPropertiesContext::Scene3DPropertiesContext( ContextHandler2Helper const & rParent, Shape3DProperties& r3DProperties ) noexcept
+: ContextHandler2( rParent )
+, mr3DProperties( r3DProperties )
+{
+}
+
+ContextHandlerRef Scene3DPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( camera ):
+ if( rAttribs.hasAttribute( XML_fov ) )
+ mr3DProperties.mfFieldOfVision = rAttribs.getInteger( XML_fov, 0 ) / 60000.0; // 60000ths of degree
+ if( rAttribs.hasAttribute( XML_zoom ) )
+ mr3DProperties.mfZoom = rAttribs.getInteger( XML_zoom, 100000 ) / 100000.0;
+ if( rAttribs.hasAttribute( XML_prst ) )
+ mr3DProperties.mnPreset = rAttribs.getToken( XML_prst, XML_none );
+
+ return new Scene3DRotationPropertiesContext( *this, mr3DProperties.maCameraRotation );
+
+ case A_TOKEN( lightRig ):
+ mr3DProperties.mnLightRigDirection = rAttribs.getToken( XML_dir, XML_none );
+ mr3DProperties.mnLightRigType = rAttribs.getToken( XML_rig, XML_none );
+
+ return new Scene3DRotationPropertiesContext( *this, mr3DProperties.maLightRigRotation );
+
+ case A_TOKEN( backdrop ):
+ case A_TOKEN( extLst ):
+ return nullptr; // TODO: later (backdrop is not supported by core anyway)
+ }
+ return nullptr;
+}
+
+SceneText3DPropertiesContext::SceneText3DPropertiesContext( ContextHandler2Helper const & rParent, Text3DProperties& r3DProperties ) noexcept
+: ContextHandler2( rParent )
+, mr3DProperties( r3DProperties )
+{
+}
+
+ContextHandlerRef SceneText3DPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( camera ):
+ if( rAttribs.hasAttribute( XML_fov ) )
+ mr3DProperties.mfFieldOfVision = rAttribs.getInteger( XML_fov, 0 ) / 60000.0; // 60000ths of degree
+ if( rAttribs.hasAttribute( XML_zoom ) )
+ mr3DProperties.mfZoom = rAttribs.getInteger( XML_zoom, 100000 ) / 100000.0;
+ if( rAttribs.hasAttribute( XML_prst ) )
+ mr3DProperties.mnPreset = rAttribs.getToken( XML_prst, XML_none );
+
+ return new Scene3DRotationPropertiesContext( *this, mr3DProperties.maCameraRotation );
+
+ case A_TOKEN( lightRig ):
+ mr3DProperties.mnLightRigDirection = rAttribs.getToken( XML_dir, XML_none );
+ mr3DProperties.mnLightRigType = rAttribs.getToken( XML_rig, XML_none );
+
+ return new Scene3DRotationPropertiesContext( *this, mr3DProperties.maLightRigRotation );
+
+ case A_TOKEN( backdrop ):
+ case A_TOKEN( extLst ):
+ return nullptr; // TODO: later (backdrop is not supported by core anyway)
+
+ case A_TOKEN( bevelT ):
+ case A_TOKEN( bevelB ):
+ {
+ BevelProperties aProps;
+ if( rAttribs.hasAttribute( XML_w ) )
+ aProps.mnWidth = rAttribs.getInteger( XML_w, 0 );
+ if( rAttribs.hasAttribute( XML_h ) )
+ aProps.mnHeight = rAttribs.getInteger( XML_h, 0 );
+ if( rAttribs.hasAttribute( XML_prst ) )
+ aProps.mnPreset = rAttribs.getToken( XML_prst, XML_none );
+
+ if( aElementToken == A_TOKEN( bevelT ) )
+ mr3DProperties.maTopBevelProperties.set( aProps );
+ else
+ mr3DProperties.maBottomBevelProperties.set( aProps );
+ break;
+ }
+
+ case A_TOKEN( extrusionClr ):
+ return new ColorContext( *this, mr3DProperties.maExtrusionColor );
+
+ case A_TOKEN( contourClr ):
+ return new ColorContext( *this, mr3DProperties.maContourColor );
+ }
+ return nullptr;
+}
+
+Shape3DPropertiesContext::Shape3DPropertiesContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, Shape3DProperties& r3DProperties ) noexcept
+: ContextHandler2( rParent )
+, mr3DProperties( r3DProperties )
+{
+ if( rAttribs.hasAttribute( XML_extrusionH ) )
+ mr3DProperties.mnExtrusionH = rAttribs.getInteger( XML_extrusionH, 0 );
+ if( rAttribs.hasAttribute( XML_contourW ) )
+ mr3DProperties.mnContourW = rAttribs.getInteger( XML_contourW, 0 );
+ if( rAttribs.hasAttribute( XML_z ) )
+ mr3DProperties.mnShapeZ = rAttribs.getInteger( XML_z, 0 );
+ if( rAttribs.hasAttribute( XML_prstMaterial ) )
+ mr3DProperties.mnMaterial = rAttribs.getToken( XML_prstMaterial, XML_none );
+}
+
+ContextHandlerRef Shape3DPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( bevelT ):
+ case A_TOKEN( bevelB ):
+ {
+ BevelProperties aProps;
+ if( rAttribs.hasAttribute( XML_w ) )
+ aProps.mnWidth = rAttribs.getInteger( XML_w, 0 );
+ if( rAttribs.hasAttribute( XML_h ) )
+ aProps.mnHeight = rAttribs.getInteger( XML_h, 0 );
+ if( rAttribs.hasAttribute( XML_prst ) )
+ aProps.mnPreset = rAttribs.getToken( XML_prst, XML_none );
+
+ if( aElementToken == A_TOKEN( bevelT ) )
+ mr3DProperties.maTopBevelProperties.set( aProps );
+ else
+ mr3DProperties.maBottomBevelProperties.set( aProps );
+
+ break;
+ }
+ case A_TOKEN( extrusionClr ):
+ return new ColorContext( *this, mr3DProperties.maExtrusionColor );
+
+ case A_TOKEN( contourClr ):
+ return new ColorContext( *this, mr3DProperties.maContourColor );
+ }
+ return nullptr;
+}
+
+Scene3DRotationPropertiesContext::Scene3DRotationPropertiesContext( ContextHandler2Helper const & rParent, RotationProperties& rRotationProperties ) noexcept
+: ContextHandler2( rParent )
+, mrRotationProperties( rRotationProperties )
+{
+}
+
+ContextHandlerRef Scene3DRotationPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( rot ):
+ mrRotationProperties.mnLatitude = rAttribs.getInteger( XML_lat, 0 );
+ mrRotationProperties.mnLongitude = rAttribs.getInteger( XML_lon, 0 );
+ mrRotationProperties.mnRevolution = rAttribs.getInteger( XML_rev, 0 );
+ break;
+ }
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
new file mode 100644
index 000000000..8fefc18fd
--- /dev/null
+++ b/oox/source/drawingml/shape.cxx
@@ -0,0 +1,2368 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_wasm_strip.h>
+
+#include <oox/drawingml/shape.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/graphicproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/presetgeometrynames.hxx>
+#include <drawingml/shape3dproperties.hxx>
+#include "effectproperties.hxx"
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/ThemeOverrideFragmentHandler.hxx>
+#include <drawingml/table/tableproperties.hxx>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <drawingml/chart/chartspacefragment.hxx>
+#include <drawingml/chart/chartspacemodel.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <oox/ppt/pptimport.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/mathml/importutils.hxx>
+#include <oox/mathml/import.hxx>
+#include <oox/token/properties.hxx>
+#include "diagram/datamodel.hxx"
+#include "diagram/diagramhelper.hxx"
+
+#include <comphelper/classids.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequence.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/gen.hxx>
+#include <tools/globname.hxx>
+#include <tools/mapunit.hxx>
+#include <editeng/unoprnms.hxx>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/GraphicExportFilter.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <com/sun/star/document/XActionLockable.hpp>
+#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <svx/svdobj.hxx>
+#include <svx/svdotable.hxx>
+#include <svx/svdtrans.hxx>
+#include <tools/stream.hxx>
+#include <unotools/streamwrap.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/graphicfilter.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/wmfexternal.hxx>
+#include <sal/log.hxx>
+#include <svx/sdtaitm.hxx>
+#include <oox/drawingml/diagram/diagram.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::style;
+
+namespace oox::drawingml {
+
+Shape::Shape( const char* pServiceName, bool bDefaultHeight )
+: mpLinePropertiesPtr( std::make_shared<LineProperties>() )
+, mpShapeRefLinePropPtr( std::make_shared<LineProperties>() )
+, mpFillPropertiesPtr( std::make_shared<FillProperties>() )
+, mpShapeRefFillPropPtr( std::make_shared<FillProperties>() )
+, mpGraphicPropertiesPtr( std::make_shared<GraphicProperties>() )
+, mpCustomShapePropertiesPtr( std::make_shared<CustomShapeProperties>() )
+, mp3DPropertiesPtr( std::make_shared<Shape3DProperties>() )
+, mpEffectPropertiesPtr( std::make_shared<EffectProperties>() )
+, mpShapeRefEffectPropPtr( std::make_shared<EffectProperties>() )
+, mpMasterTextListStyle( std::make_shared<TextListStyle>() )
+, mnSubType( 0 )
+, meFrameType( FRAMETYPE_GENERIC )
+, mnRotation( 0 )
+, mnDiagramRotation( 0 )
+, mbFlipH( false )
+, mbFlipV( false )
+, mbHidden( false )
+, mbHiddenMasterShape( false )
+, mbLocked( false )
+, mbWPGChild(false)
+, mbLockedCanvas( false )
+, mbWps( false )
+, mbTextBox( false )
+, mbHasLinkedTxbx( false )
+, maDiagramDoms( 0 )
+, mpDiagramHelper( nullptr )
+{
+ if ( pServiceName )
+ msServiceName = OUString::createFromAscii( pServiceName );
+ setDefaults(bDefaultHeight);
+}
+
+Shape::Shape( const ShapePtr& pSourceShape )
+: mpTextBody(pSourceShape->mpTextBody)
+, mpLinePropertiesPtr( pSourceShape->mpLinePropertiesPtr )
+, mpShapeRefLinePropPtr( pSourceShape->mpShapeRefLinePropPtr )
+, mpFillPropertiesPtr( pSourceShape->mpFillPropertiesPtr )
+, mpShapeRefFillPropPtr( pSourceShape->mpShapeRefFillPropPtr )
+, mpGraphicPropertiesPtr( pSourceShape->mpGraphicPropertiesPtr )
+, mpCustomShapePropertiesPtr( pSourceShape->mpCustomShapePropertiesPtr )
+, mpTablePropertiesPtr( pSourceShape->mpTablePropertiesPtr )
+, mp3DPropertiesPtr( pSourceShape->mp3DPropertiesPtr )
+, mpEffectPropertiesPtr (pSourceShape->mpEffectPropertiesPtr)
+, mpShapeRefEffectPropPtr(pSourceShape->mpShapeRefEffectPropPtr)
+, maShapeProperties( pSourceShape->maShapeProperties )
+, mpMasterTextListStyle( pSourceShape->mpMasterTextListStyle )
+, msServiceName( pSourceShape->msServiceName )
+, msName( pSourceShape->msName )
+, msInternalName( pSourceShape->msInternalName )
+, msId( pSourceShape->msId )
+, mnSubType( pSourceShape->mnSubType )
+, moSubTypeIndex( pSourceShape->moSubTypeIndex )
+, maShapeStyleRefs( pSourceShape->maShapeStyleRefs )
+, maSize( pSourceShape->maSize )
+, maPosition( pSourceShape->maPosition )
+, meFrameType( pSourceShape->meFrameType )
+, mnRotation( pSourceShape->mnRotation )
+, mnDiagramRotation( pSourceShape->mnDiagramRotation )
+, mbFlipH( pSourceShape->mbFlipH )
+, mbFlipV( pSourceShape->mbFlipV )
+, mbHidden( pSourceShape->mbHidden )
+, mbHiddenMasterShape( pSourceShape->mbHiddenMasterShape )
+, mbLocked( pSourceShape->mbLocked )
+, mbWPGChild( pSourceShape->mbWPGChild )
+, mbLockedCanvas( pSourceShape->mbLockedCanvas )
+, mbWps( pSourceShape->mbWps )
+, mbTextBox( pSourceShape->mbTextBox )
+, mbHasLinkedTxbx(false)
+, maDiagramDoms( pSourceShape->maDiagramDoms )
+, mnZOrder(pSourceShape->mnZOrder)
+, mnZOrderOff(pSourceShape->mnZOrderOff)
+, mnDataNodeType(pSourceShape->mnDataNodeType)
+, mfAspectRatio(pSourceShape->mfAspectRatio)
+, mpDiagramHelper( nullptr )
+, msDiagramDataModelID(pSourceShape->msDiagramDataModelID)
+{}
+
+Shape::~Shape()
+{
+ // DiagramHelper should not be set here anymore, see
+ // propagateDiagramHelper below (maybe assert..?)
+ delete mpDiagramHelper;
+}
+
+void Shape::prepareDiagramHelper(
+ const std::shared_ptr< Diagram >& rDiagramPtr,
+ const std::shared_ptr<::oox::drawingml::Theme>& rTheme)
+{
+ // Prepare Diagram data collecting for this Shape
+ if( nullptr == mpDiagramHelper && FRAMETYPE_DIAGRAM == meFrameType )
+ {
+ mpDiagramHelper = new AdvancedDiagramHelper(
+ rDiagramPtr,
+ rTheme,
+ getSize());
+ }
+}
+
+void Shape::propagateDiagramHelper()
+{
+ // Propagate collected Diagram data to data holder
+ if (FRAMETYPE_DIAGRAM == meFrameType && nullptr != mpDiagramHelper)
+ {
+ SdrObjGroup* pAnchorObj = dynamic_cast<SdrObjGroup*>(SdrObject::getSdrObjectFromXShape(mxShape));
+
+ if(pAnchorObj)
+ {
+ static_cast<AdvancedDiagramHelper*>(mpDiagramHelper)->doAnchor(*pAnchorObj, *this);
+ mpDiagramHelper = nullptr;
+ }
+ }
+
+ // If propagation failed, delete/cleanup here. Since the DiagramHelper
+ // holds a Diagram and that this Shape it is necessary - the destructor
+ // will not be called and will be too late
+ if (nullptr != mpDiagramHelper)
+ {
+ delete mpDiagramHelper;
+ mpDiagramHelper = nullptr;
+ }
+}
+
+void Shape::migrateDiagramHelperToNewShape(const ShapePtr& pTarget)
+{
+ if(!mpDiagramHelper)
+ {
+ return;
+ }
+
+ if(!pTarget)
+ {
+ // no migrate target, but cleanup helper
+ delete mpDiagramHelper;
+ mpDiagramHelper = nullptr;
+ return;
+ }
+
+ if(pTarget->mpDiagramHelper)
+ {
+ // this should no happen, but if there is already a helper, clean it up
+ delete pTarget->mpDiagramHelper;
+ pTarget->mpDiagramHelper = nullptr;
+ }
+
+ // exchange and reset to nullptr
+ pTarget->mpDiagramHelper = mpDiagramHelper;
+ mpDiagramHelper = nullptr;
+}
+
+table::TablePropertiesPtr const & Shape::getTableProperties()
+{
+ if ( !mpTablePropertiesPtr )
+ mpTablePropertiesPtr = std::make_shared<table::TableProperties>();
+ return mpTablePropertiesPtr;
+}
+
+void Shape::setDefaults(bool bHeight)
+{
+ maDefaultShapeProperties.setProperty(PROP_TextAutoGrowHeight, false);
+ maDefaultShapeProperties.setProperty(PROP_TextWordWrap, true);
+ maDefaultShapeProperties.setProperty(PROP_TextLeftDistance, static_cast< sal_Int32 >( 250 ));
+ maDefaultShapeProperties.setProperty(PROP_TextUpperDistance, static_cast< sal_Int32 >( 125 ));
+ maDefaultShapeProperties.setProperty(PROP_TextRightDistance, static_cast< sal_Int32 >( 250 ));
+ maDefaultShapeProperties.setProperty(PROP_TextLowerDistance, static_cast< sal_Int32 >( 125 ));
+ if (bHeight)
+ maDefaultShapeProperties.setProperty(PROP_CharHeight, static_cast< float >( 18.0 ));
+ maDefaultShapeProperties.setProperty(PROP_TextVerticalAdjust, TextVerticalAdjust_TOP);
+ maDefaultShapeProperties.setProperty(PROP_ParaAdjust,
+ static_cast<sal_Int16>(ParagraphAdjust_LEFT));
+}
+
+::oox::vml::OleObjectInfo& Shape::setOleObjectType()
+{
+ OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setOleObjectType - multiple frame types" );
+ meFrameType = FRAMETYPE_OLEOBJECT;
+ mxOleObjectInfo = std::make_shared<::oox::vml::OleObjectInfo>( true );
+ return *mxOleObjectInfo;
+}
+
+ChartShapeInfo& Shape::setChartType( bool bEmbedShapes )
+{
+ OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setChartType - multiple frame types" );
+ meFrameType = FRAMETYPE_CHART;
+ if (mbWps)
+ msServiceName = "com.sun.star.drawing.temporaryForXMLImportOLE2Shape";
+ else
+ msServiceName = "com.sun.star.drawing.OLE2Shape";
+ mxChartShapeInfo = std::make_shared<ChartShapeInfo>( bEmbedShapes );
+ return *mxChartShapeInfo;
+}
+
+void Shape::setDiagramType()
+{
+ OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setDiagramType - multiple frame types" );
+ meFrameType = FRAMETYPE_DIAGRAM;
+ msServiceName = "com.sun.star.drawing.GroupShape";
+ mnSubType = 0;
+}
+
+void Shape::setTableType()
+{
+ OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setTableType - multiple frame types" );
+ meFrameType = FRAMETYPE_TABLE;
+ msServiceName = "com.sun.star.drawing.TableShape";
+ mnSubType = 0;
+}
+
+void Shape::setServiceName( const char* pServiceName )
+{
+ if ( pServiceName )
+ msServiceName = OUString::createFromAscii( pServiceName );
+}
+
+const ShapeStyleRef* Shape::getShapeStyleRef( sal_Int32 nRefType ) const
+{
+ ShapeStyleRefMap::const_iterator aIt = maShapeStyleRefs.find( nRefType );
+ return (aIt == maShapeStyleRefs.end()) ? nullptr : &aIt->second;
+}
+
+void Shape::addShape(
+ ::oox::core::XmlFilterBase& rFilterBase,
+ const Theme* pTheme,
+ const Reference< XShapes >& rxShapes,
+ const basegfx::B2DHomMatrix& aTransformation,
+ const FillProperties& rShapeOrParentShapeFillProps,
+ ShapeIdMap* pShapeMap,
+ oox::drawingml::ShapePtr pParentGroupShape)
+{
+ SAL_INFO("oox.drawingml", "Shape::addShape: id='" << msId << "'");
+
+ try
+ {
+ OUString sServiceName( msServiceName );
+ if( !sServiceName.isEmpty() )
+ {
+ basegfx::B2DHomMatrix aMatrix( aTransformation );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, false, false, aMatrix, rShapeOrParentShapeFillProps, pParentGroupShape) );
+
+ if( pShapeMap && !msId.isEmpty() )
+ {
+ (*pShapeMap)[ msId ] = shared_from_this();
+ }
+
+ // if this is a group shape, we have to add also each child shape
+ Reference< XShapes > xShapes( xShape, UNO_QUERY );
+ if ( xShapes.is() )
+ addChildren( rFilterBase, *this, pTheme, xShapes, pShapeMap, aMatrix );
+
+ if (isWPGChild() && xShape)
+ {
+ // This is a wps shape and it is the child of the WPG, now copy the
+ // the text body properties to the xshape.
+ Reference<XPropertySet> xChildWPSProperties(xShape, uno::UNO_QUERY);
+
+ if (getTextBody() && xChildWPSProperties)
+ {
+ xChildWPSProperties->setPropertyValue(
+ UNO_NAME_TEXT_VERTADJUST,
+ uno::Any(getTextBody()->getTextProperties().meVA));
+
+ xChildWPSProperties->setPropertyValue(
+ UNO_NAME_TEXT_LEFTDIST,
+ uno::Any(getTextBody()->getTextProperties().moInsets[0].has_value()
+ ? *getTextBody()->getTextProperties().moInsets[0]
+ : 0));
+ xChildWPSProperties->setPropertyValue(
+ UNO_NAME_TEXT_UPPERDIST,
+ uno::Any(getTextBody()->getTextProperties().moInsets[1].has_value()
+ ? *getTextBody()->getTextProperties().moInsets[1]
+ : 0));
+ xChildWPSProperties->setPropertyValue(
+ UNO_NAME_TEXT_RIGHTDIST,
+ uno::Any(getTextBody()->getTextProperties().moInsets[2].has_value()
+ ? *getTextBody()->getTextProperties().moInsets[2]
+ : 0));
+ xChildWPSProperties->setPropertyValue(
+ UNO_NAME_TEXT_LOWERDIST,
+ uno::Any(getTextBody()->getTextProperties().moInsets[3].has_value()
+ ? *getTextBody()->getTextProperties().moInsets[3]
+ : 0));
+ }
+ }
+
+ if( meFrameType == FRAMETYPE_DIAGRAM )
+ {
+ keepDiagramCompatibilityInfo();
+
+ // set DiagramHelper at SdrObjGroup
+ propagateDiagramHelper();
+
+ // Check if this is the PPTX import, so far converting SmartArt to a non-editable
+ // metafile is only implemented for DOCX.
+ bool bPowerPoint = dynamic_cast<oox::ppt::PowerPointImport*>(&rFilterBase) != nullptr;
+
+ if (!SvtFilterOptions::Get().IsSmartArt2Shape() && !bPowerPoint)
+ convertSmartArtToMetafile( rFilterBase );
+ }
+
+ NamedShapePairs* pNamedShapePairs = rFilterBase.getDiagramFontHeights();
+ if (xShape.is() && pNamedShapePairs)
+ {
+ auto itPairs = pNamedShapePairs->find(getInternalName());
+ if (itPairs != pNamedShapePairs->end())
+ {
+ auto it = itPairs->second.find(shared_from_this());
+ if (it != itPairs->second.end())
+ {
+ // Our drawingml::Shape is in the list of an internal name, remember the now
+ // inserted XShape.
+ it->second = xShape;
+ }
+ }
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::addShape" );
+ }
+}
+
+void Shape::setLockedCanvas(bool bLockedCanvas)
+{
+ mbLockedCanvas = bLockedCanvas;
+}
+
+void Shape::setWPGChild(bool bWPG)
+{
+ mbWPGChild = bWPG;
+}
+
+void Shape::setWps(bool bWps)
+{
+ mbWps = bWps;
+}
+
+void Shape::setTextBox(bool bTextBox)
+{
+ mbTextBox = bTextBox;
+}
+
+void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
+{
+ SAL_INFO("oox.drawingml", "Shape::applyShapeReference: apply '" << rReferencedShape.msId << "' to '" << msId << "'");
+
+ if ( rReferencedShape.mpTextBody && bUseText )
+ mpTextBody = std::make_shared<TextBody>( *rReferencedShape.mpTextBody );
+ else
+ mpTextBody.reset();
+ maShapeProperties = rReferencedShape.maShapeProperties;
+ mpShapeRefLinePropPtr = std::make_shared<LineProperties>( rReferencedShape.getActualLineProperties(nullptr) );
+ mpShapeRefFillPropPtr = std::make_shared<FillProperties>( rReferencedShape.getActualFillProperties(nullptr, nullptr) );
+ mpCustomShapePropertiesPtr = std::make_shared<CustomShapeProperties>( *rReferencedShape.mpCustomShapePropertiesPtr );
+ mpTablePropertiesPtr = rReferencedShape.mpTablePropertiesPtr ? std::make_shared<table::TableProperties>( *rReferencedShape.mpTablePropertiesPtr ) : nullptr;
+ mpShapeRefEffectPropPtr = std::make_shared<EffectProperties>( rReferencedShape.getActualEffectProperties(nullptr) );
+ mpMasterTextListStyle = std::make_shared<TextListStyle>( *rReferencedShape.mpMasterTextListStyle );
+ maSize = rReferencedShape.maSize;
+ maPosition = rReferencedShape.maPosition;
+ mnRotation = rReferencedShape.mnRotation;
+ mbFlipH = rReferencedShape.mbFlipH;
+ mbFlipV = rReferencedShape.mbFlipV;
+ mbHidden = rReferencedShape.mbHidden;
+ mbLocked = rReferencedShape.mbLocked;
+}
+
+namespace {
+
+struct ActionLockGuard
+{
+ explicit ActionLockGuard(Reference<drawing::XShape> const& xShape)
+ : m_xLockable(xShape, UNO_QUERY)
+ {
+ if (m_xLockable.is()) {
+ m_xLockable->addActionLock();
+ }
+ }
+ ~ActionLockGuard()
+ {
+ if (m_xLockable.is()) {
+ m_xLockable->removeActionLock();
+ }
+ }
+private:
+ Reference<document::XActionLockable> m_xLockable;
+};
+
+}
+
+// for group shapes, the following method is also adding each child
+void Shape::addChildren(
+ XmlFilterBase& rFilterBase,
+ Shape& rMaster,
+ const Theme* pTheme,
+ const Reference< XShapes >& rxShapes,
+ ShapeIdMap* pShapeMap,
+ const basegfx::B2DHomMatrix& aTransformation )
+{
+ for (auto const& child : rMaster.maChildren)
+ {
+ child->setMasterTextListStyle( mpMasterTextListStyle );
+ child->addShape( rFilterBase, pTheme, rxShapes, aTransformation, getFillProperties(), pShapeMap, rMaster.shared_from_this());
+ }
+}
+
+static void lcl_resetPropertyValue( std::vector<beans::PropertyValue>& rPropVec, const OUString& rName )
+{
+ auto aIterator = std::find_if( rPropVec.begin(), rPropVec.end(),
+ [rName]( const beans::PropertyValue& rValue ) { return rValue.Name == rName; } );
+
+ if (aIterator != rPropVec.end())
+ rPropVec.erase( aIterator );
+}
+
+static void lcl_setPropertyValue( std::vector<beans::PropertyValue>& rPropVec,
+ const OUString& rName,
+ const beans::PropertyValue& rPropertyValue )
+{
+ lcl_resetPropertyValue( rPropVec, rName );
+
+ rPropVec.push_back( rPropertyValue );
+}
+
+static SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust )
+{
+ if (eAdjust == ParagraphAdjust_LEFT)
+ return SDRTEXTHORZADJUST_LEFT;
+ else if (eAdjust == ParagraphAdjust_RIGHT)
+ return SDRTEXTHORZADJUST_RIGHT;
+ else if (eAdjust == ParagraphAdjust_CENTER)
+ return SDRTEXTHORZADJUST_CENTER;
+ return SDRTEXTHORZADJUST_LEFT;
+}
+
+static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape,
+ const OUString& rClass, const OUString& rPresetType,
+ const CustomShapePropertiesPtr& pCustomShapePropertiesPtr,
+ const TextBodyPtr& pTextBody,
+ const GraphicHelper& rGraphicHelper)
+{
+ if (!xShape.is() || !pCustomShapePropertiesPtr || !pTextBody)
+ return;
+
+ uno::Reference<drawing::XEnhancedCustomShapeDefaulter> xDefaulter( xShape,
+ uno::UNO_QUERY );
+
+ if (!xDefaulter.is() || rClass.isEmpty())
+ return;
+
+ Reference<XPropertySet> xSet( xShape, UNO_QUERY );
+ if (!xSet.is())
+ return;
+
+ // The DrawingML shapes from the presetTextWarpDefinitions are mapped to the definitions
+ // in svx/../EnhancedCustomShapeGeometry.cxx, which are used for WordArt shapes from
+ // binary MS Office. Therefore all adjustment values need to be adapted.
+ auto aAdjGdList = pCustomShapePropertiesPtr->getAdjustmentGuideList();
+ Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustment(
+ !aAdjGdList.empty() ? aAdjGdList.size() : 1 );
+ auto pAdjustment = aAdjustment.getArray();
+ int nIndex = 0;
+ for (const auto& aEntry : aAdjGdList)
+ {
+ double fValue = aEntry.maFormula.toDouble();
+ // then: polar-handle, else: XY-handle
+ // There exist only 8 polar-handles at all in presetTextWarp.
+ if ((rClass == "fontwork-arch-down-curve")
+ || (rClass == "fontwork-arch-down-pour" && aEntry.maName == "adj1")
+ || (rClass == "fontwork-arch-up-curve")
+ || (rClass == "fontwork-arch-up-pour" && aEntry.maName == "adj1")
+ || (rClass == "fontwork-open-circle-curve")
+ || (rClass == "fontwork-open-circle-pour" && aEntry.maName == "adj1")
+ || (rClass == "fontwork-circle-curve")
+ || (rClass == "fontwork-circle-pour" && aEntry.maName == "adj1"))
+ {
+ // DrawingML has 1/60000 degree unit, but WordArt simple degree. Range [0..360[
+ // or range ]-180..180] doesn't matter, because only cos(angle) and
+ // sin(angle) are used.
+ fValue = NormAngle360(fValue / 60000.0);
+ }
+ else
+ {
+ // DrawingML writes adjustment guides as relative value with 100% = 100000,
+ // but WordArt definitions use values absolute in viewBox 0 0 21600 21600,
+ // so scale with 21600/100000 = 0.216, with two exceptions:
+ // X-handles of waves describe increase/decrease relative to horizontal center.
+ // The gdRefR of pour-shapes is not relative to viewBox but to radius.
+ if ((rClass == "mso-spt158" && aEntry.maName == "adj2") // textDoubleWave1
+ || (rClass == "fontwork-wave" && aEntry.maName == "adj2") // textWave1
+ || (rClass == "mso-spt157" && aEntry.maName == "adj2") // textWave2
+ || (rClass == "mso-spt159" && aEntry.maName == "adj2")) // textWave4
+ {
+ fValue = (fValue + 50000.0) * 0.216;
+ }
+ else if ( (rClass == "fontwork-arch-down-pour" && aEntry.maName == "adj2")
+ || (rClass == "fontwork-arch-up-pour" && aEntry.maName == "adj2")
+ || (rClass == "fontwork-open-circle-pour" && aEntry.maName == "adj2")
+ || (rClass == "fontwork-circle-pour" && aEntry.maName == "adj2"))
+ {
+ fValue *= 0.108;
+ }
+ else
+ {
+ fValue *= 0.216;
+ }
+ }
+
+ pAdjustment[nIndex].Value <<= fValue;
+ pAdjustment[nIndex++].State = css::beans::PropertyState_DIRECT_VALUE;
+ }
+
+ // Set properties
+ xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWHEIGHT, uno::Any( false ) );
+ xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWWIDTH, uno::Any( false ) );
+ xSet->setPropertyValue( UNO_NAME_FILLSTYLE, uno::Any( drawing::FillStyle_SOLID ) );
+
+ // ToDo: Old binary WordArt does not allow different styles for different paragraphs, so it
+ // was not necessary to examine all paragraphs. Solution for DrawingML is needed.
+ // Currently different alignment of paragraphs are lost, for example.
+ const TextParagraphVector& rParagraphs = pTextBody->getParagraphs();
+ if (!rParagraphs.empty() && !rParagraphs[0]->getRuns().empty())
+ {
+ std::shared_ptr<TextParagraph> pParagraph = rParagraphs[0];
+ std::shared_ptr<TextRun> pRun = pParagraph->getRuns()[0];
+ TextCharacterProperties& pProperties = pRun->getTextCharacterProperties();
+
+ if (pProperties.moBold.has() && pProperties.moBold.get())
+ {
+ xSet->setPropertyValue( UNO_NAME_CHAR_WEIGHT, uno::Any( css::awt::FontWeight::BOLD ) );
+ }
+ if (pProperties.moItalic.has() && pProperties.moItalic.get())
+ {
+ xSet->setPropertyValue( UNO_NAME_CHAR_POSTURE, uno::Any( css::awt::FontSlant::FontSlant_ITALIC ) );
+ }
+ if (pProperties.moHeight.has())
+ {
+ sal_Int32 nHeight = pProperties.moHeight.get() / 100;
+ xSet->setPropertyValue( UNO_NAME_CHAR_HEIGHT, uno::Any( nHeight ) );
+ }
+ if (pProperties.maFillProperties.maFillColor.isUsed())
+ {
+ const sal_Int32 aFillColor = static_cast<sal_Int32>(
+ pProperties.maFillProperties.maFillColor.getColor( rGraphicHelper ).GetRGBColor() );
+ xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::Any( aFillColor ) );
+
+ if (pProperties.maFillProperties.maFillColor.hasTransparency())
+ {
+ const sal_Int16 aTransparence = pProperties.maFillProperties.maFillColor.getTransparency();
+ xSet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::Any(aTransparence));
+ }
+ }
+ else
+ {
+ // Set default color
+ xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::Any( COL_BLACK ) );
+ }
+ {
+ ParagraphAdjust eAdjust = ParagraphAdjust_LEFT;
+ if (pParagraph->getProperties().getParaAdjust())
+ eAdjust = *pParagraph->getProperties().getParaAdjust();
+ xSet->setPropertyValue( "ParaAdjust", uno::Any( eAdjust ) );
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape( xShape );
+ assert(pShape);
+ SdrTextHorzAdjust eHorzAdjust = lcl_convertAdjust( eAdjust );
+ pShape->SetMergedItem( SdrTextHorzAdjustItem( eHorzAdjust ) );
+ }
+ }
+
+ // Apply vertical adjustment for text on arc
+ // ToDo: The property is currently not evaluated.
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
+ assert(pShape);
+ if (rClass == "fontwork-arch-up-curve" || rClass == "fontwork-circle-curve")
+ pShape->SetMergedItem( SdrTextVertAdjustItem( SdrTextVertAdjust::SDRTEXTVERTADJUST_BOTTOM ) );
+ else if (rClass == "fontwork-arch-down-curve")
+ pShape->SetMergedItem( SdrTextVertAdjustItem( SdrTextVertAdjust::SDRTEXTVERTADJUST_TOP ) );
+
+ // Apply preset shape
+ xDefaulter->createCustomShapeDefaults( rClass );
+
+ auto aGeomPropSeq = xSet->getPropertyValue( "CustomShapeGeometry" )
+ .get<uno::Sequence<beans::PropertyValue>>();
+ auto aGeomPropVec
+ = comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(
+ aGeomPropSeq );
+
+ // Reset old properties
+ static const OUStringLiteral sTextPath( u"TextPath" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ static const OUStringLiteral sPresetTextWarp( u"PresetTextWarp" );
+
+ lcl_resetPropertyValue( aGeomPropVec, "CoordinateSize" );
+ lcl_resetPropertyValue( aGeomPropVec, "Equations" );
+ lcl_resetPropertyValue( aGeomPropVec, "Path" );
+ lcl_resetPropertyValue( aGeomPropVec, sAdjustmentValues);
+
+ bool bFromWordArt(false);
+ pTextBody->getTextProperties().maPropertyMap.getProperty(PROP_FromWordArt) >>= bFromWordArt;
+
+ bool bScaleX(false);
+ if (!bFromWordArt
+ && (rPresetType == "textArchDown" || rPresetType == "textArchUp"
+ || rPresetType == "textCircle" || rPresetType == "textButton"))
+ {
+ bScaleX = true;
+ }
+
+ // Apply geometry properties
+ uno::Sequence<beans::PropertyValue> aPropertyValues(
+ comphelper::InitPropertySequence(
+ { { sTextPath, uno::Any( true ) },
+ { "TextPathMode",
+ uno::Any( drawing::EnhancedCustomShapeTextPathMode_PATH ) },
+ { "ScaleX", uno::Any(bScaleX) } } ) );
+
+ lcl_setPropertyValue( aGeomPropVec, sTextPath,
+ comphelper::makePropertyValue( sTextPath, aPropertyValues ) );
+
+ lcl_setPropertyValue( aGeomPropVec, sPresetTextWarp,
+ comphelper::makePropertyValue( sPresetTextWarp, rPresetType ) );
+
+ if (!aAdjGdList.empty())
+ {
+ lcl_setPropertyValue( aGeomPropVec, sAdjustmentValues,
+ comphelper::makePropertyValue( sAdjustmentValues, aAdjustment ) );
+ }
+
+ xSet->setPropertyValue(
+ "CustomShapeGeometry",
+ uno::Any(comphelper::containerToSequence(aGeomPropVec)));
+}
+
+// Some helper methods for createAndInsert
+namespace
+{
+// mirrors aTransformation at its center axis
+// only valid if neither rotation or shear included
+void lcl_mirrorAtCenter(basegfx::B2DHomMatrix& aTransformation, bool bFlipH, bool bFlipV)
+{
+ if (!bFlipH && !bFlipV)
+ return;
+ basegfx::B2DPoint aCenter(0.5, 0.5);
+ aCenter *= aTransformation;
+ aTransformation.translate(-aCenter);
+ aTransformation.scale(bFlipH ? -1.0 : 1.0, bFlipV ? -1.0 : 1.0);
+ aTransformation.translate(aCenter);
+ return;
+}
+
+// only valid if neither rotation or shear included
+void lcl_doSpecialMSOWidthHeightToggle(basegfx::B2DHomMatrix& aTransformation)
+{
+ // The values are directly set at the matrix without any matrix multiplication.
+ // That way it is valid for lines too. Those have zero width or height.
+ const double fSx(aTransformation.get(0, 0));
+ const double fSy(aTransformation.get(1, 1));
+ const double fTx(aTransformation.get(0, 2));
+ const double fTy(aTransformation.get(1, 2));
+ aTransformation.set(0, 0, fSy);
+ aTransformation.set(1, 1, fSx);
+ aTransformation.set(0, 2, fTx + 0.5 * (fSx - fSy));
+ aTransformation.set(1, 2, fTy + 0.5 * (fSy - fSx));
+ return;
+}
+
+void lcl_RotateAtCenter(basegfx::B2DHomMatrix& aTransformation,sal_Int32 nMSORotationAngle)
+{
+ if (nMSORotationAngle == 0)
+ return;
+ double fRad = basegfx::deg2rad<60000>(nMSORotationAngle);
+ basegfx::B2DPoint aCenter(0.5, 0.5);
+ aCenter *= aTransformation;
+ aTransformation.translate(-aCenter);
+ aTransformation.rotate(fRad);
+ aTransformation.translate(aCenter);
+ return;
+}
+}
+
+Reference< XShape > const & Shape::createAndInsert(
+ ::oox::core::XmlFilterBase& rFilterBase,
+ const OUString& rServiceName,
+ const Theme* pTheme,
+ const css::uno::Reference< css::drawing::XShapes >& rxShapes,
+ bool bClearText,
+ bool bDoNotInsertEmptyTextBody,
+ basegfx::B2DHomMatrix& aParentTransformation,
+ const FillProperties& rShapeOrParentShapeFillProps,
+ oox::drawingml::ShapePtr pParentGroupShape)
+{
+ bool bIsEmbMedia = false;
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: id='" << msId << "' service='" << rServiceName << "'");
+
+ formulaimport::XmlStreamBuilder * pMathXml(nullptr);
+ if (mpTextBody)
+ {
+ for (auto const& it : mpTextBody->getParagraphs())
+ {
+ if (it->HasMathXml())
+ {
+ if (!mpTextBody->isEmpty() || pMathXml != nullptr)
+ {
+ SAL_WARN("oox.drawingml", "losing a Math object...");
+ }
+ else
+ {
+ pMathXml = &it->GetMathXml();
+ }
+ }
+ }
+ }
+
+ // tdf#90403 PowerPoint ignores a:ext cx and cy values of p:xfrm, and uses real table width and height
+ if ( mpTablePropertiesPtr && rServiceName == "com.sun.star.drawing.TableShape" )
+ {
+ maSize.Width = 0;
+ for (auto const& elem : mpTablePropertiesPtr->getTableGrid())
+ {
+ maSize.Width = o3tl::saturating_add(maSize.Width, static_cast<sal_Int32>(elem));
+ }
+ maSize.Height = 0;
+ for (auto const& elem : mpTablePropertiesPtr->getTableRows())
+ {
+ // WARN: When less then minimum sized rows exist, calculated height here
+ // is corrected before layouting takes place
+ maSize.Height = o3tl::saturating_add(maSize.Height, elem.getHeight());
+ }
+ }
+
+ awt::Rectangle aShapeRectHmm(
+ o3tl::convert(maPosition.X, o3tl::Length::emu, o3tl::Length::mm100),
+ o3tl::convert(maPosition.Y, o3tl::Length::emu, o3tl::Length::mm100),
+ o3tl::convert(maSize.Width, o3tl::Length::emu, o3tl::Length::mm100),
+ o3tl::convert(maSize.Height, o3tl::Length::emu, o3tl::Length::mm100));
+
+ OUString aServiceName;
+ if (pMathXml)
+ {
+ // convert this shape to OLE
+ aServiceName = "com.sun.star.drawing.OLE2Shape";
+ msServiceName = aServiceName;
+ meFrameType = FRAMETYPE_GENERIC; // not OLEOBJECT, no stream in package
+ mnSubType = 0;
+ }
+ else if (rServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
+ mpGraphicPropertiesPtr && !mpGraphicPropertiesPtr->m_sMediaPackageURL.isEmpty())
+ {
+ aServiceName = finalizeServiceName( rFilterBase, "com.sun.star.presentation.MediaShape", aShapeRectHmm );
+ bIsEmbMedia = true;
+ }
+ else
+ {
+ aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm );
+ }
+ // Use custom shape instead of GraphicObjectShape if the image is cropped to
+ // shape. Except rectangle, which does not require further cropping
+ bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
+ !mpCustomShapePropertiesPtr->representsDefaultShape());
+
+ bool bIsCustomShape = (aServiceName == "com.sun.star.drawing.CustomShape" || bIsCroppedGraphic);
+ bool bIsConnectorShape = (aServiceName == "com.sun.star.drawing.ConnectorShape");
+ if(bIsCroppedGraphic)
+ {
+ aServiceName = "com.sun.star.drawing.CustomShape";
+ mpGraphicPropertiesPtr->mbIsCustomShape = true;
+ }
+ bool bUseRotationTransform = ( !mbWps ||
+ aServiceName == "com.sun.star.drawing.LineShape" ||
+ aServiceName == "com.sun.star.drawing.GroupShape" ||
+ mbFlipH ||
+ mbFlipV );
+
+ basegfx::B2DHomMatrix aTransformation; // will be cumulative transformation of this object
+
+ // Special for SmartArt import. Rotate diagram's shape around object's center before sizing.
+ if (bUseRotationTransform && mnDiagramRotation != 0)
+ {
+ aTransformation.translate(-0.5, -0.5);
+ aTransformation.rotate(basegfx::deg2rad<60000>(mnDiagramRotation));
+ aTransformation.translate(0.5, 0.5);
+ }
+
+ // Build object matrix from shape size and position; corresponds to MSO ext and off
+ // Only LineShape and ConnectorShape may have zero width or height.
+ if (aServiceName == "com.sun.star.drawing.LineShape"
+ || aServiceName == "com.sun.star.drawing.ConnectorShape")
+ aTransformation.scale(maSize.Width, maSize.Height);
+ else
+ {
+ aTransformation.scale(maSize.Width ? maSize.Width : 1.0,
+ maSize.Height ? maSize.Height : 1.0);
+ }
+
+ // Evaluate object flip. Other shapes than custom shapes have no attribute for flip but use
+ // negative scale. Flip in MSO is at object center.
+ if (!bIsCustomShape && (mbFlipH || mbFlipV))
+ lcl_mirrorAtCenter(aTransformation, mbFlipH, mbFlipV);
+
+ // Evaluate parent flip.
+ // A CustomShape has mirror not as negative scale, but as attributes.
+ basegfx::B2DVector aParentScale(1.0, 1.0);
+ basegfx::B2DVector aParentTranslate(0.0, 0.0);
+ double fParentRotate(0.0);
+ double fParentShearX(0.0);
+ if (pParentGroupShape)
+ {
+ aParentTransformation.decompose(aParentScale, aParentTranslate, fParentRotate, fParentShearX);
+ if (bIsCustomShape)
+ {
+ lcl_mirrorAtCenter(aTransformation, aParentScale.getX() < 0, aParentScale.getY() < 0);
+ if(aParentScale.getX() < 0)
+ mbFlipH = !mbFlipH;
+ if(aParentScale.getY() < 0)
+ mbFlipV = !mbFlipV;
+ }
+ }
+
+ if (maPosition.X != 0 || maPosition.Y != 0)
+ {
+ // if global position is used, add it to transformation
+ if (mbWps && pParentGroupShape == nullptr)
+ aTransformation.translate(
+ o3tl::convert(maPosition.X, o3tl::Length::mm100, o3tl::Length::emu),
+ o3tl::convert(maPosition.Y, o3tl::Length::mm100, o3tl::Length::emu));
+ else
+ aTransformation.translate(maPosition.X, maPosition.Y);
+ }
+
+ // Apply further parent transformations. First scale object then rotate. Other way round would
+ // introduce shearing.
+
+ // The attributes chExt and chOff of the group in oox file contain the values on which the size
+ // and position of the child is based on. If they differ from the actual size of the group as
+ // given in its ext and off attributes, the child has to be transformed according the new values.
+ if (pParentGroupShape)
+ {
+ // ToDo: A diagram in a group might need special handling because it cannot flip and only
+ // resize uniformly. But currently it is imported with zero size, see tdf#139575. That needs
+ // to be fixed beforehand.
+
+ // Scaling is done from left/top edges of the group. So these need to become coordinate axes.
+ aTransformation.translate(-pParentGroupShape->maChPosition.X,
+ -pParentGroupShape->maChPosition.Y);
+
+ // oox allows zero or missing attribute chExt. In that case the scaling factor is 1.
+ // Transform2DContext::onCreateContext has set maChSize to maSize for groups in oox file in
+ // such cases. For own made groups (e.g. diagrams) that is missing.
+ // The factors cumulate on the way through the parent groups, so we do not use maSize of the
+ // direct parent group but the cumulated value from aParentScale.
+ double fFactorX = 1.0;
+ double fFactorY = 1.0;
+ if (pParentGroupShape->maChSize.Width != 0)
+ fFactorX = aParentScale.getX() / pParentGroupShape->maChSize.Width;
+ if (pParentGroupShape->maChSize.Height != 0)
+ fFactorY = aParentScale.getY() / pParentGroupShape->maChSize.Height;
+ if (fFactorX != 1 || fFactorY != 1)
+ {
+ // It depends on the object rotation angle whether scaling is applied to switched
+ // width and height. MSO acts strange in that case (as of May 2021).
+ const sal_Int32 nDeg(mnRotation / 60000);
+ const bool bNeedsMSOWidhtHeightToggle
+ = (nDeg >= 45 && nDeg < 135) || (nDeg >= 225 && nDeg < 315);
+ if (bNeedsMSOWidhtHeightToggle)
+ lcl_doSpecialMSOWidthHeightToggle(aTransformation);
+
+ aTransformation.scale(fFactorX, fFactorY);
+
+ if (bNeedsMSOWidhtHeightToggle)
+ {
+ lcl_doSpecialMSOWidthHeightToggle(aTransformation);
+ // In case of flip the special case needs an additional 180deg rotation.
+ if ((aParentScale.getX() < 0) != (aParentScale.getY() < 0))
+ lcl_RotateAtCenter(aTransformation, 10800000);
+ }
+ }
+ }
+
+ // Apply object rotation at current object center
+ // The flip contained in aParentScale will affect orientation of object rotation angle.
+ sal_Int16 nOrientation = ((aParentScale.getX() < 0) != (aParentScale.getY() < 0)) ? -1 : 1;
+ // ToDo: Not sure about the restrictions given by bUseRotationTransform.
+ // Since LibreOffice doesn't have 3D camera options for 2D shapes, rotate the shape opposite of
+ // the camera Z axis rotation, in order to produce the same visual result from MSO
+ const sal_Int32 nCameraRotation = get3DProperties().maCameraRotation.mnRevolution.get(0);
+ if (bUseRotationTransform && (mnRotation != 0 || nCameraRotation != 0))
+ lcl_RotateAtCenter(aTransformation, nOrientation * (mnRotation - nCameraRotation));
+
+ if (fParentRotate != 0.0)
+ aTransformation.rotate(fParentRotate);
+ if (!aParentTranslate.equalZero())
+ aTransformation.translate(aParentTranslate);
+
+ aParentTransformation = aTransformation;
+
+ constexpr double fEmuToMm100 = o3tl::convert(1.0, o3tl::Length::emu, o3tl::Length::mm100);
+ aTransformation.scale(fEmuToMm100, fEmuToMm100);
+
+ // OOXML flips shapes before rotating them, so the rotation needs to be inverted
+ if( bIsCustomShape && mbFlipH != mbFlipV )
+ {
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ aTransformation.decompose(aScale, aTranslate, fRotate, fShearX);
+
+ if(fRotate != 0)
+ {
+ basegfx::B2DPoint aCenter(0.5, 0.5);
+ aCenter *= aTransformation;
+ aTransformation.translate( -aCenter.getX(), -aCenter.getY() );
+ aTransformation.rotate( fRotate * -2.0 );
+ aTransformation.translate( aCenter.getX(), aCenter.getY() );
+ }
+ }
+
+ // special for lineshape
+ if ( aServiceName == "com.sun.star.drawing.LineShape" )
+ {
+ ::basegfx::B2DPolygon aPoly;
+ aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
+ aPoly.insert( 1, ::basegfx::B2DPoint( maSize.Width ? 1 : 0, maSize.Height ? 1 : 0 ) );
+ aPoly.transform( aTransformation );
+
+ // now creating the corresponding PolyPolygon
+ sal_Int32 i, nNumPoints = aPoly.count();
+ uno::Sequence< awt::Point > aPointSequence( nNumPoints );
+ awt::Point* pPoints = aPointSequence.getArray();
+ for( i = 0; i < nNumPoints; ++i )
+ {
+ basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) );
+
+ // Guard against zero width or height.
+ if (i)
+ {
+ const basegfx::B2DPoint& rPreviousPoint = aPoly.getB2DPoint(i - 1);
+ if (aPoint.getX() - rPreviousPoint.getX() == 0)
+ aPoint.setX(aPoint.getX() + 1);
+ if (aPoint.getY() - rPreviousPoint.getY() == 0)
+ aPoint.setY(aPoint.getY() + 1);
+ }
+
+ pPoints[i] = awt::Point(static_cast<sal_Int32>(aPoint.getX()), static_cast<sal_Int32>(aPoint.getY()));
+ }
+ uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 );
+ aPolyPolySequence.getArray()[ 0 ] = aPointSequence;
+
+ maShapeProperties.setProperty(PROP_PolyPolygon, aPolyPolySequence);
+ }
+ else if ( aServiceName == "com.sun.star.drawing.ConnectorShape" )
+ {
+ ::basegfx::B2DPolygon aPoly;
+ aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
+ aPoly.insert( 1, ::basegfx::B2DPoint( maSize.Width ? 1 : 0, maSize.Height ? 1 : 0 ) );
+ aPoly.transform( aTransformation );
+
+ basegfx::B2DPoint aStartPosition( aPoly.getB2DPoint( 0 ) );
+ basegfx::B2DPoint aEndPosition( aPoly.getB2DPoint( 1 ) );
+ awt::Point aAWTStartPosition( static_cast< sal_Int32 >( aStartPosition.getX() ), static_cast< sal_Int32 >( aStartPosition.getY() ) );
+ awt::Point aAWTEndPosition( static_cast< sal_Int32 >( aEndPosition.getX() ), static_cast< sal_Int32 >( aEndPosition.getY() ) );
+
+ maShapeProperties.setProperty(PROP_StartPosition, aAWTStartPosition);
+ maShapeProperties.setProperty(PROP_EndPosition, aAWTEndPosition);
+ }
+ else
+ {
+ // now set transformation for this object
+ HomogenMatrix3 aMatrix;
+
+ aMatrix.Line1.Column1 = aTransformation.get(0,0);
+ aMatrix.Line1.Column2 = aTransformation.get(0,1);
+ aMatrix.Line1.Column3 = aTransformation.get(0,2);
+
+ aMatrix.Line2.Column1 = aTransformation.get(1,0);
+ aMatrix.Line2.Column2 = aTransformation.get(1,1);
+ aMatrix.Line2.Column3 = aTransformation.get(1,2);
+
+ aMatrix.Line3.Column1 = aTransformation.get(2,0);
+ aMatrix.Line3.Column2 = aTransformation.get(2,1);
+ aMatrix.Line3.Column3 = aTransformation.get(2,2);
+
+ maShapeProperties.setProperty(PROP_Transformation, aMatrix);
+ }
+
+ Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
+ if ( !mxShape.is() )
+ {
+ mxShape.set( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
+ }
+
+ Reference< XPropertySet > xSet( mxShape, UNO_QUERY );
+ if (xSet.is())
+ {
+ if( !msName.isEmpty() )
+ {
+ Reference< container::XNamed > xNamed( mxShape, UNO_QUERY );
+ if( xNamed.is() )
+ xNamed->setName( msName );
+ }
+ if( !msDescription.isEmpty() )
+ {
+ xSet->setPropertyValue( "Description", Any( msDescription ) );
+ }
+ if (aServiceName != "com.sun.star.text.TextFrame")
+ rxShapes->add( mxShape );
+
+ if ( mbHidden || mbHiddenMasterShape )
+ {
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: invisible shape with id='" << msId << "'");
+ xSet->setPropertyValue( "Visible", Any( false ) );
+ // In Excel hidden means not printed, let's use visibility for now until that's handled separately
+ xSet->setPropertyValue( "Printable", Any( false ) );
+ }
+
+ if (mbLocked)
+ {
+ xSet->setPropertyValue("MoveProtect", Any(true));
+ xSet->setPropertyValue("SizeProtect", Any(true));
+ }
+
+ ActionLockGuard const alg(mxShape);
+
+ // sj: removing default text of placeholder objects such as SlideNumberShape or HeaderShape
+ if ( bClearText )
+ {
+ uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
+ if ( xText.is() )
+ {
+ xText->setString( "" );
+ }
+ }
+
+ if (pMathXml)
+ {
+ // the "EmbeddedObject" property is read-only, so we have to create
+ // the shape first, and it can be read only after the shape is
+ // inserted into the document, so delay the actual import until here
+ SvGlobalName name(SO3_SM_CLASSID);
+ xSet->setPropertyValue("CLSID", uno::Any(name.GetHexName()));
+ uno::Reference<embed::XEmbeddedObject> const xObj(
+ xSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY);
+ if (xObj.is())
+ {
+ uno::Reference<uno::XInterface> const xMathModel(xObj->getComponent());
+ oox::FormulaImportBase *const pMagic(
+ dynamic_cast<oox::FormulaImportBase*>(xMathModel.get()));
+ assert(pMagic);
+ pMagic->readFormulaOoxml(*pMathXml);
+ }
+ }
+
+ const GraphicHelper& rGraphicHelper = rFilterBase.getGraphicHelper();
+
+ ::Color nLinePhClr(ColorTransparency, 0xffffffff);
+ ::Color nFillPhClr(ColorTransparency, 0xffffffff);
+ sal_Int16 nFillPhClrTheme = -1;
+ // TODO: use ph color when applying effect properties
+ //sal_Int32 nEffectPhClr = -1;
+
+ // dmapper needs the original rotation angle for calculating square wrap. This angle is not
+ // available as property there, so store it in InteropGrabBag.
+ putPropertyToGrabBag("mso-rotation-angle", Any(mnRotation));
+
+ if( pTheme )
+ {
+ if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) )
+ {
+ LineProperties aLineProperties;
+ aLineProperties.maLineFill.moFillType = XML_noFill;
+ if( const LineProperties* pLineProps = pTheme->getLineStyle( pLineRef->mnThemedIdx ) )
+ aLineProperties.assignUsed( *pLineProps );
+ nLinePhClr = pLineRef->maPhClr.getColor( rGraphicHelper );
+
+ // Store style-related properties to InteropGrabBag to be able to export them back
+ uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence(
+ {
+ {"SchemeClr", uno::Any(pLineRef->maPhClr.getSchemeColorName())},
+ {"Idx", uno::Any(pLineRef->mnThemedIdx)},
+ {"Color", uno::Any(nLinePhClr)},
+ {"LineStyle", uno::Any(aLineProperties.getLineStyle())},
+ {"LineCap", uno::Any(aLineProperties.getLineCap())},
+ {"LineJoint", uno::Any(aLineProperties.getLineJoint())},
+ {"LineWidth", uno::Any(aLineProperties.getLineWidth())},
+ {"Transformations", uno::Any(pLineRef->maPhClr.getTransformations())}
+ });
+ putPropertyToGrabBag( "StyleLnRef", Any( aProperties ) );
+ }
+ if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) )
+ {
+ if (!getFillProperties().moUseBgFill.get(false))
+ {
+ nFillPhClr = pFillRef->maPhClr.getColor(rGraphicHelper);
+ nFillPhClrTheme = pFillRef->maPhClr.getSchemeColorIndex();
+ }
+
+ OUString sColorScheme = pFillRef->maPhClr.getSchemeColorName();
+ if( !sColorScheme.isEmpty() )
+ {
+ uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence(
+ {
+ {"SchemeClr", uno::Any(sColorScheme)},
+ {"Idx", uno::Any(pFillRef->mnThemedIdx)},
+ {"Color", uno::Any(nFillPhClr)},
+ {"Transformations", uno::Any(pFillRef->maPhClr.getTransformations())}
+ });
+
+ putPropertyToGrabBag( "StyleFillRef", Any( aProperties ) );
+ }
+ }
+ if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_effectRef ) )
+ {
+ // TODO: use ph color when applying effect properties
+ // nEffectPhClr = pEffectRef->maPhClr.getColor( rGraphicHelper );
+
+ // Store style-related properties to InteropGrabBag to be able to export them back
+ uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence(
+ {
+ {"SchemeClr", uno::Any(pEffectRef->maPhClr.getSchemeColorName())},
+ {"Idx", uno::Any(pEffectRef->mnThemedIdx)},
+ {"Transformations", uno::Any(pEffectRef->maPhClr.getTransformations())}
+ });
+ putPropertyToGrabBag( "StyleEffectRef", Any( aProperties ) );
+ }
+ }
+ ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() );
+
+ // add properties from textbody to shape properties
+ if( mpTextBody )
+ {
+ mpTextBody->getTextProperties().pushTextDistances(Size(aShapeRectHmm.Width, aShapeRectHmm.Height));
+ aShapeProps.assignUsed( mpTextBody->getTextProperties().maPropertyMap );
+ // Push char properties as well - specifically useful when this is a placeholder
+ if( mpMasterTextListStyle && mpMasterTextListStyle->getListStyle()[0].getTextCharacterProperties().moHeight.has() )
+ aShapeProps.setProperty(PROP_CharHeight, GetFontHeight( mpMasterTextListStyle->getListStyle()[0].getTextCharacterProperties().moHeight.get() ));
+ }
+
+ // applying properties
+ aShapeProps.assignUsed( getShapeProperties() );
+ aShapeProps.assignUsed( maDefaultShapeProperties );
+ if(mnRotation != 0 && bIsCustomShape)
+ aShapeProps.setProperty( PROP_RotateAngle, sal_Int32( NormAngle36000( Degree100(mnRotation / -600) ) ));
+ if( bIsEmbMedia ||
+ bIsCustomShape ||
+ aServiceName == "com.sun.star.drawing.GraphicObjectShape" ||
+ aServiceName == "com.sun.star.drawing.OLE2Shape")
+ {
+ mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper, mbFlipH, mbFlipV );
+ }
+ if ( mpTablePropertiesPtr && aServiceName == "com.sun.star.drawing.TableShape" )
+ {
+ mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
+ if ( auto* pTableShape = dynamic_cast<sdr::table::SdrTableObj*>(SdrObject::getSdrObjectFromXShape(mxShape)) )
+ {
+ // Disable layouting until an attempt at correcting faulty table height is made
+ pTableShape->SetSkipChangeLayout(true);
+ }
+ }
+
+ FillProperties aFillProperties = getActualFillProperties(pTheme, &rShapeOrParentShapeFillProps);
+ if (getFillProperties().moFillType.has() && getFillProperties().moFillType.get() == XML_grpFill)
+ getFillProperties().assignUsed(aFillProperties);
+ if(!bIsCroppedGraphic)
+ aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, nFillPhClrTheme, mbFlipH, mbFlipV, bIsCustomShape );
+ LineProperties aLineProperties = getActualLineProperties(pTheme);
+ aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr );
+ EffectProperties aEffectProperties = getActualEffectProperties(pTheme);
+ // TODO: use ph color when applying effect properties
+ aEffectProperties.pushToPropMap( aShapeProps, rGraphicHelper );
+
+ // applying autogrowheight property before setting shape size, because
+ // the shape size might be changed if currently autogrowheight is true
+ // we must also check that the PropertySet supports the property.
+ Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
+ const OUString& rPropName = PropertyMap::getPropertyName( PROP_TextAutoGrowHeight );
+ if( xSetInfo.is() && xSetInfo->hasPropertyByName( rPropName ) )
+ if( aShapeProps.hasProperty( PROP_TextAutoGrowHeight ) )
+ xSet->setPropertyValue( rPropName, Any( false ) );
+
+ // do not set properties at a group shape (this causes
+ // assertions from svx) ...
+ if( aServiceName != "com.sun.star.drawing.GroupShape" )
+ {
+ if (aServiceName == "com.sun.star.text.TextFrame")
+ {
+ if (mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getShapeTypeOverride())
+ {
+ uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc( length+1);
+ auto pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "mso-orig-shape-type";
+ uno::Sequence< sal_Int8 > const & aNameSeq =
+ mpCustomShapePropertiesPtr->getShapePresetTypeName();
+ OUString sShapePresetTypeName(reinterpret_cast< const char* >(
+ aNameSeq.getConstArray()), aNameSeq.getLength(), RTL_TEXTENCODING_UTF8);
+ pGrabBag[length].Value <<= sShapePresetTypeName;
+ propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag));
+ }
+ //If the text box has links then save the link information so that
+ //it can be accessed in DomainMapper_Impl.cxx while chaining the text frames.
+ if (isLinkedTxbx())
+ {
+ uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc( length + 3 );
+ auto pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "TxbxHasLink";
+ pGrabBag[length].Value <<= isLinkedTxbx();
+ pGrabBag[length + 1 ].Name = "Txbx-Id";
+ pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id;
+ pGrabBag[length + 2 ].Name = "Txbx-Seq";
+ pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq;
+ propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag));
+ }
+
+ // TextFrames have BackColor, not FillColor
+ if (aShapeProps.hasProperty(PROP_FillColor))
+ {
+ aShapeProps.setAnyProperty(PROP_BackColor, aShapeProps.getProperty(PROP_FillColor));
+ aShapeProps.erase(PROP_FillColor);
+ }
+ // TextFrames have BackColorTransparency, not FillTransparence
+ if (aShapeProps.hasProperty(PROP_FillTransparence))
+ {
+ aShapeProps.setAnyProperty(PROP_BackColorTransparency, aShapeProps.getProperty(PROP_FillTransparence));
+ aShapeProps.erase(PROP_FillTransparence);
+ }
+ // TextFrames have BackGraphic, not FillBitmap
+ if (aShapeProps.hasProperty(PROP_FillBitmap))
+ {
+ aShapeProps.setAnyProperty(PROP_BackGraphic, aShapeProps.getProperty(PROP_FillBitmap));
+ aShapeProps.erase(PROP_FillBitmap);
+ }
+ if (aShapeProps.hasProperty(PROP_FillBitmapName))
+ {
+ uno::Any aAny = aShapeProps.getProperty(PROP_FillBitmapName);
+ OUString aFillBitmapName = aAny.get<OUString>();
+ uno::Reference<awt::XBitmap> xBitmap = rFilterBase.getModelObjectHelper().getFillBitmap(aFillBitmapName);
+ uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ aShapeProps.setProperty(PROP_BackGraphic, xGraphic);
+ // aShapeProps.erase(PROP_FillBitmapName); // Maybe, leave the name as well
+ }
+ // And no LineColor property; individual borders can have colors
+ if (aShapeProps.hasProperty(PROP_LineColor))
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ static const sal_Int32 aBorders[] =
+ {
+ PROP_TopBorder, PROP_LeftBorder, PROP_BottomBorder, PROP_RightBorder
+ };
+ for (sal_Int32 nBorder : aBorders)
+ {
+ css::table::BorderLine2 aBorderLine = xPropertySet->getPropertyValue(PropertyMap::getPropertyName(nBorder)).get<css::table::BorderLine2>();
+ aBorderLine.Color = aShapeProps.getProperty(PROP_LineColor).get<sal_Int32>();
+ if (aLineProperties.moLineWidth.has())
+ aBorderLine.LineWidth = convertEmuToHmm(aLineProperties.moLineWidth.get());
+ aShapeProps.setProperty(nBorder, aBorderLine);
+ }
+ aShapeProps.erase(PROP_LineColor);
+ }
+ if(mnRotation)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ static const OUStringLiteral aGrabBagPropName = u"FrameInteropGrabBag";
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
+ beans::PropertyValue aPair(comphelper::makePropertyValue("mso-rotation-angle",
+ mnRotation));
+ if (aGrabBag.hasElements())
+ {
+ sal_Int32 nLength = aGrabBag.getLength();
+ aGrabBag.realloc(nLength + 1);
+ aGrabBag.getArray()[nLength] = aPair;
+ }
+ else
+ {
+ aGrabBag = { aPair };
+ }
+ xPropertySet->setPropertyValue(aGrabBagPropName, uno::Any(aGrabBag));
+ }
+ // TextFrames have ShadowFormat, not individual shadow properties.
+ std::optional<sal_Int32> oShadowDistance;
+ if (aShapeProps.hasProperty(PROP_ShadowXDistance))
+ {
+ oShadowDistance = aShapeProps.getProperty(PROP_ShadowXDistance).get<sal_Int32>();
+ aShapeProps.erase(PROP_ShadowXDistance);
+ }
+ if (aShapeProps.hasProperty(PROP_ShadowYDistance))
+ {
+ // There is a single 'dist' attribute, so no need to count the avg of x and y.
+ aShapeProps.erase(PROP_ShadowYDistance);
+ }
+ std::optional<sal_Int32> oShadowColor;
+ if (aShapeProps.hasProperty(PROP_ShadowColor))
+ {
+ oShadowColor = aShapeProps.getProperty(PROP_ShadowColor).get<sal_Int32>();
+ aShapeProps.erase(PROP_ShadowColor);
+ }
+ if (aShapeProps.hasProperty(PROP_Shadow))
+ aShapeProps.erase(PROP_Shadow);
+
+ if (oShadowDistance || oShadowColor || aEffectProperties.maShadow.moShadowDir.has())
+ {
+ css::table::ShadowFormat aFormat;
+ if (oShadowColor)
+ aFormat.Color = *oShadowColor;
+ if (aEffectProperties.maShadow.moShadowDir.has())
+ {
+ css::table::ShadowLocation nLocation = css::table::ShadowLocation_NONE;
+ switch (aEffectProperties.maShadow.moShadowDir.get())
+ {
+ case 13500000:
+ nLocation = css::table::ShadowLocation_TOP_LEFT;
+ break;
+ case 18900000:
+ nLocation = css::table::ShadowLocation_TOP_RIGHT;
+ break;
+ case 8100000:
+ nLocation = css::table::ShadowLocation_BOTTOM_LEFT;
+ break;
+ case 2700000:
+ nLocation = css::table::ShadowLocation_BOTTOM_RIGHT;
+ break;
+ }
+ aFormat.Location = nLocation;
+ }
+ aFormat.ShadowWidth = *oShadowDistance;
+ aShapeProps.setProperty(PROP_ShadowFormat, aFormat);
+ }
+
+ }
+ else if (mbTextBox)
+ {
+ aShapeProps.setProperty(PROP_TextBox, true);
+ }
+
+ if (aServiceName != "com.sun.star.text.TextFrame" && isLinkedTxbx())
+ {
+ uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ propertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc( length + 3 );
+ auto pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "TxbxHasLink";
+ pGrabBag[length].Value <<= isLinkedTxbx();
+ pGrabBag[length + 1 ].Name = "Txbx-Id";
+ pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id;
+ pGrabBag[length + 2 ].Name = "Txbx-Seq";
+ pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq;
+ propertySet->setPropertyValue("InteropGrabBag",uno::Any(aGrabBag));
+ }
+
+ // If the shape is a picture placeholder.
+ if (aServiceName == "com.sun.star.presentation.GraphicObjectShape" && !bClearText)
+ {
+ // Placeholder text should be in center of the shape.
+ aShapeProps.setProperty(PROP_TextContourFrame, false);
+
+ /* Placeholder icon should be at the center of the parent shape.
+ * We use negative graphic crop property because of that we don't
+ * have padding support.
+ */
+ uno::Reference<beans::XPropertySet> xGraphic(xSet->getPropertyValue("Graphic"), uno::UNO_QUERY);
+ if (xGraphic.is())
+ {
+ awt::Size aBitmapSize;
+ xGraphic->getPropertyValue("Size100thMM") >>= aBitmapSize;
+ sal_Int32 nXMargin = (aShapeRectHmm.Width - aBitmapSize.Width) / 2;
+ sal_Int32 nYMargin = (aShapeRectHmm.Height - aBitmapSize.Height) / 2;
+ if (nXMargin > 0 && nYMargin > 0)
+ {
+ text::GraphicCrop aGraphicCrop;
+ aGraphicCrop.Top = nYMargin * -1;
+ aGraphicCrop.Bottom = nYMargin * -1;
+ aGraphicCrop.Left = nXMargin * -1;
+ aGraphicCrop.Right = nXMargin * -1;
+ aShapeProps.setProperty(PROP_GraphicCrop, aGraphicCrop);
+ }
+ }
+ }
+
+ PropertySet( xSet ).setProperties( aShapeProps );
+
+ if (mpTablePropertiesPtr && aServiceName == "com.sun.star.drawing.TableShape")
+ {
+ // Powerpoint sometimes export row heights less than the minimum size,
+ // which during import expanded to the minimum
+ if (auto* pTableShape = dynamic_cast<sdr::table::SdrTableObj*>(SdrObject::getSdrObjectFromXShape(mxShape)))
+ {
+ sal_Int32 nCorrectedHeight = pTableShape->getHeightWithoutFitting();
+ const auto& aShapeSize = mxShape->getSize();
+ if( nCorrectedHeight > aShapeSize.Height )
+ mxShape->setSize( {aShapeSize.Width, nCorrectedHeight} );
+ pTableShape->SetSkipChangeLayout(false);
+ }
+ }
+
+ if (mbLockedCanvas)
+ {
+ putPropertyToGrabBag( "LockedCanvas", Any( true ) );
+ if (aServiceName == "com.sun.star.drawing.LineShape")
+ {
+ // It seems the position and size for lines inside a locked canvas is absolute.
+ mxShape->setPosition(awt::Point(aShapeRectHmm.X, aShapeRectHmm.Y));
+ mxShape->setSize(awt::Size(aShapeRectHmm.Width, aShapeRectHmm.Height));
+ }
+ }
+
+ // Store original fill and line colors of the shape and the theme color name to InteropGrabBag
+ std::vector<beans::PropertyValue> aProperties
+ {
+ comphelper::makePropertyValue("EmuLineWidth", aLineProperties.moLineWidth.get(0)),
+ comphelper::makePropertyValue("OriginalSolidFillClr", aShapeProps.getProperty(PROP_FillColor)),
+ comphelper::makePropertyValue("OriginalLnSolidFillClr", aShapeProps.getProperty(PROP_LineColor))
+ };
+ OUString sColorFillScheme = aFillProperties.maFillColor.getSchemeColorName();
+ if( !aFillProperties.maFillColor.isPlaceHolder() && !sColorFillScheme.isEmpty() )
+ {
+ aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClr", sColorFillScheme));
+ aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClrTransformations", aFillProperties.maFillColor.getTransformations()));
+ }
+ OUString sLnColorFillScheme = aLineProperties.maLineFill.maFillColor.getSchemeColorName();
+ if( !aLineProperties.maLineFill.maFillColor.isPlaceHolder() && !sLnColorFillScheme.isEmpty() )
+ {
+ aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClr", sLnColorFillScheme));
+ auto aResolvedSchemeClr = aLineProperties.maLineFill.maFillColor;
+ aResolvedSchemeClr.clearTransformations();
+ aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillResolvedSchemeClr", aResolvedSchemeClr.getColor(rGraphicHelper, nFillPhClr)));
+ aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClrTransformations", aLineProperties.maLineFill.maFillColor.getTransformations()));
+ }
+ putPropertiesToGrabBag(comphelper::containerToSequence(aProperties));
+
+ // Store original gradient fill of the shape to InteropGrabBag
+ // LibreOffice doesn't support all the kinds of gradient so we save its complete definition
+ if( aShapeProps.hasProperty( PROP_FillGradient ) )
+ {
+ std::vector<beans::PropertyValue> aGradientStops;
+ size_t i = 0;
+ for( const auto& [rPos, rColor] : aFillProperties.maGradientProps.maGradientStops )
+ { // for each stop in the gradient definition:
+
+ // save position
+ std::vector<beans::PropertyValue> aGradientStop
+ {
+ comphelper::makePropertyValue("Pos", rPos)
+ };
+
+ OUString sStopColorScheme = rColor.getSchemeColorName();
+ if( sStopColorScheme.isEmpty() )
+ {
+ // save RGB color
+ aGradientStop.push_back(comphelper::makePropertyValue("RgbClr", rColor.getColor(rGraphicHelper, nFillPhClr)));
+ // in the case of a RGB color, transformations are already applied to
+ // the color with the exception of alpha transformations. We only need
+ // to keep the transparency value to calculate the alpha value later.
+ if( rColor.hasTransparency() )
+ aGradientStop.push_back(comphelper::makePropertyValue("Transparency", rColor.getTransparency()));
+ }
+ else
+ {
+ // save color with scheme name
+ aGradientStop.push_back(comphelper::makePropertyValue("SchemeClr", sStopColorScheme));
+ // save all color transformations
+ aGradientStop.push_back(comphelper::makePropertyValue("Transformations", rColor.getTransformations()));
+ }
+
+ aGradientStops.push_back(comphelper::makePropertyValue(OUString::number(i), comphelper::containerToSequence(aGradientStop)));
+ ++i;
+ }
+ // If getFillProperties.moFillType is unused that means gradient is defined by a theme
+ // which is already saved into StyleFillRef property, so no need to save the explicit values too
+ if( getFillProperties().moFillType.has() )
+ putPropertyToGrabBag( "GradFillDefinition", uno::Any(comphelper::containerToSequence(aGradientStops)));
+ putPropertyToGrabBag( "OriginalGradFill", aShapeProps.getProperty(PROP_FillGradient) );
+ }
+
+ // store unsupported effect attributes in the grab bag
+ if (!aEffectProperties.m_Effects.empty())
+ {
+ std::vector<beans::PropertyValue> aEffects;
+ for (auto const& it : aEffectProperties.m_Effects)
+ {
+ PropertyValue aEffect = it->getEffect();
+ if( !aEffect.Name.isEmpty() )
+ {
+ std::vector<beans::PropertyValue> aEffectsGrabBag
+ {
+ comphelper::makePropertyValue("Attribs", aEffect.Value)
+ };
+
+ Color& aColor( it->moColor );
+ OUString sColorScheme = aColor.getSchemeColorName();
+ if( sColorScheme.isEmpty() )
+ {
+ // RGB color and transparency value
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClr", aColor.getColor(rGraphicHelper, nFillPhClr)));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClrTransparency", aColor.getTransparency()));
+ }
+ else
+ {
+ // scheme color with name and transformations
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClr", sColorScheme));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClrTransformations", aColor.getTransformations()));
+ }
+ aEffects.push_back(comphelper::makePropertyValue(aEffect.Name, comphelper::containerToSequence(aEffectsGrabBag)));
+ }
+ }
+ putPropertyToGrabBag("EffectProperties", uno::Any(comphelper::containerToSequence(aEffects)));
+ }
+
+ // add 3D effects if any
+ Sequence< PropertyValue > aCamera3DEffects = get3DProperties().getCameraAttributes();
+ Sequence< PropertyValue > aLightRig3DEffects = get3DProperties().getLightRigAttributes();
+ Sequence< PropertyValue > aShape3DEffects = get3DProperties().getShape3DAttributes( rGraphicHelper, nFillPhClr );
+ if( aCamera3DEffects.hasElements() || aLightRig3DEffects.hasElements() || aShape3DEffects.hasElements() )
+ {
+ uno::Sequence<beans::PropertyValue> a3DEffectsGrabBag = comphelper::InitPropertySequence(
+ {
+ {"Camera", uno::Any(aCamera3DEffects)},
+ {"LightRig", uno::Any(aLightRig3DEffects)},
+ {"Shape3D", uno::Any(aShape3DEffects)}
+ });
+ putPropertyToGrabBag( "3DEffectProperties", Any( a3DEffectsGrabBag ) );
+ }
+
+ if( bIsCustomShape && getTextBody())
+ {
+
+ Sequence< PropertyValue > aTextCamera3DEffects = getTextBody()->get3DProperties().getCameraAttributes();
+ Sequence< PropertyValue > aTextLightRig3DEffects = getTextBody()->get3DProperties().getLightRigAttributes();
+ Sequence< PropertyValue > aTextShape3DEffects = getTextBody()->get3DProperties().getShape3DAttributes( rGraphicHelper, nFillPhClr );
+ if( aTextCamera3DEffects.hasElements() || aTextLightRig3DEffects.hasElements() || aTextShape3DEffects.hasElements() )
+ {
+ uno::Sequence<beans::PropertyValue> aText3DEffectsGrabBag = comphelper::InitPropertySequence(
+ {
+ {"Camera", uno::Any(aTextCamera3DEffects)},
+ {"LightRig", uno::Any(aTextLightRig3DEffects)},
+ {"Shape3D", uno::Any(aTextShape3DEffects)}
+ });
+ putPropertyToGrabBag( "Text3DEffectProperties", Any( aText3DEffectsGrabBag ) );
+ }
+ }
+
+ // store bitmap artistic effects in the grab bag
+ if( !mpGraphicPropertiesPtr->maBlipProps.maEffect.isEmpty() )
+ putPropertyToGrabBag( "ArtisticEffectProperties",
+ Any( mpGraphicPropertiesPtr->maBlipProps.maEffect.getEffect() ) );
+ }
+
+ else if( mbLockedCanvas )
+ {
+ //If we have aServiceName as "com.sun.star.drawing.GroupShape" and lockedCanvas
+ putPropertyToGrabBag( "LockedCanvas", Any( true ) );
+ }
+
+ // These can have a custom geometry, so position should be set here,
+ // after creation but before custom shape handling, using the position
+ // we got from the caller.
+ if (mbWps && aServiceName == "com.sun.star.drawing.LineShape" && !pParentGroupShape)
+ mxShape->setPosition(maPosition);
+
+ if (bIsConnectorShape)
+ {
+ OUString sConnectorShapePresetTypeName(
+ reinterpret_cast<const char*>(
+ mpCustomShapePropertiesPtr->getShapePresetTypeName().getConstArray()),
+ mpCustomShapePropertiesPtr->getShapePresetTypeName().getLength(),
+ RTL_TEXTENCODING_UTF8);
+ msConnectorName = sConnectorShapePresetTypeName;
+
+ sal_Int32 nType = mpCustomShapePropertiesPtr->getShapePresetType();
+ switch (nType)
+ {
+ case XML_line:
+ case XML_straightConnector1:
+ xSet->setPropertyValue("EdgeKind", Any(ConnectorType_LINE));
+ break;
+ case XML_bentConnector2:
+ case XML_bentConnector3:
+ case XML_bentConnector4:
+ case XML_bentConnector5:
+ xSet->setPropertyValue("EdgeKind", Any(ConnectorType_STANDARD));
+ break;
+ case XML_curvedConnector2:
+ case XML_curvedConnector3:
+ case XML_curvedConnector4:
+ case XML_curvedConnector5:
+ xSet->setPropertyValue("EdgeKind", Any(ConnectorType_CURVE));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if( bIsCustomShape )
+ {
+ if ( mbFlipH )
+ mpCustomShapePropertiesPtr->setMirroredX( true );
+ if ( mbFlipV )
+ mpCustomShapePropertiesPtr->setMirroredY( true );
+ if( getTextBody() )
+ {
+ sal_Int32 nTextCameraZRotation = static_cast< sal_Int32 >( getTextBody()->get3DProperties().maCameraRotation.mnRevolution.get() );
+ mpCustomShapePropertiesPtr->setTextCameraZRotateAngle( nTextCameraZRotation / 60000 );
+
+ sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( getTextBody()->getTextProperties().moRotation.get( 0 ) );
+
+ nTextRotateAngle -= mnDiagramRotation;
+ /* OOX measures text rotation clockwise in 1/60000th degrees,
+ relative to the containing shape. setTextRotateAngle wants degrees anticlockwise. */
+ nTextRotateAngle = -1 * nTextRotateAngle / 60000;
+
+ if (getTextBody()->getTextProperties().moUpright)
+ {
+ // When upright is set, we want the text without any rotation.
+ // But if we set 0 here, the text is still rotated if the
+ // shape containing it is rotated.
+ // Hence, we rotate the text into the opposite direction of
+ // the rotation of the shape, by as much as the shape was rotated.
+ mpCustomShapePropertiesPtr->setTextRotateAngle((mnRotation / 60000) + nTextRotateAngle);
+ // Also put the initial angles away in a GrabBag.
+ putPropertyToGrabBag("Upright", Any(true));
+ putPropertyToGrabBag("nShapeRotationAtImport", Any(mnRotation / 60000));
+ putPropertyToGrabBag("nTextRotationAtImport", Any(nTextRotateAngle));
+ }
+ else
+ {
+ mpCustomShapePropertiesPtr->setTextRotateAngle(nTextRotateAngle);
+ }
+
+ auto sHorzOverflow = getTextBody()->getTextProperties().msHorzOverflow;
+ if (!sHorzOverflow.isEmpty())
+ putPropertyToGrabBag("horzOverflow", uno::Any(getTextBody()->getTextProperties().msHorzOverflow));
+ auto nVertOverflow = getTextBody()->getTextProperties().msVertOverflow;
+ if (!nVertOverflow.isEmpty())
+ putPropertyToGrabBag("vertOverflow", uno::Any(getTextBody()->getTextProperties().msVertOverflow));
+ }
+
+ // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks
+ // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs
+ SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'");
+ SAL_INFO("oox.csdata", "==csdata== shape name: '" << msName << "'");
+ mpCustomShapePropertiesPtr->pushToPropSet(xSet, maSize);
+
+ if (mpTextBody)
+ {
+ bool bIsPresetShape = !mpTextBody->getTextProperties().msPrst.isEmpty();
+ if (bIsPresetShape)
+ {
+ OUString sClass;
+ const OUString sPresetType = mpTextBody->getTextProperties().msPrst;
+ sClass = PresetGeometryTypeNames::GetFontworkType( sPresetType );
+
+ lcl_createPresetShape( mxShape, sClass, sPresetType, mpCustomShapePropertiesPtr, mpTextBody, rGraphicHelper );
+ }
+ }
+ }
+ else if( getTextBody() )
+ getTextBody()->getTextProperties().pushVertSimulation();
+
+ // tdf#133037: a bit hackish: force Shape to rotate in the opposite direction the camera would rotate
+ PropertySet aPropertySet(mxShape);
+ if ( !bUseRotationTransform && (mnRotation != 0 || nCameraRotation != 0) )
+ {
+ // use the same logic for rotation from VML exporter (SimpleShape::implConvertAndInsert at vmlshape.cxx)
+ Degree100 nAngle = NormAngle36000( Degree100((mnRotation - nCameraRotation) / -600) );
+ aPropertySet.setAnyProperty( PROP_RotateAngle, Any( sal_Int32( nAngle.get() ) ) );
+ aPropertySet.setAnyProperty( PROP_HoriOrientPosition, Any( maPosition.X ) );
+ aPropertySet.setAnyProperty( PROP_VertOrientPosition, Any( maPosition.Y ) );
+ }
+
+ // in some cases, we don't have any text body.
+ if( mpTextBody && ( !bDoNotInsertEmptyTextBody || !mpTextBody->isEmpty() ) )
+ {
+ Reference < XText > xText( mxShape, UNO_QUERY );
+ if ( xText.is() ) // not every shape is supporting an XText interface (e.g. GroupShape)
+ {
+ TextCharacterProperties aCharStyleProperties;
+ if( const ShapeStyleRef* pFontRef = getShapeStyleRef( XML_fontRef ) )
+ {
+ if( pFontRef->mnThemedIdx != 0 )
+ {
+ if( pTheme )
+ if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) )
+ aCharStyleProperties.assignUsed( *pCharProps );
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: use font color");
+ if ( pFontRef->maPhClr.isUsed() )
+ {
+ aCharStyleProperties.maFillProperties.maFillColor = pFontRef->maPhClr;
+ aCharStyleProperties.maFillProperties.moFillType.set(XML_solidFill);
+ }
+ }
+ }
+ xText->setString("");
+ Reference < XTextCursor > xAt = xText->createTextCursor();
+ getTextBody()->insertAt( rFilterBase, xText, xAt, aCharStyleProperties, mpMasterTextListStyle );
+
+ const TextParagraphVector& rParagraphs = getTextBody()->getParagraphs();
+ if (!rParagraphs.empty())
+ {
+ const std::shared_ptr<TextParagraph>& pParagraph = rParagraphs[0];
+ if (pParagraph->getProperties().getParaAdjust())
+ {
+ style::ParagraphAdjust eAdjust = *pParagraph->getProperties().getParaAdjust();
+ if (eAdjust == style::ParagraphAdjust_CENTER)
+ {
+ // If the first paragraph is centered, then set the para adjustment of
+ // the shape itself to centered as well.
+ aPropertySet.setAnyProperty(PROP_ParaAdjust, uno::Any(eAdjust));
+ }
+ }
+
+ // tdf#144092 For empty textboxes push character styles &
+ // endParaRPr into the Shape's properties
+ if (rParagraphs.size() == 1 && pParagraph->getRuns().empty())
+ {
+ TextCharacterProperties aTextCharacterProps{ pParagraph->getCharacterStyle(
+ aCharStyleProperties, *mpMasterTextListStyle,
+ getTextBody()->getTextListStyle()) };
+ aTextCharacterProps.assignUsed(pParagraph->getEndProperties());
+ aTextCharacterProps.pushToPropSet(aPropertySet, rFilterBase);
+ }
+ }
+ }
+ }
+ else if (mbTextBox)
+ {
+ // No drawingML text, but WPS text is expected: save the theme
+ // character color on the shape, then.
+ if(const ShapeStyleRef* pFontRef = getShapeStyleRef(XML_fontRef))
+ {
+ ::Color nCharColor = pFontRef->maPhClr.getColor(rGraphicHelper);
+ aPropertySet.setAnyProperty(PROP_CharColor, uno::Any(nCharColor));
+ }
+ }
+
+ // Set glow effect properties
+ if ( aEffectProperties.maGlow.moGlowRad.has() )
+ {
+ uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
+ propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.get())));
+ propertySet->setPropertyValue("GlowEffectColor", Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
+ propertySet->setPropertyValue("GlowEffectTransparency", Any(aEffectProperties.maGlow.moGlowColor.getTransparency()));
+ }
+
+ // Set soft edge effect properties
+ if (aEffectProperties.maSoftEdge.moRad.has())
+ {
+ uno::Reference<beans::XPropertySet> propertySet(mxShape, uno::UNO_QUERY);
+ propertySet->setPropertyValue(
+ "SoftEdgeRadius", Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.get())));
+ }
+
+ // Set the stroke and fill-color properties of the OLE shape
+ if (aServiceName == "com.sun.star.drawing.OLE2Shape" && mxOleObjectInfo
+ && !mxOleObjectInfo->maShapeId.isEmpty())
+ if (::oox::vml::Drawing* pVmlDrawing = rFilterBase.getVmlDrawing())
+ if (const ::oox::vml::ShapeBase* pVmlShape
+ = pVmlDrawing->getShapes().getShapeById(mxOleObjectInfo->maShapeId))
+ {
+ // Apply stroke props from the type model of the related VML shape.
+ ShapePropertyMap aPropMap(rFilterBase.getModelObjectHelper());
+ pVmlShape->getTypeModel().maStrokeModel.pushToPropMap(
+ aPropMap, rFilterBase.getGraphicHelper());
+ // And, fill-color properties as well...
+ pVmlShape->getTypeModel().maFillModel.pushToPropMap(
+ aPropMap, rFilterBase.getGraphicHelper());
+ PropertySet(xSet).setProperties(aPropMap);
+ }
+ }
+
+ if (mxShape.is())
+ {
+ finalizeXShape( rFilterBase, rxShapes );
+
+ if (mpTextBody)
+ mpTextBody->getTextProperties().readjustTextDistances(mxShape);
+ }
+
+ return mxShape;
+}
+
+void Shape::keepDiagramDrawing(XmlFilterBase& rFilterBase, const OUString& rFragmentPath)
+{
+
+ sal_Int32 length = maDiagramDoms.getLength();
+ maDiagramDoms.realloc(length + 1);
+
+ // drawingValue[0] => dom, drawingValue[1] => Sequence of associated relationships
+ uno::Sequence<uno::Any> diagramDrawing{
+ uno::Any(rFilterBase.importFragment(rFragmentPath)),
+ uno::Any(resolveRelationshipsOfTypeFromOfficeDoc(rFilterBase, rFragmentPath, u"image"))
+ };
+
+ beans::PropertyValue* pValue = maDiagramDoms.getArray();
+ pValue[length].Name = "OOXDrawing";
+ pValue[length].Value <<= diagramDrawing;
+}
+
+void Shape::keepDiagramCompatibilityInfo()
+{
+ try
+ {
+ if( !maDiagramDoms.hasElements() )
+ return;
+
+ Reference < XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
+ Reference < XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
+ if ( !xSetInfo.is() )
+ return;
+
+ const OUString aGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
+ if( !xSetInfo->hasPropertyByName( aGrabBagPropName ) )
+ return;
+
+ Sequence < PropertyValue > aGrabBag;
+ xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
+
+ // We keep the previous items, if present
+ if ( aGrabBag.hasElements() )
+ xSet->setPropertyValue( aGrabBagPropName, Any( comphelper::concatSequences(aGrabBag, maDiagramDoms) ) );
+ else
+ xSet->setPropertyValue( aGrabBagPropName, Any( maDiagramDoms ) );
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo" );
+ }
+}
+
+void Shape::convertSmartArtToMetafile(XmlFilterBase const & rFilterBase)
+{
+ try
+ {
+ Reference<XPropertySet> xSet(mxShape, UNO_QUERY_THROW);
+
+ xSet->setPropertyValue("MoveProtect", Any(true));
+ xSet->setPropertyValue("SizeProtect", Any(true));
+
+ // Replace existing shapes with a new Graphic Object rendered
+ // from them
+ Reference<XShape> xShape(renderDiagramToGraphic(rFilterBase));
+ Reference<XShapes> xShapes(mxShape, UNO_QUERY_THROW);
+ while (xShapes->hasElements())
+ xShapes->remove(Reference<XShape>(xShapes->getByIndex(0), UNO_QUERY_THROW));
+ xShapes->add(xShape);
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.drawingml", "Shape::convertSmartArtToMetafile");
+ }
+}
+
+Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilterBase )
+{
+ Reference< XShape > xShape;
+
+ try
+ {
+ if( !maDiagramDoms.hasElements() )
+ return xShape;
+
+ // Stream in which to place the rendered shape
+ SvMemoryStream aTempStream;
+ Reference < io::XStream > xStream( new utl::OStreamWrapper( aTempStream ) );
+ Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() );
+
+ // Size of the rendering
+ awt::Size aActualSize = mxShape->getSize();
+ Size aResolution(Application::GetDefaultDevice()->LogicToPixel(Size(100, 100), MapMode(MapUnit::MapCM)));
+ double fPixelsPer100thmm = static_cast < double > ( aResolution.Width() ) / 100000.0;
+ awt::Size aSize( static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ),
+ static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) );
+
+ Sequence< PropertyValue > aFilterData{
+ comphelper::makePropertyValue("PixelWidth", aSize.Width),
+ comphelper::makePropertyValue("PixelHeight", aSize.Height),
+ comphelper::makePropertyValue("LogicalWidth", aActualSize.Width),
+ comphelper::makePropertyValue("LogicalHeight", aActualSize.Height)
+ };
+
+ Sequence < PropertyValue > aDescriptor{
+ comphelper::makePropertyValue("OutputStream", xOutputStream),
+ comphelper::makePropertyValue("FilterName", OUString("SVM")), // Rendering format
+ comphelper::makePropertyValue("FilterData", aFilterData)
+ };
+
+ Reference < lang::XComponent > xSourceDoc( mxShape, UNO_QUERY_THROW );
+ Reference < XGraphicExportFilter > xGraphicExporter = GraphicExportFilter::create( rFilterBase.getComponentContext() );
+ xGraphicExporter->setSourceDocument( xSourceDoc );
+ xGraphicExporter->filter( aDescriptor );
+
+ aTempStream.Seek( STREAM_SEEK_TO_BEGIN );
+
+ Graphic aGraphic;
+ GraphicFilter aFilter( false );
+ if ( aFilter.ImportGraphic( aGraphic, u"", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE ) != ERRCODE_NONE )
+ {
+ SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: Unable to import rendered stream into graphic object" );
+ return xShape;
+ }
+
+ Reference < graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
+ Reference < lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
+ xShape.set( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
+ Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( "Graphic", Any( xGraphic ) );
+ xPropSet->setPropertyValue( "MoveProtect", Any( true ) );
+ xPropSet->setPropertyValue( "SizeProtect", Any( true ) );
+ xPropSet->setPropertyValue( "Name", Any( OUString( "RenderedShapes" ) ) );
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::renderDiagramToGraphic" );
+ }
+
+ return xShape;
+}
+
+void Shape::setTextBody(const TextBodyPtr & pTextBody)
+{
+ mpTextBody = pTextBody;
+}
+
+void Shape::setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle )
+{
+ SAL_INFO("oox.drawingml", "Shape::setMasterTextListStyle: Set master text list style to shape id='" << msId << "'");
+
+ mpMasterTextListStyle = pMasterTextListStyle;
+}
+
+OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rServiceName, const awt::Rectangle& rShapeRect )
+{
+ OUString aServiceName = rServiceName;
+ switch( meFrameType )
+ {
+ case FRAMETYPE_OLEOBJECT:
+ {
+ awt::Size aOleSize( rShapeRect.Width, rShapeRect.Height );
+ if( rFilter.getOleObjectHelper().importOleObject( maShapeProperties, *mxOleObjectInfo, aOleSize ) )
+ aServiceName = "com.sun.star.drawing.OLE2Shape";
+
+ // get the path to the representation graphic
+ OUString aGraphicPath;
+ if( !mxOleObjectInfo->maShapeId.isEmpty() )
+ if( ::oox::vml::Drawing* pVmlDrawing = rFilter.getVmlDrawing() )
+ if( const ::oox::vml::ShapeBase* pVmlShape = pVmlDrawing->getShapes().getShapeById( mxOleObjectInfo->maShapeId ) )
+ aGraphicPath = pVmlShape->getGraphicPath();
+
+ // import and store the graphic
+ if( !aGraphicPath.isEmpty() )
+ {
+ // Transfer shape's width and height to graphicsfilter (can be used by WMF/EMF)
+ WmfExternal aExtHeader;
+ aExtHeader.mapMode = 8; // MM_ANISOTROPIC
+ aExtHeader.xExt = rShapeRect.Width;
+ aExtHeader.yExt = rShapeRect.Height;
+
+ Reference< graphic::XGraphic > xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic( aGraphicPath, &aExtHeader );
+ if( xGraphic.is() )
+ maShapeProperties.setProperty(PROP_Graphic, xGraphic);
+ }
+ }
+ break;
+
+ default:;
+ }
+ return aServiceName;
+}
+
+void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& rxShapes )
+{
+ switch( meFrameType )
+ {
+ case FRAMETYPE_CHART:
+ {
+ OSL_ENSURE( !mxChartShapeInfo->maFragmentPath.isEmpty(), "Shape::finalizeXShape - missing chart fragment" );
+ if( mxShape.is() && !mxChartShapeInfo->maFragmentPath.isEmpty() ) try
+ {
+ // set the chart2 OLE class ID at the OLE shape
+ PropertySet aShapeProp( mxShape );
+ aShapeProp.setProperty( PROP_CLSID, OUString( "12dcae26-281f-416f-a234-c3086127382e" ) );
+
+ // get the XModel interface of the embedded object from the OLE shape
+ Reference< frame::XModel > xDocModel;
+ aShapeProp.getProperty( xDocModel, PROP_Model );
+ Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW );
+
+ // load the chart data from the XML fragment
+#if ENABLE_WASM_STRIP_CHART
+ (void) rFilter;
+ (void) rxShapes;
+#else
+ // WASM_CHART change
+ // TODO: Instead of using convertFromModel an alternative may be
+ // added to convert not to Chart/OLE SdrObejct, but to GraphicObject
+ // with the Chart visualization. There should be a preview available
+ // in the imported chart data
+ bool bMSO2007Doc = rFilter.isMSO2007Document();
+ chart::ChartSpaceModel aModel(bMSO2007Doc);
+ rtl::Reference<chart::ChartSpaceFragment> pChartSpaceFragment = new chart::ChartSpaceFragment(
+ rFilter, mxChartShapeInfo->maFragmentPath, aModel );
+ const OUString aThemeOverrideFragmentPath( pChartSpaceFragment->
+ getFragmentPathFromFirstTypeFromOfficeDoc(u"themeOverride") );
+ rFilter.importFragment( pChartSpaceFragment );
+ ::oox::ppt::PowerPointImport *pPowerPointImport =
+ dynamic_cast< ::oox::ppt::PowerPointImport* >(&rFilter);
+
+ // The original theme.
+ ThemePtr pTheme;
+
+ if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
+ {
+ // Handle theme override.
+ uno::Reference< xml::sax::XFastSAXSerializable > xDoc(
+ rFilter.importFragment(aThemeOverrideFragmentPath), uno::UNO_QUERY_THROW);
+ pTheme = pPowerPointImport->getActualSlidePersist()->getTheme();
+ auto pThemeOverride = std::make_shared<Theme>(*pTheme);
+ rFilter.importFragment(
+ new ThemeOverrideFragmentHandler(rFilter, aThemeOverrideFragmentPath,
+ *pThemeOverride),
+ xDoc);
+ pPowerPointImport->getActualSlidePersist()->setTheme(pThemeOverride);
+ }
+
+ // convert imported chart model to chart document
+ Reference< drawing::XShapes > xExternalPage;
+ if( !mxChartShapeInfo->mbEmbedShapes )
+ xExternalPage = rxShapes;
+ if( rFilter.getChartConverter() )
+ {
+ rFilter.getChartConverter()->convertFromModel( rFilter, aModel, xChartDoc, xExternalPage, mxShape->getPosition(), mxShape->getSize() );
+ if( !xChartDoc->hasInternalDataProvider() )
+ {
+ Reference< chart2::data::XDataReceiver > xDataRec( xChartDoc, UNO_QUERY );
+ Reference< chart2::data::XDataSource > xData = xDataRec->getUsedData();
+ if( !xData->getDataSequences().hasElements() || !xData->getDataSequences()[0]->getValues().is() ||
+ !xData->getDataSequences()[0]->getValues()->getData().hasElements() )
+ {
+ rFilter.useInternalChartDataTable( true );
+ rFilter.getChartConverter()->convertFromModel( rFilter, aModel, xChartDoc, xExternalPage, mxShape->getPosition(), mxShape->getSize() );
+ rFilter.useInternalChartDataTable( false );
+ }
+ }
+
+ }
+
+ if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
+ {
+ // Restore the original theme.
+ pPowerPointImport->getActualSlidePersist()->setTheme(pTheme);
+ }
+#endif
+ }
+ catch( Exception& )
+ {
+ }
+ }
+ break;
+
+ default:;
+ }
+}
+
+void Shape::putPropertyToGrabBag( const OUString& sPropertyName, const Any& aPropertyValue )
+{
+ PropertyValue aNewProperty;
+ aNewProperty.Name = sPropertyName;
+ aNewProperty.Value = aPropertyValue;
+ putPropertyToGrabBag( aNewProperty );
+}
+
+void Shape::putPropertyToGrabBag( const PropertyValue& pProperty )
+{
+ Reference< XPropertySet > xSet( mxShape, UNO_QUERY );
+ Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
+ const OUString aGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
+ if( mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName ) )
+ {
+ Sequence< PropertyValue > aGrabBag;
+ xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
+
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc( length + 1 );
+ aGrabBag.getArray()[length] = pProperty;
+
+ xSet->setPropertyValue( aGrabBagPropName, Any( aGrabBag ) );
+ }
+}
+
+void Shape::putPropertiesToGrabBag( const Sequence< PropertyValue >& aProperties )
+{
+ Reference< XPropertySet > xSet( mxShape, UNO_QUERY );
+ Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
+ const OUString aGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
+ if( !(mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName )) )
+ return;
+
+ // get existing grab bag
+ Sequence< PropertyValue > aGrabBag;
+ xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
+
+ std::vector<PropertyValue> aVec;
+ aVec.reserve(aProperties.getLength());
+
+ // put the new items
+ std::transform(aProperties.begin(), aProperties.end(), std::back_inserter(aVec),
+ [](const PropertyValue& rProp) {
+ PropertyValue aProp;
+ aProp.Name = rProp.Name;
+ aProp.Value = rProp.Value;
+ return aProp;
+ });
+
+ // put it back to the shape
+ xSet->setPropertyValue( aGrabBagPropName, Any( comphelper::concatSequences(aGrabBag, aVec) ) );
+}
+
+FillProperties Shape::getActualFillProperties(const Theme* pTheme, const FillProperties* pParentShapeFillProps) const
+{
+ FillProperties aFillProperties;
+ aFillProperties.moFillType = XML_noFill;
+
+ // Reference shape properties
+ aFillProperties.assignUsed( *mpShapeRefFillPropPtr );
+
+ // Theme
+ if( pTheme != nullptr )
+ {
+ if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) )
+ {
+ if( const FillProperties* pFillProps = pTheme->getFillStyle( pFillRef->mnThemedIdx ) )
+ aFillProperties.assignUsed( *pFillProps );
+ }
+ }
+
+ // Properties specified directly for this shape
+ aFillProperties.assignUsed(getFillProperties());
+
+ // Parent shape's properties
+ if ( pParentShapeFillProps != nullptr)
+ if( getFillProperties().moFillType.has() && getFillProperties().moFillType.get() == XML_grpFill )
+ aFillProperties.assignUsed( *pParentShapeFillProps );
+
+ return aFillProperties;
+}
+
+LineProperties Shape::getActualLineProperties(const Theme* pTheme) const
+{
+ LineProperties aLineProperties;
+ aLineProperties.maLineFill.moFillType = XML_noFill;
+
+ // Reference shape properties
+ aLineProperties.assignUsed( *mpShapeRefLinePropPtr );
+
+ // Theme
+ if( pTheme != nullptr )
+ {
+ if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) )
+ {
+ if( const LineProperties* pLineProps = pTheme->getLineStyle( pLineRef->mnThemedIdx ) )
+ aLineProperties.assignUsed( *pLineProps );
+ }
+ }
+
+ // Properties specified directly for this shape
+ aLineProperties.assignUsed( getLineProperties() );
+
+ return aLineProperties;
+}
+
+EffectProperties Shape::getActualEffectProperties(const Theme* pTheme) const
+{
+ EffectProperties aEffectProperties;
+
+ // Reference shape properties
+ aEffectProperties.assignUsed( *mpShapeRefEffectPropPtr );
+
+ // Theme
+ if( pTheme != nullptr )
+ {
+ if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_effectRef ) )
+ {
+ if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
+ aEffectProperties.assignUsed( *pEffectProps );
+ }
+ }
+
+ // Properties specified directly for this shape
+ aEffectProperties.assignUsed ( getEffectProperties() );
+
+ return aEffectProperties;
+}
+
+uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, const OUString& sFragment, std::u16string_view sType )
+{
+ uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp;
+ sal_Int32 counter = 0;
+
+ core::RelationsRef xRels = rFilter.importRelations( sFragment );
+ if ( xRels )
+ {
+ core::RelationsRef xImageRels = xRels->getRelationsFromTypeFromOfficeDoc( sType );
+ if ( xImageRels )
+ {
+ xRelListTemp.realloc( xImageRels->size() );
+ auto pxRelListTemp = xRelListTemp.getArray();
+ for (auto const& imageRel : *xImageRels)
+ {
+ uno::Sequence< uno::Any > diagramRelTuple (3);
+ auto pdiagramRelTuple = diagramRelTuple.getArray();
+ // [0] => RID, [1] => InputStream [2] => extension
+ OUString sRelId = imageRel.second.maId;
+
+ pdiagramRelTuple[0] <<= sRelId;
+ OUString sTarget = xImageRels->getFragmentPathFromRelId( sRelId );
+
+ uno::Reference< io::XInputStream > xImageInputStrm( rFilter.openInputStream( sTarget ), uno::UNO_SET_THROW );
+ StreamDataSequence dataSeq;
+ if ( rFilter.importBinaryData( dataSeq, sTarget ) )
+ {
+ pdiagramRelTuple[1] <<= dataSeq;
+ }
+
+ pdiagramRelTuple[2] <<= sTarget.copy( sTarget.lastIndexOf(".") );
+
+ pxRelListTemp[counter] = diagramRelTuple;
+ ++counter;
+ }
+ xRelListTemp.realloc(counter);
+
+ }
+ }
+ return xRelListTemp;
+}
+
+void Shape::cloneFillProperties()
+{
+ auto pFillProperties = std::make_shared<FillProperties>();
+ pFillProperties->assignUsed(*mpFillPropertiesPtr);
+ mpFillPropertiesPtr = pFillProperties;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape3dproperties.cxx b/oox/source/drawingml/shape3dproperties.cxx
new file mode 100644
index 000000000..07ba56579
--- /dev/null
+++ b/oox/source/drawingml/shape3dproperties.cxx
@@ -0,0 +1,392 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/shape3dproperties.hxx>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/graphic/XGraphicTransformer.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+#include <oox/token/tokens.hxx>
+#include <sal/log.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::graphic;
+
+
+namespace oox::drawingml {
+
+OUString Generic3DProperties::getCameraPrstName( sal_Int32 nElement )
+{
+ switch( nElement )
+ {
+ case XML_legacyObliqueTopLeft: return "legacyObliqueTopLeft";
+ case XML_legacyObliqueTop: return "legacyObliqueTop";
+ case XML_legacyObliqueTopRight: return "legacyObliqueTopRight";
+ case XML_legacyObliqueLeft: return "legacyObliqueLeft";
+ case XML_legacyObliqueFront: return "legacyObliqueFront";
+ case XML_legacyObliqueRight: return "legacyObliqueRight";
+ case XML_legacyObliqueBottomLeft: return "legacyObliqueBottomLeft";
+ case XML_legacyObliqueBottom: return "legacyObliqueBottom";
+ case XML_legacyObliqueBottomRight: return "legacyObliqueBottomRight";
+ case XML_legacyPerspectiveTopLeft: return "legacyPerspectiveTopLeft";
+ case XML_legacyPerspectiveTop: return "legacyPerspectiveTop";
+ case XML_legacyPerspectiveTopRight: return "legacyPerspectiveTopRight";
+ case XML_legacyPerspectiveLeft: return "legacyPerspectiveLeft";
+ case XML_legacyPerspectiveFront: return "legacyPerspectiveFront";
+ case XML_legacyPerspectiveRight: return "legacyPerspectiveRight";
+ case XML_legacyPerspectiveBottomLeft: return "legacyPerspectiveBottomLeft";
+ case XML_legacyPerspectiveBottom: return "legacyPerspectiveBottom";
+ case XML_legacyPerspectiveBottomRight: return "legacyPerspectiveBottomRight";
+ case XML_orthographicFront: return "orthographicFront";
+ case XML_isometricTopUp: return "isometricTopUp";
+ case XML_isometricTopDown: return "isometricTopDown";
+ case XML_isometricBottomUp: return "isometricBottomUp";
+ case XML_isometricBottomDown: return "isometricBottomDown";
+ case XML_isometricLeftUp: return "isometricLeftUp";
+ case XML_isometricLeftDown: return "isometricLeftDown";
+ case XML_isometricRightUp: return "isometricRightUp";
+ case XML_isometricRightDown: return "isometricRightDown";
+ case XML_isometricOffAxis1Left: return "isometricOffAxis1Left";
+ case XML_isometricOffAxis1Right: return "isometricOffAxis1Right";
+ case XML_isometricOffAxis1Top: return "isometricOffAxis1Top";
+ case XML_isometricOffAxis2Left: return "isometricOffAxis2Left";
+ case XML_isometricOffAxis2Right: return "isometricOffAxis2Right";
+ case XML_isometricOffAxis2Top: return "isometricOffAxis2Top";
+ case XML_isometricOffAxis3Left: return "isometricOffAxis3Left";
+ case XML_isometricOffAxis3Right: return "isometricOffAxis3Right";
+ case XML_isometricOffAxis3Bottom: return "isometricOffAxis3Bottom";
+ case XML_isometricOffAxis4Left: return "isometricOffAxis4Left";
+ case XML_isometricOffAxis4Right: return "isometricOffAxis4Right";
+ case XML_isometricOffAxis4Bottom: return "isometricOffAxis4Bottom";
+ case XML_obliqueTopLeft: return "obliqueTopLeft";
+ case XML_obliqueTop: return "obliqueTop";
+ case XML_obliqueTopRight: return "obliqueTopRight";
+ case XML_obliqueLeft: return "obliqueLeft";
+ case XML_obliqueRight: return "obliqueRight";
+ case XML_obliqueBottomLeft: return "obliqueBottomLeft";
+ case XML_obliqueBottom: return "obliqueBottom";
+ case XML_obliqueBottomRight: return "obliqueBottomRight";
+ case XML_perspectiveFront: return "perspectiveFront";
+ case XML_perspectiveLeft: return "perspectiveLeft";
+ case XML_perspectiveRight: return "perspectiveRight";
+ case XML_perspectiveAbove: return "perspectiveAbove";
+ case XML_perspectiveBelow: return "perspectiveBelow";
+ case XML_perspectiveAboveLeftFacing: return "perspectiveAboveLeftFacing";
+ case XML_perspectiveAboveRightFacing: return "perspectiveAboveRightFacing";
+ case XML_perspectiveContrastingLeftFacing: return "perspectiveContrastingLeftFacing";
+ case XML_perspectiveContrastingRightFacing: return "perspectiveContrastingRightFacing";
+ case XML_perspectiveHeroicLeftFacing: return "perspectiveHeroicLeftFacing";
+ case XML_perspectiveHeroicRightFacing: return "perspectiveHeroicRightFacing";
+ case XML_perspectiveHeroicExtremeLeftFacing: return "perspectiveHeroicExtremeLeftFacing";
+ case XML_perspectiveHeroicExtremeRightFacing: return "perspectiveHeroicExtremeRightFacing";
+ case XML_perspectiveRelaxed: return "perspectiveRelaxed";
+ case XML_perspectiveRelaxedModerately: return "perspectiveRelaxedModerately";
+ }
+ SAL_WARN( "oox.drawingml", "Generic3DProperties::getCameraPrstName - unexpected prst type" );
+ return OUString();
+}
+
+OUString Generic3DProperties::getLightRigName( sal_Int32 nElement )
+{
+ switch( nElement )
+ {
+ case XML_legacyFlat1: return "legacyFlat1";
+ case XML_legacyFlat2: return "legacyFlat2";
+ case XML_legacyFlat3: return "legacyFlat3";
+ case XML_legacyFlat4: return "legacyFlat4";
+ case XML_legacyNormal1: return "legacyNormal1";
+ case XML_legacyNormal2: return "legacyNormal2";
+ case XML_legacyNormal3: return "legacyNormal3";
+ case XML_legacyNormal4: return "legacyNormal4";
+ case XML_legacyHarsh1: return "legacyHarsh1";
+ case XML_legacyHarsh2: return "legacyHarsh2";
+ case XML_legacyHarsh3: return "legacyHarsh3";
+ case XML_legacyHarsh4: return "legacyHarsh4";
+ case XML_threePt: return "threePt";
+ case XML_balanced: return "balanced";
+ case XML_soft: return "soft";
+ case XML_harsh: return "harsh";
+ case XML_flood: return "flood";
+ case XML_contrasting: return "contrasting";
+ case XML_morning: return "morning";
+ case XML_sunrise: return "sunrise";
+ case XML_sunset: return "sunset";
+ case XML_chilly: return "chilly";
+ case XML_freezing: return "freezing";
+ case XML_flat: return "flat";
+ case XML_twoPt: return "twoPt";
+ case XML_glow: return "glow";
+ case XML_brightRoom: return "brightRoom";
+ }
+ SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigName - unexpected token" );
+ return OUString();
+}
+
+OUString Generic3DProperties::getLightRigDirName( sal_Int32 nElement )
+{
+ switch( nElement )
+ {
+ case XML_tl: return "tl";
+ case XML_t: return "t";
+ case XML_tr: return "tr";
+ case XML_l: return "l";
+ case XML_r: return "r";
+ case XML_bl: return "bl";
+ case XML_b: return "b";
+ case XML_br: return "br";
+ }
+ SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigDirName - unexpected token" );
+ return OUString();
+}
+
+OUString Generic3DProperties::getBevelPresetTypeString( sal_Int32 nType )
+{
+ switch (nType)
+ {
+ case XML_relaxedInset: return "relaxedInset";
+ case XML_circle: return "circle";
+ case XML_slope: return "slope";
+ case XML_cross: return "cross";
+ case XML_angle: return "angle";
+ case XML_softRound: return "softRound";
+ case XML_convex: return "convex";
+ case XML_coolSlant: return "coolSlant";
+ case XML_divot: return "divot";
+ case XML_riblet: return "riblet";
+ case XML_hardEdge: return "hardEdge";
+ case XML_artDeco: return "artDeco";
+ }
+ SAL_WARN( "oox.drawingml", "Generic3DProperties::getBevelPresetTypeString - unexpected token" );
+ return OUString();
+}
+
+OUString Generic3DProperties::getPresetMaterialTypeString( sal_Int32 nType )
+{
+ switch (nType)
+ {
+ case XML_legacyMatte: return "legacyMatte";
+ case XML_legacyPlastic: return "legacyPlastic";
+ case XML_legacyMetal: return "legacyMetal";
+ case XML_legacyWireframe: return "legacyWireframe";
+ case XML_matte: return "matte";
+ case XML_plastic: return "plastic";
+ case XML_metal: return "metal";
+ case XML_warmMatte: return "warmMatte";
+ case XML_translucentPowder: return "translucentPowder";
+ case XML_powder: return "powder";
+ case XML_dkEdge: return "dkEdge";
+ case XML_softEdge: return "softEdge";
+ case XML_clear: return "clear";
+ case XML_flat: return "flat";
+ case XML_softmetal: return "softmetal";
+ case XML_none: return "none";
+ }
+ SAL_WARN( "oox.drawingml", "Generic3DProperties::getPresetMaterialTypeString - unexpected token" );
+ return OUString();
+}
+
+css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getCameraAttributes()
+{
+ css::uno::Sequence<css::beans::PropertyValue> aSeq(6);
+ auto pSeq = aSeq.getArray();
+ sal_Int32 nSize = 0;
+ if( mfFieldOfVision.has() )
+ {
+ pSeq[nSize].Name = "fov";
+ pSeq[nSize].Value <<= mfFieldOfVision.use();
+ nSize++;
+ }
+ if( mfZoom.has() )
+ {
+ pSeq[nSize].Name = "zoom";
+ pSeq[nSize].Value <<= mfZoom.use();
+ nSize++;
+ }
+ if( mnPreset.has() )
+ {
+ pSeq[nSize].Name = "prst";
+ pSeq[nSize].Value <<= getCameraPrstName( mnPreset.use() );
+ nSize++;
+ }
+ if( maCameraRotation.mnLatitude.has() )
+ {
+ pSeq[nSize].Name = "rotLat";
+ pSeq[nSize].Value <<= maCameraRotation.mnLatitude.use();
+ nSize++;
+ }
+ if( maCameraRotation.mnLongitude.has() )
+ {
+ pSeq[nSize].Name = "rotLon";
+ pSeq[nSize].Value <<= maCameraRotation.mnLongitude.use();
+ nSize++;
+ }
+ if( maCameraRotation.mnRevolution.has() )
+ {
+ pSeq[nSize].Name = "rotRev";
+ pSeq[nSize].Value <<= maCameraRotation.mnRevolution.use();
+ nSize++;
+ }
+ aSeq.realloc( nSize );
+ return aSeq;
+}
+
+css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getLightRigAttributes()
+{
+ css::uno::Sequence<css::beans::PropertyValue> aSeq(5);
+ auto pSeq = aSeq.getArray();
+ sal_Int32 nSize = 0;
+ if( mnLightRigDirection.has() )
+ {
+ pSeq[nSize].Name = "dir";
+ pSeq[nSize].Value <<= getLightRigDirName( mnLightRigDirection.use() );
+ nSize++;
+ }
+ if( mnLightRigType.has() )
+ {
+ pSeq[nSize].Name = "rig";
+ pSeq[nSize].Value <<= getLightRigName( mnLightRigType.use() );
+ nSize++;
+ }
+ if( maLightRigRotation.mnLatitude.has() )
+ {
+ pSeq[nSize].Name = "rotLat";
+ pSeq[nSize].Value <<= maLightRigRotation.mnLatitude.use();
+ nSize++;
+ }
+ if( maLightRigRotation.mnLongitude.has() )
+ {
+ pSeq[nSize].Name = "rotLon";
+ pSeq[nSize].Value <<= maLightRigRotation.mnLongitude.use();
+ nSize++;
+ }
+ if( maLightRigRotation.mnRevolution.has() )
+ {
+ pSeq[nSize].Name = "rotRev";
+ pSeq[nSize].Value <<= maLightRigRotation.mnRevolution.use();
+ nSize++;
+ }
+ aSeq.realloc( nSize );
+ return aSeq;
+}
+
+css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getBevelAttributes( BevelProperties rProps )
+{
+ css::uno::Sequence<css::beans::PropertyValue> aSeq(3);
+ auto pSeq = aSeq.getArray();
+ sal_Int32 nSize = 0;
+ if( rProps.mnPreset.has() )
+ {
+ pSeq[nSize].Name = "prst";
+ pSeq[nSize].Value <<= getBevelPresetTypeString( rProps.mnPreset.use() );
+ nSize++;
+ }
+ if( rProps.mnWidth.has() )
+ {
+ pSeq[nSize].Name = "w";
+ pSeq[nSize].Value <<= rProps.mnWidth.use();
+ nSize++;
+ }
+ if( rProps.mnHeight.has() )
+ {
+ pSeq[nSize].Name = "h";
+ pSeq[nSize].Value <<= rProps.mnHeight.use();
+ nSize++;
+ }
+ aSeq.realloc( nSize );
+ return aSeq;
+}
+
+css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getColorAttributes(
+ const Color& rColor, const GraphicHelper& rGraphicHelper, ::Color rPhClr )
+{
+ const OUString& sColorScheme = rColor.getSchemeColorName();
+ if( sColorScheme.isEmpty() )
+ {
+ // RGB color and transparency value
+ return { comphelper::makePropertyValue("rgbClr", rColor.getColor( rGraphicHelper, rPhClr )),
+ comphelper::makePropertyValue("rgbClrTransparency", rColor.getTransparency()) };
+ }
+ // scheme color with name and transformations
+ return { comphelper::makePropertyValue("schemeClr", sColorScheme),
+ comphelper::makePropertyValue("schemeClrTransformations",
+ rColor.getTransformations()) };
+}
+
+css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getShape3DAttributes(
+ const GraphicHelper& rGraphicHelper, ::Color rPhClr )
+{
+ css::uno::Sequence<css::beans::PropertyValue> aSeq(8);
+ auto pSeq = aSeq.getArray();
+ sal_Int32 nSize = 0;
+ if( mnExtrusionH.has() )
+ {
+ pSeq[nSize].Name = "extrusionH";
+ pSeq[nSize].Value <<= mnExtrusionH.use();
+ nSize++;
+ }
+ if( mnContourW.has() )
+ {
+ pSeq[nSize].Name = "contourW";
+ pSeq[nSize].Value <<= mnContourW.use();
+ nSize++;
+ }
+ if( mnShapeZ.has() )
+ {
+ pSeq[nSize].Name = "z";
+ pSeq[nSize].Value <<= mnShapeZ.use();
+ nSize++;
+ }
+ if( mnMaterial.has() )
+ {
+ pSeq[nSize].Name = "prstMaterial";
+ pSeq[nSize].Value <<= getPresetMaterialTypeString( mnMaterial.use() );
+ nSize++;
+ }
+ if( maTopBevelProperties.has() )
+ {
+ pSeq[nSize].Name = "bevelT";
+ pSeq[nSize].Value <<= getBevelAttributes( maTopBevelProperties.use() );
+ nSize++;
+ }
+ if( maBottomBevelProperties.has() )
+ {
+ pSeq[nSize].Name = "bevelB";
+ pSeq[nSize].Value <<= getBevelAttributes( maBottomBevelProperties.use() );
+ nSize++;
+ }
+ if( maExtrusionColor.isUsed() )
+ {
+ pSeq[nSize].Name = "extrusionClr";
+ pSeq[nSize].Value <<= getColorAttributes( maExtrusionColor, rGraphicHelper, rPhClr );
+ nSize++;
+ }
+ if( maContourColor.isUsed() )
+ {
+ pSeq[nSize].Name = "contourClr";
+ pSeq[nSize].Value <<= getColorAttributes( maContourColor, rGraphicHelper, rPhClr );
+ nSize++;
+ }
+ aSeq.realloc( nSize );
+ return aSeq;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
new file mode 100644
index 000000000..e0cbf9343
--- /dev/null
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/xml/sax/FastToken.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/drawingml/shapecontext.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/shapestylecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/textbodypropertiescontext.hxx>
+#include "hyperlinkcontext.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <sal/log.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_Shape
+ShapeContext::ShapeContext( ContextHandler2Helper const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pShapePtr )
+: ContextHandler2( rParent )
+, mpMasterShapePtr( pMasterShapePtr )
+, mpShapePtr( pShapePtr )
+{
+ if( mpMasterShapePtr && mpShapePtr )
+ mpMasterShapePtr->addChild( mpShapePtr );
+}
+
+ShapeContext::~ShapeContext()
+{
+}
+
+ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( getBaseToken( aElementToken ) )
+ {
+ // nvSpPr CT_ShapeNonVisual begin
+// case XML_drElemPr:
+// break;
+ case XML_cNvPr:
+ {
+ mpShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
+ mpShapePtr->setDescription( rAttribs.getString( XML_descr ).get() );
+ break;
+ }
+ case XML_hlinkMouseOver:
+ case XML_hlinkClick:
+ return new HyperLinkContext( *this, rAttribs, getShape()->getShapeProperties() );
+ case XML_ph:
+ mpShapePtr->setSubType( rAttribs.getToken( XML_type, XML_obj ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
+
+ case XML_spPr:
+ return new ShapePropertiesContext( *this, *mpShapePtr );
+
+ case XML_style:
+ return new ShapeStyleContext( *this, *mpShapePtr );
+
+ case XML_txBody:
+ case XML_txbxContent:
+ {
+ if (!mpShapePtr->getTextBody())
+ mpShapePtr->setTextBody( std::make_shared<TextBody>() );
+ return new TextBodyContext( *this, mpShapePtr );
+ }
+ case XML_txXfrm:
+ {
+ const TextBodyPtr& rShapePtr = mpShapePtr->getTextBody();
+ if (rShapePtr)
+ rShapePtr->getTextProperties().moRotation = rAttribs.getInteger( XML_rot );
+ return nullptr;
+ }
+ case XML_cNvSpPr:
+ break;
+ case XML_spLocks:
+ break;
+ case XML_bodyPr:
+ if (!mpShapePtr->getTextBody())
+ mpShapePtr->setTextBody( std::make_shared<TextBody>() );
+ return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr );
+ case XML_txbx:
+ break;
+ case XML_cNvPicPr:
+ break;
+ case XML_nvPicPr:
+ case XML_picLocks:
+ break;
+ case XML_relIds:
+ break;
+ case XML_nvSpPr:
+ break;
+ default:
+ SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
new file mode 100644
index 000000000..1a9cb4113
--- /dev/null
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/xml/sax/FastToken.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/drawingml/shapegroupcontext.hxx>
+#include <oox/drawingml/connectorshapecontext.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <sal/log.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+ShapeGroupContext::ShapeGroupContext( FragmentHandler2 const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pGroupShapePtr )
+: FragmentHandler2( rParent )
+, mpGroupShapePtr( pGroupShapePtr )
+{
+ if( pMasterShapePtr )
+ mpGroupShapePtr->setWps(pMasterShapePtr->getWps());
+ if( pMasterShapePtr && mpGroupShapePtr )
+ pMasterShapePtr->addChild( mpGroupShapePtr );
+}
+
+ShapeGroupContext::~ShapeGroupContext()
+{
+}
+
+ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( getBaseToken( aElementToken ) )
+ {
+ case XML_cNvPr:
+ {
+ mpGroupShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpGroupShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpGroupShapePtr->setName( rAttribs.getString( XML_name ).get() );
+ break;
+ }
+ case XML_ph:
+ mpGroupShapePtr->setSubType( rAttribs.getToken( XML_type, FastToken::DONTKNOW ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpGroupShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
+
+ case XML_grpSpPr:
+ return new ShapePropertiesContext( *this, *mpGroupShapePtr );
+ case XML_nvGrpSpPr:
+ return this;
+ case XML_spPr:
+ return new ShapePropertiesContext( *this, *mpGroupShapePtr );
+/*
+ case XML_style:
+ return new ShapeStyleContext( getParser() );
+*/
+ case XML_cxnSp: // connector shape
+ {
+ ShapePtr pShape = std::make_shared<Shape>("com.sun.star.drawing.ConnectorShape");
+ pShape->setLockedCanvas(mpGroupShapePtr->getLockedCanvas());
+ return new ConnectorShapeContext(*this, mpGroupShapePtr, pShape,
+ pShape->getConnectorShapeProperties());
+ }
+ case XML_grpSp: // group shape
+ return new ShapeGroupContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" ) );
+ case XML_sp: // shape
+ case XML_wsp:
+ // Don't set default character height for WPS shapes, Writer has its
+ // own way to set the default, and if we don't set it here, editing
+ // properly inherits it.
+ return new ShapeContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.CustomShape", getBaseToken(aElementToken) == XML_sp ) );
+ case XML_pic: // CT_Picture
+ return new GraphicShapeContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" ) );
+ case XML_graphicFrame: // CT_GraphicalObjectFrame
+ return new GraphicalObjectFrameContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" ), true );
+ case XML_cNvGrpSpPr:
+ break;
+ case XML_grpSpLocks:
+ break;
+ default:
+ SAL_WARN("oox", "ShapeGroupContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx
new file mode 100644
index 000000000..935cc4970
--- /dev/null
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/shapepropertiescontext.hxx>
+
+#include <drawingml/scene3dcontext.hxx>
+#include <drawingml/linepropertiescontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/transform2dcontext.hxx>
+#include <drawingml/customshapegeometry.hxx>
+#include <drawingml/effectpropertiescontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/customshapeproperties.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_ShapeProperties
+ShapePropertiesContext::ShapePropertiesContext( ContextHandler2Helper const & rParent, Shape& rShape )
+: ContextHandler2( rParent )
+, mrShape( rShape )
+{
+}
+
+ContextHandlerRef ShapePropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ // CT_Transform2D
+ case A_TOKEN( xfrm ):
+ return new Transform2DContext( *this, rAttribs, mrShape );
+
+ // GeometryGroup
+ case A_TOKEN( custGeom ): // custom geometry "CT_CustomGeometry2D"
+ return new CustomShapeGeometryContext( *this, *mrShape.getCustomShapeProperties() );
+
+ case A_TOKEN( prstGeom ): // preset geometry "CT_PresetGeometry2D"
+ {
+ sal_Int32 nToken = rAttribs.getToken( XML_prst, 0 );
+ // TODO: Move the following checks to a separate place or as a separate function
+ if (nToken == XML_line && !mrShape.isConnectorShape())
+ {
+ mrShape.getServiceName() = "com.sun.star.drawing.LineShape";
+ }
+
+ // We got a preset geometry, forget the geometry inherited from the placeholder shape.
+ mrShape.getCustomShapeProperties() = std::make_shared<CustomShapeProperties>();
+
+ return new PresetShapeGeometryContext( *this, rAttribs, *(mrShape.getCustomShapeProperties()) );
+ }
+
+ case A_TOKEN( prstTxWarp ):
+ return new PresetTextShapeContext( *this, rAttribs, *(mrShape.getCustomShapeProperties()) );
+
+ // CT_LineProperties
+ case A_TOKEN( ln ):
+ return new LinePropertiesContext( *this, rAttribs, mrShape.getLineProperties() );
+
+ // EffectPropertiesGroup
+ // todo not supported by core
+ case A_TOKEN( effectLst ): // CT_EffectList
+ case A_TOKEN( effectDag ): // CT_EffectContainer
+ return new EffectPropertiesContext( *this, mrShape.getEffectProperties() );
+
+ // todo not supported by core, only for preservation via grab bags
+ case A_TOKEN( scene3d ): // CT_Scene3D
+ return new Scene3DPropertiesContext( *this, mrShape.get3DProperties() );
+
+ // todo not supported by core, only for preservation via grab bags
+ case A_TOKEN( sp3d ): // CT_Shape3D
+ return new Shape3DPropertiesContext( *this, rAttribs, mrShape.get3DProperties() );
+ }
+
+ return FillPropertiesContext::createFillContext( *this, aElementToken, rAttribs, mrShape.getFillProperties() );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx
new file mode 100644
index 000000000..57014b478
--- /dev/null
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -0,0 +1,238 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/shapepropertymap.hxx>
+
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+
+#include <oox/helper/modelobjecthelper.hxx>
+#include <oox/token/properties.hxx>
+
+namespace oox::drawingml {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const ShapePropertyIds spnDefaultShapeIds =
+{
+ PROP_LineStyle, PROP_LineWidth, PROP_LineColor, PROP_LineTransparence, PROP_LineDash, PROP_LineCap, PROP_LineJoint,
+ PROP_LineStartName, PROP_LineStartWidth, PROP_LineStartCenter, PROP_LineEndName, PROP_LineEndWidth, PROP_LineEndCenter,
+ PROP_FillStyle, PROP_FillColor, PROP_FillTransparence, PROP_FillTransparenceGradientName, PROP_FillGradient,
+ PROP_FillBitmap, PROP_FillBitmapMode, PROP_FillBitmapSizeX, PROP_FillBitmapSizeY,
+ PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint,
+ PROP_FillHatch,
+ PROP_FillBackground,
+ PROP_FillUseSlideBackground,
+ PROP_FillBitmapName,
+ PROP_ShadowXDistance,
+ PROP_ShadowSizeX,
+ PROP_ShadowSizeY
+};
+
+} // namespace
+
+ShapePropertyInfo ShapePropertyInfo::DEFAULT( spnDefaultShapeIds, true, false, false, false, false );
+
+ShapePropertyInfo::ShapePropertyInfo( const ShapePropertyIds& rnPropertyIds,
+ bool bNamedLineMarker, bool bNamedLineDash, bool bNamedFillGradient, bool bNamedFillBitmap, bool bNamedFillHatch ) :
+ mrPropertyIds(rnPropertyIds),
+ mbNamedLineMarker( bNamedLineMarker ),
+ mbNamedLineDash( bNamedLineDash ),
+ mbNamedFillGradient( bNamedFillGradient ),
+ mbNamedFillBitmap( bNamedFillBitmap ),
+ mbNamedFillHatch( bNamedFillHatch )
+{
+}
+
+ShapePropertyMap::ShapePropertyMap( ModelObjectHelper& rModelObjHelper, const ShapePropertyInfo& rShapePropInfo ) :
+ mrModelObjHelper( rModelObjHelper ),
+ maShapePropInfo( rShapePropInfo )
+{
+}
+
+bool ShapePropertyMap::supportsProperty( ShapeProperty ePropId ) const
+{
+ return maShapePropInfo.has( ePropId );
+}
+
+bool ShapePropertyMap::hasNamedLineMarkerInTable( const OUString& rMarkerName ) const
+{
+ return maShapePropInfo.mbNamedLineMarker && mrModelObjHelper.hasLineMarker( rMarkerName );
+}
+
+bool ShapePropertyMap::setAnyProperty( ShapeProperty ePropId, const Any& rValue )
+{
+ // get current property identifier for the specified property
+ sal_Int32 nPropId = maShapePropInfo[ ePropId ];
+ if( nPropId < 0 ) return false;
+
+ // special handling for properties supporting named objects in tables
+ switch( ePropId )
+ {
+ case ShapeProperty::LineStart:
+ case ShapeProperty::LineEnd:
+ return setLineMarker( nPropId, rValue );
+
+ case ShapeProperty::LineDash:
+ return setLineDash( nPropId, rValue );
+
+ case ShapeProperty::FillGradient:
+ return setFillGradient( nPropId, rValue );
+
+ case ShapeProperty::GradientTransparency:
+ return setGradientTrans( nPropId, rValue );
+
+ case ShapeProperty::FillBitmap:
+ return setFillBitmap(nPropId, rValue);
+
+ case ShapeProperty::FillBitmapName:
+ return setFillBitmapName(rValue);
+
+ case ShapeProperty::FillHatch:
+ return setFillHatch( nPropId, rValue );
+
+ default:; // suppress compiler warnings
+ }
+
+ // set plain property value
+ setAnyProperty( nPropId, rValue );
+ return true;
+}
+
+// private --------------------------------------------------------------------
+
+bool ShapePropertyMap::setLineMarker( sal_Int32 nPropId, const Any& rValue )
+{
+ NamedValue aNamedMarker;
+ if( (rValue >>= aNamedMarker) && !aNamedMarker.Name.isEmpty() )
+ {
+ // push line marker explicitly
+ if( !maShapePropInfo.mbNamedLineMarker )
+ return setAnyProperty( nPropId, aNamedMarker.Value );
+
+ // create named line marker (if coordinates have been passed) and push its name
+ bool bInserted = !aNamedMarker.Value.has< PolyPolygonBezierCoords >() ||
+ mrModelObjHelper.insertLineMarker( aNamedMarker.Name, aNamedMarker.Value.get< PolyPolygonBezierCoords >() );
+ return bInserted && setProperty( nPropId, aNamedMarker.Name );
+ }
+ return false;
+}
+
+bool ShapePropertyMap::setLineDash( sal_Int32 nPropId, const Any& rValue )
+{
+ // push line dash explicitly
+ if( !maShapePropInfo.mbNamedLineDash )
+ return setAnyProperty( nPropId, rValue );
+
+ // create named line dash and push its name
+ if( rValue.has< LineDash >() )
+ {
+ OUString aDashName = mrModelObjHelper.insertLineDash( rValue.get< LineDash >() );
+ return !aDashName.isEmpty() && setProperty( nPropId, aDashName );
+ }
+
+ return false;
+}
+
+bool ShapePropertyMap::setFillGradient( sal_Int32 nPropId, const Any& rValue )
+{
+ // push gradient explicitly
+ if( !maShapePropInfo.mbNamedFillGradient )
+ return setAnyProperty( nPropId, rValue );
+
+ // create named gradient and push its name
+ if( rValue.has< awt::Gradient >() )
+ {
+ OUString aGradientName = mrModelObjHelper.insertFillGradient( rValue.get< awt::Gradient >() );
+ return !aGradientName.isEmpty() && setProperty( nPropId, aGradientName );
+ }
+
+ return false;
+}
+
+bool ShapePropertyMap::setFillHatch( sal_Int32 nPropId, const Any& rValue )
+{
+ // push hatch explicitly
+ if( !maShapePropInfo.mbNamedFillHatch )
+ return setAnyProperty( nPropId, rValue );
+
+ // create named hatch and push its name
+ if (rValue.has<drawing::Hatch>())
+ {
+ OUString aHatchName = mrModelObjHelper.insertFillHatch(rValue.get<drawing::Hatch>());
+ return !aHatchName.isEmpty() && setProperty( nPropId, aHatchName );
+ }
+
+ return false;
+}
+
+bool ShapePropertyMap::setGradientTrans( sal_Int32 nPropId, const Any& rValue )
+{
+ // create named gradient and push its name
+ if( rValue.has< awt::Gradient >() )
+ {
+ OUString aGradientName = mrModelObjHelper.insertTransGrandient( rValue.get< awt::Gradient >() );
+ return !aGradientName.isEmpty() && setProperty( nPropId, aGradientName );
+ }
+
+ return false;
+}
+
+bool ShapePropertyMap::setFillBitmap(sal_Int32 nPropId, const Any& rValue)
+{
+ // push bitmap explicitly
+ if (!maShapePropInfo.mbNamedFillBitmap)
+ {
+ return setAnyProperty(nPropId, rValue);
+ }
+
+ // create named bitmap URL and push its name
+ if (rValue.has<uno::Reference<graphic::XGraphic>>())
+ {
+ auto xGraphic = rValue.get<uno::Reference<graphic::XGraphic>>();
+ OUString aBitmapName = mrModelObjHelper.insertFillBitmapXGraphic(xGraphic);
+ return !aBitmapName.isEmpty() && setProperty(nPropId, aBitmapName);
+ }
+
+ return false;
+}
+
+bool ShapePropertyMap::setFillBitmapName(const Any& rValue)
+{
+ if (rValue.has<uno::Reference<graphic::XGraphic>>())
+ {
+ auto xGraphic = rValue.get<uno::Reference<graphic::XGraphic>>();
+ OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapXGraphic(xGraphic);
+ return !aBitmapUrlName.isEmpty() && setProperty(PROP_FillBitmapName, aBitmapUrlName);
+ }
+ return false;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shapestylecontext.cxx b/oox/source/drawingml/shapestylecontext.cxx
new file mode 100644
index 000000000..f0bc061a5
--- /dev/null
+++ b/oox/source/drawingml/shapestylecontext.cxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/shapestylecontext.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_ShapeStyle
+
+ShapeStyleContext::ShapeStyleContext( ContextHandler2Helper const & rParent, Shape& rShape )
+: ContextHandler2( rParent )
+, mrShape( rShape )
+{
+}
+
+ShapeStyleContext::~ShapeStyleContext()
+{
+}
+
+ContextHandlerRef ShapeStyleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( lnRef ) : // CT_StyleMatrixReference
+ case A_TOKEN( fillRef ) : // CT_StyleMatrixReference
+ case A_TOKEN( effectRef ) : // CT_StyleMatrixReference
+ case A_TOKEN( fontRef ) : // CT_FontReference
+ {
+ sal_Int32 nToken = getBaseToken( aElementToken );
+ ShapeStyleRef& rStyleRef = mrShape.getShapeStyleRefs()[ nToken ];
+ rStyleRef.mnThemedIdx = (nToken == XML_fontRef) ? rAttribs.getToken( XML_idx, XML_none ) : rAttribs.getInteger( XML_idx, 0 );
+ // Set default Text Color. Some xml files don't seem
+ // to have color definitions inside fontRef - Use
+ // tx1 in such cases
+ if( nToken == XML_fontRef && !rStyleRef.maPhClr.isUsed() )
+ rStyleRef.maPhClr.setSchemeClr(XML_tx1);
+ return new ColorContext( *this, rStyleRef.maPhClr );
+ }
+ }
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/spdefcontext.cxx b/oox/source/drawingml/spdefcontext.cxx
new file mode 100644
index 000000000..3697bdfe8
--- /dev/null
+++ b/oox/source/drawingml/spdefcontext.cxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/spdefcontext.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textbodypropertiescontext.hxx>
+#include <drawingml/textliststylecontext.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+spDefContext::spDefContext( ContextHandler2Helper const & rParent, Shape& rDefaultObject )
+: ContextHandler2( rParent )
+, mrDefaultObject( rDefaultObject )
+{
+}
+
+ContextHandlerRef spDefContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( spPr ):
+ return new ShapePropertiesContext( *this, mrDefaultObject );
+ case A_TOKEN( bodyPr ):
+ {
+ TextBodyPtr xTextBody = std::make_shared<TextBody>();
+ mrDefaultObject.setTextBody( xTextBody );
+ return new TextBodyPropertiesContext( *this, rAttribs, xTextBody->getTextProperties() );
+ }
+ case A_TOKEN( lstStyle ):
+ return new TextListStyleContext( *this, *mrDefaultObject.getMasterTextListStyle() );
+ case A_TOKEN( style ):
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx b/oox/source/drawingml/table/predefined-table-styles.cxx
new file mode 100644
index 000000000..91eccdfc8
--- /dev/null
+++ b/oox/source/drawingml/table/predefined-table-styles.cxx
@@ -0,0 +1,975 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#include <oox/token/tokens.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+using namespace oox;
+using namespace oox::drawingml::table;
+
+/* tdf#107604
+ * There are predefined table styles that have a
+ * style id (in ppt/slides/slidex.xml) but does not have
+ * corresponding style definition (ppt/tableStyles.xml).
+ * So we should create those styles here for this case.
+ * There are 74 predefined styles and many different
+ * variables. A style map was created by examining all
+ * 74 style properties. And table styles were coded according
+ * to that map. You can see that map in
+ * oox/documentation/predefined-styles-map.ods. We should
+ * define all of these variables to keep the code readable
+ * and change something easily when some styles change.
+ */
+
+std::map<OUString, std::pair<OUString, OUString>> mStyleIdMap;
+
+// Create style-id map for using similar attributes of the groups.
+// (style ids used from here: https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2010/hh273476(v=office.14)?redirectedfrom=MSDN)
+// and checked all of them.
+
+static void createStyleIdMap()
+{
+ mStyleIdMap[OUString("{2D5ABB26-0587-4C30-8999-92F81FD0307C}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString(""));
+ mStyleIdMap[OUString("{3C2FFA5D-87B4-456A-9821-1D502468CF0F}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent1"));
+ mStyleIdMap[OUString("{284E427A-3D55-4303-BF80-6455036E1DE7}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent2"));
+ mStyleIdMap[OUString("{69C7853C-536D-4A76-A0AE-DD22124D55A5}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent3"));
+ mStyleIdMap[OUString("{775DCB02-9BB8-47FD-8907-85C794F793BA}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent4"));
+ mStyleIdMap[OUString("{35758FB7-9AC5-4552-8A53-C91805E547FA}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent5"));
+ mStyleIdMap[OUString("{08FB837D-C827-4EFA-A057-4D05807E0F7C}")]
+ = std::make_pair(OUString("Themed-Style-1"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{5940675A-B579-460E-94D1-54222C63F5DA}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString(""));
+ mStyleIdMap[OUString("{D113A9D2-9D6B-4929-AA2D-F23B5EE8CBE7}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent1"));
+ mStyleIdMap[OUString("{18603FDC-E32A-4AB5-989C-0864C3EAD2B8}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent2"));
+ mStyleIdMap[OUString("{306799F8-075E-4A3A-A7F6-7FBC6576F1A4}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent3"));
+ mStyleIdMap[OUString("{E269D01E-BC32-4049-B463-5C60D7B0CCD2}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent4"));
+ mStyleIdMap[OUString("{327F97BB-C833-4FB7-BDE5-3F7075034690}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent5"));
+ mStyleIdMap[OUString("{638B1855-1B75-4FBE-930C-398BA8C253C6}")]
+ = std::make_pair(OUString("Themed-Style-2"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{9D7B26C5-4107-4FEC-AEDC-1716B250A1EF}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString(""));
+ mStyleIdMap[OUString("{3B4B98B0-60AC-42C2-AFA5-B58CD77FA1E5}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent1"));
+ mStyleIdMap[OUString("{0E3FDE45-AF77-4B5C-9715-49D594BDF05E}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent2"));
+ mStyleIdMap[OUString("{C083E6E3-FA7D-4D7B-A595-EF9225AFEA82}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent3"));
+ mStyleIdMap[OUString("{D27102A9-8310-4765-A935-A1911B00CA55}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent4"));
+ mStyleIdMap[OUString("{5FD0F851-EC5A-4D38-B0AD-8093EC10F338}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent5"));
+ mStyleIdMap[OUString("{68D230F3-CF80-4859-8CE7-A43EE81993B5}")]
+ = std::make_pair(OUString("Light-Style-1"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{7E9639D4-E3E2-4D34-9284-5A2195B3D0D7}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString(""));
+ mStyleIdMap[OUString("{69012ECD-51FC-41F1-AA8D-1B2483CD663E}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent1"));
+ mStyleIdMap[OUString("{72833802-FEF1-4C79-8D5D-14CF1EAF98D9}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent2"));
+ mStyleIdMap[OUString("{F2DE63D5-997A-4646-A377-4702673A728D}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent3"));
+ mStyleIdMap[OUString("{17292A2E-F333-43FB-9621-5CBBE7FDCDCB}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent4"));
+ mStyleIdMap[OUString("{5A111915-BE36-4E01-A7E5-04B1672EAD32}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent5"));
+ mStyleIdMap[OUString("{912C8C85-51F0-491E-9774-3900AFEF0FD7}")]
+ = std::make_pair(OUString("Light-Style-2"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{616DA210-FB5B-4158-B5E0-FEB733F419BA}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString(""));
+ mStyleIdMap[OUString("{BC89EF96-8CEA-46FF-86C4-4CE0E7609802}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent1"));
+ mStyleIdMap[OUString("{5DA37D80-6434-44D0-A028-1B22A696006F}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent2"));
+ mStyleIdMap[OUString("{8799B23B-EC83-4686-B30A-512413B5E67A}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent3"));
+ mStyleIdMap[OUString("{ED083AE6-46FA-4A59-8FB0-9F97EB10719F}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent4"));
+ mStyleIdMap[OUString("{BDBED569-4797-4DF1-A0F4-6AAB3CD982D8}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent5"));
+ mStyleIdMap[OUString("{E8B1032C-EA38-4F05-BA0D-38AFFFC7BED3}")]
+ = std::make_pair(OUString("Light-Style-3"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{793D81CF-94F2-401A-BA57-92F5A7B2D0C5}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString(""));
+ mStyleIdMap[OUString("{B301B821-A1FF-4177-AEE7-76D212191A09}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent1"));
+ mStyleIdMap[OUString("{9DCAF9ED-07DC-4A11-8D7F-57B35C25682E}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent2"));
+ mStyleIdMap[OUString("{1FECB4D8-DB02-4DC6-A0A2-4F2EBAE1DC90}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent3"));
+ mStyleIdMap[OUString("{1E171933-4619-4E11-9A3F-F7608DF75F80}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent4"));
+ mStyleIdMap[OUString("{FABFCF23-3B69-468F-B69F-88F6DE6A72F2}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent5"));
+ mStyleIdMap[OUString("{10A1B5D5-9B99-4C35-A422-299274C87663}")]
+ = std::make_pair(OUString("Medium-Style-1"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString(""));
+ mStyleIdMap[OUString("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent1"));
+ mStyleIdMap[OUString("{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent2"));
+ mStyleIdMap[OUString("{F5AB1C69-6EDB-4FF4-983F-18BD219EF322}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent3"));
+ mStyleIdMap[OUString("{00A15C55-8517-42AA-B614-E9B94910E393}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent4"));
+ mStyleIdMap[OUString("{7DF18680-E054-41AD-8BC1-D1AEF772440D}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent5"));
+ mStyleIdMap[OUString("{93296810-A885-4BE3-A3E7-6D5BEEA58F35}")]
+ = std::make_pair(OUString("Medium-Style-2"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{8EC20E35-A176-4012-BC5E-935CFFF8708E}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString(""));
+ mStyleIdMap[OUString("{6E25E649-3F16-4E02-A733-19D2CDBF48F0}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent1"));
+ mStyleIdMap[OUString("{85BE263C-DBD7-4A20-BB59-AAB30ACAA65A}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent2"));
+ mStyleIdMap[OUString("{EB344D84-9AFB-497E-A393-DC336BA19D2E}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent3"));
+ mStyleIdMap[OUString("{EB9631B5-78F2-41C9-869B-9F39066F8104}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent4"));
+ mStyleIdMap[OUString("{74C1A8A3-306A-4EB7-A6B1-4F7E0EB9C5D6}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent5"));
+ mStyleIdMap[OUString("{2A488322-F2BA-4B5B-9748-0D474271808F}")]
+ = std::make_pair(OUString("Medium-Style-3"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{D7AC3CCA-C797-4891-BE02-D94E43425B78}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString(""));
+ mStyleIdMap[OUString("{69CF1AB2-1976-4502-BF36-3FF5EA218861}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent1"));
+ mStyleIdMap[OUString("{8A107856-5554-42FB-B03E-39F5DBC370BA}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent2"));
+ mStyleIdMap[OUString("{0505E3EF-67EA-436B-97B2-0124C06EBD24}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent3"));
+ mStyleIdMap[OUString("{C4B1156A-380E-4F78-BDF5-A606A8083BF9}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent4"));
+ mStyleIdMap[OUString("{22838BEF-8BB2-4498-84A7-C5851F593DF1}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent5"));
+ mStyleIdMap[OUString("{16D9F66E-5EB9-4882-86FB-DCBF35E3C3E4}")]
+ = std::make_pair(OUString("Medium-Style-4"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{E8034E78-7F5D-4C2E-B375-FC64B27BC917}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString(""));
+ mStyleIdMap[OUString("{125E5076-3810-47DD-B79F-674D7AD40C01}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent1"));
+ mStyleIdMap[OUString("{37CE84F3-28C3-443E-9E96-99CF82512B78}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent2"));
+ mStyleIdMap[OUString("{D03447BB-5D67-496B-8E87-E561075AD55C}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent3"));
+ mStyleIdMap[OUString("{E929F9F4-4A8F-4326-A1B4-22849713DDAB}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent4"));
+ mStyleIdMap[OUString("{8FD4443E-F989-4FC4-A0C8-D5A2AF1F390B}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent5"));
+ mStyleIdMap[OUString("{AF606853-7671-496A-8E4F-DF71F8EC918B}")]
+ = std::make_pair(OUString("Dark-Style-1"), OUString("Accent6"));
+
+ mStyleIdMap[OUString("{5202B0CA-FC54-4496-8BCA-5EF66A818D29}")]
+ = std::make_pair(OUString("Dark-Style-2"), OUString(""));
+ mStyleIdMap[OUString("{0660B408-B3CF-4A94-85FC-2B1E0A45F4A2}")]
+ = std::make_pair(OUString("Dark-Style-2"), OUString("Accent1"));
+ mStyleIdMap[OUString("{91EBBBCC-DAD2-459C-BE2E-F6DE35CF9A28}")]
+ = std::make_pair(OUString("Dark-Style-2"), OUString("Accent3"));
+ mStyleIdMap[OUString("{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}")]
+ = std::make_pair(OUString("Dark-Style-2"), OUString("Accent5"));
+}
+
+static std::map<OUString, sal_Int32> tokens = { { "", XML_dk1 },
+ { "Accent1", XML_accent1 },
+ { "Accent2", XML_accent2 },
+ { "Accent3", XML_accent3 },
+ { "Accent4", XML_accent4 },
+ { "Accent5", XML_accent5 },
+ { "Accent6", XML_accent6 } };
+
+void setBorderLineType(const oox::drawingml::LinePropertiesPtr& pLineProp, sal_Int32 nToken)
+{
+ pLineProp->maLineFill.moFillType.set(nToken);
+}
+
+void insertBorderLine(TableStylePart& aTableStylePart, sal_Int32 nToken,
+ oox::drawingml::LinePropertiesPtr pLineProp)
+{
+ if (pLineProp->maLineFill.moFillType.has())
+ {
+ aTableStylePart.getLineBorders().insert(
+ std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(nToken, pLineProp));
+ }
+}
+
+std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId)
+{
+ createStyleIdMap();
+ std::unique_ptr<TableStyle> pTableStyle;
+ pTableStyle.reset(new TableStyle());
+
+ // Text Color definitions for table parts
+
+ ::oox::drawingml::Color wholeTblTextColor;
+ ::oox::drawingml::Color firstRowTextColor;
+ ::oox::drawingml::Color firstColTextColor;
+ ::oox::drawingml::Color lastRowTextColor;
+ ::oox::drawingml::Color lastColTextColor;
+ ::oox::drawingml::Color band1HTextColor;
+ ::oox::drawingml::Color band1VTextColor;
+ ::oox::drawingml::Color band2HTextColor;
+ ::oox::drawingml::Color band2VTextColor;
+
+ // Fill properties definitions for table parts
+
+ oox::drawingml::FillPropertiesPtr pWholeTblFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pFirstRowFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pFirstColFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pLastRowFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pLastColFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pBand1HFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pBand1VFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pBand2HFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pBand2VFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+ oox::drawingml::FillPropertiesPtr pTblBgFillProperties
+ = std::make_shared<oox::drawingml::FillProperties>();
+
+ // Start table border line properties definitions for table parts
+
+ oox::drawingml::LinePropertiesPtr pWholeTblLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pWholeTblRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pWholeTblTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pWholeTblBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pWholeTblInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pWholeTblInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pFirstRowLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstRowRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstRowTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstRowBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstRowInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstRowInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pFirstColLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstColRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstColTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstColBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstColInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pFirstColInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pLastColLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastColRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastColTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastColBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastColInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastColInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pLastRowLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastRowRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastRowTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastRowBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastRowInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pLastRowInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pBand1HLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1HRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1HTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1HBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1HInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1HInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pBand1VLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1VRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1VTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1VBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1VInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand1VInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pBand2HLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2HRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2HTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2HBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2HInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2HInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ oox::drawingml::LinePropertiesPtr pBand2VLeftBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2VRightBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2VTopBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2VBottomBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2VInsideHBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+ oox::drawingml::LinePropertiesPtr pBand2VInsideVBorder
+ = std::make_shared<oox::drawingml::LineProperties>();
+
+ // End table border line properties definitions for table parts
+
+ // Start to set fill types.
+
+ pTblBgFillProperties->moFillType.set(XML_solidFill);
+ pWholeTblFillProperties->moFillType.set(XML_solidFill);
+ pFirstRowFillProperties->moFillType.set(XML_solidFill);
+ pFirstColFillProperties->moFillType.set(XML_solidFill);
+ pLastRowFillProperties->moFillType.set(XML_solidFill);
+ pLastColFillProperties->moFillType.set(XML_solidFill);
+ pBand1HFillProperties->moFillType.set(XML_solidFill);
+ pBand1VFillProperties->moFillType.set(XML_solidFill);
+ pBand2HFillProperties->moFillType.set(XML_solidFill);
+ pBand2VFillProperties->moFillType.set(XML_solidFill);
+
+ // End to set fill types.
+
+ // Define common properties.
+
+ pWholeTblLeftBorder->moLineWidth = 12700;
+ pWholeTblRightBorder->moLineWidth = 12700;
+ pWholeTblTopBorder->moLineWidth = 12700;
+ pWholeTblBottomBorder->moLineWidth = 12700;
+ pWholeTblInsideHBorder->moLineWidth = 12700;
+ pWholeTblInsideVBorder->moLineWidth = 12700;
+
+ pWholeTblLeftBorder->moPresetDash = XML_solid;
+ pWholeTblRightBorder->moPresetDash = XML_solid;
+ pWholeTblTopBorder->moPresetDash = XML_solid;
+ pWholeTblBottomBorder->moPresetDash = XML_solid;
+ pWholeTblInsideHBorder->moPresetDash = XML_solid;
+ pWholeTblInsideVBorder->moPresetDash = XML_solid;
+
+ // Start to handle all style groups.
+
+ OUString style_name = mStyleIdMap[styleId].first;
+ OUString accent_name = mStyleIdMap[styleId].second;
+
+ if (style_name == "Themed-Style-1")
+ {
+ if (!accent_name.isEmpty())
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideVBorder, XML_solidFill);
+ setBorderLineType(pFirstRowLeftBorder, XML_solidFill);
+ setBorderLineType(pFirstRowRightBorder, XML_solidFill);
+ setBorderLineType(pFirstRowTopBorder, XML_solidFill);
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowLeftBorder, XML_solidFill);
+ setBorderLineType(pLastRowRightBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+ setBorderLineType(pLastRowBottomBorder, XML_solidFill);
+ setBorderLineType(pFirstColLeftBorder, XML_solidFill);
+ setBorderLineType(pFirstColRightBorder, XML_solidFill);
+ setBorderLineType(pFirstColTopBorder, XML_solidFill);
+ setBorderLineType(pFirstColBottomBorder, XML_solidFill);
+ setBorderLineType(pFirstColInsideHBorder, XML_solidFill);
+ setBorderLineType(pLastColLeftBorder, XML_solidFill);
+ setBorderLineType(pLastColRightBorder, XML_solidFill);
+ setBorderLineType(pLastColTopBorder, XML_solidFill);
+ setBorderLineType(pLastColBottomBorder, XML_solidFill);
+ setBorderLineType(pLastColInsideHBorder, XML_solidFill);
+
+ sal_Int32 accent_val = tokens[mStyleIdMap[styleId].second];
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pFirstRowLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstRowRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pLastRowLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastRowRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastRowBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pFirstColLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstColRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstColTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstColBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstColInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pLastColLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastColRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastColTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastColBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastColInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+ }
+ else
+ {
+ wholeTblTextColor.setSchemeClr(XML_tx1);
+ }
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_alpha, 40000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_alpha, 40000);
+ }
+ else if (style_name == "Themed-Style-2")
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ {
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+ setBorderLineType(pFirstColRightBorder, XML_solidFill);
+ setBorderLineType(pLastColLeftBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_lt1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+
+ accent_val = tokens[mStyleIdMap[styleId].second];
+
+ pTblBgFillProperties->maFillColor.setSchemeClr(accent_val);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pFirstColRightBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pLastColLeftBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pBand1HFillProperties->maFillColor.setSchemeClr(XML_lt1);
+ pBand1VFillProperties->maFillColor.setSchemeClr(XML_lt1);
+ }
+ else
+ {
+ setBorderLineType(pWholeTblInsideVBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+
+ accent_val = XML_tx1;
+
+ pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(XML_tx1);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(XML_tx1);
+ }
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ pWholeTblLeftBorder->maLineFill.maFillColor.addTransformation(XML_tint, 50000);
+ pWholeTblRightBorder->maLineFill.maFillColor.addTransformation(XML_tint, 50000);
+ pWholeTblTopBorder->maLineFill.maFillColor.addTransformation(XML_tint, 50000);
+ pWholeTblBottomBorder->maLineFill.maFillColor.addTransformation(XML_tint, 50000);
+ }
+ else if (style_name == "Light-Style-1")
+ {
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_tx1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_tx1;
+
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ firstRowTextColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ }
+ else if (style_name == "Light-Style-2")
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+ setBorderLineType(pBand1HTopBorder, XML_solidFill);
+ setBorderLineType(pBand1HBottomBorder, XML_solidFill);
+ setBorderLineType(pBand1VLeftBorder, XML_solidFill);
+ setBorderLineType(pBand1VRightBorder, XML_solidFill);
+ setBorderLineType(pBand2VLeftBorder, XML_solidFill);
+ setBorderLineType(pBand2VRightBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_tx1);
+ firstRowTextColor.setSchemeClr(XML_bg1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_tx1;
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand1HTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pBand1HBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand1VLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pBand1VRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand2VLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pBand2VRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ }
+ else if (style_name == "Light-Style-3")
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideVBorder, XML_solidFill);
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_tx1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_tx1;
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ firstRowTextColor.setSchemeClr(accent_val);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_alpha, 20000);
+ }
+ else if (style_name == "Medium-Style-1")
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+ pWholeTblFillProperties->maFillColor.setSchemeClr(XML_lt1);
+ pLastRowFillProperties->maFillColor.setSchemeClr(XML_lt1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_dk1;
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ }
+ else if (style_name == "Medium-Style-2")
+ {
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideVBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+ lastRowTextColor.setSchemeClr(XML_lt1);
+ firstColTextColor.setSchemeClr(XML_lt1);
+ lastColTextColor.setSchemeClr(XML_lt1);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_dk1;
+
+ pWholeTblFillProperties->maFillColor.setSchemeClr(accent_val);
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pFirstColFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastColFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pWholeTblFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pBand1HFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ }
+ else if (style_name == "Medium-Style-3")
+ {
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstColTextColor.setSchemeClr(XML_lt1);
+ lastColTextColor.setSchemeClr(XML_lt1);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+ pWholeTblFillProperties->maFillColor.setSchemeClr(XML_lt1);
+ pLastRowFillProperties->maFillColor.setSchemeClr(XML_lt1);
+ pBand1HFillProperties->maFillColor.setSchemeClr(XML_dk1);
+ pBand1VFillProperties->maFillColor.setSchemeClr(XML_dk1);
+
+ firstRowTextColor.setSchemeClr(XML_lt1);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_dk1;
+
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pFirstColFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastColFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pBand1HFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ }
+ else if (style_name == "Medium-Style-4")
+ {
+ setBorderLineType(pWholeTblLeftBorder, XML_solidFill);
+ setBorderLineType(pWholeTblRightBorder, XML_solidFill);
+ setBorderLineType(pWholeTblTopBorder, XML_solidFill);
+ setBorderLineType(pWholeTblBottomBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideHBorder, XML_solidFill);
+ setBorderLineType(pWholeTblInsideVBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+ pLastRowFillProperties->maFillColor.setSchemeClr(XML_dk1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_dk1;
+
+ pWholeTblLeftBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblRightBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(accent_val);
+ pWholeTblFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ firstRowTextColor.setSchemeClr(accent_val);
+ pFirstRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pFirstRowFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pLastRowFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pWholeTblFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pBand1HFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ }
+ else if (style_name == "Dark-Style-1")
+ {
+ setBorderLineType(pFirstRowBottomBorder, XML_solidFill);
+ setBorderLineType(pFirstColRightBorder, XML_solidFill);
+ setBorderLineType(pLastColLeftBorder, XML_solidFill);
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ sal_Int32 transform_val;
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+ pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pFirstColRightBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pLastColLeftBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+ pFirstRowFillProperties->maFillColor.setSchemeClr(XML_dk1);
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ {
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ transform_val = XML_shade;
+ }
+ else
+ {
+ accent_val = XML_dk1;
+ transform_val = XML_tint;
+ }
+
+ pWholeTblFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pFirstColFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastColFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pWholeTblFillProperties->maFillColor.addTransformation(transform_val, 20000);
+ pBand1HFillProperties->maFillColor.addTransformation(transform_val, 40000);
+ pBand1VFillProperties->maFillColor.addTransformation(transform_val, 40000);
+ pLastColFillProperties->maFillColor.addTransformation(transform_val, 60000);
+ pFirstColFillProperties->maFillColor.addTransformation(transform_val, 60000);
+ }
+ else if (style_name == "Dark-Style-2")
+ {
+ setBorderLineType(pLastRowTopBorder, XML_solidFill);
+
+ wholeTblTextColor.setSchemeClr(XML_dk1);
+ firstRowTextColor.setSchemeClr(XML_lt1);
+
+ pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1);
+
+ if (accent_name.isEmpty())
+ pFirstRowFillProperties->maFillColor.setSchemeClr(XML_dk1);
+ else if (accent_name == "Accent1")
+ pFirstRowFillProperties->maFillColor.setSchemeClr(XML_accent2);
+ else if (accent_name == "Accent3")
+ pFirstRowFillProperties->maFillColor.setSchemeClr(XML_accent4);
+ else if (accent_name == "Accent5")
+ pFirstRowFillProperties->maFillColor.setSchemeClr(XML_accent6);
+
+ sal_Int32 accent_val;
+
+ if (!accent_name.isEmpty())
+ accent_val = tokens[mStyleIdMap[styleId].second];
+ else
+ accent_val = XML_dk1;
+
+ pWholeTblFillProperties->maFillColor.setSchemeClr(accent_val);
+ pLastRowFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1HFillProperties->maFillColor.setSchemeClr(accent_val);
+ pBand1VFillProperties->maFillColor.setSchemeClr(accent_val);
+
+ pWholeTblFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ pBand1HFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ pBand1VFillProperties->maFillColor.addTransformation(XML_tint, 40000);
+ pLastRowFillProperties->maFillColor.addTransformation(XML_tint, 20000);
+ }
+
+ // End to handle all style groups.
+
+ // Create a TableStyle from handled properties.
+
+ pTableStyle->getWholeTbl().getTextColor() = wholeTblTextColor;
+ pTableStyle->getFirstRow().getTextColor() = firstRowTextColor;
+ pTableStyle->getFirstCol().getTextColor() = firstColTextColor;
+ pTableStyle->getLastRow().getTextColor() = lastRowTextColor;
+ pTableStyle->getLastCol().getTextColor() = lastColTextColor;
+ pTableStyle->getBand1H().getTextColor() = band1HTextColor;
+ pTableStyle->getBand1V().getTextColor() = band1VTextColor;
+ pTableStyle->getBand2H().getTextColor() = band2HTextColor;
+ pTableStyle->getBand2V().getTextColor() = band2VTextColor;
+
+ pTableStyle->getBackgroundFillProperties() = pTblBgFillProperties;
+ pTableStyle->getWholeTbl().getFillProperties() = pWholeTblFillProperties;
+ pTableStyle->getFirstRow().getFillProperties() = pFirstRowFillProperties;
+ pTableStyle->getFirstCol().getFillProperties() = pFirstColFillProperties;
+ pTableStyle->getLastRow().getFillProperties() = pLastRowFillProperties;
+ pTableStyle->getLastCol().getFillProperties() = pLastColFillProperties;
+ pTableStyle->getBand1H().getFillProperties() = pBand1HFillProperties;
+ pTableStyle->getBand1V().getFillProperties() = pBand1VFillProperties;
+ pTableStyle->getBand2H().getFillProperties() = pBand2HFillProperties;
+ pTableStyle->getBand2V().getFillProperties() = pBand2VFillProperties;
+
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_left, pWholeTblLeftBorder);
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_right, pWholeTblRightBorder);
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_top, pWholeTblTopBorder);
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_bottom, pWholeTblBottomBorder);
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_insideV, pWholeTblInsideVBorder);
+ insertBorderLine(pTableStyle->getWholeTbl(), XML_insideH, pWholeTblInsideHBorder);
+
+ insertBorderLine(pTableStyle->getFirstRow(), XML_left, pFirstRowLeftBorder);
+ insertBorderLine(pTableStyle->getFirstRow(), XML_right, pFirstRowRightBorder);
+ insertBorderLine(pTableStyle->getFirstRow(), XML_top, pFirstRowTopBorder);
+ insertBorderLine(pTableStyle->getFirstRow(), XML_bottom, pFirstRowBottomBorder);
+ insertBorderLine(pTableStyle->getFirstRow(), XML_insideV, pFirstRowInsideVBorder);
+ insertBorderLine(pTableStyle->getFirstRow(), XML_insideH, pFirstRowInsideHBorder);
+
+ insertBorderLine(pTableStyle->getFirstCol(), XML_left, pFirstColLeftBorder);
+ insertBorderLine(pTableStyle->getFirstCol(), XML_right, pFirstColRightBorder);
+ insertBorderLine(pTableStyle->getFirstCol(), XML_top, pFirstColTopBorder);
+ insertBorderLine(pTableStyle->getFirstCol(), XML_bottom, pFirstColBottomBorder);
+ insertBorderLine(pTableStyle->getFirstCol(), XML_insideV, pFirstColInsideVBorder);
+ insertBorderLine(pTableStyle->getFirstCol(), XML_insideH, pFirstColInsideHBorder);
+
+ insertBorderLine(pTableStyle->getLastRow(), XML_left, pLastRowLeftBorder);
+ insertBorderLine(pTableStyle->getLastRow(), XML_right, pLastRowRightBorder);
+ insertBorderLine(pTableStyle->getLastRow(), XML_top, pLastRowTopBorder);
+ insertBorderLine(pTableStyle->getLastRow(), XML_bottom, pLastRowBottomBorder);
+ insertBorderLine(pTableStyle->getLastRow(), XML_insideV, pLastRowInsideVBorder);
+ insertBorderLine(pTableStyle->getLastRow(), XML_insideH, pLastRowInsideHBorder);
+
+ insertBorderLine(pTableStyle->getLastCol(), XML_left, pLastColLeftBorder);
+ insertBorderLine(pTableStyle->getLastCol(), XML_right, pLastColRightBorder);
+ insertBorderLine(pTableStyle->getLastCol(), XML_top, pLastColTopBorder);
+ insertBorderLine(pTableStyle->getLastCol(), XML_bottom, pLastColBottomBorder);
+ insertBorderLine(pTableStyle->getLastCol(), XML_insideV, pLastColInsideVBorder);
+ insertBorderLine(pTableStyle->getLastCol(), XML_insideH, pLastColInsideHBorder);
+
+ insertBorderLine(pTableStyle->getBand1H(), XML_left, pBand1HLeftBorder);
+ insertBorderLine(pTableStyle->getBand1H(), XML_right, pBand1HRightBorder);
+ insertBorderLine(pTableStyle->getBand1H(), XML_top, pBand1HTopBorder);
+ insertBorderLine(pTableStyle->getBand1H(), XML_bottom, pBand1HBottomBorder);
+ insertBorderLine(pTableStyle->getBand1H(), XML_insideV, pBand1HInsideVBorder);
+ insertBorderLine(pTableStyle->getBand1H(), XML_insideH, pBand1HInsideHBorder);
+
+ insertBorderLine(pTableStyle->getBand1V(), XML_left, pBand1VLeftBorder);
+ insertBorderLine(pTableStyle->getBand1V(), XML_right, pBand1VRightBorder);
+ insertBorderLine(pTableStyle->getBand1V(), XML_top, pBand1VTopBorder);
+ insertBorderLine(pTableStyle->getBand1V(), XML_bottom, pBand1VBottomBorder);
+ insertBorderLine(pTableStyle->getBand1V(), XML_insideV, pBand1VInsideVBorder);
+ insertBorderLine(pTableStyle->getBand1V(), XML_insideH, pBand1VInsideHBorder);
+
+ insertBorderLine(pTableStyle->getBand2H(), XML_left, pBand2HLeftBorder);
+ insertBorderLine(pTableStyle->getBand2H(), XML_right, pBand2HRightBorder);
+ insertBorderLine(pTableStyle->getBand2H(), XML_top, pBand2HTopBorder);
+ insertBorderLine(pTableStyle->getBand2H(), XML_bottom, pBand2HBottomBorder);
+ insertBorderLine(pTableStyle->getBand2H(), XML_insideV, pBand2HInsideVBorder);
+ insertBorderLine(pTableStyle->getBand2H(), XML_insideH, pBand2HInsideHBorder);
+
+ insertBorderLine(pTableStyle->getBand2V(), XML_left, pBand2VLeftBorder);
+ insertBorderLine(pTableStyle->getBand2V(), XML_right, pBand2VRightBorder);
+ insertBorderLine(pTableStyle->getBand2V(), XML_top, pBand2VTopBorder);
+ insertBorderLine(pTableStyle->getBand2V(), XML_bottom, pBand2VBottomBorder);
+ insertBorderLine(pTableStyle->getBand2V(), XML_insideV, pBand2VInsideVBorder);
+ insertBorderLine(pTableStyle->getBand2V(), XML_insideH, pBand2VInsideHBorder);
+
+ return pTableStyle;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
new file mode 100644
index 000000000..ee48a8358
--- /dev/null
+++ b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablebackgroundstylecontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TableBackgroundStyleContext::TableBackgroundStyleContext( ContextHandler2Helper const & rParent, TableStyle& rTableStyle )
+: ContextHandler2( rParent )
+, mrTableStyle( rTableStyle )
+{
+}
+
+TableBackgroundStyleContext::~TableBackgroundStyleContext()
+{
+}
+
+ContextHandlerRef
+TableBackgroundStyleContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ // EG_ThemeableFillStyle (choice)
+ case A_TOKEN( fill ): // CT_FillProperties
+ {
+ std::shared_ptr< FillProperties >& rxFillProperties = mrTableStyle.getBackgroundFillProperties();
+ rxFillProperties = std::make_shared<FillProperties>();
+ return new FillPropertiesContext( *this, *rxFillProperties );
+ }
+ case A_TOKEN( fillRef ): // CT_StyleMatrixReference
+ {
+ ShapeStyleRef& rStyleRef = mrTableStyle.getBackgroundFillStyleRef();
+ rStyleRef.mnThemedIdx = rAttribs.getInteger( XML_idx, 0 );
+ return new ColorContext( *this, rStyleRef.maPhClr );
+ }
+ // EG_ThemeableEffectStyle (choice)
+ case A_TOKEN( effect ): // CT_EffectProperties
+ break;
+ case A_TOKEN( effectRef ): // CT_StyleMatrixReference
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
new file mode 100644
index 000000000..19347db21
--- /dev/null
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -0,0 +1,578 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablecell.hxx>
+#include <drawingml/table/tableproperties.hxx>
+#include <basegfx/color/bcolor.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/color.hxx>
+#include <com/sun/star/table/BorderLineStyle.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using ::com::sun::star::table::BorderLine2;
+
+namespace oox::drawingml::table {
+
+TableCell::TableCell()
+: mpTextBody( std::make_shared<TextBody>() )
+, mnRowSpan ( 1 )
+, mnGridSpan( 1 )
+, mbhMerge( false )
+, mbvMerge( false )
+, mnMarL( 91440 )
+, mnMarR( 91440 )
+, mnMarT( 45720 )
+, mnMarB( 45720 )
+, mnVertToken( XML_horz )
+, mnAnchorToken( XML_t )
+, mbAnchorCtr( false )
+, mnHorzOverflowToken( XML_clip )
+{
+}
+
+static void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
+ Reference< XPropertySet > const & rxPropSet, oox::drawingml::LineProperties const & rLineProperties,
+ sal_Int32 nPropId )
+{
+ BorderLine2 aBorderLine;
+ if ( rLineProperties.maLineFill.moFillType.differsFrom( XML_noFill ))
+ {
+ Color aColor = rLineProperties.maLineFill.getBestSolidColor();
+ aBorderLine.Color = sal_Int32(aColor.getColor( rFilterBase.getGraphicHelper() ));
+ aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+ aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+ aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
+ aBorderLine.LineDistance = 0;
+ }
+ else
+ {
+ aBorderLine.Color = sal_Int32( COL_AUTO );
+ aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+ aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+ aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
+ aBorderLine.LineDistance = 0;
+ }
+
+ if ( rLineProperties.moPresetDash.has() )
+ {
+ switch ( rLineProperties.moPresetDash.get() )
+ {
+ case XML_dot:
+ case XML_sysDot:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DOTTED;
+ break;
+ case XML_dash:
+ case XML_lgDash:
+ case XML_sysDash:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
+ break;
+ case XML_dashDot:
+ case XML_lgDashDot:
+ case XML_sysDashDot:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DASH_DOT;
+ break;
+ case XML_lgDashDotDot:
+ case XML_sysDashDotDot:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DASH_DOT_DOT;
+ break;
+ case XML_solid:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::SOLID;
+ break;
+ default:
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
+ break;
+ }
+ }
+ else if ( !rLineProperties.maCustomDash.empty() )
+ {
+ aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
+ }
+ else
+ {
+ aBorderLine.LineStyle = ::table::BorderLineStyle::NONE;
+ }
+
+ PropertySet aPropSet( rxPropSet );
+ aPropSet.setProperty( nPropId, aBorderLine );
+}
+
+static void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart& rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties& rLineProperties )
+{
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rPartLineBorders( rTableStylePart.getLineBorders() );
+ ::oox::drawingml::ShapeStyleRef& rLineStyleRef = rTableStylePart.getStyleRefs()[ nLineType ];
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >::const_iterator aIter( rPartLineBorders.find( nLineType ) );
+ if ( ( aIter != rPartLineBorders.end() ) && aIter->second )
+ rLineProperties.assignUsed( *aIter->second );
+ else if (rLineStyleRef.mnThemedIdx != 0)
+ {
+ if (const Theme* pTheme = rFilterBase.getCurrentTheme())
+ {
+ rLineProperties.assignUsed( *pTheme->getLineStyle(rLineStyleRef.mnThemedIdx) );
+ ::Color nPhClr = rLineStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() );
+ rLineProperties.maLineFill.maFillColor.setSrgbClr( nPhClr );
+ }
+ }
+}
+
+static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
+ oox::drawingml::FillProperties& rFillProperties,
+ TextCharacterProperties& aTextCharProps,
+ oox::drawingml::LineProperties& rLeftBorder,
+ oox::drawingml::LineProperties& rRightBorder,
+ oox::drawingml::LineProperties& rTopBorder,
+ oox::drawingml::LineProperties& rBottomBorder,
+ oox::drawingml::LineProperties& rInsideHBorder,
+ oox::drawingml::LineProperties& rInsideVBorder,
+ oox::drawingml::LineProperties& rTopLeftToBottomRightBorder,
+ oox::drawingml::LineProperties& rBottomLeftToTopRightBorder,
+ TableStylePart& rTableStylePart,
+ bool bIsWholeTable = false,
+ sal_Int32 nCol = 0,
+ sal_Int32 nMaxCol = 0,
+ sal_Int32 nRow = 0,
+ sal_Int32 nMaxRow = 0)
+{
+ ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() );
+ if ( rPartFillPropertiesPtr )
+ rFillProperties.assignUsed( *rPartFillPropertiesPtr );
+ else
+ {
+ ::oox::drawingml::ShapeStyleRef& rFillStyleRef = rTableStylePart.getStyleRefs()[ XML_fillRef ];
+ const Theme* pTheme = rFilterBase.getCurrentTheme();
+ if (pTheme && rFillStyleRef.mnThemedIdx != 0 )
+ {
+ rFillProperties.assignUsed( *pTheme->getFillStyle( rFillStyleRef.mnThemedIdx ) );
+ ::Color nPhClr = rFillStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() );
+ rFillProperties.maFillColor.setSrgbClr( nPhClr );
+ }
+ }
+
+ // Left, right, top and bottom side of the whole table should be mean outer frame of the whole table.
+ // Without this check it means left top right and bottom of whole cells of whole table.
+ if (bIsWholeTable)
+ {
+ if (nCol == 0)
+ applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
+ if (nCol == nMaxCol)
+ applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
+ if (nRow == 0)
+ applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
+ if (nRow == nMaxRow)
+ applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder );
+
+ applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_insideV, rInsideVBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_tl2br, rTopLeftToBottomRightBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, rBottomLeftToTopRightBorder );
+ }
+ else
+ {
+ applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_tl2br, rTopLeftToBottomRightBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, rBottomLeftToTopRightBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder );
+ applyBorder( rFilterBase, rTableStylePart, XML_insideV, rInsideVBorder );
+ }
+
+ aTextCharProps.maLatinFont = rTableStylePart.getLatinFont();
+ aTextCharProps.maAsianFont = rTableStylePart.getAsianFont();
+ aTextCharProps.maComplexFont = rTableStylePart.getComplexFont();
+ aTextCharProps.maSymbolFont = rTableStylePart.getSymbolFont();
+ if ( rTableStylePart.getTextColor().isUsed() )
+ {
+ aTextCharProps.maFillProperties.maFillColor = rTableStylePart.getTextColor();
+ aTextCharProps.maFillProperties.moFillType.set(XML_solidFill);
+ }
+ if( rTableStylePart.getTextBoldStyle() )
+ aTextCharProps.moBold = *rTableStylePart.getTextBoldStyle();
+ if( rTableStylePart.getTextItalicStyle() )
+ aTextCharProps.moItalic = *rTableStylePart.getTextItalicStyle();
+}
+
+static void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell )
+{
+ Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( "TextRightDistance", Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( "TextLeftDistance", Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( "TextLowerDistance", Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) );
+
+ drawing::TextVerticalAdjust eVA;
+ switch( rTableCell.getAnchorToken() )
+ {
+ case XML_ctr: eVA = drawing::TextVerticalAdjust_CENTER; break;
+ case XML_b: eVA = drawing::TextVerticalAdjust_BOTTOM; break;
+ case XML_just:
+ case XML_dist:
+ default:
+ case XML_t: eVA = drawing::TextVerticalAdjust_TOP; break;
+ }
+ xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
+}
+
+void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
+ const css::uno::Reference < css::table::XCell >& rxCell, const TableProperties& rTableProperties,
+ const TableStyle& rTableStyle, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow )
+{
+ TableStyle& rTable( const_cast< TableStyle& >( rTableStyle ) );
+ TableProperties& rProperties( const_cast< TableProperties& >( rTableProperties ) );
+
+ Reference< text::XText > xText( rxCell, UNO_QUERY_THROW );
+ Reference< text::XTextCursor > xAt = xText->createTextCursor();
+
+ applyTableCellProperties( rxCell, *this );
+ TextCharacterProperties aTextStyleProps;
+ xAt->gotoStart( true );
+ xAt->gotoEnd( true );
+
+ Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
+ oox::drawingml::FillProperties aFillProperties;
+ oox::drawingml::LineProperties aLinePropertiesLeft;
+ oox::drawingml::LineProperties aLinePropertiesRight;
+ oox::drawingml::LineProperties aLinePropertiesTop;
+ oox::drawingml::LineProperties aLinePropertiesBottom;
+ oox::drawingml::LineProperties aLinePropertiesInsideH;
+ oox::drawingml::LineProperties aLinePropertiesInsideV;
+ oox::drawingml::LineProperties aLinePropertiesTopLeftToBottomRight;
+ oox::drawingml::LineProperties aLinePropertiesBottomLeftToTopRight;
+
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getWholeTbl(),
+ true,
+ nColumn,
+ nMaxColumn,
+ nRow,
+ nMaxRow );
+
+ if ( rProperties.isFirstRow() && ( nRow == 0 ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getFirstRow() );
+ }
+ if ( rProperties.isLastRow() && ( nRow == nMaxRow ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getLastRow() );
+ }
+ if ( rProperties.isFirstCol() && ( nColumn == 0 ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getFirstCol() );
+ }
+ if ( rProperties.isLastCol() && ( nColumn == nMaxColumn ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getLastCol() );
+ }
+ if ( rProperties.isBandRow() )
+ {
+ if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) &&
+ ( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) &&
+ ( !rProperties.isFirstCol() || ( nColumn != 0 ) ) &&
+ ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) )
+ {
+ sal_Int32 nBand = nRow;
+ if ( rProperties.isFirstRow() )
+ nBand++;
+ if ( nBand & 1 )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getBand2H() );
+ }
+ else
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getBand1H() );
+ }
+ }
+ }
+ if ( ( nRow == 0 ) && ( nColumn == 0 ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getNwCell() );
+ }
+ if ( ( nRow == nMaxRow ) && ( nColumn == 0 ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getSwCell() );
+ }
+ if ( ( nRow == 0 ) && ( nColumn == nMaxColumn ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getNeCell() );
+ }
+ if ( ( nRow == nMaxRow ) && ( nColumn == nMaxColumn ) )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getSeCell() );
+ }
+ if ( rProperties.isBandCol() )
+ {
+ if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) &&
+ ( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) &&
+ ( !rProperties.isFirstCol() || ( nColumn != 0 ) ) &&
+ ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) )
+ {
+ sal_Int32 nBand = nColumn;
+ if ( rProperties.isFirstCol() )
+ nBand++;
+ if ( nBand & 1 )
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getBand2V() );
+ }
+ else
+ {
+ applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
+ aLinePropertiesLeft,
+ aLinePropertiesRight,
+ aLinePropertiesTop,
+ aLinePropertiesBottom,
+ aLinePropertiesInsideH,
+ aLinePropertiesInsideV,
+ aLinePropertiesTopLeftToBottomRight,
+ aLinePropertiesBottomLeftToTopRight,
+ rTable.getBand1V() );
+ }
+ }
+ }
+ aLinePropertiesLeft.assignUsed( maLinePropertiesLeft );
+ aLinePropertiesRight.assignUsed( maLinePropertiesRight );
+ aLinePropertiesTop.assignUsed( maLinePropertiesTop );
+ aLinePropertiesBottom.assignUsed( maLinePropertiesBottom );
+ aLinePropertiesInsideH.assignUsed( maLinePropertiesInsideH );
+ aLinePropertiesInsideV.assignUsed( maLinePropertiesInsideV );
+ aLinePropertiesTopLeftToBottomRight.assignUsed( maLinePropertiesTopLeftToBottomRight );
+ aLinePropertiesBottomLeftToTopRight.assignUsed( maLinePropertiesBottomLeftToTopRight );
+
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesLeft, PROP_LeftBorder );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesRight, PROP_RightBorder );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTop, PROP_TopBorder );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesBottom, PROP_BottomBorder );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTopLeftToBottomRight, PROP_DiagonalTLBR );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesBottomLeftToTopRight, PROP_DiagonalBLTR );
+
+ // Convert insideH to Top and Bottom, InsideV to Left and Right. Exclude the outer borders.
+ if(nRow != 0)
+ {
+ aLinePropertiesInsideH.assignUsed( aLinePropertiesTop );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideH, PROP_TopBorder );
+ }
+ if(nRow != nMaxRow)
+ {
+ aLinePropertiesInsideH.assignUsed( aLinePropertiesBottom );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideH, PROP_BottomBorder );
+ }
+ if(nColumn != 0)
+ {
+ aLinePropertiesInsideV.assignUsed( aLinePropertiesLeft );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideV, PROP_LeftBorder );
+ }
+ if(nColumn != nMaxColumn)
+ {
+ aLinePropertiesInsideV.assignUsed( aLinePropertiesRight );
+ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesInsideV, PROP_RightBorder );
+ }
+
+ if (rProperties.getBgColor().isUsed() && !maFillProperties.maFillColor.isUsed() && maFillProperties.moFillType.get() == XML_noFill)
+ {
+ maFillProperties.moFillType = XML_solidFill;
+ maFillProperties.maFillColor = rProperties.getBgColor();
+ }
+
+ aFillProperties.assignUsed( maFillProperties );
+ ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() );
+
+ Color aBgColor;
+ ::Color nPhClr = API_RGB_TRANSPARENT;
+ std::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() );
+ ::oox::drawingml::ShapeStyleRef& rBackgroundFillStyle( rTable.getBackgroundFillStyleRef() );
+ if (rBackgroundFillPropertiesPtr)
+ aBgColor = rBackgroundFillPropertiesPtr->getBestSolidColor();
+ else if (rBackgroundFillStyle.mnThemedIdx != 0)
+ {
+ if (const Theme* pTheme = rFilterBase.getCurrentTheme())
+ {
+ aBgColor = pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx)->getBestSolidColor();
+ nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
+ }
+ }
+ if (aBgColor.isUsed())
+ {
+ const Color& rCellColor = aFillProperties.getBestSolidColor();
+ const double fTransparency = rCellColor.isUsed() ? 0.01 * rCellColor.getTransparency() : 1.0;
+ ::Color nBgColor( aBgColor.getColor(rFilterBase.getGraphicHelper(), nPhClr) );
+ ::Color nCellColor( rCellColor.getColor(rFilterBase.getGraphicHelper()) );
+ ::Color aResult( basegfx::interpolate(nBgColor.getBColor(), nCellColor.getBColor(), 1.0 - fTransparency) );
+ aFillProperties.maFillColor.clearTransformations();
+ aFillProperties.maFillColor.setSrgbClr(sal_Int32(aResult.GetRGBColor()));
+ aFillProperties.moFillType.set(XML_solidFill);
+ }
+ if (!aFillProperties.moFillType.has())
+ aFillProperties.moFillType.set(XML_noFill);
+
+ // TODO: phClr?
+ aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
+ PropertySet aPropSet{xPropSet};
+ aPropSet.setProperties( aPropMap );
+
+ if ( getVertToken() == XML_eaVert )
+ {
+ xPropSet->setPropertyValue("TextWritingMode", Any(css::text::WritingMode_TB_RL));
+ }
+
+ getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, pMasterTextListStyle );
+
+ // tdf#144092 For empty cells push character styles & endParaRPr to the Cell's properties
+ const TextParagraphVector& rParagraphs = getTextBody()->getParagraphs();
+ if (rParagraphs.size() == 1)
+ {
+ const auto pFirstParagraph = rParagraphs.at(0);
+ if (pFirstParagraph->getRuns().empty())
+ {
+ TextCharacterProperties aTextCharacterProps{ pFirstParagraph->getCharacterStyle(
+ aTextStyleProps, *pMasterTextListStyle, getTextBody()->getTextListStyle()) };
+ aTextCharacterProps.assignUsed(pFirstParagraph->getEndProperties());
+ aTextCharacterProps.pushToPropSet(aPropSet, rFilterBase);
+ }
+ }
+
+ if (getVertToken() == XML_vert)
+ xPropSet->setPropertyValue("RotateAngle", Any(short(27000)));
+ else if (getVertToken() == XML_vert270)
+ xPropSet->setPropertyValue("RotateAngle", Any(short(9000)));
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablecellcontext.cxx b/oox/source/drawingml/table/tablecellcontext.cxx
new file mode 100644
index 000000000..dde824fb7
--- /dev/null
+++ b/oox/source/drawingml/table/tablecellcontext.cxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablecellcontext.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/linepropertiescontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+
+namespace oox::drawingml::table {
+
+TableCellContext::TableCellContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, TableCell& rTableCell )
+: ContextHandler2( rParent )
+, mrTableCell( rTableCell )
+{
+ if ( rAttribs.hasAttribute( XML_rowSpan ) )
+ mrTableCell.setRowSpan( rAttribs.getString( XML_rowSpan ).get().toInt32() );
+ if ( rAttribs.hasAttribute( XML_gridSpan ) )
+ mrTableCell.setGridSpan( rAttribs.getString( XML_gridSpan ).get().toInt32() );
+
+ mrTableCell.sethMerge( rAttribs.getBool( XML_hMerge, false ) );
+ mrTableCell.setvMerge( rAttribs.getBool( XML_vMerge, false ) );
+}
+
+TableCellContext::~TableCellContext()
+{
+}
+
+ContextHandlerRef
+TableCellContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( txBody ): // CT_TextBody
+ {
+ oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>();
+ mrTableCell.setTextBody( xTextBody );
+ return new oox::drawingml::TextBodyContext( *this, *xTextBody );
+ }
+
+ case A_TOKEN( tcPr ): // CT_TableCellProperties
+ {
+ mrTableCell.setLeftMargin( rAttribs.getInteger( XML_marL, 91440 ) );
+ mrTableCell.setRightMargin( rAttribs.getInteger( XML_marR, 91440 ) );
+ mrTableCell.setTopMargin( rAttribs.getInteger( XML_marT, 45720 ) );
+ mrTableCell.setBottomMargin( rAttribs.getInteger( XML_marB, 45720 ) );
+ mrTableCell.setVertToken( rAttribs.getToken( XML_vert, XML_horz ) ); // ST_TextVerticalType
+ mrTableCell.setAnchorToken( rAttribs.getToken( XML_anchor, XML_t ) ); // ST_TextAnchoringType
+ mrTableCell.setAnchorCtr( rAttribs.getBool( XML_anchorCtr, false ) );
+ mrTableCell.setHorzOverflowToken( rAttribs.getToken( XML_horzOverflow, XML_clip ) ); // ST_TextHorzOverflowType
+ }
+ break;
+ case A_TOKEN( lnL ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesLeft );
+ case A_TOKEN( lnR ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesRight );
+ case A_TOKEN( lnT ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesTop );
+ case A_TOKEN( lnB ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesBottom );
+ case A_TOKEN( lnTlToBr ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesTopLeftToBottomRight );
+ case A_TOKEN( lnBlToTr ):
+ return new oox::drawingml::LinePropertiesContext( *this, rAttribs, mrTableCell.maLinePropertiesBottomLeftToTopRight );
+ case A_TOKEN( cell3D ): // CT_Cell3D
+ break;
+
+ case A_TOKEN( extLst ): // CT_OfficeArtExtensionList
+ break;
+
+ default:
+ return FillPropertiesContext::createFillContext( *this, aElementToken, rAttribs, mrTableCell.maFillProperties );
+
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablecontext.cxx b/oox/source/drawingml/table/tablecontext.cxx
new file mode 100644
index 000000000..84e80dccd
--- /dev/null
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <drawingml/guidcontext.hxx>
+#include <drawingml/table/tablecontext.hxx>
+#include <drawingml/table/tableproperties.hxx>
+#include <drawingml/table/tablestylecontext.hxx>
+#include <drawingml/table/tablerowcontext.hxx>
+#include <drawingml/effectpropertiescontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+
+namespace oox::drawingml::table {
+
+TableContext::TableContext( ContextHandler2Helper const & rParent, const ShapePtr& pShapePtr )
+: ShapeContext( rParent, ShapePtr(), pShapePtr )
+, mrTableProperties( *pShapePtr->getTableProperties() )
+{
+ pShapePtr->setTableType();
+}
+
+TableContext::~TableContext()
+{
+}
+
+ContextHandlerRef
+TableContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tblPr ): // CT_TableProperties
+ {
+ mrTableProperties.setFirstRow( rAttribs.getBool( XML_firstRow, false ) );
+ mrTableProperties.setFirstCol( rAttribs.getBool( XML_firstCol, false ) );
+ mrTableProperties.setLastRow( rAttribs.getBool( XML_lastRow, false ) );
+ mrTableProperties.setLastCol( rAttribs.getBool( XML_lastCol, false ) );
+ mrTableProperties.setBandRow( rAttribs.getBool( XML_bandRow, false ) );
+ mrTableProperties.setBandCol( rAttribs.getBool( XML_bandCol, false ) );
+ }
+ break;
+ case A_TOKEN(solidFill):
+ return new ColorContext(*this, mrTableProperties.getBgColor());
+ case A_TOKEN( tableStyle ): // CT_TableStyle
+ {
+ std::shared_ptr< TableStyle >& rTableStyle = mrTableProperties.getTableStyle();
+ rTableStyle = std::make_shared<TableStyle>();
+ return new TableStyleContext( *this, rAttribs, *rTableStyle );
+ }
+ case A_TOKEN( effectLst ): // CT_EffectList
+ {
+ return new EffectPropertiesContext(*this, mpShapePtr->getEffectProperties());
+ }
+ case A_TOKEN( tableStyleId ): // ST_Guid
+ return new oox::drawingml::GuidContext( *this, mrTableProperties.getStyleId() );
+
+ case A_TOKEN( tblGrid ): // CT_TableGrid
+ break;
+ case A_TOKEN( gridCol ): // CT_TableCol
+ {
+ std::vector< sal_Int32 >& rvTableGrid( mrTableProperties.getTableGrid() );
+ rvTableGrid.push_back( rAttribs.getString( XML_w ).get().toInt32() );
+ }
+ break;
+ case A_TOKEN( tr ): // CT_TableRow
+ {
+ std::vector< TableRow >& rvTableRows( mrTableProperties.getTableRows() );
+ rvTableRows.emplace_back();
+ return new TableRowContext( *this, rAttribs, rvTableRows.back() );
+ }
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablepartstylecontext.cxx b/oox/source/drawingml/table/tablepartstylecontext.cxx
new file mode 100644
index 000000000..2d9717322
--- /dev/null
+++ b/oox/source/drawingml/table/tablepartstylecontext.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablepartstylecontext.hxx>
+#include <drawingml/table/tablestyletextstylecontext.hxx>
+#include <drawingml/table/tablestylecellstylecontext.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TablePartStyleContext::TablePartStyleContext( ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart )
+: ContextHandler2( rParent )
+, mrTableStylePart( rTableStylePart )
+{
+}
+
+TablePartStyleContext::~TablePartStyleContext()
+{
+}
+
+// CT_TablePartStyle
+ContextHandlerRef
+TablePartStyleContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tcTxStyle ): // CT_TableStyleTextStyle
+ return new TableStyleTextStyleContext( *this, rAttribs, mrTableStylePart );
+ case A_TOKEN( tcStyle ): // CT_TableStyleCellStyle
+ return new TableStyleCellStyleContext( *this, mrTableStylePart );
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
new file mode 100644
index 000000000..38f655af1
--- /dev/null
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -0,0 +1,216 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tableproperties.hxx>
+#include <drawingml/table/tablestylelist.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <com/sun/star/table/XTable.hpp>
+#include <com/sun/star/table/XMergeableCellRange.hpp>
+#include <oox/core/xmlfilterbase.hxx>
+#include "predefined-table-styles.cxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::table;
+
+namespace oox::drawingml::table {
+
+TableProperties::TableProperties()
+: mbFirstRow( false )
+, mbFirstCol( false )
+, mbLastRow( false )
+, mbLastCol( false )
+, mbBandRow( false )
+, mbBandCol( false )
+{
+ maBgColor.setUnused();
+}
+
+static void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, const std::vector< TableRow >& rvTableRows )
+{
+ if ( rvTableRows.size() > 1 )
+ xTableRows->insertByIndex( 0, rvTableRows.size() - 1 );
+ std::vector< TableRow >::const_iterator aTableRowIter( rvTableRows.begin() );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xTableRows, UNO_QUERY_THROW );
+ sal_Int32 nCols = std::min<sal_Int32>(xIndexAccess->getCount(), rvTableRows.size());
+ for (sal_Int32 n = 0; n < nCols; ++n)
+ {
+ Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( "Height", Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) );
+ ++aTableRowIter;
+ }
+}
+
+static void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const std::vector< sal_Int32 >& rvTableGrid )
+{
+ if ( rvTableGrid.size() > 1 )
+ xTableColumns->insertByIndex( 0, rvTableGrid.size() - 1 );
+ std::vector< sal_Int32 >::const_iterator aTableGridIter( rvTableGrid.begin() );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xTableColumns, UNO_QUERY_THROW );
+ sal_Int32 nCols = std::min<sal_Int32>(xIndexAccess->getCount(), rvTableGrid.size());
+ for (sal_Int32 n = 0; n < nCols; ++n)
+ {
+ Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( "Width", Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) );
+ }
+}
+
+static void MergeCells( const uno::Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
+{
+ if( xTable.is() ) try
+ {
+ Reference< XMergeableCellRange > xRange( xTable->createCursorByRange( xTable->getCellRangeByPosition( nCol, nRow,nCol + nColSpan - 1, nRow + nRowSpan - 1 ) ), UNO_QUERY_THROW );
+ if( xRange->isMergeable() )
+ xRange->merge();
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, std::unique_ptr<TableStyle>& rTableStyleToDelete )
+{
+ ::oox::core::XmlFilterBase& rBase( const_cast< ::oox::core::XmlFilterBase& >( rFilterBase ) );
+
+ TableStyle* pTableStyle = nullptr;
+ if ( mpTableStyle )
+ pTableStyle = &*mpTableStyle;
+ else if ( !getStyleId().isEmpty() && rBase.getTableStyles() )
+ {
+ const std::vector< TableStyle >& rTableStyles( rBase.getTableStyles()->getTableStyles() );
+ const OUString aStyleId( getStyleId() );
+
+ for (auto const& tableStyle : rTableStyles)
+ {
+ if ( const_cast< TableStyle& >(tableStyle).getStyleId() == aStyleId )
+ {
+ pTableStyle = &const_cast< TableStyle& >(tableStyle);
+ break; // we get the correct style
+ }
+ }
+ //if the pptx just has table style id, but no table style content, we will create the table style ourselves
+ if (!pTableStyle)
+ {
+ rTableStyleToDelete = CreateTableStyle(aStyleId);
+ pTableStyle = rTableStyleToDelete.get();
+ }
+ }
+
+ if ( !pTableStyle )
+ {
+ static TableStyle theDefaultTableStyle;
+ return theDefaultTableStyle;
+ }
+
+ return *pTableStyle;
+}
+
+void TableProperties::pushToPropSet(const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference<XPropertySet>& xPropSet,
+ const TextListStylePtr& pMasterTextListStyle)
+{
+ uno::Reference<XColumnRowRange> xColumnRowRange(xPropSet->getPropertyValue("Model"),
+ uno::UNO_QUERY_THROW);
+
+ CreateTableColumns(xColumnRowRange->getColumns(), mvTableGrid);
+ CreateTableRows(xColumnRowRange->getRows(), mvTableRows);
+
+ std::unique_ptr<TableStyle> xTableStyleToDelete;
+ const TableStyle& rTableStyle(getUsedTableStyle(rFilterBase, xTableStyleToDelete));
+ sal_Int32 nRow = 0;
+
+ for (auto& tableRow : mvTableRows)
+ {
+ sal_Int32 nColumn = 0;
+ sal_Int32 nColumnSize = tableRow.getTableCells().size();
+ sal_Int32 nRemovedColumn = 0;
+ sal_Int32 nRemovedRow = 0;
+
+ for (sal_Int32 nColIndex = 0; nColIndex < nColumnSize; nColIndex++)
+ {
+ TableCell& rTableCell(tableRow.getTableCells().at(nColIndex));
+
+ if (!rTableCell.getvMerge() && !rTableCell.gethMerge())
+ {
+ uno::Reference<XTable> xTable(xColumnRowRange, uno::UNO_QUERY_THROW);
+ bool bMerged = false;
+
+ if ((rTableCell.getRowSpan() > 1) || (rTableCell.getGridSpan() > 1))
+ {
+ MergeCells(xTable, nColumn, nRow, rTableCell.getGridSpan(),
+ rTableCell.getRowSpan());
+
+ if (rTableCell.getGridSpan() > 1)
+ {
+ nRemovedColumn = (rTableCell.getGridSpan() - 1);
+ // MergeCells removes columns. Our loop does not know about those
+ // removed columns and we skip handling those removed columns.
+ nColIndex += nRemovedColumn;
+ // It will adjust new column number after push current column's
+ // props with pushToXCell.
+ bMerged = true;
+ }
+
+ if (rTableCell.getRowSpan() > 1)
+ nRemovedRow = (rTableCell.getRowSpan() - 1);
+ }
+
+ Reference<XCellRange> xCellRange(xTable, UNO_QUERY_THROW);
+ Reference<XCell> xCell;
+
+ if (nRemovedColumn)
+ {
+ try
+ {
+ xCell = xCellRange->getCellByPosition(nColumn, nRow);
+ }
+ // Exception can come from TableModel::getCellByPosition when a column
+ // is removed while merging columns. So adjust again here.
+ catch (Exception&)
+ {
+ xCell = xCellRange->getCellByPosition(nColumn - nRemovedColumn, nRow);
+ }
+ }
+ else
+ xCell = xCellRange->getCellByPosition(nColumn, nRow);
+
+
+ sal_Int32 nMaxCol = tableRow.getTableCells().size() - nRemovedColumn - 1;
+ sal_Int32 nMaxRow = mvTableRows.size() - nRemovedRow - 1;
+
+ rTableCell.pushToXCell(rFilterBase, pMasterTextListStyle, xCell, *this, rTableStyle,
+ nColumn, nMaxCol, nRow, nMaxRow);
+
+ if (bMerged)
+ nColumn += nRemovedColumn;
+
+ nRemovedRow = 0;
+ }
+ ++nColumn;
+ }
+ ++nRow;
+ }
+
+ xTableStyleToDelete.reset();
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablerow.cxx b/oox/source/drawingml/table/tablerow.cxx
new file mode 100644
index 000000000..3284c7c84
--- /dev/null
+++ b/oox/source/drawingml/table/tablerow.cxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablerow.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+namespace oox::drawingml::table
+{
+TableRow::TableRow()
+ : mnHeight(0)
+{
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablerowcontext.cxx b/oox/source/drawingml/table/tablerowcontext.cxx
new file mode 100644
index 000000000..aafd13b00
--- /dev/null
+++ b/oox/source/drawingml/table/tablerowcontext.cxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablerowcontext.hxx>
+#include <drawingml/table/tablecellcontext.hxx>
+#include <drawingml/table/tablerow.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+
+namespace oox::drawingml::table {
+
+TableRowContext::TableRowContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, TableRow& rTableRow )
+: ContextHandler2( rParent )
+, mrTableRow( rTableRow )
+{
+ rTableRow.setHeight( rAttribs.getString( XML_h ).get().toInt32() );
+}
+
+TableRowContext::~TableRowContext()
+{
+}
+
+ContextHandlerRef
+TableRowContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tc ): // CT_TableCell
+ {
+ std::vector< TableCell >& rvTableCells = mrTableRow.getTableCells();
+ rvTableCells.emplace_back();
+ return new TableCellContext( *this, rAttribs, rvTableCells.back() );
+ }
+ case A_TOKEN( extLst ): // CT_OfficeArtExtensionList
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestyle.cxx b/oox/source/drawingml/table/tablestyle.cxx
new file mode 100644
index 000000000..e0ae76e9a
--- /dev/null
+++ b/oox/source/drawingml/table/tablestyle.cxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table
+{
+TableStyle::TableStyle() {}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylecellstylecontext.cxx b/oox/source/drawingml/table/tablestylecellstylecontext.cxx
new file mode 100644
index 000000000..a3c86b238
--- /dev/null
+++ b/oox/source/drawingml/table/tablestylecellstylecontext.cxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablestylecellstylecontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/linepropertiescontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TableStyleCellStyleContext::TableStyleCellStyleContext( ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart )
+: ContextHandler2( rParent )
+, mrTableStylePart( rTableStylePart )
+, mnLineType( XML_none )
+{
+}
+
+TableStyleCellStyleContext::~TableStyleCellStyleContext()
+{
+}
+
+// CT_TableStyleCellStyle
+ContextHandlerRef
+TableStyleCellStyleContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tcBdr ): // CT_TableCellBorderStyle
+ break;
+ case A_TOKEN( left ): // CT_ThemeableLineStyle
+ case A_TOKEN( right ):
+ case A_TOKEN( top ):
+ case A_TOKEN( bottom ):
+ case A_TOKEN( insideH ):
+ case A_TOKEN( insideV ):
+ case A_TOKEN( tl2br ):
+ case A_TOKEN( tr2bl ):
+ mnLineType = getBaseToken( aElementToken );
+ break;
+
+ case A_TOKEN( ln ):
+ {
+ if ( mnLineType != XML_none )
+ {
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rLineBorders = mrTableStylePart.getLineBorders();
+ ::oox::drawingml::LinePropertiesPtr pLineProperties = std::make_shared<oox::drawingml::LineProperties>();
+ rLineBorders[ mnLineType ] = pLineProperties;
+ return new LinePropertiesContext( *this, rAttribs, *pLineProperties );
+ }
+ }
+ break;
+ case A_TOKEN( lnRef ):
+ {
+ if ( mnLineType != XML_none )
+ {
+ ShapeStyleRef& rLineStyleRef = mrTableStylePart.getStyleRefs()[ mnLineType ];
+ rLineStyleRef.mnThemedIdx = rAttribs.getInteger( XML_idx, 0 );
+ return new ColorContext( *this, rLineStyleRef.maPhClr );
+ }
+ }
+ break;
+
+ // EG_ThemeableFillStyle (choice)
+ case A_TOKEN( fill ): // CT_FillProperties
+ {
+ FillPropertiesPtr& rxFillProperties = mrTableStylePart.getFillProperties();
+ rxFillProperties = std::make_shared<FillProperties>();
+ return new FillPropertiesContext( *this, *rxFillProperties );
+ }
+ case A_TOKEN( fillRef ): // CT_StyleMatrixReference
+ {
+ ShapeStyleRef& rStyleRef = mrTableStylePart.getStyleRefs()[ XML_fillRef ];
+ rStyleRef.mnThemedIdx = rAttribs.getInteger( XML_idx, 0 );
+ return new ColorContext( *this, rStyleRef.maPhClr );
+ }
+ case A_TOKEN( cell3D ): // CT_Cell3D
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylecontext.cxx b/oox/source/drawingml/table/tablestylecontext.cxx
new file mode 100644
index 000000000..7dc4ce468
--- /dev/null
+++ b/oox/source/drawingml/table/tablestylecontext.cxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablestylecontext.hxx>
+#include <drawingml/table/tablebackgroundstylecontext.hxx>
+#include <drawingml/table/tablepartstylecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TableStyleContext::TableStyleContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, TableStyle& rTableStyle )
+: ContextHandler2( rParent )
+, mrTableStyle( rTableStyle )
+{
+ mrTableStyle.getStyleId() = rAttribs.getString( XML_styleId ).get();
+ mrTableStyle.getStyleName() = rAttribs.getString( XML_styleName ).get();
+}
+
+TableStyleContext::~TableStyleContext()
+{
+}
+
+ContextHandlerRef
+TableStyleContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& /* rAttribs */ )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tblBg ): // CT_TableBackgroundStyle
+ return new TableBackgroundStyleContext( *this, mrTableStyle );
+ case A_TOKEN( wholeTbl ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getWholeTbl() );
+ case A_TOKEN( band1H ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getBand1H() );
+ case A_TOKEN( band2H ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getBand2H() );
+ case A_TOKEN( band1V ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getBand1V() );
+ case A_TOKEN( band2V ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getBand2V() );
+ case A_TOKEN( lastCol ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getLastCol() );
+ case A_TOKEN( firstCol ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getFirstCol() );
+ case A_TOKEN( lastRow ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getLastRow() );
+ case A_TOKEN( seCell ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getSeCell() );
+ case A_TOKEN( swCell ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getSwCell() );
+ case A_TOKEN( firstRow ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getFirstRow() );
+ case A_TOKEN( neCell ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getNeCell() );
+ case A_TOKEN( nwCell ): // CT_TablePartStyle
+ return new TablePartStyleContext( *this, mrTableStyle.getNwCell() );
+ case A_TOKEN( extLst ): // CT_OfficeArtExtensionList
+ break;
+ }
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylelist.cxx b/oox/source/drawingml/table/tablestylelist.cxx
new file mode 100644
index 000000000..57a0ba489
--- /dev/null
+++ b/oox/source/drawingml/table/tablestylelist.cxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablestylelist.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table
+{
+TableStyleList::TableStyleList() {}
+
+TableStyleList::~TableStyleList() {}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx b/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
new file mode 100644
index 000000000..77dc42677
--- /dev/null
+++ b/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablestylelistfragmenthandler.hxx>
+#include <drawingml/table/tablestylecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TableStyleListFragmentHandler::TableStyleListFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, TableStyleList& rTableStyleList ):
+FragmentHandler2( rFilter, rFragmentPath ),
+mrTableStyleList( rTableStyleList )
+{
+}
+
+TableStyleListFragmentHandler::~TableStyleListFragmentHandler()
+{
+}
+
+// CT_TableStyleList
+ContextHandlerRef TableStyleListFragmentHandler::onCreateContext(
+ sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( tblStyleLst ): // CT_TableStyleList
+ mrTableStyleList.getDefaultStyleId() = rAttribs.getString( XML_def ).get();
+ break;
+ case A_TOKEN( tblStyle ): // CT_TableStyle
+ std::vector< TableStyle >& rTableStyles = mrTableStyleList.getTableStyles();
+ rTableStyles.emplace_back();
+ return new TableStyleContext( *this, rAttribs, rTableStyles.back() );
+ }
+ return this;
+}
+
+} // namespace oox::drawingml::table
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestylepart.cxx b/oox/source/drawingml/table/tablestylepart.cxx
new file mode 100644
index 000000000..729604f26
--- /dev/null
+++ b/oox/source/drawingml/table/tablestylepart.cxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/table/tablestylepart.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+namespace oox::drawingml::table
+{
+TableStylePart::TableStylePart() {}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/table/tablestyletextstylecontext.cxx b/oox/source/drawingml/table/tablestyletextstylecontext.cxx
new file mode 100644
index 000000000..d4206439f
--- /dev/null
+++ b/oox/source/drawingml/table/tablestyletextstylecontext.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <drawingml/table/tablestyletextstylecontext.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml::table {
+
+TableStyleTextStyleContext::TableStyleTextStyleContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, TableStylePart& rTableStylePart )
+: ContextHandler2( rParent )
+, mrTableStylePart( rTableStylePart )
+{
+ if( rAttribs.hasAttribute( XML_b ) ) {
+ sal_Int32 nB = rAttribs.getToken( XML_b, XML_def );
+ if ( nB == XML_on )
+ mrTableStylePart.getTextBoldStyle() = true;
+ else if ( nB == XML_off )
+ mrTableStylePart.getTextBoldStyle() = false;
+ }
+
+ if( rAttribs.hasAttribute( XML_i ) ) {
+ sal_Int32 nI = rAttribs.getToken( XML_i, XML_def );
+ if ( nI == XML_on )
+ mrTableStylePart.getTextItalicStyle() = true;
+ else if ( nI == XML_off )
+ mrTableStylePart.getTextItalicStyle() = false;
+ }
+}
+
+TableStyleTextStyleContext::~TableStyleTextStyleContext()
+{
+}
+
+// CT_TableStyleTextStyle
+ContextHandlerRef
+TableStyleTextStyleContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ // EG_ThemeableFontStyles (choice)
+ case A_TOKEN( font ): // CT_FontCollection
+ return this;
+ case A_TOKEN( ea ): // CT_TextFont
+ mrTableStylePart.getAsianFont().setAttributes( rAttribs );
+ return nullptr;
+ case A_TOKEN( cs ): // CT_TextFont
+ mrTableStylePart.getComplexFont().setAttributes( rAttribs );
+ return nullptr;
+ case A_TOKEN( sym ): // CT_TextFont
+ mrTableStylePart.getSymbolFont().setAttributes( rAttribs );
+ return nullptr;
+ case A_TOKEN( latin ): // CT_TextFont
+ mrTableStylePart.getLatinFont().setAttributes( rAttribs );
+ return nullptr;
+
+ case A_TOKEN( fontRef ): // CT_FontReference
+ {
+ ShapeStyleRef& rFontStyle = mrTableStylePart.getStyleRefs()[ XML_fontRef ];
+ rFontStyle.mnThemedIdx = rAttribs.getToken( XML_idx, XML_none );
+ return new ColorContext( *this, rFontStyle.maPhClr );
+ }
+
+ case A_TOKEN( extLst ): // CT_OfficeArtExtensionList
+ break;
+ }
+
+ return new ColorValueContext( *this, mrTableStylePart.getTextColor() );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
new file mode 100644
index 000000000..1be15c4f8
--- /dev/null
+++ b/oox/source/drawingml/textbody.cxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textbody.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <drawingml/textparagraph.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/token/properties.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+
+namespace oox::drawingml {
+
+TextBody::TextBody()
+ : mbHasNoninheritedBodyProperties( false )
+{
+}
+
+TextBody::TextBody( const TextBodyPtr& pBody )
+ : mbHasNoninheritedBodyProperties( false )
+{
+ if( pBody ) {
+ maTextProperties = pBody->maTextProperties;
+ maTextListStyle = pBody->maTextListStyle;
+ }
+}
+
+TextParagraph& TextBody::addParagraph()
+{
+ auto xPara = std::make_shared<TextParagraph>();
+ maParagraphs.push_back( xPara );
+ return *xPara;
+}
+
+void TextBody::insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference < XText > & xText,
+ const Reference < XTextCursor > & xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStylePtr& pMasterTextListStylePtr ) const
+{
+ TextListStyle aMasterTextStyle(*pMasterTextListStylePtr);
+
+ Reference<css::beans::XPropertySet> xPropertySet(xAt, UNO_QUERY);
+ float nCharHeight = xPropertySet->getPropertyValue("CharHeight").get<float>();
+ size_t nIndex = 0;
+ for (auto const& paragraph : maParagraphs)
+ {
+ paragraph->insertAt(rFilterBase, xText, xAt, rTextStyleProperties, aMasterTextStyle,
+ maTextListStyle, (nIndex == 0), nCharHeight, getTextProperties().mnFontScale);
+ ++nIndex;
+ }
+}
+
+bool TextBody::isEmpty() const
+{
+ if (maParagraphs.empty())
+ return true;
+ if ( maParagraphs.size() > 1 )
+ return false;
+
+ const TextRunVector& rRuns = maParagraphs[0]->getRuns();
+ if ( rRuns.empty() )
+ return true;
+ if ( rRuns.size() > 1 )
+ return false;
+
+ return rRuns[0]->getText().isEmpty();
+}
+
+OUString TextBody::toString() const
+{
+ if (!isEmpty())
+ {
+ const TextRunVector& rRuns = maParagraphs.front()->getRuns();
+ if(!rRuns.empty())
+ return rRuns.front()->getText();
+ }
+ return OUString();
+}
+
+bool TextBody::hasVisualRunProperties() const
+{
+ for ( auto& pTextParagraph : getParagraphs() )
+ {
+ if ( pTextParagraph->hasVisualRunProperties() )
+ return true;
+ }
+ return false;
+}
+
+bool TextBody::hasParagraphProperties() const
+{
+ for ( auto& pTextParagraph : getParagraphs() )
+ {
+ if ( pTextParagraph->hasProperties() )
+ return true;
+ }
+ return false;
+}
+
+void TextBody::ApplyStyleEmpty(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference < XText > & xText,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStylePtr& pMasterTextListStylePtr) const
+{
+ assert(isEmpty());
+
+ if (maParagraphs.empty())
+ return;
+
+ // Apply character properties
+ PropertySet aPropSet(xText);
+ TextCharacterProperties aTextCharacterProps(maParagraphs[0]->getCharacterStyle(
+ rTextStyleProperties, *pMasterTextListStylePtr, maTextListStyle));
+ aTextCharacterProps.pushToPropSet(aPropSet, rFilterBase);
+
+ // Apply paragraph properties
+ TextListStyle aCombinedTextStyle;
+ aCombinedTextStyle.apply(*pMasterTextListStylePtr);
+ aCombinedTextStyle.apply(maTextListStyle);
+
+ TextParagraphProperties* pTextParagraphStyle = maParagraphs[0]->getParagraphStyle(aCombinedTextStyle);
+ if (pTextParagraphStyle)
+ {
+ Reference< XPropertySet > xProps(xText, UNO_QUERY);
+ PropertyMap aioBulletList;
+ aioBulletList.setProperty< sal_Int32 >(PROP_LeftMargin, 0); // Init bullets left margin to 0 (no bullets).
+ float nCharHeight = xProps->getPropertyValue("CharHeight").get<float>();
+ TextParagraphProperties aParaProp;
+ aParaProp.apply(*pTextParagraphStyle);
+ aParaProp.pushToPropSet(&rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(),
+ true, nCharHeight, getTextProperties().mnFontScale, true);
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
new file mode 100644
index 000000000..b1e5241aa
--- /dev/null
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -0,0 +1,221 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/textbodypropertiescontext.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textparagraphpropertiescontext.hxx>
+#include <drawingml/textcharacterpropertiescontext.hxx>
+#include <drawingml/textliststylecontext.hxx>
+#include <drawingml/textfield.hxx>
+#include <drawingml/textfieldcontext.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <sax/fastattribs.hxx>
+#include "hyperlinkcontext.hxx"
+
+#include <oox/mathml/import.hxx>
+
+#include <sal/log.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+namespace {
+
+// CT_TextParagraph
+class TextParagraphContext : public ContextHandler2
+{
+public:
+ TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara );
+
+ virtual ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+protected:
+ TextParagraph& mrParagraph;
+};
+
+}
+
+TextParagraphContext::TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara )
+: ContextHandler2( rParent )
+, mrParagraph( rPara )
+{
+ mbEnableTrimSpace = false;
+}
+
+ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ // EG_TextRun
+ switch( aElementToken )
+ {
+ case A_TOKEN( r ): // "CT_RegularTextRun" Regular Text Run.
+ case W_TOKEN( r ):
+ {
+ TextRunPtr pRun = std::make_shared<TextRun>();
+ mrParagraph.addRun( pRun );
+ return new RegularTextRunContext( *this, pRun );
+ }
+ case A_TOKEN( br ): // "CT_TextLineBreak" Soft return line break (vertical tab).
+ {
+ TextRunPtr pRun = std::make_shared<TextRun>();
+ pRun->setLineBreak();
+ mrParagraph.addRun( pRun );
+ return new RegularTextRunContext( *this, pRun );
+ }
+ case A_TOKEN( fld ): // "CT_TextField" Text Field.
+ {
+ auto pField = std::make_shared<TextField>();
+ mrParagraph.addRun( pField );
+ return new TextFieldContext( *this, rAttribs, *pField );
+ }
+ case A_TOKEN( pPr ):
+ case W_TOKEN( pPr ):
+ mrParagraph.setHasProperties();
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
+ case A_TOKEN( endParaRPr ):
+ return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
+ case W_TOKEN( sdt ):
+ case W_TOKEN( sdtContent ):
+ return this;
+ case W_TOKEN( del ):
+ break;
+ case W_TOKEN( ins ):
+ return this;
+ case OOX_TOKEN(a14, m):
+ return CreateLazyMathBufferingContext(*this, mrParagraph);
+ case W_TOKEN( hyperlink ):
+ {
+ TextRunPtr pRun = std::make_shared<TextRun>();
+ mrParagraph.addRun(pRun);
+ // parse hyperlink attributes: use HyperLinkContext for that
+ rtl::Reference<HyperLinkContext> pContext(new HyperLinkContext(
+ *this, rAttribs, pRun->getTextCharacterProperties().maHyperlinkPropertyMap));
+ // but create text run context because HyperLinkContext can't process internal w:r, w:t, etc
+ return new RegularTextRunContext(*this, pRun);
+ }
+ default:
+ SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ }
+
+ return nullptr;
+}
+
+RegularTextRunContext::RegularTextRunContext( ContextHandler2Helper const & rParent, TextRunPtr const & pRunPtr )
+: ContextHandler2( rParent )
+, mpRunPtr( pRunPtr )
+, mbIsInText( false )
+{
+}
+
+void RegularTextRunContext::onEndElement( )
+{
+ switch( getCurrentElement() )
+ {
+ case A_TOKEN( t ):
+ case W_TOKEN( t ):
+ {
+ mbIsInText = false;
+ break;
+ }
+ case A_TOKEN( r ):
+ break;
+ }
+}
+
+void RegularTextRunContext::onCharacters( const OUString& aChars )
+{
+ if( mbIsInText )
+ {
+ mpRunPtr->getText() += aChars;
+ }
+}
+
+ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs)
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( rPr ): // "CT_TextCharPropertyBag" The text char properties of this text run.
+ case W_TOKEN( rPr ):
+ return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() );
+ case A_TOKEN( t ): // "xsd:string" minOccurs="1" The actual text string.
+ case W_TOKEN( t ):
+ mbIsInText = true;
+ break;
+ case W_TOKEN( drawing ):
+ break;
+ default:
+ SAL_WARN("oox", "RegularTextRunContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ break;
+ }
+
+ return this;
+}
+
+TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, TextBody& rTextBody )
+: ContextHandler2( rParent )
+, mrTextBody( rTextBody )
+{
+}
+
+TextBodyContext::TextBodyContext(ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr)
+ : TextBodyContext(rParent, *pShapePtr->getTextBody())
+{
+ mpShapePtr = pShapePtr;
+}
+
+ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( bodyPr ): // CT_TextBodyPropertyBag
+ if (sax_fastparser::castToFastAttributeList(rAttribs.getFastAttributeList()).getFastAttributeTokens().size() > 0)
+ mrTextBody.setHasNoninheritedBodyProperties();
+ if ( mpShapePtr )
+ return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr );
+ else
+ return new TextBodyPropertiesContext( *this, rAttribs, mrTextBody.getTextProperties() );
+ case A_TOKEN( lstStyle ): // CT_TextListStyle
+ return new TextListStyleContext( *this, mrTextBody.getTextListStyle() );
+ case A_TOKEN( p ): // CT_TextParagraph
+ case W_TOKEN( p ):
+ return new TextParagraphContext( *this, mrTextBody.addParagraph() );
+ case W_TOKEN( sdt ):
+ case W_TOKEN( sdtContent ):
+ return this;
+ case W_TOKEN( sdtPr ):
+ case W_TOKEN( sdtEndPr ):
+ break;
+ case W_TOKEN( tbl ):
+ break;
+ default:
+ SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ }
+
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
new file mode 100644
index 000000000..e44a103e3
--- /dev/null
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -0,0 +1,190 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <drawingml/textbodyproperties.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/gen.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdoashp.hxx>
+#include <svx/sdtditm.hxx>
+
+#include <array>
+
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::text;
+using namespace css;
+
+namespace oox::drawingml {
+
+TextBodyProperties::TextBodyProperties()
+ : mbAnchorCtr(false)
+ , meVA( TextVerticalAdjust_TOP )
+{
+}
+
+/* For Legacy purposes: TODO: Check if it is required at all! */
+void TextBodyProperties::pushVertSimulation()
+{
+ sal_Int32 tVert = moVert.get( XML_horz );
+ if( !(tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert) )
+ return;
+
+ // #160799# fake different vertical text modes by top-bottom writing mode
+ maPropertyMap.setProperty( PROP_TextWritingMode, WritingMode_TB_RL);
+
+ // workaround for TB_LR as using WritingMode2 doesn't work
+ if( meVA != TextVerticalAdjust_CENTER )
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
+ (tVert == XML_vert270) ? TextHorizontalAdjust_RIGHT : TextHorizontalAdjust_LEFT);
+ if( tVert == XML_vert270 )
+ maPropertyMap.setProperty( PROP_TextVerticalAdjust, TextVerticalAdjust_BOTTOM);
+ if( ( tVert == XML_vert && meVA == TextVerticalAdjust_TOP ) ||
+ ( tVert == XML_vert270 && meVA == TextVerticalAdjust_BOTTOM ) )
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_RIGHT);
+ else if( meVA == TextVerticalAdjust_CENTER )
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_CENTER);
+}
+
+/* Push text distances / insets, taking into consideration Shape Rotation */
+void TextBodyProperties::pushTextDistances(Size const& rTextAreaSize)
+{
+ for (auto & rValue : maTextDistanceValues)
+ rValue.reset();
+
+ sal_Int32 nOff = 0;
+ static constexpr const std::array<sal_Int32, 4> aProps {
+ PROP_TextLeftDistance,
+ PROP_TextUpperDistance,
+ PROP_TextRightDistance,
+ PROP_TextLowerDistance
+ };
+
+ switch (moRotation.get(0))
+ {
+ case 90*1*60000: nOff = 3; break;
+ case 90*2*60000: nOff = 2; break;
+ case 90*3*60000: nOff = 1; break;
+ default: break;
+ }
+
+ for (size_t i = 0; i < aProps.size(); i++)
+ {
+ sal_Int32 nVal = 0;
+
+ // Hack for n#760986
+ // TODO: Preferred method would be to have a textbox on top
+ // of the shape and the place it according to the (off,ext)
+ if (nOff == 0 && moTextOffLeft)
+ nVal = *moTextOffLeft;
+
+ if (nOff == 1 && moTextOffUpper)
+ nVal = *moTextOffUpper;
+
+
+ if (nOff == 2 && moTextOffRight)
+ nVal = *moTextOffRight;
+
+ if (nOff == 3 && moTextOffLower)
+ nVal = *moTextOffLower;
+
+
+ if( nVal < 0 )
+ nVal = 0;
+
+ sal_Int32 nTextOffsetValue = nVal;
+
+ if (moInsets[i])
+ {
+ nTextOffsetValue = *moInsets[i] + nVal;
+ }
+
+ // if inset is set, then always set the value
+ // this prevents the default to be set (0 is a valid value)
+ if (moInsets[i] || nTextOffsetValue)
+ {
+ maTextDistanceValues[nOff] = nTextOffsetValue;
+ }
+
+ nOff = (nOff + 1) % aProps.size();
+ }
+
+ // Check if bottom and top are set
+ if (maTextDistanceValues[1] && maTextDistanceValues[3])
+ {
+ double nHeight = rTextAreaSize.getHeight();
+
+ double nTop = *maTextDistanceValues[1];
+ double nBottom = *maTextDistanceValues[3];
+
+ // Check if top + bottom is more than text area height.
+ // If yes, we need to adjust the values as defined in OOXML.
+ if (nTop + nBottom >= nHeight)
+ {
+ double diffFactor = (nTop + nBottom - nHeight) / 2.0;
+
+ maTextDistanceValues[1] = nTop - diffFactor;
+ maTextDistanceValues[3] = nBottom - diffFactor;
+ }
+ }
+
+ for (size_t i = 0; i < aProps.size(); i++)
+ {
+ if (maTextDistanceValues[i])
+ maPropertyMap.setProperty(aProps[i], *maTextDistanceValues[i]);
+ }
+}
+
+/* Readjust the text distances / insets if necessary to take
+ the text area into account, not just the shape area*/
+void TextBodyProperties::readjustTextDistances(uno::Reference<drawing::XShape> const& xShape)
+{
+ // Only for custom shapes (for now)
+ auto* pCustomShape = dynamic_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape));
+ if (pCustomShape)
+ {
+ sal_Int32 nLower = pCustomShape->GetTextLowerDistance();
+ sal_Int32 nUpper = pCustomShape->GetTextUpperDistance();
+
+ pCustomShape->SetMergedItem(makeSdrTextUpperDistItem(0));
+ pCustomShape->SetMergedItem(makeSdrTextLowerDistItem(0));
+
+ tools::Rectangle aAnchorRect;
+ pCustomShape->TakeTextAnchorRect(aAnchorRect);
+ Size aAnchorSize = aAnchorRect.GetSize();
+
+ pushTextDistances(aAnchorSize);
+ if (maTextDistanceValues[1] && maTextDistanceValues[3])
+ {
+ nLower = *maTextDistanceValues[3];
+ nUpper = *maTextDistanceValues[1];
+ }
+
+ pCustomShape->SetMergedItem(makeSdrTextLowerDistItem(nLower));
+ pCustomShape->SetMergedItem(makeSdrTextUpperDistItem(nUpper));
+ }
+}
+
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
new file mode 100644
index 000000000..f7d4abd4e
--- /dev/null
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -0,0 +1,220 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textbodypropertiescontext.hxx>
+
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <drawingml/textbodyproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/customshapegeometry.hxx>
+#include <drawingml/scene3dcontext.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <svx/SvxXTextColumns.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_TextBodyProperties
+TextBodyPropertiesContext::TextBodyPropertiesContext(ContextHandler2Helper const& rParent,
+ const AttributeList& rAttribs,
+ const ShapePtr& pShapePtr)
+ : TextBodyPropertiesContext(rParent, rAttribs, pShapePtr->getTextBody()->getTextProperties())
+{
+ mpShapePtr = pShapePtr;
+}
+
+TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs, TextBodyProperties& rTextBodyProp )
+: ContextHandler2( rParent )
+, mrTextBodyProp( rTextBodyProp )
+{
+ // ST_TextWrappingType
+ sal_Int32 nWrappingType = rAttribs.getToken( XML_wrap, XML_square );
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextWordWrap, nWrappingType == XML_square );
+
+ // ST_Coordinate
+ OUString sValue;
+ sal_Int32 aIns[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns };
+ for( sal_Int32 i = 0; i < sal_Int32(SAL_N_ELEMENTS( aIns )); i++)
+ {
+ sValue = rAttribs.getString( aIns[i] ).get();
+ if( !sValue.isEmpty() )
+ mrTextBodyProp.moInsets[i] = GetCoordinate( sValue );
+ }
+
+ mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
+ if( mrTextBodyProp.mbAnchorCtr )
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_CENTER );
+
+// bool bCompatLineSpacing = rAttribs.getBool( XML_compatLnSpc, false );
+// bool bForceAA = rAttribs.getBool( XML_forceAA, false );
+ bool bFromWordArt = rAttribs.getBool(XML_fromWordArt, false);
+ mrTextBodyProp.maPropertyMap.setProperty(PROP_FromWordArt, bFromWordArt);
+
+ // ST_TextHorzOverflowType
+ mrTextBodyProp.msHorzOverflow = rAttribs.getString(XML_horzOverflow, "");
+ // ST_TextVertOverflowType
+ mrTextBodyProp.msVertOverflow = rAttribs.getString(XML_vertOverflow, "");
+
+ // ST_TextColumnCount
+ if (const sal_Int32 nColumns = rAttribs.getInteger(XML_numCol, 0); nColumns > 0)
+ {
+ css::uno::Reference<css::text::XTextColumns> xCols(SvxXTextColumns_createInstance(),
+ css::uno::UNO_QUERY_THROW);
+ xCols->setColumnCount(nColumns);
+ css::uno::Reference<css::beans::XPropertySet> xProps(xCols, css::uno::UNO_QUERY_THROW);
+ // ST_PositiveCoordinate32
+ const sal_Int32 nSpacing = o3tl::convert(rAttribs.getInteger(XML_spcCol, 0),
+ o3tl::Length::emu, o3tl::Length::mm100);
+ xProps->setPropertyValue("AutomaticDistance", css::uno::Any(nSpacing));
+ mrTextBodyProp.maPropertyMap.setAnyProperty(PROP_TextColumns, css::uno::Any(xCols));
+ }
+
+ // ST_Angle
+ mrTextBodyProp.moRotation = rAttribs.getInteger( XML_rot );
+
+// bool bRtlCol = rAttribs.getBool( XML_rtlCol, false );
+ // ST_PositiveCoordinate
+// sal_Int32 nSpcCol = rAttribs.getInteger( XML_spcCol, 0 );
+// bool bSpcFirstLastPara = rAttribs.getBool( XML_spcFirstLastPara, 0 );
+
+ bool bUpright = rAttribs.getBool(XML_upright, false);
+ if (bUpright)
+ mrTextBodyProp.moUpright = true;
+
+ // ST_TextVerticalType
+ if( rAttribs.hasAttribute( XML_vert ) ) {
+ mrTextBodyProp.moVert = rAttribs.getToken( XML_vert );
+ sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
+ if (tVert == XML_vert || tVert == XML_eaVert || tVert == XML_mongolianVert)
+ mrTextBodyProp.moRotation = 5400000;
+ else if (tVert == XML_vert270)
+ mrTextBodyProp.moRotation = 5400000 * 3;
+ else {
+ bool bRtl = rAttribs.getBool( XML_rtl, false );
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextWritingMode,
+ ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB ));
+ }
+ }
+
+ // ST_TextAnchoringType
+ if( rAttribs.hasAttribute( XML_anchor ) )
+ {
+ mrTextBodyProp.meVA = GetTextVerticalAdjust( rAttribs.getToken( XML_anchor, XML_t ) );
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextVerticalAdjust, mrTextBodyProp.meVA);
+ }
+
+ // Push defaults
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false);
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, drawing::TextFitToSizeType_NONE);
+}
+
+ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ // Sequence
+ case A_TOKEN( prstTxWarp ): // CT_PresetTextShape
+ if( mpShapePtr )
+ {
+ const OptValue<OUString> sPrst = rAttribs.getString( XML_prst );
+ if( sPrst.has() )
+ {
+ mrTextBodyProp.msPrst = sPrst.get();
+ if( mrTextBodyProp.msPrst != "textNoShape" )
+ return new PresetTextShapeContext( *this, rAttribs,
+ *( mpShapePtr->getCustomShapeProperties() ) );
+ }
+ }
+ break;
+
+ case A_TOKEN( prot ): // CT_TextProtectionProperty
+ break;
+
+ // EG_TextAutofit
+ case A_TOKEN( noAutofit ):
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false); // CT_TextNoAutofit
+ break;
+ case A_TOKEN( normAutofit ): // CT_TextNormalAutofit
+ {
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, TextFitToSizeType_AUTOFIT);
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false);
+ mrTextBodyProp.mnFontScale = rAttribs.getInteger(XML_fontScale, 100000);
+ break;
+ }
+ case A_TOKEN( spAutoFit ):
+ {
+ const sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
+ if( tVert != XML_vert && tVert != XML_eaVert && tVert != XML_vert270 && tVert != XML_mongolianVert )
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, true);
+ }
+ break;
+
+ case A_TOKEN( scene3d ): // CT_Scene3D
+ {
+ if(mpShapePtr && mpShapePtr->getServiceName() == "com.sun.star.drawing.CustomShape")
+ return new SceneText3DPropertiesContext( *this, mpShapePtr->getTextBody()->get3DProperties() );
+
+ break;
+ }
+
+ // EG_Text3D
+ case A_TOKEN( sp3d ): // CT_Shape3D
+ {
+ if (mpShapePtr && mpShapePtr->getServiceName() == "com.sun.star.drawing.CustomShape")
+ {
+ if (rAttribs.hasAttribute(XML_extrusionH))
+ mpShapePtr->getTextBody()->get3DProperties().mnExtrusionH = rAttribs.getInteger(XML_extrusionH, 0);
+ if (rAttribs.hasAttribute(XML_contourW))
+ mpShapePtr->getTextBody()->get3DProperties().mnContourW = rAttribs.getInteger(XML_contourW, 0);
+ if (rAttribs.hasAttribute(XML_z))
+ mpShapePtr->getTextBody()->get3DProperties().mnShapeZ = rAttribs.getInteger(XML_z, 0);
+ if (rAttribs.hasAttribute(XML_prstMaterial))
+ mpShapePtr->getTextBody()->get3DProperties().mnMaterial = rAttribs.getToken(XML_prstMaterial, XML_none);
+ return new SceneText3DPropertiesContext(*this, mpShapePtr->getTextBody()->get3DProperties());
+ }
+ break;
+ }
+
+ case A_TOKEN( flatTx ): // CT_FlatText
+
+ break;
+ }
+
+ return nullptr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
new file mode 100644
index 000000000..e7bc36763
--- /dev/null
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -0,0 +1,248 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textcharacterproperties.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <comphelper/sequence.hxx>
+#include <i18nlangtag/languagetag.hxx>
+#include <i18nlangtag/mslangid.hxx>
+#include <editeng/escapementitem.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+using ::oox::core::XmlFilterBase;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+namespace oox::drawingml {
+
+void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSourceProps )
+{
+ // overwrite all properties existing in rSourceProps
+ maHyperlinkPropertyMap.assignUsed( rSourceProps.maHyperlinkPropertyMap );
+ maLatinFont.assignIfUsed( rSourceProps.maLatinFont );
+ maLatinThemeFont.assignIfUsed( rSourceProps.maLatinThemeFont );
+ maAsianFont.assignIfUsed( rSourceProps.maAsianFont );
+ maAsianThemeFont.assignIfUsed( rSourceProps.maAsianThemeFont );
+ maComplexFont.assignIfUsed( rSourceProps.maComplexFont );
+ maComplexThemeFont.assignIfUsed( rSourceProps.maComplexThemeFont );
+ maSymbolFont.assignIfUsed( rSourceProps.maSymbolFont );
+ maHighlightColor.assignIfUsed( rSourceProps.maHighlightColor );
+ maUnderlineColor.assignIfUsed( rSourceProps.maUnderlineColor );
+ moLang.assignIfUsed( rSourceProps.moLang );
+ moHeight.assignIfUsed( rSourceProps.moHeight );
+ moFontScale.assignIfUsed(rSourceProps.moFontScale);
+ moSpacing.assignIfUsed( rSourceProps.moSpacing );
+ moUnderline.assignIfUsed( rSourceProps.moUnderline );
+ moBaseline.assignIfUsed( rSourceProps.moBaseline );
+ moStrikeout.assignIfUsed( rSourceProps.moStrikeout );
+ moCaseMap.assignIfUsed( rSourceProps.moCaseMap );
+ moBold.assignIfUsed( rSourceProps.moBold );
+ moItalic.assignIfUsed( rSourceProps.moItalic );
+ moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText );
+ moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText );
+ moTextOutlineProperties.assignIfUsed(rSourceProps.moTextOutlineProperties);
+
+ maTextEffectsProperties = rSourceProps.maTextEffectsProperties;
+ maFillProperties.assignUsed( rSourceProps.maFillProperties );
+}
+
+void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter ) const
+{
+ OUString aFontName;
+ sal_Int16 nFontPitch = 0;
+ sal_Int16 nFontFamily = 0;
+
+ bool bRet = maLatinFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (!bRet)
+ // In case there is no direct font, try to look it up as a theme reference.
+ bRet = maLatinThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (bRet)
+ {
+ rPropMap.setProperty( PROP_CharFontName, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitch, nFontPitch);
+ rPropMap.setProperty( PROP_CharFontFamily, nFontFamily);
+ }
+
+ bRet = maAsianFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (!bRet)
+ bRet = maAsianThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (bRet)
+ {
+ rPropMap.setProperty( PROP_CharFontNameAsian, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitchAsian, nFontFamily);
+ rPropMap.setProperty( PROP_CharFontFamilyAsian, nFontPitch);
+ }
+
+ bRet = maComplexFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (!bRet)
+ bRet = maComplexThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
+ if (bRet)
+ {
+ rPropMap.setProperty( PROP_CharFontNameComplex, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitchComplex, nFontPitch);
+ rPropMap.setProperty( PROP_CharFontFamilyComplex, nFontFamily);
+ }
+
+ if ( maFillProperties.moFillType.has() )
+ {
+ Color aColor = maFillProperties.getBestSolidColor();
+ bool bContoured = false;
+
+ // noFill doesn't exist for characters. Map noFill to 99% transparency
+ if (maFillProperties.moFillType.get() == XML_noFill)
+ aColor.addTransformation(XML_alpha, 1000);
+
+ // tdf#137438 Emulate text outline color/transparency.
+ // If the outline color dominates, then use it as the text color.
+ if (moTextOutlineProperties.has()
+ && moTextOutlineProperties.get().maLineFill.moFillType.has()
+ && moTextOutlineProperties.get().maLineFill.moFillType.get() != XML_noFill)
+ {
+ Color aLineColor = moTextOutlineProperties.get().maLineFill.getBestSolidColor();
+ sal_Int16 nLineTransparency = aLineColor.getTransparency();
+
+ // tdf#127696 If the text color is white (and the outline color doesn't dominate),
+ // then this is contoured text in LO.
+ if (nLineTransparency < aColor.getTransparency()
+ || (bContoured = aColor.getColor(rFilter.getGraphicHelper()) == COL_WHITE))
+ aColor = aLineColor;
+ }
+ rPropMap.setProperty(PROP_CharColor, aColor.getColor(rFilter.getGraphicHelper()));
+ // set color theme index
+ rPropMap.setProperty(PROP_CharColorTheme, aColor.getSchemeColorIndex());
+ rPropMap.setProperty(PROP_CharColorTintOrShade, aColor.getTintOrShade());
+ rPropMap.setProperty(PROP_CharColorLumMod, aColor.getLumMod());
+ rPropMap.setProperty(PROP_CharColorLumOff, aColor.getLumOff());
+ rPropMap.setProperty(PROP_CharContoured, bContoured);
+
+ if (aColor.hasTransparency())
+ {
+ const auto nTransparency = aColor.getTransparency();
+ rPropMap.setProperty(PROP_CharTransparence, nTransparency);
+
+ // WORKAROUND: Fully transparent white has the same value as COL_AUTO, avoid collision
+ if (nTransparency == 100
+ && aColor.getColor(rFilter.getGraphicHelper()).GetRGBColor() == COL_AUTO.GetRGBColor())
+ rPropMap.setProperty(PROP_CharColor, ::Color(ColorTransparency, 0xFFFFFFFE));
+ }
+ }
+
+ if( moLang.has() && !moLang.get().isEmpty() )
+ {
+ LanguageTag aTag(moLang.get());
+ lang::Locale aLocale(aTag.getLocale());
+ switch(MsLangId::getScriptType(aTag.getLanguageType()))
+ {
+ case css::i18n::ScriptType::LATIN:
+ rPropMap.setProperty( PROP_CharLocale, aLocale);break;
+ case css::i18n::ScriptType::ASIAN:
+ rPropMap.setProperty( PROP_CharLocaleAsian, aLocale);break;
+ case css::i18n::ScriptType::COMPLEX:
+ rPropMap.setProperty( PROP_CharLocaleComplex, aLocale);break;
+ }
+ }
+
+ if( moHeight.has() )
+ {
+ float fHeight = GetFontHeight( moHeight.get() );
+ if (moFontScale.has())
+ fHeight *= (moFontScale.get() / 100000);
+ rPropMap.setProperty( PROP_CharHeight, fHeight);
+ rPropMap.setProperty( PROP_CharHeightAsian, fHeight);
+ rPropMap.setProperty( PROP_CharHeightComplex, fHeight);
+ }
+
+ rPropMap.setProperty( PROP_CharKerning, static_cast<sal_Int16>(GetTextSpacingPoint( moSpacing.get( 0 ) )));
+
+ rPropMap.setProperty( PROP_CharUnderline, GetFontUnderline( moUnderline.get( XML_none ) ));
+ rPropMap.setProperty( PROP_CharStrikeout, GetFontStrikeout( moStrikeout.get( XML_noStrike ) ));
+ rPropMap.setProperty( PROP_CharCaseMap, GetCaseMap( moCaseMap.get( XML_none ) ));
+
+ if( moBaseline.has() ) {
+ rPropMap.setProperty( PROP_CharEscapement, sal_Int16(moBaseline.get( 0 ) / 1000));
+ rPropMap.setProperty( PROP_CharEscapementHeight, sal_Int8(DFLT_ESC_PROP));
+ } else {
+ rPropMap.setProperty( PROP_CharEscapement, sal_Int16(0));
+ rPropMap.setProperty( PROP_CharEscapementHeight, sal_Int8(100)); // 100%
+ }
+
+ float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL;
+ rPropMap.setProperty( PROP_CharWeight, fWeight);
+ rPropMap.setProperty( PROP_CharWeightAsian, fWeight);
+ rPropMap.setProperty( PROP_CharWeightComplex, fWeight);
+
+ awt::FontSlant eSlant = moItalic.get( false ) ? awt::FontSlant_ITALIC : awt::FontSlant_NONE;
+ rPropMap.setProperty( PROP_CharPosture, eSlant);
+ rPropMap.setProperty( PROP_CharPostureAsian, eSlant);
+ rPropMap.setProperty( PROP_CharPostureComplex, eSlant);
+
+ bool bUnderlineFillFollowText = moUnderlineFillFollowText.get( false );
+ if( moUnderline.has() && maUnderlineColor.isUsed() && !bUnderlineFillFollowText )
+ {
+ rPropMap.setProperty( PROP_CharUnderlineHasColor, true);
+ rPropMap.setProperty( PROP_CharUnderlineColor, maUnderlineColor.getColor( rFilter.getGraphicHelper() ));
+ }
+ else
+ {
+ rPropMap.setProperty( PROP_CharUnderlineHasColor, false);
+ rPropMap.setProperty( PROP_CharUnderlineColor, sal_Int32(-1));
+ }
+
+ if (maHighlightColor.isUsed() && maHighlightColor.getTransparency() != 100)
+ rPropMap.setProperty( PROP_CharBackColor, maHighlightColor.getColor( rFilter.getGraphicHelper() ));
+ else
+ rPropMap.setProperty( PROP_CharBackColor, sal_Int32(-1));
+}
+
+static void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValue>& aVectorOfPropertyValues )
+{
+ if (!rPropSet.hasProperty(PROP_CharInteropGrabBag) || aVectorOfPropertyValues.empty())
+ return;
+ Sequence<PropertyValue> aGrabBag;
+ Any aAnyGrabBag = rPropSet.getAnyProperty(PROP_CharInteropGrabBag);
+ aAnyGrabBag >>= aGrabBag;
+
+ rPropSet.setAnyProperty(PROP_CharInteropGrabBag, Any(comphelper::concatSequences(aGrabBag, aVectorOfPropertyValues)));
+}
+
+void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter ) const
+{
+ PropertyMap aPropMap;
+ pushToPropMap( aPropMap, rFilter );
+ rPropSet.setProperties( aPropMap );
+ pushToGrabBag(rPropSet, maTextEffectsProperties);
+}
+
+float TextCharacterProperties::getCharHeightPoints( float fDefault ) const
+{
+ return moHeight.has() ? GetFontHeight( moHeight.get() ) : fDefault;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
new file mode 100644
index 000000000..5ec22d45e
--- /dev/null
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -0,0 +1,334 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textcharacterpropertiescontext.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <drawingml/linepropertiescontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <drawingml/texteffectscontext.hxx>
+#include "hyperlinkcontext.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <sax/fastattribs.hxx>
+
+#include <sal/log.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::awt;
+
+namespace oox::drawingml {
+
+// CT_TextCharacterProperties
+TextCharacterPropertiesContext::TextCharacterPropertiesContext(
+ ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs,
+ TextCharacterProperties& rTextCharacterProperties )
+: ContextHandler2( rParent )
+, mrTextCharacterProperties( rTextCharacterProperties )
+{
+ int nVisualTokenAmount = sax_fastparser::castToFastAttributeList(
+ rAttribs.getFastAttributeList() ).getFastAttributeTokens().size();
+
+ if ( rAttribs.hasAttribute( XML_lang ) )
+ {
+ mrTextCharacterProperties.moLang = rAttribs.getString( XML_lang );
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+ if ( rAttribs.hasAttribute( XML_altLang ))
+ {
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+ if ( rAttribs.hasAttribute( XML_sz ) )
+ mrTextCharacterProperties.moHeight = rAttribs.getInteger( XML_sz );
+ if ( rAttribs.hasAttribute( XML_spc ) )
+ mrTextCharacterProperties.moSpacing = rAttribs.getInteger( XML_spc );
+ if ( rAttribs.hasAttribute( XML_u ) )
+ mrTextCharacterProperties.moUnderline = rAttribs.getToken( XML_u );
+ if ( rAttribs.hasAttribute( XML_strike ) )
+ mrTextCharacterProperties.moStrikeout = rAttribs.getToken( XML_strike );
+ if ( rAttribs.hasAttribute( XML_baseline ) && rAttribs.getInteger( XML_baseline ).get() != 0 )
+ mrTextCharacterProperties.moBaseline = rAttribs.getInteger( XML_baseline );
+
+ if ( rAttribs.hasAttribute( XML_b ) )
+ mrTextCharacterProperties.moBold = rAttribs.getBool( XML_b );
+ if ( rAttribs.hasAttribute( XML_i ) )
+ mrTextCharacterProperties.moItalic = rAttribs.getBool( XML_i );
+ if( rAttribs.hasAttribute( XML_cap ) )
+ mrTextCharacterProperties.moCaseMap = rAttribs.getToken( XML_cap );
+ if ( rAttribs.hasAttribute( XML_dirty ) )
+ {
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+ if ( rAttribs.hasAttribute( XML_smtClean ) )
+ {
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+
+ if ( nVisualTokenAmount > 0 )
+ mrTextCharacterProperties.mbHasVisualRunProperties = true;
+
+ /* TODO / unhandled so far:
+ A_TOKEN( kern )
+ XML_altLang
+ A_TOKEN( kumimoji )
+ A_TOKEN( spc )
+ A_TOKEN( normalizeH )
+ A_TOKEN( noProof )
+ A_TOKEN( dirty )
+ A_TOKEN( err )
+ A_TOKEN( smtClean )
+ A_TOKEN( smtId )
+ */
+}
+
+TextCharacterPropertiesContext::~TextCharacterPropertiesContext()
+{
+}
+
+ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if( aElementToken != A_TOKEN(lang) )
+ mrTextCharacterProperties.mbHasVisualRunProperties = true;
+
+ switch( aElementToken )
+ {
+ case A_TOKEN(ln): // CT_LineProperties
+ // TODO still largely unsupported
+ return new LinePropertiesContext(*this, rAttribs, mrTextCharacterProperties.moTextOutlineProperties.use());
+ // EG_FillProperties
+ case A_TOKEN( noFill ):
+ case A_TOKEN( solidFill ):
+ case A_TOKEN( gradFill ):
+ case A_TOKEN( pattFill ):
+ return FillPropertiesContext::createFillContext( *this, aElementToken, rAttribs, mrTextCharacterProperties.maFillProperties );
+ // EG_EffectProperties
+ case A_TOKEN( effectDag ): // CT_EffectContainer 5.1.10.25
+ case A_TOKEN( effectLst ): // CT_EffectList 5.1.10.26
+ break;
+ case A_TOKEN( highlight ): // CT_Color
+ return new ColorContext(*this, mrTextCharacterProperties.maHighlightColor);
+ case W_TOKEN( highlight ):
+ mrTextCharacterProperties.maHighlightColor = rAttribs.getHighlightColor(W_TOKEN(val));
+ break;
+ // EG_TextUnderlineLine
+ case A_TOKEN( uLnTx ): // CT_TextUnderlineLineFollowText
+ mrTextCharacterProperties.moUnderlineLineFollowText = true;
+ break;
+// TODO unsupported yet
+// case A_TOKEN( uLn ): // CT_LineProperties
+// return new LinePropertiesContext( getHandler(), rAttribs, maUnderlineProperties );
+
+ // EG_TextUnderlineFill
+ case A_TOKEN( uFillTx ): // CT_TextUnderlineFillFollowText
+ mrTextCharacterProperties.moUnderlineFillFollowText = true;
+ break;
+ case A_TOKEN( uFill ): // CT_TextUnderlineFillGroupWrapper->EG_FillProperties (not supported)
+ return new SimpleFillPropertiesContext( *this, mrTextCharacterProperties.maUnderlineColor );
+
+ // CT_FontCollection
+ case A_TOKEN( latin ): // CT_TextFont
+ mrTextCharacterProperties.maLatinFont.setAttributes( rAttribs );
+ break;
+ case A_TOKEN( ea ): // CT_TextFont
+ mrTextCharacterProperties.maAsianFont.setAttributes( rAttribs );
+ break;
+ case A_TOKEN( cs ): // CT_TextFont
+ mrTextCharacterProperties.maComplexFont.setAttributes( rAttribs );
+ break;
+ case A_TOKEN( sym ): // CT_TextFont
+ mrTextCharacterProperties.maSymbolFont.setAttributes( rAttribs );
+ break;
+
+ case A_TOKEN( hlinkClick ): // CT_Hyperlink
+ case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
+ return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap );
+ case W_TOKEN( rFonts ):
+ if( rAttribs.hasAttribute(W_TOKEN(ascii)) )
+ {
+ mrTextCharacterProperties.maLatinFont.setAttributes(rAttribs.getString(W_TOKEN(ascii), OUString()));
+ }
+ if (rAttribs.hasAttribute(W_TOKEN(asciiTheme)))
+ {
+ mrTextCharacterProperties.maLatinThemeFont.setAttributes(rAttribs.getString(W_TOKEN(asciiTheme), OUString()));
+ }
+ if( rAttribs.hasAttribute(W_TOKEN(cs)) )
+ {
+ mrTextCharacterProperties.maComplexFont.setAttributes(rAttribs.getString(W_TOKEN(cs), OUString()));
+ }
+ if (rAttribs.hasAttribute(W_TOKEN(cstheme)))
+ {
+ mrTextCharacterProperties.maComplexThemeFont.setAttributes(rAttribs.getString(W_TOKEN(cstheme), OUString()));
+ }
+ if( rAttribs.hasAttribute(W_TOKEN(eastAsia)) )
+ {
+ mrTextCharacterProperties.maAsianFont.setAttributes(rAttribs.getString(W_TOKEN(eastAsia), OUString()));
+ }
+ if (rAttribs.hasAttribute(W_TOKEN(eastAsiaTheme)))
+ {
+ mrTextCharacterProperties.maAsianThemeFont.setAttributes(rAttribs.getString(W_TOKEN(eastAsiaTheme), OUString()));
+ }
+ break;
+ case W_TOKEN( u ):
+ {
+ // If you add here, check if it is in drawingmltypes.cxx 113.
+ auto attrib = rAttribs.getString(W_TOKEN(val), OUString());
+ if (attrib == "single" || attrib == "words") // TODO: implement words properly. Now it is a single line.
+ mrTextCharacterProperties.moUnderline = XML_sng;
+ else if (attrib == "wavyHeavy")
+ mrTextCharacterProperties.moUnderline = XML_wavyHeavy;
+ else if (attrib == "wavyDouble")
+ mrTextCharacterProperties.moUnderline = XML_wavyDbl;
+ else if (attrib == "wave")
+ mrTextCharacterProperties.moUnderline = XML_wavy;
+ else if (attrib == "thick")
+ mrTextCharacterProperties.moUnderline = XML_heavy;
+ else if (attrib == "dottedHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dottedHeavy;
+ else if (attrib == "dotted")
+ mrTextCharacterProperties.moUnderline = XML_dotted;
+ else if (attrib == "dashDotDotHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dotDotDashHeavy;
+ else if (attrib == "dotDotDash")
+ mrTextCharacterProperties.moUnderline = XML_dotDotDash;
+ else if (attrib == "dashDotHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dotDashHeavy;
+ else if (attrib == "dotDash")
+ mrTextCharacterProperties.moUnderline = XML_dotDash;
+ else if (attrib == "double")
+ mrTextCharacterProperties.moUnderline = XML_dbl;
+ else if (attrib == "dashLongHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dashLongHeavy;
+ else if (attrib == "dashLong")
+ mrTextCharacterProperties.moUnderline = XML_dashLong;
+ else if (attrib == "dashedHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dashHeavy;
+ else if (attrib == "dash")
+ mrTextCharacterProperties.moUnderline = XML_dash;
+ else if (attrib == "none")
+ mrTextCharacterProperties.moUnderline = XML_none;
+ auto colorAttrib = rAttribs.getIntegerHex(W_TOKEN(color));
+ if (colorAttrib.has())
+ {
+ oox::drawingml::Color theColor;
+ theColor.setSrgbClr(colorAttrib.get());
+ mrTextCharacterProperties.maUnderlineColor = theColor;
+ }
+ break;
+ }
+ case W_TOKEN( spacing ):
+ {
+ auto attrib = rAttribs.getInteger(W_TOKEN( val ), 0);
+ mrTextCharacterProperties.moSpacing = attrib;
+ break;
+ }
+ case W_TOKEN( b ):
+ mrTextCharacterProperties.moBold = rAttribs.getBool(W_TOKEN( val ), true);
+ break;
+ case W_TOKEN( i ):
+ mrTextCharacterProperties.moItalic = rAttribs.getBool(W_TOKEN( val ), true);
+ break;
+ case W_TOKEN( bCs ):
+ break;
+ case W_TOKEN( strike ):
+ if (rAttribs.getBool(W_TOKEN(val), true))
+ mrTextCharacterProperties.moStrikeout = XML_sngStrike;
+ break;
+ case W_TOKEN( dstrike ):
+ if (rAttribs.getBool(W_TOKEN(val), true))
+ mrTextCharacterProperties.moStrikeout = XML_dblStrike;
+ break;
+ case W_TOKEN( color ):
+ if (rAttribs.getInteger(W_TOKEN(val)).has())
+ {
+ mrTextCharacterProperties.maFillProperties.maFillColor.setSrgbClr(rAttribs.getIntegerHex(W_TOKEN(val)).get());
+ mrTextCharacterProperties.maFillProperties.moFillType.set(XML_solidFill);
+ }
+ break;
+ case W_TOKEN( sz ):
+ if (rAttribs.getInteger(W_TOKEN(val)).has())
+ {
+ sal_Int32 nVal = rAttribs.getInteger(W_TOKEN(val)).get();
+ // wml has half points, dml has hundred points
+ mrTextCharacterProperties.moHeight = nVal * 50;
+ }
+ break;
+ case W_TOKEN( szCs ):
+ break;
+ case W_TOKEN( caps ):
+ {
+ if( rAttribs.getBool(W_TOKEN( val ), true) )
+ mrTextCharacterProperties.moCaseMap = XML_all;
+ else
+ mrTextCharacterProperties.moCaseMap = XML_none;
+ }
+ break;
+ case W_TOKEN( smallCaps ):
+ {
+ if( rAttribs.getBool(W_TOKEN( val ), true) )
+ mrTextCharacterProperties.moCaseMap = XML_small;
+ else
+ mrTextCharacterProperties.moCaseMap = XML_none;
+ }
+ break;
+ case W_TOKEN(vertAlign):
+ {
+ // Map wordprocessingML <w:vertAlign w:val="..."/> to drawingML
+ // <a:rPr baseline="...">.
+ sal_Int32 nVal = rAttribs.getToken(W_TOKEN(val), 0);
+ if (nVal == XML_superscript)
+ mrTextCharacterProperties.moBaseline = 30000;
+ else if (nVal == XML_subscript)
+ mrTextCharacterProperties.moBaseline = -25000;
+ break;
+ }
+ case W_TOKEN(lang):
+ mrTextCharacterProperties.moLang = rAttribs.getString(W_TOKEN(val), OUString());
+ break;
+ case OOX_TOKEN(w14, glow):
+ case OOX_TOKEN(w14, shadow):
+ case OOX_TOKEN(w14, reflection):
+ case OOX_TOKEN(w14, textOutline):
+ case OOX_TOKEN(w14, textFill):
+ case OOX_TOKEN(w14, scene3d):
+ case OOX_TOKEN(w14, props3d):
+ case OOX_TOKEN(w14, ligatures):
+ case OOX_TOKEN(w14, numForm):
+ case OOX_TOKEN(w14, numSpacing):
+ case OOX_TOKEN(w14, stylisticSets):
+ case OOX_TOKEN(w14, cntxtAlts):
+ {
+ return new TextEffectsContext( *this, aElementToken, mrTextCharacterProperties.maTextEffectsProperties );
+ }
+ break;
+ default:
+ SAL_WARN("oox", "TextCharacterPropertiesContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx
new file mode 100644
index 000000000..e380b6425
--- /dev/null
+++ b/oox/source/drawingml/texteffectscontext.cxx
@@ -0,0 +1,318 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <drawingml/texteffectscontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+#include <map>
+
+namespace oox::drawingml {
+
+namespace
+{
+
+OUString const & lclGetNameForElementId(sal_uInt32 aId)
+{
+ static std::map<sal_uInt32, OUString> const aIdMap
+ {
+ { OOX_TOKEN(w14, srgbClr) , "srgbClr" },
+ { OOX_TOKEN(w14, schemeClr) , "schemeClr" },
+ { OOX_TOKEN(w14, tint) , "tint" },
+ { OOX_TOKEN(w14, shade) , "shade" },
+ { OOX_TOKEN(w14, alpha) , "alpha" },
+ { OOX_TOKEN(w14, hueMod) , "hueMod" },
+ { OOX_TOKEN(w14, sat) , "sat" },
+ { OOX_TOKEN(w14, satOff) , "satOff" },
+ { OOX_TOKEN(w14, satMod) , "satMod" },
+ { OOX_TOKEN(w14, lum) , "lum" },
+ { OOX_TOKEN(w14, lumOff) , "lumOff" },
+ { OOX_TOKEN(w14, lumMod) , "lumMod" },
+ { OOX_TOKEN(w14, noFill) , "noFill" },
+ { OOX_TOKEN(w14, solidFill) , "solidFill" },
+ { OOX_TOKEN(w14, gradFill) , "gradFill" },
+ { OOX_TOKEN(w14, gsLst) , "gsLst" },
+ { OOX_TOKEN(w14, gs) , "gs" },
+ { OOX_TOKEN(w14, pos) , "pos" },
+ { OOX_TOKEN(w14, lin) , "lin" },
+ { OOX_TOKEN(w14, path) , "path" },
+ { OOX_TOKEN(w14, fillToRect) , "fillToRect" },
+ { OOX_TOKEN(w14, prstDash) , "prstDash" },
+ { OOX_TOKEN(w14, round) , "round" },
+ { OOX_TOKEN(w14, bevel) , "bevel" },
+ { OOX_TOKEN(w14, miter) , "miter" },
+ { OOX_TOKEN(w14, camera) , "camera" },
+ { OOX_TOKEN(w14, lightRig) , "lightRig" },
+ { OOX_TOKEN(w14, rot) , "rot" },
+ { OOX_TOKEN(w14, bevelT) , "bevelT" },
+ { OOX_TOKEN(w14, bevelB) , "bevelB" },
+ { OOX_TOKEN(w14, extrusionClr) , "extrusionClr" },
+ { OOX_TOKEN(w14, contourClr) , "contourClr"} ,
+ { OOX_TOKEN(w14, styleSet) , "styleSet" },
+
+ { OOX_TOKEN(w14, glow) , "glow" },
+ { OOX_TOKEN(w14, shadow) , "shadow" },
+ { OOX_TOKEN(w14, reflection) , "reflection" },
+ { OOX_TOKEN(w14, textOutline) , "textOutline" },
+ { OOX_TOKEN(w14, textFill) , "textFill" },
+ { OOX_TOKEN(w14, scene3d) , "scene3d" },
+ { OOX_TOKEN(w14, props3d) , "props3d" },
+ { OOX_TOKEN(w14, ligatures) , "ligatures" },
+ { OOX_TOKEN(w14, numForm) , "numForm" },
+ { OOX_TOKEN(w14, numSpacing) , "numSpacing" },
+ { OOX_TOKEN(w14, stylisticSets), "stylisticSets" },
+ { OOX_TOKEN(w14, cntxtAlts) , "cntxtAlts" },
+ };
+
+ return aIdMap.find(aId)->second;
+}
+
+OUString const & lclGetGrabBagName(sal_uInt32 aId)
+{
+ static std::map<sal_uInt32, OUString> const aGrabBagNameMap
+ {
+ { OOX_TOKEN(w14, glow) , "CharGlowTextEffect" },
+ { OOX_TOKEN(w14, shadow) , "CharShadowTextEffect" },
+ { OOX_TOKEN(w14, reflection) , "CharReflectionTextEffect" },
+ { OOX_TOKEN(w14, textOutline) , "CharTextOutlineTextEffect" },
+ { OOX_TOKEN(w14, textFill) , "CharTextFillTextEffect" },
+ { OOX_TOKEN(w14, scene3d) , "CharScene3DTextEffect" },
+ { OOX_TOKEN(w14, props3d) , "CharProps3DTextEffect" },
+ { OOX_TOKEN(w14, ligatures) , "CharLigaturesTextEffect" },
+ { OOX_TOKEN(w14, numForm) , "CharNumFormTextEffect" },
+ { OOX_TOKEN(w14, numSpacing) , "CharNumSpacingTextEffect" },
+ { OOX_TOKEN(w14, stylisticSets), "CharStylisticSetsTextEffect" },
+ { OOX_TOKEN(w14, cntxtAlts) , "CharCntxtAltsTextEffect" },
+ };
+
+ return aGrabBagNameMap.find(aId)->second;
+}
+
+}
+
+using namespace oox::core;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+
+TextEffectsContext::TextEffectsContext(
+ ContextHandler2Helper const & rParent,
+ sal_Int32 aElementToken,
+ std::vector<PropertyValue>& rTextEffectsProperties)
+ : ContextHandler2(rParent)
+ , mrTextEffectsProperties(rTextEffectsProperties)
+ , mnCurrentElement(aElementToken)
+{
+}
+
+TextEffectsContext::~TextEffectsContext()
+{
+}
+
+void TextEffectsContext::pushAttributeToGrabBag (sal_Int32 aAttributeId, const OUString& rElementName, const AttributeList& rAttribs)
+{
+ if (!rAttribs.hasAttribute(aAttributeId))
+ return;
+ OUString aString = rAttribs.getString(aAttributeId).get();
+ mpGrabBagStack->addString(rElementName, aString);
+}
+
+void TextEffectsContext::processAttributes(const AttributeList& rAttribs)
+{
+ mpGrabBagStack->push("attributes");
+ switch(mnCurrentElement)
+ {
+ case OOX_TOKEN(w14, glow):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rad), "rad", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, srgbClr):
+ case OOX_TOKEN(w14, schemeClr):
+ case OOX_TOKEN(w14, tint):
+ case OOX_TOKEN(w14, shade):
+ case OOX_TOKEN(w14, alpha):
+ case OOX_TOKEN(w14, hueMod):
+ case OOX_TOKEN(w14, sat):
+ case OOX_TOKEN(w14, satOff):
+ case OOX_TOKEN(w14, satMod):
+ case OOX_TOKEN(w14, lum):
+ case OOX_TOKEN(w14, lumOff):
+ case OOX_TOKEN(w14, lumMod):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, shadow):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, reflection):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, stA), "stA", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, stPos), "stPos", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, endA), "endA", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, endPos), "endPos", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, fadeDir), "fadeDir", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, textOutline):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, cap), "cap", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, cmpd), "cmpd", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, prstDash):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, gs):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, pos), "pos", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, lin):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ang), "ang", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, scaled), "scaled", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, path):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, path), "path", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, fillToRect):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, l), "l", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, t), "t", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, r), "r", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, b), "b", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, miter):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lim), "lim", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, camera):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, lightRig):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rig), "rig", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, rot):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lat), "lat", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lon), "lon", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rev), "rev", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, props3d):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, extrusionH), "extrusionH", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, contourW), "contourW", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prstMaterial), "prstMaterial", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, bevelT):
+ case OOX_TOKEN(w14, bevelB):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, h), "h", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, ligatures):
+ case OOX_TOKEN(w14, numForm):
+ case OOX_TOKEN(w14, numSpacing):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, styleSet):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, id), "id", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ }
+ break;
+ case OOX_TOKEN(w14, cntxtAlts):
+ {
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ }
+ break;
+ default:
+ break;
+ }
+
+ mpGrabBagStack->pop();
+}
+
+void TextEffectsContext::onStartElement(const oox::AttributeList& rAttribs)
+{
+ if (mpGrabBagStack == nullptr)
+ {
+ OUString aGrabBagName = lclGetGrabBagName(mnCurrentElement);
+ mpGrabBagStack.reset(new GrabBagStack(aGrabBagName));
+ }
+
+ OUString aElementName = lclGetNameForElementId(mnCurrentElement);
+ mpGrabBagStack->push(aElementName);
+ processAttributes(rAttribs);
+}
+
+void TextEffectsContext::onEndElement()
+{
+ mpGrabBagStack->pop();
+
+ if (mpGrabBagStack->isStackEmpty())
+ {
+ Sequence<PropertyValue> aSeq;
+ PropertyValue aPropertyValue = mpGrabBagStack->getRootProperty();
+ aPropertyValue.Value >>= aSeq;
+ aPropertyValue.Value <<= aSeq[0];
+
+ mrTextEffectsProperties.push_back(aPropertyValue);
+ }
+
+}
+
+ContextHandlerRef TextEffectsContext::onCreateContext(sal_Int32 aElementToken, const AttributeList& /*rAttribs*/)
+{
+ mnCurrentElement = aElementToken;
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
new file mode 100644
index 000000000..664c2dd37
--- /dev/null
+++ b/oox/source/drawingml/textfield.cxx
@@ -0,0 +1,274 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <drawingml/textfield.hxx>
+
+#include <rtl/ustring.hxx>
+#include <rtl/string.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+
+#include <o3tl/string_view.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <tools/diagnose_ex.h>
+#include <editeng/flditem.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::lang;
+
+namespace oox::drawingml {
+
+TextField::TextField()
+{
+}
+
+namespace {
+
+/** instantiate the textfields. Because of semantics difference between
+ * OpenXML and OpenOffice, some OpenXML field might cause two fields to be created.
+ * @param aFields the created fields. The list is empty if no field has been created.
+ * @param xModel the model
+ * @param sType the OpenXML field type.
+ */
+void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
+ const Reference< XModel > & xModel, std::u16string_view sType )
+{
+ Reference< XInterface > xIface;
+ Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
+ if( o3tl::starts_with(sType, u"datetime"))
+ {
+ auto p = sType.substr(8);
+ try
+ {
+ if (o3tl::starts_with(p, u"'"))
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.Custom" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ return;
+ }
+
+ SvxDateFormat eDateFormat = TextField::getLODateFormat(sType);
+ if (eDateFormat != SvxDateFormat::AppDefault)
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
+ xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eDateFormat)));
+ xProps->setPropertyValue("IsDate", Any(true));
+ xProps->setPropertyValue("IsFixed", Any(false));
+ }
+
+ SvxTimeFormat eTimeFormat = TextField::getLOTimeFormat(sType);
+ if (eTimeFormat != SvxTimeFormat::AppDefault)
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
+ xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eTimeFormat)));
+ xProps->setPropertyValue("IsDate", Any(false));
+ xProps->setPropertyValue("IsFixed", Any(false));
+ }
+ }
+ catch(const Exception &)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+ }
+ else if ( sType == u"slidenum" )
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ }
+ else if ( sType == u"slidecount" )
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageCount" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ }
+ else if ( sType == u"slidename" )
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageName" );
+ aFields.emplace_back( xIface, uno::UNO_QUERY );
+ }
+ else if ( o3tl::starts_with(sType, u"file") )
+ {
+ int idx = rtl_ustr_toInt32(sType.data() + 4, 10);
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.FileName" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
+
+ switch( idx )
+ {
+ case 1: // Path
+ xProps->setPropertyValue("FileFormat", Any(sal_Int16(1)));
+ break;
+ case 2: // File name without extension
+ xProps->setPropertyValue("FileFormat", Any(sal_Int16(2)));
+ break;
+ case 3: // File name with extension
+ xProps->setPropertyValue("FileFormat", Any(sal_Int16(3)));
+ break;
+ default: // Path/File name
+ xProps->setPropertyValue("FileFormat", Any(sal_Int16(0)));
+ }
+ }
+ else if( sType == u"author" )
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.Author" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ }
+}
+
+} // namespace
+
+sal_Int32 TextField::insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference < XText > & xText,
+ const Reference < XTextCursor > &xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float /*nDefaultCharHeight*/) const
+{
+ sal_Int32 nCharHeight = 0;
+ try
+ {
+ PropertyMap aioBulletList;
+ Reference< XPropertySet > xProps( xAt, UNO_QUERY);
+ PropertySet aPropSet( xProps );
+
+ maTextParagraphProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, nullptr, true, 18 );
+
+ TextCharacterProperties aTextCharacterProps( rTextCharacterStyle );
+ aTextCharacterProps.assignUsed( maTextParagraphProperties.getTextCharacterProperties() );
+ aTextCharacterProps.assignUsed( getTextCharacterProperties() );
+ if ( aTextCharacterProps.moHeight.has() )
+ nCharHeight = aTextCharacterProps.moHeight.get();
+ aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase );
+
+ std::vector< Reference< XTextField > > fields;
+ lclCreateTextFields( fields, rFilterBase.getModel(), msType );
+ if( !fields.empty() )
+ {
+ bool bFirst = true;
+ for (auto const& field : fields)
+ {
+ if( field.is() )
+ {
+ Reference< XTextContent > xContent( field, UNO_QUERY);
+ if( bFirst)
+ {
+ bFirst = false;
+ }
+ else
+ {
+ xText->insertString( xAt, " ", false );
+ }
+ xText->insertTextContent( xAt, xContent, false );
+ }
+ }
+ }
+ else
+ {
+ xText->insertString( xAt, getText(), false );
+ }
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("oox", "OOX: TextField::insertAt()");
+ }
+
+ return nCharHeight;
+}
+
+SvxDateFormat TextField::getLODateFormat(std::u16string_view rDateTimeType)
+{
+ auto aDateTimeNum = rDateTimeType.substr(8);
+
+ if( aDateTimeNum.empty() ) // "datetime"
+ return SvxDateFormat::StdSmall;
+
+ int nDateTimeNum = rtl_ustr_toInt32(aDateTimeNum.data(), 10);
+
+ switch( nDateTimeNum )
+ {
+ case 1: // Date dd/mm/yyyy
+ case 8: // DateTime dd/mm/yyyy H:MM PM
+ case 9: // DateTime dd/mm/yyyy H:MM:SS PM
+ return SvxDateFormat::B;
+ case 2: // Date Day, Month dd, yyyy
+ return SvxDateFormat::StdBig;
+ case 3: // Date dd Month yyyy
+ case 4: // Date Month dd, yyyy - no exact map
+ case 6: // Date Month yy - no exact map
+ return SvxDateFormat::D;
+ case 5: // Date dd-Mon-yy - no exact map
+ case 7: // Date Mon-yy - no exact map
+ return SvxDateFormat::C;
+ case 10: // Time H:MM - not a date format
+ case 11: // Time H:MM:SS - not a date format
+ case 12: // Time H:MM PM - not a date format
+ case 13: // Time H:MM:SS PM - not a date format
+ default:
+ return SvxDateFormat::AppDefault;
+ }
+}
+
+SvxTimeFormat TextField::getLOTimeFormat(std::u16string_view rDateTimeType)
+{
+ auto aDateTimeNum = rDateTimeType.substr(8);
+ int nDateTimeNum = rtl_ustr_toInt32(aDateTimeNum.data(), 10);
+
+ switch( nDateTimeNum )
+ {
+ case 8: // DateTime dd/mm/yyyy H:MM PM
+ case 12: // Time H:MM PM
+ return SvxTimeFormat::HH12_MM;
+ case 9: // DateTime dd/mm/yyyy H:MM:SS PM
+ case 13: // Time H:MM:SS PM
+ return SvxTimeFormat::HH12_MM_SS;
+ case 10: // Time H:MM
+ return SvxTimeFormat::HH24_MM;
+ case 11: // Time H:MM:SS
+ return SvxTimeFormat::Standard;
+ case 1: // Date dd/mm/yyyy
+ case 2: // Date Day, Month dd, yyyy
+ case 3: // Date dd Month yyyy
+ case 4: // Date Month dd, yyyy
+ case 5: // Date dd-Mon-yy
+ case 6: // Date Month yy
+ case 7: // Date Mon-yy
+ default:
+ return SvxTimeFormat::AppDefault;
+ }
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textfieldcontext.cxx b/oox/source/drawingml/textfieldcontext.cxx
new file mode 100644
index 000000000..8cfb17c08
--- /dev/null
+++ b/oox/source/drawingml/textfieldcontext.cxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textfieldcontext.hxx>
+#include <drawingml/textparagraphpropertiescontext.hxx>
+#include <drawingml/textcharacterpropertiescontext.hxx>
+#include <drawingml/textfield.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+TextFieldContext::TextFieldContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttributes,
+ TextField& rTextField)
+ : ContextHandler2( rParent )
+ , mrTextField( rTextField )
+ , mbIsInText( false )
+{
+ mrTextField.setUuid( rAttributes.getString( XML_id ).get() );
+ mrTextField.setType( rAttributes.getString( XML_type ).get() );
+}
+
+void TextFieldContext::onEndElement( )
+{
+ if( getCurrentElement() == (A_TOKEN( t )) )
+ {
+ mbIsInText = false;
+ }
+}
+
+void TextFieldContext::onCharacters( const OUString& aChars )
+{
+ if( mbIsInText )
+ {
+ mrTextField.getText() += aChars;
+ }
+}
+
+ContextHandlerRef TextFieldContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( rPr ):
+ return new TextCharacterPropertiesContext( *this, rAttribs, mrTextField.getTextCharacterProperties() );
+ case A_TOKEN( pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextField.getTextParagraphProperties() );
+ case A_TOKEN( t ):
+ mbIsInText = true;
+ break;
+ }
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textfont.cxx b/oox/source/drawingml/textfont.cxx
new file mode 100644
index 000000000..41dd0716a
--- /dev/null
+++ b/oox/source/drawingml/textfont.cxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textfont.hxx>
+#include <com/sun/star/awt/FontFamily.hpp>
+#include <com/sun/star/awt/FontPitch.hpp>
+#include <oox/drawingml/theme.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/tokens.hxx>
+
+using ::oox::core::XmlFilterBase;
+
+namespace oox::drawingml {
+
+namespace {
+
+sal_Int16 lclGetFontPitch( sal_Int32 nOoxValue )
+{
+ using namespace ::com::sun::star::awt::FontPitch;
+ static const sal_Int16 spnFontPitch[] = { DONTKNOW, FIXED, VARIABLE };
+ return STATIC_ARRAY_SELECT( spnFontPitch, nOoxValue, DONTKNOW );
+}
+
+sal_Int16 lclGetFontFamily( sal_Int32 nOoxValue )
+{
+ using namespace ::com::sun::star::awt::FontFamily;
+ static const sal_Int16 spnFontFamily[] = { DONTKNOW, ROMAN, SWISS, MODERN, SCRIPT, DECORATIVE };
+ return STATIC_ARRAY_SELECT( spnFontFamily, nOoxValue, DONTKNOW );
+}
+
+} // namespace
+
+TextFont::TextFont() :
+ mnPitch( 0 ),
+ mnCharset( WINDOWS_CHARSET_ANSI )
+{
+}
+
+void TextFont::setAttributes( const AttributeList& rAttribs )
+{
+ maTypeface = rAttribs.getString( XML_typeface, OUString() );
+ maPanose = rAttribs.getString( XML_panose, OUString() );
+ mnPitch = rAttribs.getInteger( XML_pitchFamily, 0 );
+ mnCharset = rAttribs.getInteger( XML_charset, WINDOWS_CHARSET_DEFAULT );
+}
+
+void TextFont::setAttributes( const OUString& sFontName )
+{
+ maTypeface = sFontName;
+ maPanose.clear();
+ mnPitch = 0;
+ mnCharset = WINDOWS_CHARSET_DEFAULT;
+}
+
+void TextFont::assignIfUsed( const TextFont& rTextFont )
+{
+ if( !rTextFont.maTypeface.isEmpty() )
+ *this = rTextFont;
+}
+
+bool TextFont::getFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily, const XmlFilterBase& rFilter ) const
+{
+ if( const Theme* pTheme = rFilter.getCurrentTheme() )
+ if( const TextFont* pFont = pTheme->resolveFont( maTypeface ) )
+ return pFont->implGetFontData( rFontName, rnFontPitch, rnFontFamily );
+ return implGetFontData( rFontName, rnFontPitch, rnFontFamily );
+}
+
+bool TextFont::implGetFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily ) const
+{
+ rFontName = maTypeface;
+ rnFontPitch = lclGetFontPitch( extractValue< sal_Int16 >( mnPitch, 0, 4 ) );
+ rnFontFamily = lclGetFontFamily( extractValue< sal_Int16 >( mnPitch, 4, 4 ) );
+ return !rFontName.isEmpty();
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
new file mode 100644
index 000000000..42679ad44
--- /dev/null
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textliststyle.hxx>
+#include <sal/log.hxx>
+
+namespace oox::drawingml {
+
+TextListStyle::TextListStyle()
+ : mbHasListStyleOnImport(false)
+{
+}
+
+TextListStyle::~TextListStyle()
+{
+}
+
+TextListStyle::TextListStyle(const TextListStyle& rStyle)
+ : mbHasListStyleOnImport(false)
+{
+ for ( size_t i = 0; i < NUM_TEXT_LIST_STYLE_ENTRIES; i++ )
+ {
+ maListStyle[i] = rStyle.maListStyle[i];
+ maAggregationListStyle[i] = rStyle.maAggregationListStyle[i];
+ }
+}
+
+TextListStyle& TextListStyle::operator=(const TextListStyle& rStyle)
+{
+ if(this != &rStyle)
+ {
+ for ( size_t i = 0; i < NUM_TEXT_LIST_STYLE_ENTRIES; i++ )
+ {
+ maListStyle[i] = rStyle.maListStyle[i];
+ maAggregationListStyle[i] = rStyle.maAggregationListStyle[i];
+ }
+ }
+ return *this;
+}
+
+static void applyStyleList( const TextParagraphPropertiesArray& rSourceListStyle, TextParagraphPropertiesArray& rDestListStyle )
+{
+ for ( size_t i = 0; i < NUM_TEXT_LIST_STYLE_ENTRIES; i++ )
+ rDestListStyle[i].apply(rSourceListStyle[i]);
+}
+
+void TextListStyle::apply( const TextListStyle& rTextListStyle )
+{
+ applyStyleList( rTextListStyle.getAggregationListStyle(), getAggregationListStyle() );
+ applyStyleList( rTextListStyle.getListStyle(), getListStyle() );
+}
+
+#ifdef DBG_UTIL
+void TextListStyle::dump() const
+{
+ for ( int i = 0; i < NUM_TEXT_LIST_STYLE_ENTRIES; i++ )
+ {
+ SAL_INFO("oox.drawingml", "text list style level: " << i);
+ maListStyle[i].dump();
+ }
+}
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textliststylecontext.cxx b/oox/source/drawingml/textliststylecontext.cxx
new file mode 100644
index 000000000..62d81f9c7
--- /dev/null
+++ b/oox/source/drawingml/textliststylecontext.cxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textliststylecontext.hxx>
+#include <drawingml/textparagraphpropertiescontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+// CT_TextListStyle
+TextListStyleContext::TextListStyleContext( ContextHandler2Helper const & rParent, TextListStyle& rTextListStyle )
+: ContextHandler2( rParent )
+, mrTextListStyle( rTextListStyle )
+{
+}
+
+TextListStyleContext::~TextListStyleContext()
+{
+}
+
+ContextHandlerRef TextListStyleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ mrTextListStyle.setHasListStyleOnImport();
+ switch( aElementToken )
+ {
+ case A_TOKEN( defPPr ): // CT_TextParagraphProperties
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 0 ] );
+ case A_TOKEN( outline1pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getAggregationListStyle()[ 0 ] );
+ case A_TOKEN( outline2pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getAggregationListStyle()[ 1 ] );
+ case A_TOKEN( lvl1pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 0 ] );
+ case A_TOKEN( lvl2pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 1 ] );
+ case A_TOKEN( lvl3pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 2 ] );
+ case A_TOKEN( lvl4pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 3 ] );
+ case A_TOKEN( lvl5pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 4 ] );
+ case A_TOKEN( lvl6pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 5 ] );
+ case A_TOKEN( lvl7pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 6 ] );
+ case A_TOKEN( lvl8pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 7 ] );
+ case A_TOKEN( lvl9pPr ):
+ return new TextParagraphPropertiesContext( *this, rAttribs, mrTextListStyle.getListStyle()[ 8 ] );
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
new file mode 100644
index 000000000..80f9fd373
--- /dev/null
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -0,0 +1,220 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textparagraph.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <svtools/unitconv.hxx>
+
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <oox/mathml/importutils.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <oox/token/properties.hxx>
+
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+namespace oox::drawingml {
+
+TextParagraph::TextParagraph()
+ : mbHasProperties( false )
+{
+}
+
+TextParagraph::~TextParagraph()
+{
+}
+
+TextCharacterProperties TextParagraph::getCharacterStyle (
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rMasterTextListStyle,
+ const TextListStyle& rTextListStyle) const
+{
+ const TextParagraphProperties* pMasterTextParagraphStyle = getParagraphStyle(rMasterTextListStyle);
+ const TextParagraphProperties* pTextParagraphStyle = getParagraphStyle(rTextListStyle);
+
+ TextCharacterProperties aTextCharacterStyle;
+ if (pMasterTextParagraphStyle)
+ aTextCharacterStyle.assignUsed(pMasterTextParagraphStyle->getTextCharacterProperties());
+ aTextCharacterStyle.assignUsed(rTextStyleProperties);
+ if (pTextParagraphStyle)
+ aTextCharacterStyle.assignUsed(pTextParagraphStyle->getTextCharacterProperties());
+ aTextCharacterStyle.assignUsed(maProperties.getTextCharacterProperties());
+ return aTextCharacterStyle;
+}
+
+TextParagraphProperties* TextParagraph::getParagraphStyle(
+ const TextListStyle& rTextListStyle) const
+{
+ sal_Int16 nLevel = maProperties.getLevel();
+
+ SAL_INFO("oox", "TextParagraph::getParagraphStyle - level " << nLevel);
+
+ const TextParagraphPropertiesArray& rListStyle = rTextListStyle.getListStyle();
+ if (nLevel >= static_cast< sal_Int16 >(rListStyle.size()))
+ nLevel = 0;
+ const TextParagraphProperties* pTextParagraphStyle = nullptr;
+ if (!rListStyle.empty())
+ pTextParagraphStyle = &rListStyle[nLevel];
+
+ return const_cast<TextParagraphProperties*>(pTextParagraphStyle);
+}
+
+void TextParagraph::insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference < XText > &xText,
+ const Reference < XTextCursor > &xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rMasterTextListStyle,
+ const TextListStyle& rTextListStyle, bool bFirst,
+ float nDefaultCharHeight, sal_Int32 nAutofitFontScale) const
+{
+ try {
+ sal_Int32 nParagraphSize = 0;
+ TextCharacterProperties aTextCharacterStyle
+ = getCharacterStyle(rTextStyleProperties, rMasterTextListStyle, rTextListStyle);
+
+ if( !bFirst )
+ {
+ xText->insertControlCharacter( xAt, ControlCharacter::APPEND_PARAGRAPH, false );
+ xAt->gotoEnd( true );
+ }
+
+ sal_Int32 nCharHeight = 0;
+ sal_Int32 nCharHeightFirst = 0;
+ if ( maRuns.empty() )
+ {
+ PropertySet aPropSet( xAt );
+
+ TextCharacterProperties aTextCharacterProps( aTextCharacterStyle );
+ aTextCharacterProps.assignUsed( maEndProperties );
+ if ( aTextCharacterProps.moHeight.has() )
+ nCharHeight = nCharHeightFirst = aTextCharacterProps.moHeight.get();
+ aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase );
+ }
+ else
+ {
+ for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt )
+ {
+ sal_Int32 nLen = (*aIt)->getText().getLength();
+ // n#759180: Force use, maEndProperties for the last segment
+ // This is currently applied to only empty runs
+ if( !nLen && ( ( aIt + 1 ) == aEnd ) )
+ (*aIt)->getTextCharacterProperties().assignUsed( maEndProperties );
+ sal_Int32 nCharHeightCurrent = (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle, nDefaultCharHeight );
+ if(aIt == maRuns.begin())
+ nCharHeightFirst = nCharHeightCurrent;
+ nCharHeight = std::max< sal_Int32 >( nCharHeight, nCharHeightCurrent);
+ nParagraphSize += nLen;
+ }
+ }
+ xAt->gotoEnd( true );
+
+ PropertyMap aioBulletList;
+ Reference< XPropertySet > xProps( xAt, UNO_QUERY);
+
+ TextListStyle aCombinedTextStyle;
+ aCombinedTextStyle.apply(rMasterTextListStyle);
+ aCombinedTextStyle.apply(rTextListStyle);
+ TextParagraphProperties* pTextParagraphStyle = getParagraphStyle(aCombinedTextStyle);
+ if ( pTextParagraphStyle )
+ {
+ TextParagraphProperties aParaProp;
+ aParaProp.apply( *pTextParagraphStyle );
+ aParaProp.apply( maProperties );
+
+ // bullets have same color as following texts by default
+ if( !aioBulletList.hasProperty( PROP_BulletColor ) && !maRuns.empty()
+ && (*maRuns.begin())->getTextCharacterProperties().maFillProperties.moFillType.has() )
+ aioBulletList.setProperty( PROP_BulletColor, (*maRuns.begin())->getTextCharacterProperties().maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() ));
+ if( !aioBulletList.hasProperty( PROP_BulletColor ) && aTextCharacterStyle.maFillProperties.moFillType.has() )
+ aioBulletList.setProperty( PROP_BulletColor, aTextCharacterStyle.maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() ));
+ if( !aioBulletList.hasProperty( PROP_GraphicSize ) && !maRuns.empty()
+ && aParaProp.getBulletList().maGraphic.hasValue())
+ {
+ tools::Long nFirstCharHeightMm = TransformMetric(nCharHeightFirst > 0 ? nCharHeightFirst : 1200, FieldUnit::POINT, FieldUnit::MM);
+ float fBulletSizeRel = 1.f;
+ double fBulletAspectRatio = 1.0;
+
+ if( aParaProp.getBulletList().mnSize.hasValue() )
+ fBulletSizeRel = aParaProp.getBulletList().mnSize.get<sal_Int16>() / 100.f;
+
+ if( aParaProp.getBulletList().mnAspectRatio.hasValue() )
+ fBulletAspectRatio = aParaProp.getBulletList().mnAspectRatio.get<double>();
+
+ css::awt::Size aBulletSize;
+ if( fBulletAspectRatio != 1.0 )
+ {
+ aBulletSize.Height = std::lround(fBulletSizeRel * nFirstCharHeightMm * OOX_BULLET_LIST_SCALE_FACTOR);
+ aBulletSize.Width = aBulletSize.Height * fBulletAspectRatio;
+ }
+ else
+ aBulletSize.Width = aBulletSize.Height = std::lround(fBulletSizeRel * nFirstCharHeightMm * OOX_BULLET_LIST_SCALE_FACTOR);
+
+ aioBulletList.setProperty( PROP_GraphicSize, aBulletSize);
+ }
+
+ float fCharacterSize = nCharHeight > 0 ? GetFontHeight ( nCharHeight ) : pTextParagraphStyle->getCharHeightPoints( 12 );
+ aParaProp.pushToPropSet( &rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), true, fCharacterSize, nAutofitFontScale, true );
+ }
+
+ // empty paragraphs do not have bullets in ppt
+ if ( !nParagraphSize )
+ {
+ xProps->setPropertyValue( "NumberingLevel", Any( static_cast< sal_Int16 >( -1 ) ) );
+ }
+
+// FIXME this is causing a lot of disruption (ie does not work). I wonder what to do -- Hub
+// Reference< XTextRange > xEnd( xAt, UNO_QUERY );
+// Reference< XPropertySet > xProps2( xEnd, UNO_QUERY );
+// mpEndProperties->pushToPropSet( xProps2 );
+ }
+ catch( Exception & )
+ {
+ SAL_INFO("oox", "exception in TextParagraph::insertAt");
+ }
+}
+
+formulaimport::XmlStreamBuilder & TextParagraph::GetMathXml()
+{
+ if (!m_pMathXml)
+ {
+ m_pMathXml.reset(new formulaimport::XmlStreamBuilder);
+ }
+ return *m_pMathXml;
+}
+
+bool TextParagraph::hasVisualRunProperties() const
+{
+ for ( auto& pTextRun : getRuns() )
+ {
+ if ( pTextRun->hasVisualRunProperties() )
+ return true;
+ }
+ return false;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
new file mode 100644
index 000000000..0006b7530
--- /dev/null
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -0,0 +1,553 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textparagraphproperties.hxx>
+
+#include <com/sun/star/text/XNumberingRulesSupplier.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+
+#include <osl/diagnose.h>
+
+#include <oox/helper/propertyset.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+#if OSL_DEBUG_LEVEL > 0
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <oox/ppt/pptimport.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#endif
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::container;
+using ::com::sun::star::awt::FontDescriptor;
+
+namespace oox::drawingml {
+
+BulletList::BulletList( )
+: maBulletColorPtr( std::make_shared<Color>() ),
+ mbBulletColorFollowText ( false ),
+ mbBulletFontFollowText ( false ),
+ mbBulletSizeFollowText ( false )
+{
+}
+
+bool BulletList::is() const
+{
+ return mnNumberingType.hasValue();
+}
+
+void BulletList::setBulletChar( const OUString & sChar )
+{
+ mnNumberingType <<= NumberingType::CHAR_SPECIAL;
+ msBulletChar <<= sChar;
+}
+
+void BulletList::setGraphic( css::uno::Reference< css::graphic::XGraphic > const & rXGraphic )
+{
+ mnNumberingType <<= NumberingType::BITMAP;
+ maGraphic <<= rXGraphic;
+}
+
+void BulletList::setNone( )
+{
+ mnNumberingType <<= NumberingType::NUMBER_NONE;
+}
+
+void BulletList::setSuffixParenBoth()
+{
+ msNumberingSuffix <<= OUString( ")" );
+ msNumberingPrefix <<= OUString( "(" );
+}
+
+void BulletList::setSuffixParenRight()
+{
+ msNumberingSuffix <<= OUString( ")" );
+ msNumberingPrefix <<= OUString();
+}
+
+void BulletList::setSuffixPeriod()
+{
+ msNumberingSuffix <<= OUString( "." );
+ msNumberingPrefix <<= OUString();
+}
+
+void BulletList::setSuffixNone()
+{
+ msNumberingSuffix <<= OUString();
+ msNumberingPrefix <<= OUString();
+}
+
+void BulletList::setSuffixMinusRight()
+{
+ msNumberingSuffix <<= OUString( "-" );
+ msNumberingPrefix <<= OUString();
+}
+
+void BulletList::setType( sal_Int32 nType )
+{
+ OSL_ASSERT((nType & sal_Int32(0xFFFF0000))==0);
+ switch( nType )
+ {
+ case XML_alphaLcParenBoth:
+ mnNumberingType <<= NumberingType::CHARS_LOWER_LETTER;
+ setSuffixParenBoth();
+ break;
+ case XML_alphaLcParenR:
+ mnNumberingType <<= NumberingType::CHARS_LOWER_LETTER;
+ setSuffixParenRight();
+ break;
+ case XML_alphaLcPeriod:
+ mnNumberingType <<= NumberingType::CHARS_LOWER_LETTER;
+ setSuffixPeriod();
+ break;
+ case XML_alphaUcParenBoth:
+ mnNumberingType <<= NumberingType::CHARS_UPPER_LETTER;
+ setSuffixParenBoth();
+ break;
+ case XML_alphaUcParenR:
+ mnNumberingType <<= NumberingType::CHARS_UPPER_LETTER;
+ setSuffixParenRight();
+ break;
+ case XML_alphaUcPeriod:
+ mnNumberingType <<= NumberingType::CHARS_UPPER_LETTER;
+ setSuffixPeriod();
+ break;
+ case XML_arabic1Minus:
+ case XML_arabic2Minus:
+ case XML_arabicDbPeriod:
+ case XML_arabicDbPlain:
+ // TODO
+ break;
+ case XML_arabicParenBoth:
+ mnNumberingType <<= NumberingType::ARABIC;
+ setSuffixParenBoth();
+ break;
+ case XML_arabicParenR:
+ mnNumberingType <<= NumberingType::ARABIC;
+ setSuffixParenRight();
+ break;
+ case XML_arabicPeriod:
+ mnNumberingType <<= NumberingType::ARABIC;
+ setSuffixPeriod();
+ break;
+ case XML_arabicPlain:
+ mnNumberingType <<= NumberingType::ARABIC;
+ setSuffixNone();
+ break;
+ case XML_circleNumDbPlain:
+ case XML_circleNumWdBlackPlain:
+ case XML_circleNumWdWhitePlain:
+ mnNumberingType <<= NumberingType::CIRCLE_NUMBER;
+ break;
+ case XML_ea1ChsPeriod:
+ mnNumberingType <<= NumberingType::NUMBER_UPPER_ZH;
+ setSuffixPeriod();
+ break;
+ case XML_ea1ChsPlain:
+ mnNumberingType <<= NumberingType::NUMBER_UPPER_ZH;
+ setSuffixNone();
+ break;
+ case XML_ea1ChtPeriod:
+ mnNumberingType <<= NumberingType::NUMBER_UPPER_ZH_TW;
+ setSuffixPeriod();
+ break;
+ case XML_ea1ChtPlain:
+ mnNumberingType <<= NumberingType::NUMBER_UPPER_ZH_TW;
+ setSuffixNone();
+ break;
+ case XML_ea1JpnChsDbPeriod:
+ case XML_ea1JpnKorPeriod:
+ case XML_ea1JpnKorPlain:
+ break;
+ case XML_hebrew2Minus:
+ mnNumberingType <<= NumberingType::CHARS_HEBREW;
+ setSuffixMinusRight();
+ break;
+ case XML_hindiAlpha1Period:
+ case XML_hindiAlphaPeriod:
+ case XML_hindiNumParenR:
+ case XML_hindiNumPeriod:
+ // TODO
+ break;
+ case XML_romanLcParenBoth:
+ mnNumberingType <<= NumberingType::ROMAN_LOWER;
+ setSuffixParenBoth();
+ break;
+ case XML_romanLcParenR:
+ mnNumberingType <<= NumberingType::ROMAN_LOWER;
+ setSuffixParenRight();
+ break;
+ case XML_romanLcPeriod:
+ mnNumberingType <<= NumberingType::ROMAN_LOWER;
+ setSuffixPeriod();
+ break;
+ case XML_romanUcParenBoth:
+ mnNumberingType <<= NumberingType::ROMAN_UPPER;
+ setSuffixParenBoth();
+ break;
+ case XML_romanUcParenR:
+ mnNumberingType <<= NumberingType::ROMAN_UPPER;
+ setSuffixParenRight();
+ break;
+ case XML_romanUcPeriod:
+ mnNumberingType <<= NumberingType::ROMAN_UPPER;
+ setSuffixPeriod();
+ break;
+ case XML_thaiAlphaParenBoth:
+ case XML_thaiNumParenBoth:
+ mnNumberingType <<= NumberingType::CHARS_THAI;
+ setSuffixParenBoth();
+ break;
+ case XML_thaiAlphaParenR:
+ case XML_thaiNumParenR:
+ mnNumberingType <<= NumberingType::CHARS_THAI;
+ setSuffixParenRight();
+ break;
+ case XML_thaiAlphaPeriod:
+ case XML_thaiNumPeriod:
+ mnNumberingType <<= NumberingType::CHARS_THAI;
+ setSuffixPeriod();
+ break;
+ }
+}
+
+void BulletList::setBulletSize(sal_Int16 nSize)
+{
+ mnSize <<= nSize;
+}
+
+void BulletList::setBulletAspectRatio(double nAspectRatio)
+{
+ mnAspectRatio <<= nAspectRatio;
+}
+
+void BulletList::setFontSize(sal_Int16 nSize)
+{
+ mnFontSize <<= nSize;
+}
+
+void BulletList::apply( const BulletList& rSource )
+{
+ if ( rSource.maBulletColorPtr->isUsed() )
+ maBulletColorPtr = rSource.maBulletColorPtr;
+ if ( rSource.mbBulletColorFollowText.hasValue() )
+ mbBulletColorFollowText = rSource.mbBulletColorFollowText;
+ if ( rSource.mbBulletFontFollowText.hasValue() )
+ mbBulletFontFollowText = rSource.mbBulletFontFollowText;
+ if ( rSource.mbBulletSizeFollowText.hasValue() )
+ mbBulletSizeFollowText = rSource.mbBulletSizeFollowText;
+ maBulletFont.assignIfUsed( rSource.maBulletFont );
+ if ( rSource.msBulletChar.hasValue() )
+ msBulletChar = rSource.msBulletChar;
+ if ( rSource.mnStartAt.hasValue() )
+ mnStartAt = rSource.mnStartAt;
+ if ( rSource.mnNumberingType.hasValue() )
+ mnNumberingType = rSource.mnNumberingType;
+ if ( rSource.msNumberingPrefix.hasValue() )
+ msNumberingPrefix = rSource.msNumberingPrefix;
+ if ( rSource.msNumberingSuffix.hasValue() )
+ msNumberingSuffix = rSource.msNumberingSuffix;
+ if ( rSource.mnSize.hasValue() )
+ mnSize = rSource.mnSize;
+ if ( rSource.mnAspectRatio.hasValue() )
+ mnAspectRatio = rSource.mnAspectRatio;
+ if ( rSource.mnFontSize.hasValue() )
+ mnFontSize = rSource.mnFontSize;
+ if ( rSource.maStyleName.hasValue() )
+ maStyleName = rSource.maStyleName;
+ if ( rSource.maGraphic.hasValue() )
+ maGraphic = rSource.maGraphic;
+}
+
+void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, PropertyMap& rPropMap ) const
+{
+ if( msNumberingPrefix.hasValue() )
+ rPropMap.setAnyProperty( PROP_Prefix, msNumberingPrefix);
+ if( msNumberingSuffix.hasValue() )
+ rPropMap.setAnyProperty( PROP_Suffix, msNumberingSuffix);
+ if( mnStartAt.hasValue() )
+ rPropMap.setAnyProperty( PROP_StartWith, mnStartAt);
+ rPropMap.setProperty( PROP_Adjust, HoriOrientation::LEFT);
+
+ if( mnNumberingType.hasValue() )
+ rPropMap.setAnyProperty( PROP_NumberingType, mnNumberingType);
+
+ OUString aBulletFontName;
+ sal_Int16 nBulletFontPitch = 0;
+ sal_Int16 nBulletFontFamily = 0;
+ float nBulletFontWeight = css::awt::FontWeight::NORMAL;
+ bool bSymbolFont = false;
+ if( pFilterBase) {
+ bool bFollowTextFont = false;
+ mbBulletFontFollowText >>= bFollowTextFont;
+ if (!bFollowTextFont && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, *pFilterBase ) )
+ {
+ FontDescriptor aFontDesc;
+ sal_Int16 nFontSize = 0;
+ if( mnFontSize >>= nFontSize )
+ aFontDesc.Height = nFontSize;
+
+ // TODO move the to the TextFont struct.
+ aFontDesc.Name = aBulletFontName;
+ aFontDesc.Pitch = nBulletFontPitch;
+ aFontDesc.Family = nBulletFontFamily;
+ aFontDesc.Weight = nBulletFontWeight;
+ if ( aBulletFontName.equalsIgnoreAsciiCase("Wingdings") ||
+ aBulletFontName.equalsIgnoreAsciiCase("Wingdings 2") ||
+ aBulletFontName.equalsIgnoreAsciiCase("Wingdings 3") ||
+ aBulletFontName.equalsIgnoreAsciiCase("Monotype Sorts") ||
+ aBulletFontName.equalsIgnoreAsciiCase("Monotype Sorts 2") ||
+ aBulletFontName.equalsIgnoreAsciiCase("Webdings") ||
+ aBulletFontName.equalsIgnoreAsciiCase("StarBats") ||
+ aBulletFontName.equalsIgnoreAsciiCase("StarMath") ||
+ aBulletFontName.equalsIgnoreAsciiCase("ZapfDingbats") ) {
+ aFontDesc.CharSet = RTL_TEXTENCODING_SYMBOL;
+ bSymbolFont = true;
+ }
+ rPropMap.setProperty( PROP_BulletFont, aFontDesc);
+ rPropMap.setProperty( PROP_BulletFontName, aBulletFontName);
+ }
+ }
+ if ( msBulletChar.hasValue() ) {
+ OUString sBuChar;
+
+ msBulletChar >>= sBuChar;
+
+ if( pFilterBase && sBuChar.getLength() == 1 && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, *pFilterBase ) && bSymbolFont )
+ {
+ sal_Unicode nBuChar = sBuChar.toChar();
+ nBuChar &= 0x00ff;
+ nBuChar |= 0xf000;
+ sBuChar = OUString( &nBuChar, 1 );
+ }
+
+ rPropMap.setProperty( PROP_BulletChar, sBuChar);
+ }
+ if ( maGraphic.hasValue() )
+ {
+ Reference<css::awt::XBitmap> xBitmap(maGraphic, UNO_QUERY);
+ if (xBitmap.is())
+ rPropMap.setProperty(PROP_GraphicBitmap, xBitmap);
+ }
+ bool bFollowTextSize = false;
+ mbBulletSizeFollowText >>= bFollowTextSize;
+ if( !bFollowTextSize && mnSize.hasValue() )
+ rPropMap.setAnyProperty( PROP_BulletRelSize, mnSize);
+ if ( maStyleName.hasValue() )
+ rPropMap.setAnyProperty( PROP_CharStyleName, maStyleName);
+ if (pFilterBase ) {
+ bool bFollowTextColor = false;
+ mbBulletColorFollowText >>= bFollowTextColor;
+ if ( maBulletColorPtr->isUsed() && !bFollowTextColor )
+ rPropMap.setProperty( PROP_BulletColor, maBulletColorPtr->getColor( pFilterBase->getGraphicHelper() ));
+ }
+}
+
+TextParagraphProperties::TextParagraphProperties()
+: mnLevel( 0 )
+{
+}
+
+void TextParagraphProperties::apply( const TextParagraphProperties& rSourceProps )
+{
+ maTextParagraphPropertyMap.assignAll( rSourceProps.maTextParagraphPropertyMap );
+ maBulletList.apply( rSourceProps.maBulletList );
+ maTextCharacterProperties.assignUsed( rSourceProps.maTextCharacterProperties );
+ if ( rSourceProps.maParaTopMargin.bHasValue )
+ maParaTopMargin = rSourceProps.maParaTopMargin;
+ if ( rSourceProps.maParaBottomMargin.bHasValue )
+ maParaBottomMargin = rSourceProps.maParaBottomMargin;
+ if ( rSourceProps.moParaLeftMargin )
+ moParaLeftMargin = rSourceProps.moParaLeftMargin;
+ if ( rSourceProps.moFirstLineIndentation )
+ moFirstLineIndentation = rSourceProps.moFirstLineIndentation;
+ if( rSourceProps.mnLevel )
+ mnLevel = rSourceProps.mnLevel;
+ if( rSourceProps.moParaAdjust )
+ moParaAdjust = rSourceProps.moParaAdjust;
+ if( rSourceProps.maLineSpacing.bHasValue )
+ maLineSpacing = rSourceProps.maLineSpacing;
+}
+
+void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase,
+ const Reference < XPropertySet >& xPropSet, PropertyMap& rioBulletMap, const BulletList* pMasterBuList, bool bApplyBulletMap, float fCharacterSize,
+ sal_Int32 nAutofitFontScale, bool bPushDefaultValues ) const
+{
+ PropertySet aPropSet( xPropSet );
+ aPropSet.setProperties( maTextParagraphPropertyMap );
+
+ sal_Int32 nNumberingType = NumberingType::NUMBER_NONE;
+ if ( maBulletList.mnNumberingType.hasValue() )
+ {
+ maBulletList.mnNumberingType >>= nNumberingType;
+ aPropSet.setProperty< sal_Int16 >( PROP_NumberingLevel, getLevel() );
+ }
+ else if ( pMasterBuList && pMasterBuList->mnNumberingType.hasValue() )
+ pMasterBuList->mnNumberingType >>= nNumberingType;
+ if ( nNumberingType == NumberingType::NUMBER_NONE )
+ aPropSet.setProperty< sal_Int16 >( PROP_NumberingLevel, -1 );
+
+ maBulletList.pushToPropMap( pFilterBase, rioBulletMap );
+
+ if ( maParaTopMargin.bHasValue || bPushDefaultValues )
+ aPropSet.setProperty( PROP_ParaTopMargin, maParaTopMargin.toMargin( fCharacterSize != 0.0 ? fCharacterSize : getCharHeightPoints ( 12.0 ) ) );
+ if ( maParaBottomMargin.bHasValue || bPushDefaultValues )
+ aPropSet.setProperty( PROP_ParaBottomMargin, maParaBottomMargin.toMargin( fCharacterSize != 0.0 ? fCharacterSize : getCharHeightPoints ( 12.0 ) ) );
+
+ std::optional< sal_Int32 > noParaLeftMargin( moParaLeftMargin );
+ std::optional< sal_Int32 > noFirstLineIndentation( moFirstLineIndentation );
+
+ // tdf#149961 Impress scales the indents when text is autofitted while Powerpoint doesn't
+ // Try to counteract this by multiplying indents by the inverse of the autofit font scale.
+ if ( nAutofitFontScale )
+ {
+ if ( noParaLeftMargin ) noParaLeftMargin = *noParaLeftMargin * MAX_PERCENT / nAutofitFontScale;
+ if ( noFirstLineIndentation ) noFirstLineIndentation = *noFirstLineIndentation * MAX_PERCENT / nAutofitFontScale;
+ }
+
+ if ( nNumberingType != NumberingType::NUMBER_NONE )
+ {
+ if ( noParaLeftMargin )
+ {
+ aPropSet.setProperty<sal_Int32>( PROP_ParaLeftMargin, 0);
+ rioBulletMap.setProperty( PROP_LeftMargin, *noParaLeftMargin);
+ noParaLeftMargin.reset();
+ }
+ if ( noFirstLineIndentation )
+ {
+ // Force Paragraph property as zero - impress seems to use the value from previous
+ // (non) bullet line if not set to zero explicitly :(
+ aPropSet.setProperty<sal_Int32>( PROP_ParaFirstLineIndent, 0);
+ rioBulletMap.setProperty( PROP_FirstLineOffset, *noFirstLineIndentation);
+ noFirstLineIndentation.reset();
+ }
+ if ( nNumberingType != NumberingType::BITMAP && !rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase )
+ rioBulletMap.setProperty( PROP_BulletColor, maTextCharacterProperties.maFillProperties.getBestSolidColor().getColor( pFilterBase->getGraphicHelper()));
+ }
+
+ if ( bApplyBulletMap )
+ {
+ Reference< XIndexReplace > xNumRule;
+ aPropSet.getProperty( xNumRule, PROP_NumberingRules );
+ OSL_ENSURE( xNumRule.is(), "can't get Numbering rules");
+
+ try
+ {
+ if( xNumRule.is() )
+ {
+ if( !rioBulletMap.empty() )
+ {
+ // fix default bullet size to be 100%
+ if( !rioBulletMap.hasProperty( PROP_BulletRelSize ) )
+ rioBulletMap.setProperty<sal_Int16>( PROP_BulletRelSize, 100);
+ Sequence< PropertyValue > aBulletPropSeq = rioBulletMap.makePropertyValueSequence();
+ xNumRule->replaceByIndex( getLevel(), Any( aBulletPropSeq ) );
+ }
+
+ aPropSet.setProperty( PROP_NumberingRules, xNumRule );
+ }
+ }
+ catch (const Exception &)
+ {
+ // Don't warn for now, expected to fail for Writer.
+ }
+ }
+ if ( noParaLeftMargin )
+ aPropSet.setProperty( PROP_ParaLeftMargin, *noParaLeftMargin);
+ if ( noFirstLineIndentation )
+ {
+ aPropSet.setProperty( PROP_ParaFirstLineIndent, *noFirstLineIndentation );
+ if( bPushDefaultValues )
+ {
+ // Reset TabStops - these would be auto calculated by Impress
+ TabStop aTabStop;
+ aTabStop.Position = 0;
+ Sequence< TabStop > aSeq { aTabStop };
+ aPropSet.setProperty( PROP_ParaTabStops, aSeq );
+ }
+ }
+
+ if ( moParaAdjust )
+ {
+ aPropSet.setProperty( PROP_ParaAdjust, *moParaAdjust);
+ }
+ else
+ {
+ aPropSet.setProperty( PROP_ParaAdjust, css::style::ParagraphAdjust_LEFT);
+ }
+
+ if ( maLineSpacing.bHasValue )
+ {
+ aPropSet.setProperty( PROP_ParaLineSpacing, maLineSpacing.toLineSpacing());
+ }
+ else
+ {
+ aPropSet.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( css::style::LineSpacingMode::PROP, 100 ));
+ }
+}
+
+float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
+{
+ return maTextCharacterProperties.getCharHeightPoints( fDefault );
+}
+
+#ifdef DBG_UTIL
+// Note: Please don't remove this function. This is required for
+// debugging pptx import problems.
+void TextParagraphProperties::dump() const
+{
+ Reference< css::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( "com.sun.star.presentation.TitleTextShape" ), UNO_QUERY );
+ Reference< css::text::XText > xText( xShape, UNO_QUERY );
+
+ Reference< css::drawing::XDrawPage > xDebugPage(ppt::SlidePersist::mxDebugPage.get(), UNO_QUERY);
+ if (xDebugPage.is())
+ xDebugPage->add( xShape );
+
+ PropertyMap emptyMap;
+
+ xText->setString( "debug" );
+ Reference< css::text::XTextCursor > xStart = xText->createTextCursor();
+ xStart->gotoEnd( true );
+ Reference< XPropertySet > xPropSet( xStart, UNO_QUERY );
+ pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 );
+ PropertySet aPropSet( xPropSet );
+ aPropSet.dump();
+}
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
new file mode 100644
index 000000000..c1b8763a9
--- /dev/null
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -0,0 +1,375 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textparagraphpropertiescontext.hxx>
+
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/UnitConversion.hxx>
+
+#include <drawingml/colorchoicecontext.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/textcharacterpropertiescontext.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/helper/attributelist.hxx>
+#include "textspacingcontext.hxx"
+#include "texttabstoplistcontext.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::graphic;
+
+namespace oox::drawingml {
+namespace {
+
+double lclGetGraphicAspectRatio( const Reference< XGraphic >& rxGraphic )
+{
+ double fRatio = 1.0;
+ Reference< com::sun::star::beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
+ css::awt::Size aSizeHmm( 0, 0 );
+ xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm;
+
+ if( aSizeHmm.Width > 0 && aSizeHmm.Height > 0)
+ return double(aSizeHmm.Width)/double(aSizeHmm.Height);
+ else
+ {
+ css::awt::Size aSourceSizePixel( 0, 0 );
+ xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel;
+
+ if( aSourceSizePixel.Width > 0 && aSourceSizePixel.Height > 0 )
+ return double(aSourceSizePixel.Width)/double(aSourceSizePixel.Height);
+ }
+ return fRatio;
+}
+
+} //namespace
+
+// CT_TextParagraphProperties
+TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2Helper const & rParent,
+ const AttributeList& rAttribs,
+ TextParagraphProperties& rTextParagraphProperties )
+: ContextHandler2( rParent )
+, mrTextParagraphProperties( rTextParagraphProperties )
+, mrBulletList( rTextParagraphProperties.getBulletList() )
+{
+ OUString sValue;
+
+ PropertyMap& rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() );
+
+ // ST_TextAlignType
+ if ( rAttribs.hasAttribute( XML_algn ) )
+ {
+ mrTextParagraphProperties.getParaAdjust() = GetParaAdjust( rAttribs.getToken( XML_algn, XML_l ) );
+ }
+ // TODO see to do the same with RubyAdjust
+
+ // ST_Coordinate32
+// sValue = rAttribs.getString( XML_defTabSz ).get(); SJ: we need to be able to set the default tab size for each text object,
+// this is possible at the moment only for the whole document.
+// sal_Int32 nDefTabSize = ( sValue.getLength() == 0 ? 0 : GetCoordinate( sValue ) );
+ // TODO
+
+// bool bEaLineBrk = rAttribs.getBool( XML_eaLnBrk, true );
+ if ( rAttribs.hasAttribute( XML_latinLnBrk ) )
+ {
+ bool bLatinLineBrk = rAttribs.getBool( XML_latinLnBrk, true );
+ rPropertyMap.setProperty( PROP_ParaIsHyphenation, bLatinLineBrk);
+ }
+ // TODO see what to do with Asian hyphenation
+
+ // ST_TextFontAlignType
+ // TODO
+// sal_Int32 nFontAlign = rAttribs.getToken( XML_fontAlgn, XML_base );
+
+ if ( rAttribs.hasAttribute( XML_hangingPunct ) )
+ {
+ bool bHangingPunct = rAttribs.getBool( XML_hangingPunct, false );
+ rPropertyMap.setProperty( PROP_ParaIsHangingPunctuation, bHangingPunct);
+ }
+
+ // ST_Coordinate
+ if ( rAttribs.hasAttribute( XML_indent ) )
+ {
+ sValue = rAttribs.getString( XML_indent ).get();
+ mrTextParagraphProperties.getFirstLineIndentation() = std::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
+ }
+
+ // ST_TextIndentLevelType
+ // -1 is an invalid value and denote the lack of level
+ sal_Int32 nLevel = rAttribs.getInteger( XML_lvl, 0 );
+ if( nLevel > 8 || nLevel < 0 )
+ {
+ nLevel = 0;
+ }
+
+ mrTextParagraphProperties.setLevel( static_cast< sal_Int16 >( nLevel ) );
+
+ char name[] = "Outline X";
+ name[8] = static_cast<char>( '1' + nLevel );
+ const OUString sStyleNameValue( OUString::createFromAscii( name ) );
+ mrBulletList.setStyleName( sStyleNameValue );
+
+ // ST_TextMargin
+ // ParaLeftMargin
+ if ( rAttribs.hasAttribute( XML_marL ) )
+ {
+ sValue = rAttribs.getString( XML_marL ).get();
+ mrTextParagraphProperties.getParaLeftMargin() = std::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
+ }
+
+ // ParaRightMargin
+ if ( rAttribs.hasAttribute( XML_marR ) )
+ {
+ sValue = rAttribs.getString( XML_marR ).get();
+ sal_Int32 nMarR = sValue.isEmpty() ? 0 : GetCoordinate( sValue ) ;
+ rPropertyMap.setProperty( PROP_ParaRightMargin, nMarR);
+ }
+
+ if ( rAttribs.hasAttribute( XML_rtl ) )
+ {
+ bool bRtl = rAttribs.getBool( XML_rtl, false );
+ rPropertyMap.setProperty( PROP_WritingMode, ( bRtl ? WritingMode2::RL_TB : WritingMode2::LR_TB ));
+ }
+}
+
+TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
+{
+ PropertyMap& rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() );
+ if ( mrTextParagraphProperties.getLineSpacing().bHasValue )
+ rPropertyMap.setProperty( PROP_ParaLineSpacing, mrTextParagraphProperties.getLineSpacing().toLineSpacing());
+ else
+ rPropertyMap.setProperty( PROP_ParaLineSpacing, css::style::LineSpacing( css::style::LineSpacingMode::PROP, 100 ));
+
+ ::std::vector< TabStop >::size_type nTabCount = maTabList.size();
+ if( nTabCount != 0 )
+ {
+ Sequence< TabStop > aSeq( nTabCount );
+ TabStop * aArray = aSeq.getArray();
+ OSL_ENSURE( aArray != nullptr, "sequence array is NULL" );
+ ::std::copy( maTabList.begin(), maTabList.end(), aArray );
+ rPropertyMap.setProperty( PROP_ParaTabStops, aSeq);
+ }
+
+ if (mxBlipProps && mxBlipProps->mxFillGraphic.is())
+ {
+ mrBulletList.setGraphic( mxBlipProps->mxFillGraphic );
+ mrBulletList.setBulletAspectRatio( lclGetGraphicAspectRatio(mxBlipProps->mxFillGraphic) );
+ }
+
+ if( mrBulletList.is() )
+ rPropertyMap.setProperty( PROP_IsNumbering, true);
+ sal_Int16 nLevel = mrTextParagraphProperties.getLevel();
+ rPropertyMap.setProperty( PROP_NumberingLevel, nLevel);
+ rPropertyMap.setProperty( PROP_NumberingIsNumber, true);
+
+ if( mrTextParagraphProperties.getParaAdjust() )
+ rPropertyMap.setProperty( PROP_ParaAdjust, *mrTextParagraphProperties.getParaAdjust());
+}
+
+ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case A_TOKEN( lnSpc ): // CT_TextSpacing
+ return new TextSpacingContext( *this, mrTextParagraphProperties.getLineSpacing() );
+ case A_TOKEN( spcBef ): // CT_TextSpacing
+ return new TextSpacingContext( *this, mrTextParagraphProperties.getParaTopMargin() );
+ case A_TOKEN( spcAft ): // CT_TextSpacing
+ return new TextSpacingContext( *this, mrTextParagraphProperties.getParaBottomMargin() );
+ // EG_TextBulletColor
+ case A_TOKEN( buClrTx ): // CT_TextBulletColorFollowText ???
+ mrBulletList.mbBulletColorFollowText <<= true;
+ break;
+ case A_TOKEN( buClr ): // CT_Color
+ return new ColorContext( *this, *mrBulletList.maBulletColorPtr );
+ // EG_TextBulletSize
+ case A_TOKEN( buSzTx ): // CT_TextBulletSizeFollowText
+ mrBulletList.mbBulletSizeFollowText <<= true;
+ break;
+ case A_TOKEN( buSzPct ): // CT_TextBulletSizePercent
+ mrBulletList.setBulletSize( std::lround( GetPercent( rAttribs.getString( XML_val ).get() ) / 1000.f ) );
+ break;
+ case A_TOKEN( buSzPts ): // CT_TextBulletSizePoint
+ mrBulletList.setBulletSize(0);
+ mrBulletList.setFontSize( static_cast<sal_Int16>(GetTextSize( rAttribs.getString( XML_val ).get() ) ) );
+ break;
+
+ // EG_TextBulletTypeface
+ case A_TOKEN( buFontTx ): // CT_TextBulletTypefaceFollowText
+ mrBulletList.mbBulletFontFollowText <<= true;
+ break;
+ case A_TOKEN( buFont ): // CT_TextFont
+ mrBulletList.maBulletFont.setAttributes( rAttribs );
+ break;
+
+ // EG_TextBullet
+ case A_TOKEN( buNone ): // CT_TextNoBullet
+ mrBulletList.setNone();
+ break;
+ case A_TOKEN( buAutoNum ): // CT_TextAutonumberBullet
+ {
+ try {
+ sal_Int32 nType = rAttribs.getToken( XML_type, 0 );
+ sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, 1 );
+ if( nStartAt > 32767 )
+ {
+ nStartAt = 32767;
+ }
+ else if( nStartAt < 1 )
+ {
+ nStartAt = 1;
+ }
+ mrBulletList.setStartAt( nStartAt );
+ mrBulletList.setType( nType );
+ }
+ catch(SAXException& /* e */ )
+ {
+ TOOLS_WARN_EXCEPTION("oox", "OOX: SAXException in XML_buAutoNum");
+ }
+ break;
+ }
+ case A_TOKEN( buChar ): // CT_TextCharBullet
+ try {
+
+ mrBulletList.setBulletChar( rAttribs.getString( XML_char ).get() );
+ mrBulletList.setSuffixNone();
+ }
+ catch(SAXException& /* e */)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "OOX: SAXException in XML_buChar");
+ }
+ break;
+ case A_TOKEN( buBlip ): // CT_TextBlipBullet
+ {
+ mxBlipProps = std::make_shared<BlipFillProperties>();
+ return new BlipFillContext( *this, rAttribs, *mxBlipProps );
+ }
+ case A_TOKEN( tabLst ): // CT_TextTabStopList
+ return new TextTabStopListContext( *this, maTabList );
+ case A_TOKEN( defRPr ): // CT_TextCharacterProperties
+ return new TextCharacterPropertiesContext( *this, rAttribs, mrTextParagraphProperties.getTextCharacterProperties() );
+ case W_TOKEN( jc ):
+ {
+ OptValue< OUString > oParaAdjust = rAttribs.getString( W_TOKEN(val) );
+ if( oParaAdjust.has() && !oParaAdjust.get().isEmpty() )
+ {
+ const OUString& sParaAdjust = oParaAdjust.get();
+ if( sParaAdjust == "left" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_LEFT);
+ else if ( sParaAdjust == "right" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_RIGHT);
+ else if ( sParaAdjust == "center" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_CENTER);
+ else if ( sParaAdjust == "both" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_BLOCK);
+ }
+ }
+ break;
+ case W_TOKEN( spacing ):
+ {
+ // Spacing before
+ if( !rAttribs.getBool(W_TOKEN(beforeAutospacing), false) )
+ {
+ OptValue<sal_Int32> oBefore = rAttribs.getInteger(W_TOKEN(before));
+ if (oBefore.has())
+ {
+ TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin();
+ rSpacing.nUnit = TextSpacing::Unit::Points;
+ rSpacing.nValue = convertTwipToMm100(oBefore.get());
+ rSpacing.bHasValue = true;
+ }
+ else
+ {
+ OptValue<sal_Int32> oBeforeLines = rAttribs.getInteger(W_TOKEN(beforeLines));
+ if (oBeforeLines.has())
+ {
+ TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin();
+ rSpacing.nUnit = TextSpacing::Unit::Percent;
+ rSpacing.nValue = oBeforeLines.get() * MAX_PERCENT / 100;
+ rSpacing.bHasValue = true;
+ }
+ }
+ }
+
+ // Spacing after
+ if( !rAttribs.getBool(W_TOKEN(afterAutospacing), false) )
+ {
+ OptValue<sal_Int32> oAfter = rAttribs.getInteger(W_TOKEN(after));
+ if (oAfter.has())
+ {
+ TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin();
+ rSpacing.nUnit = TextSpacing::Unit::Points;
+ rSpacing.nValue = convertTwipToMm100(oAfter.get());
+ rSpacing.bHasValue = true;
+ }
+ else
+ {
+ OptValue<sal_Int32> oAfterLines = rAttribs.getInteger(W_TOKEN(afterLines));
+ if (oAfterLines.has())
+ {
+ TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin();
+ rSpacing.nUnit = TextSpacing::Unit::Percent;
+ rSpacing.nValue = oAfterLines.get() * MAX_PERCENT / 100;
+ rSpacing.bHasValue = true;
+ }
+ }
+ }
+
+ // Line spacing
+ OptValue<OUString> oLineRule = rAttribs.getString(W_TOKEN(lineRule));
+ OptValue<sal_Int32> oLineSpacing = rAttribs.getInteger(W_TOKEN(line));
+ if (oLineSpacing.has())
+ {
+ TextSpacing& rLineSpacing = mrTextParagraphProperties.getLineSpacing();
+ if( !oLineRule.has() || oLineRule.get() == "auto" )
+ {
+ rLineSpacing.nUnit = TextSpacing::Unit::Percent;
+ rLineSpacing.nValue = oLineSpacing.get() * MAX_PERCENT / 240;
+ }
+ else
+ {
+ rLineSpacing.nUnit = TextSpacing::Unit::Points;
+ rLineSpacing.nValue = convertTwipToMm100(oLineSpacing.get());
+ }
+ rLineSpacing.bHasValue = true;
+ }
+ }
+ break;
+ default:
+ SAL_WARN("oox", "TextParagraphPropertiesContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ }
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
new file mode 100644
index 000000000..e3bcecb74
--- /dev/null
+++ b/oox/source/drawingml/textrun.cxx
@@ -0,0 +1,190 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textrun.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+
+#include <sal/log.hxx>
+
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+
+namespace oox::drawingml {
+
+TextRun::TextRun() :
+ mbIsLineBreak( false )
+{
+}
+
+TextRun::~TextRun()
+{
+}
+
+sal_Int32 TextRun::insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const Reference < XText > & xText,
+ const Reference < XTextCursor > &xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float nDefaultCharHeight) const
+{
+ sal_Int32 nCharHeight = 0;
+ try {
+ Reference< XTextRange > xStart = xAt;
+ PropertySet aPropSet( xStart );
+
+ Reference<XPropertyState> xState(xStart, UNO_QUERY);
+ Any aOldFontName = xState->getPropertyDefault("CharFontName");
+ Any aOldFontPitch = xState->getPropertyDefault("CharFontPitch");
+ Any aOldFontFamily = xState->getPropertyDefault("CharFontFamily");
+
+ TextCharacterProperties aTextCharacterProps( rTextCharacterStyle );
+
+ // If no text color specified lets anyway initialize it as default:
+ // this will help to recover after hyperlink
+ if (!aTextCharacterProps.maFillProperties.maFillColor.isUsed())
+ aTextCharacterProps.maFillProperties.moFillType = XML_solidFill;
+
+ aTextCharacterProps.assignUsed(maTextCharacterProperties);
+ if ( aTextCharacterProps.moHeight.has() )
+ nCharHeight = aTextCharacterProps.moHeight.get();
+ else
+ // UNO API has the character height as float, DML has it as int, but in hundreds.
+ aTextCharacterProps.moHeight = static_cast<sal_Int32>(nDefaultCharHeight * 100);
+ aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase );
+
+ if( maTextCharacterProperties.maHyperlinkPropertyMap.empty() )
+ {
+ if( mbIsLineBreak )
+ {
+ SAL_WARN("oox", "OOX: TextRun::insertAt() insert line break" );
+ xText->insertControlCharacter( xStart, ControlCharacter::LINE_BREAK, false );
+ }
+ else if (!getText().isEmpty())
+ {
+ sal_Int32 nIndex = 0;
+ sal_Int32 nMax = getText().getLength();
+ while(true)
+ {
+ bool bSymbol = (getText()[nIndex] & 0xff00) == 0xf000;
+ sal_Int32 nCount = 1;
+ while(nIndex + nCount < nMax
+ && ((getText()[nIndex + nCount] & 0xff00) == 0xf000) == bSymbol)
+ ++nCount;
+
+ OUString aFontName;
+ sal_Int16 nFontFamily = 0, nFontPitch = 0;
+ bool bReset = false;
+
+ // Direct formatting for symbols.
+ if (bSymbol && aTextCharacterProps.maSymbolFont.getFontData(aFontName, nFontPitch, nFontFamily, rFilterBase))
+
+ {
+ aPropSet.setAnyProperty(PROP_CharFontName, Any(aFontName));
+ aPropSet.setAnyProperty(PROP_CharFontPitch, Any(nFontPitch));
+ aPropSet.setAnyProperty(PROP_CharFontFamily, Any(nFontFamily));
+ bReset = true;
+ }
+
+ OUString aSubString(getText().copy(nIndex, nCount));
+ xText->insertString(xStart, aSubString, false);
+
+ aPropSet = PropertySet(xStart);
+ // Reset to whatever it was.
+ if (bReset)
+ {
+ aPropSet.setAnyProperty(PROP_CharFontName, aOldFontName);
+ aPropSet.setAnyProperty(PROP_CharFontPitch, aOldFontPitch);
+ aPropSet.setAnyProperty(PROP_CharFontFamily, aOldFontFamily);
+ }
+
+ nIndex += nCount;
+
+ if (nIndex >= nMax)
+ break;
+
+ aTextCharacterProps.pushToPropSet(aPropSet, rFilterBase);
+ }
+ }
+ }
+ else
+ {
+ SAL_WARN("oox", "OOX: URL field" );
+ Reference< XMultiServiceFactory > xFactory( rFilterBase.getModel(), UNO_QUERY );
+ Reference< XTextField > xField( xFactory->createInstance( "com.sun.star.text.TextField.URL" ), UNO_QUERY );
+ if( xField.is() )
+ {
+ Reference< XTextCursor > xTextFieldCursor = xText->createTextCursor();
+ xTextFieldCursor->gotoEnd( false );
+
+ PropertySet aFieldProps( xField );
+ aFieldProps.setProperties( maTextCharacterProperties.maHyperlinkPropertyMap );
+ aFieldProps.setProperty( PROP_Representation, getText() );
+ xText->insertTextContent( xStart, xField, false );
+
+ xTextFieldCursor->gotoEnd( true );
+
+ if (!maTextCharacterProperties.maHyperlinkPropertyMap.hasProperty(PROP_CharColor))
+ aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr(XML_hlink);
+
+ aTextCharacterProps.maFillProperties.moFillType.set(XML_solidFill);
+ if ( !maTextCharacterProperties.moUnderline.has() )
+ aTextCharacterProps.moUnderline.set( XML_sng );
+
+ PropertySet aFieldTextPropSet( xTextFieldCursor );
+ aTextCharacterProps.pushToPropSet( aFieldTextPropSet, rFilterBase );
+
+ oox::core::TextField aTextField;
+ aTextField.xText = xText;
+ aTextField.xTextCursor = xTextFieldCursor;
+ aTextField.xTextField = xField;
+ rFilterBase.getTextFieldStack().push_back( aTextField );
+ }
+ else
+ {
+ SAL_WARN("oox", "OOX: URL field couldn't be created" );
+ xText->insertString( xStart, getText(), false );
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("oox", "OOX: TextRun::insertAt()");
+ }
+
+ return nCharHeight;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textspacingcontext.cxx b/oox/source/drawingml/textspacingcontext.cxx
new file mode 100644
index 000000000..f96f1a20c
--- /dev/null
+++ b/oox/source/drawingml/textspacingcontext.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/textspacing.hxx>
+#include "textspacingcontext.hxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+
+namespace oox::drawingml {
+
+ TextSpacingContext::TextSpacingContext( ContextHandler2Helper const & rParent, TextSpacing & aSpacing )
+ : ContextHandler2( rParent )
+ , maSpacing( aSpacing )
+ {
+ maSpacing.bHasValue = true;
+ }
+
+ ContextHandlerRef TextSpacingContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
+ {
+ switch( aElement )
+ {
+ case A_TOKEN( spcPct ):
+ maSpacing.nUnit = TextSpacing::Unit::Percent;
+ maSpacing.nValue = GetPercent( rAttribs.getString( XML_val ).get() );
+ break;
+ case A_TOKEN( spcPts ):
+ maSpacing.nUnit = TextSpacing::Unit::Points;
+ maSpacing.nValue = GetTextSpacingPoint( rAttribs.getString( XML_val ).get() );
+ maSpacing.bExactValue = true;
+ break;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textspacingcontext.hxx b/oox/source/drawingml/textspacingcontext.hxx
new file mode 100644
index 000000000..5af2c0544
--- /dev/null
+++ b/oox/source/drawingml/textspacingcontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_TEXTSPACINGCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_TEXTSPACINGCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml
+{
+class TextSpacing;
+
+class TextSpacingContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextSpacingContext(::oox::core::ContextHandler2Helper const& rParent, TextSpacing& aSpacing);
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TextSpacing& maSpacing;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/texttabstoplistcontext.cxx b/oox/source/drawingml/texttabstoplistcontext.cxx
new file mode 100644
index 000000000..09809a9d8
--- /dev/null
+++ b/oox/source/drawingml/texttabstoplistcontext.cxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <rtl/ustring.hxx>
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include "texttabstoplistcontext.hxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+ TextTabStopListContext::TextTabStopListContext( ContextHandler2Helper const & rParent, std::vector< TabStop > & aTabList )
+ : ContextHandler2( rParent )
+ , maTabList( aTabList )
+ {
+ }
+
+ TextTabStopListContext::~TextTabStopListContext()
+ {
+ }
+
+ ContextHandlerRef TextTabStopListContext::onCreateContext( ::sal_Int32 aElement, const AttributeList& rAttribs )
+ {
+ switch( aElement )
+ {
+ case A_TOKEN( tab ):
+ {
+ OUString sValue;
+ TabStop aTabStop;
+ sValue = rAttribs.getString( XML_pos ).get();
+ if( !sValue.isEmpty() )
+ {
+ aTabStop.Position = GetCoordinate( sValue );
+ }
+ sal_Int32 aToken = rAttribs.getToken( XML_algn, 0 );
+ if( aToken != 0 )
+ {
+ aTabStop.Alignment = GetTabAlign( aToken );
+ }
+ maTabList.push_back(aTabStop);
+ break;
+ }
+ default:
+ break;
+ }
+ return this;
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/texttabstoplistcontext.hxx b/oox/source/drawingml/texttabstoplistcontext.hxx
new file mode 100644
index 000000000..e1ca2cb11
--- /dev/null
+++ b/oox/source/drawingml/texttabstoplistcontext.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_TEXTTABSTOPLISTCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_DRAWINGML_TEXTTABSTOPLISTCONTEXT_HXX
+
+#include <vector>
+
+#include <com/sun/star/style/TabStop.hpp>
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml {
+
+class TextTabStopListContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TextTabStopListContext( ::oox::core::ContextHandler2Helper const & rParent,
+ ::std::vector< css::style::TabStop > & aTabList );
+ virtual ~TextTabStopListContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ ::std::vector< css::style::TabStop > & maTabList;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
new file mode 100644
index 000000000..87bee8895
--- /dev/null
+++ b/oox/source/drawingml/theme.cxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/theme.hxx>
+#include <oox/token/tokens.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <comphelper/propertyvalue.hxx>
+
+using namespace com::sun::star;
+
+namespace oox::drawingml {
+
+namespace {
+
+template< typename Type >
+const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex )
+{
+ return (rVector.empty() || (nIndex < 1)) ? nullptr :
+ rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - 1 ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get();
+}
+
+} // namespace
+
+const FillProperties* Theme::getFillStyle( sal_Int32 nIndex ) const
+{
+ return (nIndex >= 1000) ?
+ lclGetStyleElement( maBgFillStyleList, nIndex - 1000 ) :
+ lclGetStyleElement( maFillStyleList, nIndex );
+}
+
+const LineProperties* Theme::getLineStyle( sal_Int32 nIndex ) const
+{
+ return lclGetStyleElement( maLineStyleList, nIndex );
+}
+
+const EffectProperties* Theme::getEffectStyle( sal_Int32 nIndex ) const
+{
+ return lclGetStyleElement( maEffectStyleList, nIndex );
+}
+
+const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const
+{
+ return maFontScheme.get( nSchemeType ).get();
+}
+
+const TextFont* Theme::resolveFont( const OUString& rName ) const
+{
+ const TextCharacterProperties* pCharProps = nullptr;
+ /* Resolves the following names:
+ +mj-lt, +mj-ea, +mj-cs -- major Latin, Asian, Complex font
+ +mn-lt, +mn-ea, +mn-cs -- minor Latin, Asian, Complex font
+ */
+ if( (rName.getLength() == 6) && (rName[ 0 ] == '+') && (rName[ 3 ] == '-') )
+ {
+ if( (rName[ 1 ] == 'm') && (rName[ 2 ] == 'j') )
+ pCharProps = maFontScheme.get( XML_major ).get();
+ else if( (rName[ 1 ] == 'm') && (rName[ 2 ] == 'n') )
+ pCharProps = maFontScheme.get( XML_minor ).get();
+ if( pCharProps )
+ {
+ if( (rName[ 4 ] == 'l') && (rName[ 5 ] == 't') )
+ return &pCharProps->maLatinFont;
+ if( (rName[ 4 ] == 'e') && (rName[ 5 ] == 'a') )
+ return &pCharProps->maAsianFont;
+ if( (rName[ 4 ] == 'c') && (rName[ 5 ] == 's') )
+ return &pCharProps->maComplexFont;
+ }
+ }
+
+ // See writerfilter::dmapper::ThemeTable::getFontNameForTheme().
+ if (rName == "majorHAnsi" || rName == "majorAscii" || rName == "majorBidi" || rName == "majorEastAsia")
+ pCharProps = maFontScheme.get(XML_major).get();
+ else if (rName == "minorHAnsi" || rName == "minorAscii" || rName == "minorBidi" || rName == "minorEastAsia")
+ pCharProps = maFontScheme.get(XML_minor).get();
+ if (pCharProps)
+ {
+ if (rName == "majorAscii" || rName == "majorHAnsi" || rName == "minorAscii" || rName == "minorHAnsi")
+ return &pCharProps->maLatinFont;
+ else if (rName == "minorBidi" || rName == "majorBidi")
+ return &pCharProps->maComplexFont;
+ else if (rName == "minorEastAsia" || rName == "majorEastAsia")
+ return &pCharProps->maAsianFont;
+ }
+ return nullptr;
+}
+
+void Theme::addTheme(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage) const
+{
+ beans::PropertyValue aColorScheme;
+ aColorScheme.Name = "ColorScheme";
+ maClrScheme.ToAny(aColorScheme.Value);
+ beans::PropertyValues aValues = {
+ comphelper::makePropertyValue("Name", maThemeName),
+ comphelper::makePropertyValue("ColorSchemeName", maClrScheme.GetName()),
+ aColorScheme,
+ };
+ uno::Reference<beans::XPropertySet> xPropertySet(xDrawPage, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("Theme", uno::Any(aValues));
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
new file mode 100644
index 000000000..0922c4b61
--- /dev/null
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -0,0 +1,243 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/themeelementscontext.hxx>
+#include <drawingml/clrschemecontext.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <drawingml/linepropertiescontext.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/helper/attributelist.hxx>
+#include "effectproperties.hxx"
+#include <drawingml/effectpropertiescontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::drawingml {
+
+namespace {
+
+class FillStyleListContext : public ContextHandler2
+{
+public:
+ FillStyleListContext( ContextHandler2Helper const & rParent, FillStyleList& rFillStyleList );
+ virtual ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+private:
+ FillStyleList& mrFillStyleList;
+};
+
+}
+
+FillStyleListContext::FillStyleListContext( ContextHandler2Helper const & rParent, FillStyleList& rFillStyleList ) :
+ ContextHandler2( rParent ),
+ mrFillStyleList( rFillStyleList )
+{
+}
+
+ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( noFill ):
+ case A_TOKEN( solidFill ):
+ case A_TOKEN( gradFill ):
+ case A_TOKEN( blipFill ):
+ case A_TOKEN( pattFill ):
+ case A_TOKEN( grpFill ):
+ mrFillStyleList.push_back( std::make_shared<FillProperties>( ) );
+ return FillPropertiesContext::createFillContext( *this, nElement, rAttribs, *mrFillStyleList.back() );
+ }
+ return nullptr;
+}
+
+namespace {
+
+class LineStyleListContext : public ContextHandler2
+{
+public:
+ LineStyleListContext( ContextHandler2Helper const & rParent, LineStyleList& rLineStyleList );
+ virtual ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+private:
+ LineStyleList& mrLineStyleList;
+};
+
+}
+
+LineStyleListContext::LineStyleListContext( ContextHandler2Helper const & rParent, LineStyleList& rLineStyleList ) :
+ ContextHandler2( rParent ),
+ mrLineStyleList( rLineStyleList )
+{
+}
+
+ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( ln ):
+ mrLineStyleList.push_back( std::make_shared<LineProperties>( ) );
+ return new LinePropertiesContext( *this, rAttribs, *mrLineStyleList.back() );
+ }
+ return nullptr;
+}
+
+namespace {
+
+class EffectStyleListContext : public ContextHandler2
+{
+public:
+ EffectStyleListContext( ContextHandler2Helper const & rParent, EffectStyleList& rEffectStyleList );
+ virtual ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+
+private:
+ EffectStyleList& mrEffectStyleList;
+};
+
+}
+
+EffectStyleListContext::EffectStyleListContext( ContextHandler2Helper const & rParent, EffectStyleList& rEffectStyleList ) :
+ ContextHandler2( rParent ),
+ mrEffectStyleList( rEffectStyleList )
+{
+}
+
+ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement, const AttributeList& /*rAttribs*/ )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( effectStyle ):
+ mrEffectStyleList.push_back( std::make_shared<EffectProperties>( ) );
+ return this;
+
+ case A_TOKEN( effectLst ): // CT_EffectList
+ if( mrEffectStyleList.back() )
+ return new EffectPropertiesContext( *this, *mrEffectStyleList.back() );
+ break;
+ }
+ return nullptr;
+}
+
+namespace {
+
+class FontSchemeContext : public ContextHandler2
+{
+public:
+ FontSchemeContext( ContextHandler2Helper const & rParent, FontScheme& rFontScheme );
+ virtual ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual void onEndElement() override;
+
+private:
+ FontScheme& mrFontScheme;
+ TextCharacterPropertiesPtr mxCharProps;
+};
+
+}
+
+FontSchemeContext::FontSchemeContext( ContextHandler2Helper const & rParent, FontScheme& rFontScheme ) :
+ ContextHandler2( rParent ),
+ mrFontScheme( rFontScheme )
+{
+}
+
+ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case A_TOKEN( majorFont ):
+ mxCharProps = std::make_shared<TextCharacterProperties>();
+ mrFontScheme[ XML_major ] = mxCharProps;
+ return this;
+ case A_TOKEN( minorFont ):
+ mxCharProps = std::make_shared<TextCharacterProperties>();
+ mrFontScheme[ XML_minor ] = mxCharProps;
+ return this;
+
+ case A_TOKEN( latin ):
+ if( mxCharProps )
+ mxCharProps->maLatinFont.setAttributes( rAttribs );
+ break;
+ case A_TOKEN( ea ):
+ if( mxCharProps )
+ mxCharProps->maAsianFont.setAttributes( rAttribs );
+ break;
+ case A_TOKEN( cs ):
+ if( mxCharProps )
+ mxCharProps->maComplexFont.setAttributes( rAttribs );
+ break;
+ }
+ return nullptr;
+}
+
+void FontSchemeContext::onEndElement()
+{
+ switch( getCurrentElement() )
+ {
+ case A_TOKEN( majorFont ):
+ case A_TOKEN( minorFont ):
+ mxCharProps.reset();
+ break;
+ }
+}
+
+ThemeElementsContext::ThemeElementsContext( ContextHandler2Helper const & rParent, Theme& rTheme ) :
+ ContextHandler2( rParent ),
+ mrTheme( rTheme )
+{
+}
+
+ContextHandlerRef ThemeElementsContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // CT_BaseStyles
+ switch( nElement )
+ {
+ case A_TOKEN( clrScheme ): // CT_ColorScheme
+ if (rAttribs.hasAttribute(XML_name))
+ {
+ mrTheme.getClrScheme().SetName(rAttribs.getString(XML_name).get());
+ }
+ return new clrSchemeContext( *this, mrTheme.getClrScheme() );
+ case A_TOKEN( fontScheme ): // CT_FontScheme
+ return new FontSchemeContext( *this, mrTheme.getFontScheme() );
+
+ case A_TOKEN( fmtScheme ): // CT_StyleMatrix
+ mrTheme.setStyleName( rAttribs.getString( XML_name ).get() );
+ return this;
+
+ case A_TOKEN( fillStyleLst ): // CT_FillStyleList
+ return new FillStyleListContext( *this, mrTheme.getFillStyleList() );
+ case A_TOKEN( lnStyleLst ): // CT_LineStyleList
+ return new LineStyleListContext( *this, mrTheme.getLineStyleList() );
+ case A_TOKEN( effectStyleLst ): // CT_EffectStyleList
+ return new EffectStyleListContext( *this, mrTheme.getEffectStyleList() );
+ case A_TOKEN( bgFillStyleLst ): // CT_BackgroundFillStyleList
+ return new FillStyleListContext( *this, mrTheme.getBgFillStyleList() );
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/themefragmenthandler.cxx b/oox/source/drawingml/themefragmenthandler.cxx
new file mode 100644
index 000000000..5ab0ee1e6
--- /dev/null
+++ b/oox/source/drawingml/themefragmenthandler.cxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/drawingml/themefragmenthandler.hxx>
+#include <drawingml/objectdefaultcontext.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/themeelementscontext.hxx>
+
+using namespace ::oox::core;
+
+namespace oox::drawingml {
+
+ThemeFragmentHandler::ThemeFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rTheme ) :
+ FragmentHandler2( rFilter, rFragmentPath ),
+ mrTheme( rTheme )
+{
+}
+
+ThemeFragmentHandler::~ThemeFragmentHandler()
+{
+}
+
+ContextHandlerRef ThemeFragmentHandler::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs)
+{
+ // CT_OfficeStyleSheet
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ switch( nElement )
+ {
+ case A_TOKEN( theme ):
+ {
+ mrTheme.setThemeName(rAttribs.getString(XML_name).get());
+ return this;
+ }
+ }
+ break;
+
+ case A_TOKEN( theme ):
+ switch( nElement )
+ {
+ case A_TOKEN( themeElements ): // CT_BaseStyles
+ return new ThemeElementsContext( *this, mrTheme );
+ case A_TOKEN( objectDefaults ): // CT_ObjectStyleDefaults
+ return new objectDefaultContext( *this, mrTheme );
+ case A_TOKEN( extraClrSchemeLst ): // CT_ColorSchemeList
+ return nullptr;
+ case A_TOKEN( custClrLst ): // CustomColorList
+ return nullptr;
+ case A_TOKEN( ext ): // CT_OfficeArtExtension
+ return nullptr;
+ }
+ break;
+ }
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx
new file mode 100644
index 000000000..08ec71f5a
--- /dev/null
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/transform2dcontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::com::sun::star;
+using ::oox::core::ContextHandlerRef;
+
+namespace oox::drawingml {
+
+/** context to import a CT_Transform2D */
+Transform2DContext::Transform2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, Shape& rShape, bool btxXfrm ) noexcept
+: ContextHandler2( rParent )
+, mrShape( rShape )
+, mbtxXfrm ( btxXfrm )
+{
+ if( !btxXfrm )
+ {
+ mrShape.setRotation( rAttribs.getInteger( XML_rot, 0 ) ); // 60000ths of a degree Positive angles are clockwise; negative angles are counter-clockwise
+ mrShape.setFlip( rAttribs.getBool( XML_flipH, false ), rAttribs.getBool( XML_flipV, false ) );
+ }
+ else
+ {
+ if (rAttribs.hasAttribute(XML_rot) && mrShape.getTextBody())
+ mrShape.getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ).get();
+ }
+}
+
+ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if( mbtxXfrm )
+ {
+ // Workaround: only for rectangles
+ const sal_Int32 nType = mrShape.getCustomShapeProperties()->getShapePresetType();
+ if( mrShape.getTextBody() && ( nType == XML_rect || nType == XML_roundRect || nType == XML_ellipse ) )
+ {
+ switch( aElementToken )
+ {
+ case A_TOKEN( off ):
+ {
+ const OUString sXValue = rAttribs.getString( XML_x ).get();
+ const OUString sYValue = rAttribs.getString( XML_y ).get();
+
+ if( !sXValue.isEmpty() && nType != XML_ellipse )
+ mrShape.getTextBody()->getTextProperties().moTextOffLeft = GetCoordinate( sXValue.toInt32() - mrShape.getPosition().X );
+ if( !sYValue.isEmpty() )
+ mrShape.getTextBody()->getTextProperties().moTextOffUpper = GetCoordinate( sYValue.toInt32() - mrShape.getPosition().Y );
+ }
+ break;
+ case A_TOKEN( ext ):
+ {
+ const OUString sXValue = rAttribs.getString( XML_cx ).get();
+ const OUString sYValue = rAttribs.getString( XML_cy ).get();
+
+ if( !sXValue.isEmpty() && nType == XML_rect )
+ {
+ mrShape.getTextBody()->getTextProperties().moTextOffRight = GetCoordinate(mrShape.getSize().Width - sXValue.toInt32());
+ if( mrShape.getTextBody()->getTextProperties().moTextOffLeft )
+ *mrShape.getTextBody()->getTextProperties().moTextOffRight -= *mrShape.getTextBody()->getTextProperties().moTextOffLeft;
+ }
+ if( !sYValue.isEmpty() )
+ {
+ mrShape.getTextBody()->getTextProperties().moTextOffLower = GetCoordinate(mrShape.getSize().Height - sYValue.toInt32());
+ if( mrShape.getTextBody()->getTextProperties().moTextOffUpper )
+ *mrShape.getTextBody()->getTextProperties().moTextOffLower -= *mrShape.getTextBody()->getTextProperties().moTextOffUpper;
+
+ }
+ }
+ break;
+ }
+ }
+ return nullptr;
+ }
+
+ switch( aElementToken )
+ {
+ case A_TOKEN( off ): // horz/vert translation
+ mrShape.setPosition( awt::Point( rAttribs.getString( XML_x ).get().toInt32(), rAttribs.getString( XML_y ).get().toInt32() ) );
+ break;
+ case A_TOKEN( ext ): // horz/vert size
+ mrShape.setSize( awt::Size( rAttribs.getString( XML_cx ).get().toInt32(), rAttribs.getString( XML_cy ).get().toInt32() ) );
+ break;
+ case A_TOKEN( chOff ): // horz/vert translation of children
+ mrShape.setChildPosition( awt::Point( rAttribs.getString( XML_x ).get().toInt32(), rAttribs.getString( XML_y ).get().toInt32() ) );
+ break;
+ case A_TOKEN( chExt ): // horz/vert size of children
+ {
+ sal_Int32 nChExtCx = rAttribs.getString(XML_cx).get().toInt32();
+
+ if(nChExtCx == 0)
+ nChExtCx = mrShape.getSize().Width;
+
+ sal_Int32 nChExtCy = rAttribs.getString(XML_cy).get().toInt32();
+
+ if(nChExtCy == 0)
+ nChExtCy = mrShape.getSize().Height;
+
+ mrShape.setChildSize(awt::Size(nChExtCx, nChExtCy));
+ }
+ break;
+ }
+
+ return nullptr;
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini
new file mode 100644
index 000000000..a5ae4c12a
--- /dev/null
+++ b/oox/source/dump/biffdumper.ini
@@ -0,0 +1,2397 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+
+# Path to additional configuration data, relative to this file.
+include-config-file=dumperbase.ini
+include-config-file=dffdumper.ini
+include-config-file=oledumper.ini
+
+# Enable entire dumper. This option does not affect the option 'enable-import'.
+# 0=off, 1=on, missing = use setting from dumperbase.ini
+# enable-dumper=1
+
+# Enable import after dumping. Disabling this option allows to dump a file
+# without loading it. This option is independent from the 'enable-dumper'
+# option.
+# 0=off, 1=on, missing = use setting from dumperbase.ini
+# enable-import=1
+
+# BIFF record settings -------------------------------------------------------
+
+# Merge CONTINUE records with leading record (default=on).
+# 0=off - show CONTINUE records separately (hex dump)
+# 1=on - show contents of leading record together with following CONTINUE
+merge-continue-record=1
+
+# name lists =================================================================
+
+# common ---------------------------------------------------------------------
+
+unitconverter=CONV-PERCENT-NEG,-1,%
+unitconverter=CONV-COLWIDTH,/256,chars
+unitconverter=CONV-TINT,/327.67,%
+
+shortlist=BIFF,0,biff2,biff3,biff4,biff5,biff8
+
+constlist=ERRORCODES
+ 0x00=#NULL!
+ 0x07=#DIV/0!
+ 0x0F=#VALUE!
+ 0x17=#REF!
+ 0x1D=#NAME?
+ 0x24=#NUM!
+ 0x2A=#N/A
+end
+
+shortlist=WINDOWS-PALETTE-0,0,black,white,red,green,blue,yellow,magenta,cyan
+shortlist=WINDOWS-PALETTE-8,8,black,white,red,green,blue,yellow,magenta,cyan
+shortlist=WINDOWS-PALETTE-16,16,dark-red,dark-green,dark-blue,dark-yellow,dark-magenta,dark-cyan,light-grey,dark-grey
+
+multilist=WINDOWS-SYSCOLORS-BIFF2
+ 24=sys-window-text,sys-window-bg
+ 0x7FFF=sys-window-text
+end
+
+multilist=WINDOWS-SYSCOLORS-BIFF5
+ 64=sys-window-text,sys-window-bg,,sys-button-face
+ 77=sys-window-text-chart,sys-window-bg-chart,auto-border-chart,sys-tooltip-bg,sys-tooltip-text
+ 0x7FFF=sys-window-text
+end
+
+constlist=COLORS-BIFF2
+ include=WINDOWS-PALETTE-0
+ include=WINDOWS-SYSCOLORS-BIFF2
+end
+
+constlist=COLORS-BIFF3
+ include=WINDOWS-PALETTE-0
+ include=WINDOWS-PALETTE-8
+ include=WINDOWS-PALETTE-16
+ include=WINDOWS-SYSCOLORS-BIFF2
+end
+
+multilist=COLORS-BIFF5
+ include=WINDOWS-PALETTE-0
+ include=WINDOWS-PALETTE-8
+ include=WINDOWS-PALETTE-16
+ 24=0x8080FF,0x802060,0xFFFFC0,0xA0E0E0,0x600080,0xFF8080,0x0080C0,0xC0C0FF
+ 32=0x000080,0xFF00FF,0xFFFF00,0x00FFFF,0x800080,0x800000,0x008080,0x0000FF
+ 40=0x00CFFF,0x69FFFF,0xE0FFE0,0xFFFF80,0xA6CAF0,0xDD9CB3,0xB38FEE,0xE3E3E3
+ 48=0x2A6FF9,0x3FB8CD,0x488436,0x958C41,0x8E5E42,0xA0627A,0x624FAC,0x969696
+ 56=0x1D2FBE,0x286676,0x004500,0x453E01,0x6A2813,0x85396A,0x4A3285,0x424242
+ include=WINDOWS-SYSCOLORS-BIFF5
+end
+
+multilist=COLORS-BIFF8
+ include=WINDOWS-PALETTE-0
+ include=WINDOWS-PALETTE-8
+ include=WINDOWS-PALETTE-16
+ 24=0x9999FF,0x993366,0xFFFFCC,0xCCFFFF,0x660066,0xFF8080,0x0066CC,0xCCCCFF
+ 32=0x000080,0xFF00FF,0xFFFF00,0x00FFFF,0x800080,0x800000,0x008080,0x0000FF
+ 40=0x00CCFF,0xCCFFFF,0xCCFFCC,0xFFFF99,0x99CCFF,0xFF99CC,0xCC99FF,0xFFCC99
+ 48=0x3366FF,0x33CCCC,0x99CC00,0xFFCC00,0xFF9900,0xFF6600,0x666699,0x969696
+ 56=0x003366,0x339966,0x003300,0x333300,0x993300,0x993366,0x333399,0x333333
+ include=WINDOWS-SYSCOLORS-BIFF5
+end
+
+shortlist=BORDERSTYLES-BIFF3,0,none,thin,medium,dash,dot,thick,double,hair
+
+multilist=BORDERSTYLES-BIFF8
+ include=BORDERSTYLES-BIFF3
+ 8=medium-dash,thin-dash-dot,medium-dash-dot,thin-dash-dot-dot,medium-dash-dot-dot,slant-dash-dot
+end
+
+multilist=FILLPATTERNS-BIFF3
+ 0=no-fill,solid-fill,50%-grey,75%-grey,25%-grey
+ 5=hor-stripe,ver-stripe,rev-diag-stripe,diag-stripe,diag-crosshatch
+ 10=thick-diag-crosshatch,thin-hor-stripe,thin-ver-stripe,thin-rev-diag-stripe,thin-diag-stripe
+ 15=thin-hor-crosshatch,thin-diag-crosshatch,12.5%-grey,6.25%-grey
+end
+
+shortlist=TEXTORIENTATION,0,horizontal,stacked,90°-ccw,90°-cw
+
+constlist=TEXTROTATION-BIFF8
+ default=
+ 255=stacked
+end
+
+multilist=BUILTIN-FORMATS
+ quote-names=1
+ 0=General,0,0.00,'#,##0','#,##0.00'
+ 5='"$"#,##0_);\("$"#,##0\)','"$"#,##0_);[Red]\("$"#,##0\)','"$"#,##0.00_);\("$"#,##0.00\)','"$"#,##0.00_);[Red]\("$"#,##0.00\)',0%
+ 10=0.00%,0.00E+00,# ?/?,# ??/??,M/D/YYYY
+ 15=D-MMM-YY,D-MMM,MMM-YY,h:mm AM/PM,h:mm:ss AM/PM
+ 20=h:mm,h:mm:ss,M/D/YYYY h:mm,General,General
+ 25=General,General,M/D/YYYY,M/D/YYYY,M/D/YYYY
+ 30=M/D/YYYY,M/D/YYYY,h:mm:ss,h:mm:ss,h:mm:ss
+ 35=h:mm:ss,M/D/YYYY,'#,##0_);(#,##0)','#,##0_);[Red](#,##0)','#,##0.00_);(#,##0.00)'
+ 40='#,##0.00_);[Red](#,##0.00)'
+ 41='_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)'
+ 42='_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_)'
+ 43='_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)'
+ 44='_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'
+ 45=mm:ss,[h]:mm:ss,mm:ss.0,##0.0E+0,@
+ 50=M/D/YYYY,M/D/YYYY,M/D/YYYY,M/D/YYYY,M/D/YYYY
+ 55=M/D/YYYY,M/D/YYYY,M/D/YYYY,M/D/YYYY,0
+ 60=0.00,'#,##0','#,##0.00','$#,##0_);($#,##0)','$#,##0_);[Red]($#,##0)'
+ 65='$#,##0.00_);($#,##0.00)','$#,##0.00_);[Red]($#,##0.00)',0%,0.00%,# ?/?
+ 70=# ??/??,M/D/YYYY,M/D/YYYY,D-MMM-YY,D-MMM
+ 75=MMM-YY,h:mm,h:mm:ss,M/D/YYYY h:mm,mm:ss
+ 80=[h]:mm:ss,mm:ss.0
+end
+
+constlist=CONSTVALUE-TYPE
+ 0=empty
+ 1=number
+ 2=string
+ 4=boolean
+ 16=error
+end
+
+constlist=PIVOT-NAMELEN
+ default=
+ 0xFFFF=name-in-cache
+end
+
+flagslist=FR-FLAGS
+ 0x0001=has-ref
+ 0x0002=alert-unsupported
+end
+
+shortlist=EXTCOLOR-TYPE,0,auto,indexed,rgb,theme,n/a
+
+combilist=EXTCOLOR-FLAGS
+ 0x01=rgb-valid
+ 0xFE=uint8,dec,type,EXTCOLOR-TYPE
+end
+
+shortlist=EXTGRADIENT-TYPE,0,linear,path
+
+shortlist=EXTFONT-SCHEME,-1,n/a,none,major,minor
+
+# DFF ------------------------------------------------------------------------
+
+flagslist=DFF-CLIENTANCHOR-FLAGS
+ 0x0001=pos-locked
+ 0x0002=size-locked
+end
+
+# formulas -------------------------------------------------------------------
+
+multilist=BASETOKENS-BIFF2
+ 0x00=,tExp,tTbl,tAdd,tSub,tMul,tDiv,tPower
+ 0x08=tConcat,tLT,tLE,tEQ,tGE,tGT,tNE,tIsect
+ 0x10=tList,tRange,tUplus,tUminus,tPercent,tParen,tMissArg,tStr
+ 0x18=,tAttr,tSheet,tEndSheet,tErr,tBool,tInt,tNum
+end
+
+constlist=BASETOKENS-BIFF5
+ include=BASETOKENS-BIFF2
+ exclude=0x1A,0x1B
+end
+
+constlist=BASETOKENS-BIFF8
+ include=BASETOKENS-BIFF5
+ 0x18=tNlr
+end
+
+constlist=TOKENCLASSES
+ 0x20=R
+ 0x40=V
+ 0x60=A
+end
+
+multilist=CLASSTOKENS-BIFF2
+ 0x00=tArray,tFunc,tFuncVar,tName,tRef,tArea,tMemArea,tMemErr
+ 0x08=tMemNoMem,tMemFunc,tRefErr,tAreaErr,tRefN,tAreaN,tMemAreaN,tMemNoMemN
+ 0x18=tFuncCE
+end
+
+constlist=CLASSTOKENS-BIFF4
+ include=CLASSTOKENS-BIFF2
+ exclude=0x18
+end
+
+multilist=CLASSTOKENS-BIFF5
+ include=CLASSTOKENS-BIFF4
+ 0x19=tNameX,tRef3d,tArea3d,tRefErr3d,tAreaErr3d
+end
+
+combilist=FUNCID
+ 0x7FFF=uint16,dec,func-id
+ 0x8000=command
+end
+
+combilist=PARAMCOUNT-CMD
+ 0x7F=uint8,dec,count
+ 0x80=prompt
+end
+
+combilist=REFRELFLAGS
+ 0x3FFF=uint16,dec,value
+ 0x4000=col-rel
+ 0x8000=row-rel
+end
+
+multilist=NLRTYPES
+ 0x00=,tNlrErr,tNlrRowR,tNlrColR,,,tNlrRowV,tNlrColV
+ 0x08=,,tNlrRange,tNlrSRange,tNlrSRowR,tNlrSColR,tNlrSRowV,tNlrSColV
+ 0x10=tNlrRangeErr,,,,,,,
+ 0x18=,,,,,tNlrSxName,,
+end
+
+combilist=NLRADDFLAGS
+ 0x3FFFFFFF=uint32,dec,count
+ 0x80000000=rel
+end
+
+flagslist=ATTRTYPES
+ 0x00=skip
+ 0x01=volatile
+ 0x02=if
+ 0x04=choose
+ 0x08=skip
+ 0x10=sum
+ 0x20=assign
+ 0x40=space
+end
+
+shortlist=ATTRSPACETYPES,0,space-before-token,cr-before-token,space-before-open,cr-before-open,space-before-close,cr-before-close,leading-space
+
+# record names ---------------------------------------------------------------
+
+multilist=RECORD-NAMES-BIFF2
+ # worksheet records
+ 0x0000=DIMENSION,BLANK,INTEGER,NUMBER,LABEL,BOOLERR,FORMULA,STRING
+ 0x0008=ROW,BOF,EOF,INDEX,CALCCOUNT,CALCMODE,PRECISION,REFMODE
+ 0x0010=DELTA,ITERATION,PROTECT,PASSWORD,HEADER,FOOTER,EXTERNCOUNT,EXTERNSHEET
+ 0x0018=DEFINEDNAME,WINDOWPROTECT,VERTICALPAGEBREAKS,HORIZONTALPAGEBREAKS,NOTE,SELECTION,FORMAT,BUILTINFMTCOUNT
+ 0x0020=COLUMNDEFAULT,ARRAY,DATEMODE,EXTERNALNAME,COLWIDTH,DEFAULTROWHEIGHT,LEFTMARGIN,RIGHTMARGIN
+ 0x0028=TOPMARGIN,BOTTOMMARGIN,PRINTHEADERS,PRINTGRIDLINES,,,,FILEPASS
+ 0x0030=,FONT,FONT2,PRINTSIZE,,INFOOPTS,DATATABLE,DATATABLE2
+ 0x0038=WNDESK,,BEGINPREF,ENDPREF,CONTINUE,WINDOW1,WINDOW2,
+ 0x0040=BACKUP,PANE,CODEPAGE,XF,IXFE,EFONT,SHOWSCROLL,SHOWFORMULA
+ 0x0048=STATUSBAR,SHORTMENUS,DDEENABLED,AUTODEC,MENUKEY,PLS|ZOOM,MENUUND,MOVESEL
+ 0x0050=DCON,DCONREF,DCONNAME,,,DEFCOLWIDTH,,
+ # worksheet records new in BIFF3, but supported in BIFF2 streams
+ 0x0200=DIMENSION,BLANK,,NUMBER,LABEL,BOOLERR,,
+ 0x0208=,,,INDEX,,,,
+ 0x027E=RK
+ # BIFF5 style BOF
+ 0x0809=BOF
+ # chart records
+ 0x1000=,CHUNITS,CHCHART,CHSERIES,CHSOURCELINK,,CHDATAFORMAT,CHLINEFORMAT
+ 0x1008=,CHMARKERFORMAT,CHAREAFORMAT,CHPIEFORMAT,CHATTACHEDLABEL,CHSTRING,,
+ 0x1010=,,,,CHTYPEGROUP,CHLEGEND,CHSERIESLIST,CHBAR
+ 0x1018=CHLINE,CHPIE,CHAREA,CHSCATTER,CHCHARTLINE,CHAXIS,CHTICK,CHVALUERANGE
+ 0x1020=CHLABELRANGE,CHAXISLINE,CHFORMATLINK,,CHDEFAULTTEXT,CHTEXT,CHFONT,CHOBJECTLINK
+ 0x1028=,,,,,CHARROW,,CHARROWHEAD
+ 0x1030=,,CHFRAME,CHBEGIN,CHEND,CHPLOTFRAME,CHCHARTSIZE,CHRELPOSITION
+ 0x1038=CHARROWRELPOS,,CHCHART3D,,,,,
+end
+
+multilist=RECORD-NAMES-BIFF3
+ include=RECORD-NAMES-BIFF2
+ # worksheet records
+ exclude=0x0006,0x0008,0x0009,0x000B,0x0018,0x0020,0x0023,0x0024,0x0025,0x0031,0x0036,0x0037,0x003E,0x0043,0x0044,0x0045
+ 0x0050=,,,,,,BUILTINFMTCOUNT,
+ 0x0058=TOOLBAR,XCT,CRN,FILESHARING,WRITEACCESS,OBJ,UNCALCED,SAFERECALC
+ 0x0060=TEMPLATE,INTL,,OBJECTPROTECT,,,,
+ 0x0068=,,,,,,,
+ 0x0070=,,,,,,,
+ 0x0078=,,,,,COLINFO,,IMGDATA
+ 0x0080=GUTS,SHEETPR,GRIDSET,HCENTER,VCENTER,,WRITEPROT,ADDIN
+ 0x0088=EDG,PUB,NOTEOFF,LH,COUNTRY,HIDEOBJ,,
+ 0x0090=SORT,SUB,PALETTE,,LHRECORD,LHNGRAPH,,
+ 0x0200=,,,,,,FORMULA,STRING
+ 0x0208=ROW,BOF,,,,,,
+ 0x0218=DEFINEDNAME
+ 0x0221=ARRAY
+ 0x0223=EXTERNALNAME
+ 0x0225=DEFAULTROWHEIGHT
+ 0x0231=FONT
+ 0x0236=DATATABLE
+ 0x023E=WINDOW2
+ 0x0243=XF
+ 0x0293=STYLE
+ # chart records
+ 0x103C=CHPICFORMAT
+end
+
+multilist=RECORD-NAMES-BIFF4
+ include=RECORD-NAMES-BIFF3
+ # worksheet/workbook records
+ exclude=0x0206,0x0209,0x001E,0x0243
+ 0x0085=SHEET
+ 0x0088=,,,,,,SHEETSOFFSET,SHEETHEADER
+ 0x0090=,,,,,,NOTESOUND,SYNC
+ 0x0098=LPR,STANDARDWIDTH,FNGROUPNAME,,FNGROUPCOUNT,,,
+ 0x00A0=SCL,PAGESETUP,FNPROTO,PROJEXTSHEET,,,,
+ 0x00A8=DRAGDROP,COORDLIST,,GCW,,,,
+ 0x0406=FORMULA
+ 0x0409=BOF
+ 0x041E=FORMAT
+ 0x0443=XF
+ # chart records
+ 0x1038=,,,CHMULTILINK,,CHDROPBAR,CHRADARLINE,CHSURFACE
+end
+
+multilist=RECORD-NAMES-BIFF5
+ include=RECORD-NAMES-BIFF4
+ # worksheet/workbook records
+ exclude=0x0409,0x0218,0x0223,0x0231,0x0443
+ 0x0006=FORMULA
+ 0x0018=DEFINEDNAME
+ 0x0023=EXTERNALNAME
+ 0x0031=FONT
+ 0x0098=,,,FILTERMODE,,AUTOFILTER,FILTERCOLUMN,
+ 0x00A8=,,,,,,SCENARIOS,SCENARIO
+ 0x00B0=PTDEFINITION,PTFIELD,PTFITEM,,PTROWCOLFIELDS,PTROWCOLITEMS,PTPAGEFIELDS,
+ 0x00B8=DOCROUTE,RECIPNAME,,,,MULTRK,MULTBLANK,TOOLBARHDR
+ 0x00C0=TOOLBAREND,MMS,ADDMENU,DELMENU,,PTDATAFIELD,PCDEFINITION,PCDFIELD
+ 0x00C8=PCITEM_INDEXLIST,PCITEM_DOUBLE,PCITEM_BOOL,PCITEM_ERROR,PCITEM_INTEGER,PCITEM_STRING,PCITEM_DATE,PCITEM_MISSING
+ 0x00D0=SXTBL,SXTBRGITEM,SXTBPG,VBAPROJECT,,PIVOTCACHE,RSTRING,DBCELL
+ 0x00D8=PCDFRANGEPR,PCDFDISCRETEPR,BOOKBOOL,REVERT,DBORPARAMQUERY,SCENPROTECT,OLESIZE,UDDESC
+ 0x00E0=XF,INTERFACEHDR,INTERFACEEND,PCDSOURCE,,,,
+ 0x0206=FORMULA
+ 0x04BC=SHAREDFMLA
+ # chart records
+ exclude=0x1004,0x102D,0x102F,0x1036,0x1037,0x1038,0x103B
+ 0x1040=CHRADARAREA,CHAXESSET,,CHLEGENDENTRY,CHPROPERTIES,CHSERGROUP,CHUSEDAXESSETS,
+ 0x1048=CHPIVOTRANGE,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHFRAMEPOS
+ 0x1050=CHFORMATRUNS,CHSOURCELINK,,,,,,
+ 0x1058=,,,CHSERERRORBAR,,CHSERIESFORMAT,,
+end
+
+multilist=RECORD-NAMES-BIFF8
+ include=RECORD-NAMES-BIFF5
+ # worksheet/workbook records
+ 0x00E0=,,,,,CELLMERGING,,
+ 0x00E8=,IMGDATA,,MSODRAWINGGROUP,MSODRAWING,MSODRAWINGSELECTION,,PHONETICPR
+ 0x00F0=,PTDEFINITION2,,,,,,
+ 0x00F8=,PCDFORMULAFIELD,,,SST,LABELSST,,EXTSST
+ 0x0100=PTFIELD2,,,PCDFIELDINDEX,,,,
+ 0x0120=,,PCDEFINITION2,,,,,
+ 0x0130=,,,,,,,CHTRINSERT
+ 0x0138=CHTRINFO,,,CHTRCELLCONTENT,,TABID,,
+ 0x0140=CHTRMOVERANGE,,,,,,,
+ 0x0148=,,,,,CHTRINSERTTAB,,
+ 0x0158=,,,,,,,LABELRANGES
+ 0x0160=USESELFS,DSF,XL5MODIFY,,,,,
+ 0x0190=,,,,,,CHTRHEADER,
+ 0x01A8=,USERBVIEW,USERSVIEWBEGIN,USERSVIEWEND,,QUERYTABLE,EXTERNALBOOK,PROT4REV
+ 0x01B0=CFHEADER,CFRULE,DATAVALIDATIONS,,,DCONBINAME,TXO,REFRESHALL
+ 0x01B8=HYPERLINK,NLRDELNAME,CODENAME,PCDFSQLTYPE,PROT4REVPASS,VBAPROJECTEMPTY,DATAVALIDATION,
+ 0x01C0=XL9FILE,RECALCID,INTCACHEDDATA,,,,,
+ # future records
+ 0x0800=SCREENTIP,,QUERYTABLEREFRESH,QUERYTABLESETTINGS,QUERYTABLESTRING,,,
+ 0x0850=CHFRINFO,CHFRWRAPPER,CHFRBLOCKBEGIN,CHFRBLOCKEND,,,CHFRCATEGORYPROPS,CHFRUNITPROPS
+ 0x0858=CHPIVOTREF,CHPIVOTFLAGS,,,,,,
+ 0x0860=,,SHEETEXT,BOOKEXT,,,,SHAREDFEATHEAD
+ 0x0868=,,,CHFRLABELPROPS,,,,
+ 0x0870=,,,,,,CONNECTION,
+ 0x0878=,,CFRULE12,CFRULEEXT,XFCRC,XFEXT,FILTERCOLUMN12,CONTINUE12
+ 0x0888=,,,PAGELAYOUTVIEW,CHECKCOMPAT,DXF,TABLESTYLES,
+ 0x0890=,,STYLEEXT,,,,THEME,
+ 0x0898=,,MTHREADSETTINGS,COMPRESSPICS,HEADERFOOTER,CHFRLAYOUT,CHFREXTPROPS,CHFREXTPROPSCONT
+ 0x08A0=,,,FORCEFULLCALC,CHFRSHAPEPROPS,CHFRTEXTPROPS,,CHFRPLOTAREALAYOUT
+ # chart records
+ 0x1058=,,,,,,,CH3DDATAFORMAT
+ 0x1060=CHFONTBASE,CHPIEEXT,CHDATERANGE,CHDATATABLE,CHPLOTGROWTH,CHSERINDEX,CHESCHERFORMAT,CHPIEEXTSETT
+end
+
+# simple records -------------------------------------------------------------
+
+constlist=SIMPLE-RECORDS-BIFF2
+ 0x000C=uint16,dec,max-iterations
+ 0x000D=int16,dec,calc-mode,CALCMODE
+ 0x000E=uint16,bool,calc-precise
+ 0x000F=uint16,dec,ref-mode,REFMODE
+ 0x0010=double,dec,epsilon
+ 0x0011=uint16,bool,iterate-recursive
+ 0x0012=uint16,bool,contents-protected
+ 0x0013=uint16,hex,password-hash
+ 0x0016=uint16,dec,externsheets
+ 0x0019=uint16,bool,window-protected
+ 0x001F=uint16,dec,builtin-fmt-count
+ 0x0022=uint16,dec,null-date,DATEMODE
+ 0x0025=uint16,hex,rowheight-flags,DEFROWHEIGHT-FLAGS
+ 0x0026=double,dec,left-margin,CONV-INCH-TO-CM
+ 0x0027=double,dec,right-margin,CONV-INCH-TO-CM
+ 0x0028=double,dec,top-margin,CONV-INCH-TO-CM
+ 0x0029=double,dec,bottom-margin,CONV-INCH-TO-CM
+ 0x002A=uint16,bool,print-sheet-headers
+ 0x002B=uint16,bool,print-gridlines
+ 0x0040=uint16,bool,backup-on-save
+ 0x0044=uint16,dec,xf-idx
+ 0x0045=uint16,dec,font-color-idx,COLORS
+ 0x0055=uint16,dec,base-col-width
+ 0x100B=uint16,dec,extrusion,CONV-PERCENT
+ 0x100C=uint16,hex,flags,CHATTACHEDLABEL-FLAGS
+ 0x1018=uint16,hex,flags,CHLINE-FLAGS
+ 0x101A=uint16,hex,flags,CHAREA-FLAGS
+ 0x101C=uint16,dec,line-type,CHCHARTLINE-TYPE
+ 0x1021=uint16,dec,axisline-id,CHAXISLINE-ID
+ 0x1024=uint16,dec,text-idx
+ 0x1026=uint16,dec,font-idx,FONTNAMES
+ 0x1045=uint16,dec,group-idx
+ 0x1046=uint16,dec,used-axessets
+ 0x104A=uint16,dec,series-idx
+ 0x104E=uint16,dec,fmt-idx,FORMATS
+end
+
+constlist=SIMPLE-RECORDS-BIFF3
+ include=SIMPLE-RECORDS-BIFF2
+ 0x0056=uint16,dec,builtin-fmt-count
+ 0x005E=uint16,unused
+ 0x005F=uint16,bool,recalc-on-save
+ 0x0063=uint16,bool,objects-protected
+ 0x0081=uint16,hex,flags,SHEETPR-FLAGS
+ 0x0082=uint16,bool,print-gridlines-changed
+ 0x0083=uint16,bool,horizontal-centered
+ 0x0084=uint16,bool,vertical-centered
+ 0x008D=uint16,dec,object-mode,HIDEOBJ
+end
+
+constlist=SIMPLE-RECORDS-BIFF4
+ include=SIMPLE-RECORDS-BIFF3
+ 0x008E=uint32,hex,stream-pos,CONV-DEC
+ 0x0099=uint16,dec,default-col-width,CONV-COLWIDTH
+ 0x009C=uint16,dec,func-group-count
+ 0x103D=uint16,dec,bar-dist
+ 0x103E=uint16,hex,flags,CHRADAR-FLAGS
+ 0x103F=uint16,hex,flags,CHSURFACE-FLAGS
+end
+
+constlist=SIMPLE-RECORDS-BIFF5
+ include=SIMPLE-RECORDS-BIFF4
+ 0x009D=uint16,dec,column-count
+ 0x00C9=double,dec,value
+ 0x00CA=uint16,bool,value
+ 0x00CB=uint16,hex,error-code,ERRORCODES
+ 0x00CC=int16,dec,value
+ 0x00D5=uint16,hex,cache-id
+ 0x00D8=uint16,hex,flags,PCDFRANGEPR-FLAGS
+ 0x00DA=uint16,bool,strip-cached-values
+ 0x00DD=uint16,bool,scenarios-protected
+ 0x00E3=uint16,dec,source-type,PCDSOURCE-TYPE
+ 0x1040=uint16,hex,flags,CHRADAR-FLAGS
+ 0x105D=uint16,hex,flags,CHSERIESFORMAT-FLAGS
+end
+
+constlist=SIMPLE-RECORDS-BIFF8
+ include=SIMPLE-RECORDS-BIFF5
+ 0x00E1=uint16,dec,codepage,CODEPAGES
+ 0x0160=uint16,bool,use-nat-lang-refs
+ 0x0161=uint16,bool,double-stream
+ 0x01AF=uint16,bool,revlog-protected
+ 0x01B7=uint16,bool,refresh-all
+ 0x01BB=uint16,dec,sql-data-type,PCDFSQLTYPE-DATATYPE
+ 0x01BC=uint16,hex,password-hash
+ 0x1065=uint16,dec,series-idx
+end
+
+# ARRAY ----------------------------------------------------------------------
+
+flagslist=ARRAY-FLAGS-BIFF2
+ 0x0001=recalc-always
+end
+
+flagslist=ARRAY-FLAGS-BIFF3
+ include=ARRAY-FLAGS-BIFF2
+ 0x0002=recalc-onload
+end
+
+# BOF ------------------------------------------------------------------------
+
+constlist=BOF-BIFFTYPE
+ 0x0000=from-id
+ 0x0007=biff2
+ 0x0200=biff2
+ 0x0300=biff3
+ 0x0400=biff4
+ 0x0500=biff5
+ 0x0600=biff8
+end
+
+constlist=BOF-SHEETTYPE
+ 0x0005=globals
+ 0x0006=vb-module
+ 0x0010=sheet
+ 0x0020=chart
+ 0x0040=macro
+ 0x0100=workspace
+end
+
+shortlist=BOF-EXCELVERSION,0,excel-97,excel-2000,excel-2002,excel-2003,excel-2007,,excel-2010
+shortlist=BOF-LOWESTVERSION-BIFF,6,biff8
+
+combilist=BOF-HISTORY-FLAGS
+ ignore=0x000000C0
+ 0x00000001=windows
+ 0x00000002=risc
+ 0x00000004=beta
+ 0x00000008=win-any
+ 0x00000010=mac-any
+ 0x00000020=beta-any
+ 0x00000100=risc-any
+ 0x00000200=out-of-mem
+ 0x00000400=out-of-mem-renderer
+ 0x00002000=font-limit-255
+ 0x0003C000=uint8,dec,max-version-saved,BOF-EXCELVERSION
+end
+
+combilist=BOF-LOWESTVERSION-FLAGS
+ 0x000000FF=uint8,dec,biff-version,BOF-LOWESTVERSION-BIFF
+ 0x00000F00=uint8,dec,version-saved,BOF-EXCELVERSION
+end
+
+# BOOKEXT --------------------------------------------------------------------
+
+combilist=BOOKEXT-FLAGS1
+ 0x00000001=no-auto-recover
+ 0x00000002=hide-pivot-list
+ 0x00000004=filter-privacy
+ 0x00000008=embed-smarttags
+ 0x00000030=uint8,dec,display-smarttags,BOOKEXT-DISPLAY-SMARTTAGS
+ 0x00000040=saved-on-recovery
+ 0x00000080=minimal-save
+ 0x00000100=opened-on-recovery
+ 0x00000200=opened-in-save-mode
+end
+
+shortlist=BOOKEXT-DISPLAY-SMARTTAGS,0,button-and-indicator,button,nothing
+
+flagslist=BOOKEXT-FLAGS2
+ 0x01=warn-smart-doc-manifest
+ 0x02=show-inc-annotations
+end
+
+flagslist=BOOKEXT-FLAGS3
+ 0x02=!all-published!selected-items-published
+ 0x04=show-pivot-chart-filter
+end
+
+# CALCMODE -------------------------------------------------------------------
+
+shortlist=CALCMODE,-1,automatic-no-table,manual,automatic
+
+# CFHEADER -------------------------------------------------------------------
+
+combilist=CFHEADER-FLAGS
+ 0x0001=complex
+ 0xFFFE=uint16,dec,id
+end
+
+# CFRULE ---------------------------------------------------------------------
+
+shortlist=CFRULE-TYPE,1,value,formula
+shortlist=CFRULE-OPERATOR,0,none,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
+
+flagslist=CFRULE-FLAGS1
+ ignore=0x00200000
+ 0x00000001=!hor-align-used
+ 0x00000002=!vert-align-used
+ 0x00000004=!text-wrap-used
+ 0x00000008=!rotation-used
+ 0x00000010=!justify-lastline-used
+ 0x00000020=!indent-used
+ 0x00000040=!shrinktofit-used
+ 0x00000080=!cell-merged-used
+ 0x00000100=!cell-locked-used
+ 0x00000200=!cell-hidden-used
+ 0x00000400=!left-border-used
+ 0x00000800=!right-border-used
+ 0x00001000=!top-border-used
+ 0x00002000=!bottom-border-used
+ 0x00004000=!tl-to-br-used
+ 0x00008000=!bl-to-tr-used
+ 0x00010000=!fill-pattern-used
+ 0x00020000=!fg-color-idx-used
+ 0x00040000=!bg-color-idx-used
+ 0x00080000=!fmt-idx-used
+ 0x00100000=!def-font-used
+ 0x02000000=numfmt-block
+ 0x04000000=font-block
+ 0x08000000=alignment-block
+ 0x10000000=border-block
+ 0x20000000=pattern-block
+ 0x40000000=protection-block
+ 0x80000000=!text-dir-used
+end
+
+flagslist=CFRULE-FLAGS2
+ ignore=0x0002
+ 0x0001=!numfmt-id!numfmt-string
+ 0x0004=outline-border
+ 0x8000=use-text-dir
+end
+
+combilist=CFRULE-ALIGNMENT
+ 0x07=uint8,dec,hor-align,XF-HORALIGN
+ 0x08=text-wrap
+ 0x70=uint8,dec,ver-align,XF-VERALIGN
+ 0x80=justify-lastline
+end
+
+combilist=CFRULE-INDENT
+ 0x000F=uint8,dec,indent
+ 0x0010=shrink-to-fit
+ 0x0020=cell-merged
+ 0x00C0=uint8,dec,text-dir,XF-TEXTDIRECTION
+end
+
+flagslist=CFRULE-FONTFLAGS
+ 0x00000002=italic
+ 0x00000008=outline
+ 0x00000010=shadow
+ 0x00000020=condense
+ 0x00000040=extend
+ 0x00000080=strikeout
+end
+
+constlist=CFRULE-FONTWEIGHT
+ include=FONT-WEIGHT
+ -1=unused
+end
+
+constlist=CFRULE-FONTESCAPEMENT
+ include=FONT-ESCAPEMENT
+ -1=unused
+end
+
+constlist=CFRULE-FONTUNDERLINE
+ include=FONT-UNDERLINE
+ -1=unused
+end
+
+constlist=CFRULE-FONTCOLOR
+ include=COLORS-BIFF8
+ -1=unused
+end
+
+flagslist=CFRULE-FONTUSEDFLAGS
+ ignore=0xFFFFFF00
+ 0x00000002=!italic-used
+ 0x00000008=!outline-used
+ 0x00000010=!shadow-used
+ 0x00000020=!condense-used
+ 0x00000040=!extend-used
+ 0x00000080=!strikeout-used
+end
+
+constlist=CFRULE-FONTUSED
+ 0=used
+ 1=not-used
+end
+
+combilist=CFRULE-BORDERCOLOR2
+ 0x0000007F=uint8,dec,top-color,COLORS
+ 0x00003F80=uint8,dec,bottom-color,COLORS
+ 0x001FC000=uint8,dec,diag-color,COLORS
+ 0x01E00000=uint8,dec,diag-style,BORDERSTYLES
+end
+
+combilist=CFRULE-FILLBLOCK
+ 0x0000FC00=uint8,dec,fill-pattern,FILLPATTERNS
+ 0x007F0000=uint8,dec,fg-color-idx,COLORS
+ 0x3F800000=uint8,dec,bg-color-idx,COLORS
+end
+
+flagslist=CFRULE-PROTECTION-FLAGS
+ 0x0001=locked
+ 0x0002=formula-hidden
+end
+
+# CFRULE12 -------------------------------------------------------------------
+
+shortlist=CFRULE12-TYPE,1,cell-is,expression,color-scale,data-bar,top-ten,icon-set
+
+flagslist=CFRULE12-FLAGS
+ 0x0002=stop-if-true
+end
+
+multilist=CFRULE12-SUBTYPE
+ 0=cell-is,expression,color-scale,data-bar,icon-set,top-ten,,unique-values,contains-text,contains-blanks
+ 10=not-contains-blanks,contains-errors,not-contains-errors,,,today,tomorrow,yesterday,last-7-days,last-month
+ 20=next-month,this-week,next-week,last-week,this-month,above-average,below-average,duplicate-values,,equal-above-average
+ 30=equal-below-average
+end
+
+flagslist=CFRULE12-TOP10-FLAGS
+ 0x01=!bottom!top
+ 0x02=percent
+end
+
+shortlist=CFRULE12-TEXT-OPERATOR,0,contains,not-contains,begins-with,ends-with
+shortlist=CFRULE12-DATE-OPERATOR,0,today,yesterday,last-7-days,this-week,last-week,last-month,tomorrow,next-week,next-month,this-month
+
+# CFRULEEXT ------------------------------------------------------------------
+
+flagslist=CFRULEEXT-FLAGS
+ 0x0001=active
+ 0x0002=stop-if-true
+end
+
+# CH3DDATAFORMAT -------------------------------------------------------------
+
+shortlist=CH3DDATAFORMAT-BASE,0,rectangular,circular
+shortlist=CH3DDATAFORMAT-TOP,0,straight,sharp,trunc
+
+# CHAREA ---------------------------------------------------------------------
+
+flagslist=CHAREA-FLAGS
+ 0x0001=stacked
+ 0x0002=percent
+ 0x0004=shadow
+end
+
+# CHAREAFORMAT ---------------------------------------------------------------
+
+flagslist=CHAREAFORMAT-FLAGS
+ 0x0001=auto
+ 0x0002=swap-negative
+end
+
+# CHATTACHEDLABEL ------------------------------------------------------------
+
+flagslist=CHATTACHEDLABEL-FLAGS
+ 0x0001=show-value
+ 0x0002=show-percent
+ 0x0004=show-categ-percent
+ 0x0008=smoothed
+ 0x0010=show-categ
+ 0x0020=show-bubble
+end
+
+# CHAXESSET ------------------------------------------------------------------
+
+shortlist=CHAXESSET-ID,0,primary,secondary
+
+# CHAXIS ---------------------------------------------------------------------
+
+shortlist=CHAXIS-TYPE,0,x-axis,y-axis,z-axis
+
+# CHAXISLINE -----------------------------------------------------------------
+
+shortlist=CHAXISLINE-ID,0,axisline,major-grid,minor-grid,wall
+
+# CHBAR ----------------------------------------------------------------------
+
+flagslist=CHBAR-FLAGS
+ 0x0001=horizontal
+ 0x0002=stacked
+ 0x0004=percent
+ 0x0008=shadow
+end
+
+# CHCHART3D ------------------------------------------------------------------
+
+flagslist=CHCHART3D-FLAGS
+ ignore=0x0010
+ 0x0001=real3d
+ 0x0002=clustered
+ 0x0004=auto-height
+ 0x0020=2d-plotarea
+end
+
+# CHTYPEGROUP ----------------------------------------------------------------
+
+flagslist=CHTYPEGROUP-FLAGS
+ 0x0001=varied-colors
+end
+
+# CHCHARTLINE ----------------------------------------------------------------
+
+shortlist=CHCHARTLINE-TYPE,0,drop-line,hi-lo-line,series-connector
+
+# CHDATAFORMAT ---------------------------------------------------------------
+
+constlist=CHDATAFORMAT-POINTIDX
+ default=
+ -1=all-points
+end
+
+constlist=CHDATAFORMAT-FORMATIDX
+ default=
+ -3=axesset-global
+end
+
+flagslist=CHDATAFORMAT-FLAGS
+ 0x0001=excel4-colors
+end
+
+# CHDATERANGE ----------------------------------------------------------------
+
+shortlist=CHDATERANGE-UNIT,0,days,months,years
+
+flagslist=CHDATERANGE-FLAGS
+ 0x0001=auto-minimum
+ 0x0002=auto-maximum
+ 0x0004=auto-major
+ 0x0008=auto-minor
+ 0x0010=date-axis
+ 0x0020=auto-base
+ 0x0040=auto-axis-cross
+ 0x0080=auto-date
+end
+
+# CHFRAME --------------------------------------------------------------------
+
+shortlist=CHFRAME-FORMAT,0,standard,,,,shadow
+
+flagslist=CHFRAME-FLAGS
+ 0x0001=auto-size
+ 0x0002=auto-pos
+end
+
+# CHFRAMEPOS -----------------------------------------------------------------
+
+shortlist=CHFRAMEPOS-POSMODE,0,rel-points,abssize-points,parent-dependent,offset-plotarea-size,,chartsize
+
+# CHFRBLOCKBEGIN, CHFRBLOCKEND -----------------------------------------------
+
+shortlist=CHFRBLOCK-TYPE,0,axes-set,,text,,axis,type-group,data-table,frame,,legend,legend-exception,,series,chart,data-format,drop-bar
+
+# CHFRCATEGORYPROPS ----------------------------------------------------------
+
+shortlist=CHFRCATEGORYPROPS-ALIGN,1,top-left,center,bottom-right
+
+flagslist=CHFRCATEGORYPROPS-FLAGS
+ ignore=0xFFFE
+ 0x0001=auto-label-frequency
+end
+
+# CHFREXTPROPS ---------------------------------------------------------------
+
+constlist=CHFREXTPROPS-PARENT
+ 0x0001=log-scaling
+ 0x0002=style
+ 0x0004=category-scaling
+ 0x0005=chart-props
+ 0x000F=legend
+ 0x0013=marker
+ 0x0016=plot-area
+ 0x0019=chart-title
+ 0x0037=3d-props
+end
+
+constlist=CHFREXTPROPS-TYPE
+ 0=start
+ 1=end
+ 2=bool
+ 3=double
+ 4=int32
+ 5=string
+ 6=uint16
+ 7=blob
+end
+
+constlist=CHFREXTPROPS-TAG
+ 0x0000=log-base
+ 0x0003=style
+ 0x001E=chart-formatting
+ 0x0020=text-formatting
+ 0x0022=symbol-type
+ 0x002E=no-multi-level
+ 0x002F=overlay
+ 0x0033=theme-override
+ 0x0034=color-mapping-override
+ 0x0035=backwall-thickness
+ 0x0036=floor-thickness
+ 0x004D=perspective
+ 0x004E=rotation-x
+ 0x004F=rotation-y
+ 0x0050=right-angled-axes-off
+ 0x0052=tick-mark-skip
+ 0x0051=tick-label-skip
+ 0x0053=major-unit
+ 0x0054=minor-unit
+ 0x0055=max
+ 0x0056=min
+ 0x0059=side-wall
+ 0x005B=show-data-labels-over-max
+ 0x005C=tick-label-pos
+ 0x005E=pie-combination
+ 0x005F=basetime-unit
+ 0x0064=format-code
+ 0x0065=height-percent
+ 0x0066=display-blanks-as
+ 0x006A=major-unit-type
+ 0x006B=minor-unit-type
+ 0x0076=edit-language
+end
+
+constlist=CHFREXTPROPS-TAG-NAMELIST
+ default=
+ 0x0022=CHFREXTPROPS-SYMBOLTYPE
+ 0x0035=CONV-PERCENT
+ 0x0036=CONV-PERCENT
+ 0x004E=CONV-DEG
+ 0x004F=CONV-DEG
+ 0x005C=CHFREXTPROPS-TICKLABELPOS
+ 0x005F=CHFREXTPROPS-TIMEUNIT
+ 0x0065=CONV-PERCENT
+ 0x0066=CHFREXTPROPS-DISPBLANKSAS
+ 0x006A=CHFREXTPROPS-TIMEUNIT
+ 0x006B=CHFREXTPROPS-TIMEUNIT
+end
+
+shortlist=CHFREXTPROPS-DISPBLANKSAS,0x0067,gap,,spanned
+shortlist=CHFREXTPROPS-SYMBOLTYPE,0x0023,none,diamond,square,triangle,x,star,dot,dash,circle,plus
+shortlist=CHFREXTPROPS-TICKLABELPOS,0x005D,center
+shortlist=CHFREXTPROPS-TIMEUNIT,0x0060,days,months,years
+
+# CHFRINFO -------------------------------------------------------------------
+
+shortlist=CHFRINFO-APPVERSION,9,excel-2000,excel-xp-2003,,excel-2007
+
+# CHFRLABELPROPS -------------------------------------------------------------
+
+flagslist=CHFRLABELPROPS-FLAGS
+ 0x0001=show-series
+ 0x0002=show-categ
+ 0x0004=show-value
+ 0x0008=show-percent
+ 0x0010=show-bubble
+end
+
+# CHFRLAYOUT -----------------------------------------------------------------
+
+combilist=CHFRLAYOUT-FLAGS
+ 0x001E=uint8,dec,legend-pos,CHFRLAYOUT-LEGENDPOS
+end
+
+shortlist=CHFRLAYOUT-LEGENDPOS,0,bottom,top-right,top,right,left
+
+shortlist=CHFRLAYOUT-MODE,0,auto,factor,edge
+
+# CHFRPLOTAREALAYOUT ---------------------------------------------------------
+
+flagslist=CHFRPLOTAREALAYOUT-FLAGS
+ 0x0001=!outer!inner
+end
+
+shortlist=CHFRLAYOUT-LEGENDPOS,0,bottom,top-right,top,right,left
+
+shortlist=CHFRLAYOUT-MODE,0,auto,factor,edge
+
+# CHFRUNITPROPS --------------------------------------------------------------
+
+shortlist=CHFRUNITPROPS-PRESET,-1,manual,none,hundred,thousand,10000,100000,million,10-million,100-million,billion,trillion
+
+flagslist=CHFRUNITPROPS-FLAGS
+ 0x0002=show-unit
+end
+
+# CHLABELRANGE ---------------------------------------------------------------
+
+flagslist=CHLABELRANGE-FLAGS
+ 0x0001=cross-between-categ
+ 0x0002=maximum-axis-cross
+ 0x0004=reverse-order
+end
+
+# CHLEGEND -------------------------------------------------------------------
+
+shortlist=CHLEGEND-DOCKPOS,0,bottom,top-right,top,right,left,,,manual
+shortlist=CHLEGEND-SPACING,0,close,medium,open
+
+flagslist=CHLEGEND-FLAGS
+ 0x0001=docked
+ 0x0002=auto-series
+ 0x0004=auto-pos-x
+ 0x0008=auto-pos-y
+ 0x0010=stacked
+ 0x0020=data-table
+end
+
+# CHLINE ---------------------------------------------------------------------
+
+flagslist=CHLINE-FLAGS
+ 0x0001=stacked
+ 0x0002=percent
+ 0x0004=shadow
+end
+
+# CHLINEFORMAT ---------------------------------------------------------------
+
+shortlist=CHLINEFORMAT-LINETYPE,0,solid,dash,dot,dash-dot,dash-dot-dot,none,25%-pattern,50%-pattern,75%-pattern
+shortlist=CHLINEFORMAT-LINEWEIGHT,-1,hair,thin,medium,thick
+
+flagslist=CHLINEFORMAT-FLAGS
+ 0x0001=auto
+ 0x0004=axis-enabled
+ 0x0008=system-color
+end
+
+# CHMARKERFORMAT -------------------------------------------------------------
+
+shortlist=CHMARKERFORMAT-TYPE,0,none,square,diamond,triangle,cross,star,dow-jones,std-dev,circle,plus
+
+flagslist=CHMARKERFORMAT-FLAGS
+ 0x0001=auto
+ 0x0010=no-fill
+ 0x0020=no-border
+end
+
+# CHOBJECTLINK ---------------------------------------------------------------
+
+shortlist=CHOBJECTLINK-TARGET,0,none,title,y-axis,x-axis,datapoint,legend,none,z-axis,,,,,axis-unit
+
+constlist=CHOBJECTLINK-POINT
+ default=
+ -2=unknown
+ -1=all-points
+end
+
+# CHPICFORMAT ----------------------------------------------------------------
+
+shortlist=CHPICFORMAT-BITMAP-MODE,1,stretched,stacked,stacked-scaled
+
+combilist=CHPICFORMAT-FLAGS
+ 0x0200=top-bottom
+ 0x0400=front-back
+ 0x0800=left-right
+end
+
+# CHPIE ----------------------------------------------------------------------
+
+flagslist=CHPIE-FLAGS
+ 0x0001=shadow
+ 0x0002=connectors
+end
+
+# CHPIVOTFLAGS ---------------------------------------------------------------
+
+flagslist=CHPIVOTFLAGS-FLAGS
+ 0x0001=hide-field-captions
+end
+
+# CHRADAR, CHRADARAREA -------------------------------------------------------
+
+flagslist=CHRADAR-FLAGS
+ 0x0001=axis-labels
+ 0x0002=shadow
+end
+
+# CHPROPERTIES ---------------------------------------------------------------
+
+shortlist=CHPROPERTIES-EMPTYCELLS,0,do-not-plot,as-zero,interpolated
+
+flagslist=CHPROPERTIES-FLAGS
+ 0x0001=manual-series
+ 0x0002=plot-visible-only
+ 0x0004=fixed-size
+ 0x0008=manual-plotarea
+ 0x0010=apply-plotarea-pos
+end
+
+# CHSCATTER ------------------------------------------------------------------
+
+shortlist=CHSCATTER-SIZETYPE,0,none,area,width
+
+flagslist=CHSCATTER-FLAGS
+ 0x0001=bubbles
+ 0x0002=show-negative
+ 0x0004=shadow
+end
+
+# CHSERERRORBAR --------------------------------------------------------------
+
+shortlist=CHSERERRORBAR-TYPE,1,x-plus,x-minus,y-plus,y-minus
+shortlist=CHSERERRORBAR-SOURCE,1,percent,fixed,std-deviation,custom,std-error
+
+# CHSERIES -------------------------------------------------------------------
+
+shortlist=CHSERIES-TYPE,0,date,numeric,sequence,text
+
+# CHSERIESFORMAT -------------------------------------------------------------
+
+flagslist=CHSERIESFORMAT-FLAGS
+ 0x0001=spline
+ 0x0002=bubbles-3d
+ 0x0004=shadow
+end
+
+# CHSERTRENDLINE -------------------------------------------------------------
+
+shortlist=CHSERTRENDLINE-TYPE,0,polynomial,exponential,logarithmic,power,moving-average
+
+# CHSOURCELINK ---------------------------------------------------------------
+
+shortlist=CHSOURCELINK-TARGET,0,title,values,category,bubbles
+shortlist=CHSOURCELINK-TYPE,0,default,constant,sheet-link
+
+flagslist=CHSOURCELINK-FLAGS
+ 0x0001=custom-numfmt
+end
+
+# CHSTRING -------------------------------------------------------------------
+
+shortlist=CHSTRING-TYPE,0,text,category-default,value-default,x-prefix,x-postfix,y-prefix,y-postfix,comment
+
+# CHSURFACE ------------------------------------------------------------------
+
+flagslist=CHSURFACE-FLAGS
+ 0x0001=filled
+ 0x0002=shadow
+end
+
+# CHTEXT ---------------------------------------------------------------------
+
+shortlist=CHTEXT-HORALIGN,1,left,center,right,block,distribute
+shortlist=CHTEXT-VERALIGN,1,top,center,bottom,block,distribute
+shortlist=CHTEXT-FILLMODE,1,transparent,opaque
+
+flagslist=CHTEXT-FLAGS1-BIFF2
+ 0x0001=auto-color
+ 0x0002=show-symbol
+ 0x0004=show-value
+ 0x0008=vertical
+ 0x0010=auto-text
+ 0x0020=default-format
+ 0x0040=deleted
+ 0x0080=auto-fill
+end
+
+combilist=CHTEXT-FLAGS1-BIFF3
+ include=CHTEXT-FLAGS1-BIFF2
+ 0x0700=uint8,dec,orientation,TEXTORIENTATION
+end
+
+combilist=CHTEXT-FLAGS1-BIFF5
+ include=CHTEXT-FLAGS1-BIFF3
+ 0x0800=show-categ-percent
+ 0x1000=show-percent
+end
+
+combilist=CHTEXT-FLAGS1-BIFF8
+ include=CHTEXT-FLAGS1-BIFF5
+ 0x2000=show-bubble-size
+ 0x4000=show-categ
+end
+
+combilist=CHTEXT-FLAGS2
+ ignore=0x3FF0
+ 0x000F=uint8,dec,placement,CHTEXT-PLACEMENT
+ 0xC000=uint8,dec,text-dir,XF-TEXTDIRECTION
+end
+
+shortlist=CHTEXT-PLACEMENT,0,context,outside,inside,center,axis,above,below,left,right,auto,manual
+
+# CHTICK ---------------------------------------------------------------------
+
+shortlist=CHTICK-TYPE,0,none,inside,outside,both
+# TODO: really different label positions in BIFF2-BIFF4?
+shortlist=CHTICK-LABELPOS-BIFF2,0,none,near,below,above
+shortlist=CHTICK-LABELPOS-BIFF5,0,none,below,above,near
+
+flagslist=CHTICK-FLAGS-BIFF2
+ 0x0001=auto-color
+ 0x0002=auto-fill
+end
+
+combilist=CHTICK-FLAGS-BIFF3
+ include=CHTICK-FLAGS-BIFF2
+ 0x001C=uint8,dec,orientation,TEXTORIENTATION
+ 0x0020=auto-rotation
+end
+
+# CHVALUERANGE ---------------------------------------------------------------
+
+flagslist=CHVALUERANGE-FLAGS
+ ignore=0x0100
+ 0x0001=auto-minimum
+ 0x0002=auto-maximum
+ 0x0004=auto-major
+ 0x0008=auto-minor
+ 0x0010=auto-axis-cross
+ 0x0020=logarithmic
+ 0x0040=reverse-order
+ 0x0080=maximum-axis-cross
+end
+
+# COLINFO --------------------------------------------------------------------
+
+combilist=COLINFO-FLAGS
+ 0x0001=hidden
+ 0x0002=custom-width
+ 0x0004=best-fit
+ 0x0008=show-phonetic
+ 0x0700=uint8,dec,outline-level
+ 0x1000=outline-collapsed
+end
+
+# CONNECTION -----------------------------------------------------------------
+
+shortlist=CONNECTION-SOURCETYPE,1,odbc,dao,file,html,ole-db,text,ado,dsp
+
+flagslist=CONNECTION-FLAGS
+ 0x0001=save-password
+ 0x0002=html-tables
+ 0x0004=table-names
+ 0x0008=deleted
+ 0x0010=stand-alone
+ 0x0020=only-use-conn-file
+ 0x0040=background
+ 0x0080=refresh-on-load
+ 0x0100=save-data
+end
+
+shortlist=CONNECTION-RECONNECTTYPE,0,as-required,always,never
+shortlist=CONNECTION-CREDENTIALS,0,integrated,none,stored-sso,prompt
+shortlist=CONNECTION-LINKEDOBJECTTYPE,0,none,query-table,pivot-cache
+
+# DATATABLE ------------------------------------------------------------------
+
+flagslist=DATATABLE-FLAGS-BIFF3
+ 0x0001=recalc-always
+ 0x0002=recalc-on-load
+ 0x0004=row-table
+ 0x0008=table-2d
+end
+
+flagslist=DATATABLE-FLAGS-BIFF8
+ include=DATATABLE-FLAGS-BIFF3
+ 0x0010=ref1-deleted
+ 0x0020=ref2-deleted
+end
+
+# DATAVALIDATION -------------------------------------------------------------
+
+combilist=DATAVALIDATION-FLAGS
+ 0x0000000F=uint8,dec,type,DATAVALIDATION-TYPE
+ 0x00000070=uint8,dec,error-style,DATAVALIDATION-ERRORSTYLE
+ 0x00000080=string-list
+ 0x00000100=ignore-empty
+ 0x00000200=no-dropdown
+ 0x00040000=show-input-box
+ 0x00080000=show-error-box
+ 0x00F00000=uint8,dec,operator,DATAVALIDATION-OPERATOR
+end
+
+shortlist=DATAVALIDATION-TYPE,0,any,whole,decimal,list,date,time,text-length,custom
+shortlist=DATAVALIDATION-OPERATOR,0,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
+shortlist=DATAVALIDATION-ERRORSTYLE,0,error,warning,info
+
+# DATAVALIDATIONS ------------------------------------------------------------
+
+flagslist=DATAVALIDATIONS-FLAGS
+ 0x0001=input-box-visible
+ 0x0002=input-box-at-cell
+ 0x0004=cached
+end
+
+# DATEMODE -------------------------------------------------------------------
+
+shortlist=DATEMODE,0,1899-12-31,1904-01-01
+
+# DBQUERY --------------------------------------------------------------------
+
+combilist=DBQUERY-FLAGS
+ 0x0007=uint8,dec,source-type,CONNECTION-SOURCETYPE
+ 0x0008=odbc-connection
+ 0x0010=sql-query
+ 0x0020=server-sql
+ 0x0040=html-query
+ 0x0080=save-password
+ 0x0100=html-tables
+end
+
+# DEFINEDNAME ----------------------------------------------------------------
+
+flagslist=DEFINEDNAME-FLAGS-BIFF2
+ 0x02=macro
+ 0x04=complex
+end
+
+shortlist=DEFINEDNAME-MACROTYPE-BIFF2,0,none,function,procedure
+
+flagslist=DEFINEDNAME-FLAGS-BIFF3
+ 0x0001=hidden
+ 0x0002=function
+ 0x0004=command
+ 0x0008=macro
+ 0x0010=complex
+ 0x0020=builtin
+end
+
+shortlist=DEFINEDNAME-BUILTINID,0,consolidate-area,auto-open,auto-close,extract,database,criteria,print-area,print-titles,recorder,data-form,auto-activate,auto-deactivate,sheet-title,filterdatabase
+
+combilist=DEFINEDNAME-FLAGS-BIFF4
+ include=DEFINEDNAME-FLAGS-BIFF3
+ 0x0FC0=uint16,dec,func-group,DEFINEDNAME-FUNCGROUP
+end
+
+combilist=DEFINEDNAME-FLAGS-BIFF5
+ include=DEFINEDNAME-FLAGS-BIFF4
+ 0x0004=vba
+ 0x1000=binary
+end
+
+shortlist=DEFINEDNAME-FUNCGROUP,0,none,financial,date-time,math-trig,statistical,lookup-ref,database,text,logical,information,commands,customizing,macro-control,dde-external,user-definded
+
+constlist=DEFINEDNAME-SHEETIDX
+ default=
+ 0=global
+end
+
+# DEFROWHEIGHT ---------------------------------------------------------------
+
+combilist=DEFROWHEIGHT-FLAGS-BIFF2
+ 0x7FFF=uint16,dec,row-height,CONV-TWIP-TO-PT
+ 0x8000=unchanged
+end
+
+flagslist=DEFROWHEIGHT-FLAGS-BIFF3
+ 0x0001=custom-height
+ 0x0002=hidden
+ 0x0004=thick-top
+ 0x0008=thick-bottom
+end
+
+# DXF ------------------------------------------------------------------------
+
+flagslist=DXF-FLAGS
+ 0x0001=!swap-fg-bg-color
+ 0x0002=use-internal-borders
+end
+
+multilist=DXF-SUBREC
+ 0=FILL-PATTERN,FILL-FGCOLOR,FILL-BGCOLOR,FILL-GRADIENT,FILL-STOP
+ 5=FONT-COLOR,BORDER-TOP,BORDER-BOTTOM,BORDER-LEFT,BORDER-RIGHT
+ 10=BORDER-DIAGONAL,BORDER-VERTICAL,BORDER-HORIZONTAL,BORDER-DIAGUP,BORDER-DIAGDOWN
+ 15=ALIGN-HORIZONTAL,ALIGN-VERTICAL,ALIGN-ROTATION,ALIGN-INDENT,ALIGN-READINGORDER
+ 20=ALIGN-WRAPTEXT,ALIGN-JUSTLASTLINE,ALIGN-SHRINKTOFIT,ALIGN-MERGED,FONT-NAME
+ 25=FONT-WEIGHT,FONT-UNDERLINE,FONT-ESCAPEMENT,FONT-ITALIC,FONT-STRIKE
+ 30=FONT-OUTLINE,FONT-SHADOW,FONT-CONDENSE,FONT-EXTEND,FONT-CHARSET
+ 35=FONT-PITCHFAMILY,FONT-HEIGHT,FONT-SCHEME,NUMFMT-CODE,
+ 40=,NUMFMT-ID,ALIGN-RELINDENT,PROT-LOCKED,PROT-HIDDEN
+end
+
+# EXTERNALBOOK ---------------------------------------------------------------
+
+constlist=EXTERNALBOOK-KEY
+ 0x0401=self-reference
+ 0x3A01=analysis-addin
+end
+
+# EXTERNALNAME ---------------------------------------------------------------
+
+flagslist=EXTERNALNAME-FLAGS-BIFF3
+ 0x0001=builtin
+ 0x0002=automatic
+ 0x0004=pic-link
+ 0x0008=dde-stddocumentname
+end
+
+combilist=EXTERNALNAME-FLAGS-BIFF5
+ include=EXTERNALNAME-FLAGS-BIFF3
+ 0x0010=ole-link
+ 0x7FE0=uint16,dec,clipboard-format
+ 0x8000=iconified
+end
+
+# EXTERNSHEET ----------------------------------------------------------------
+
+constlist=EXTERNSHEET-IDX-BIFF8
+ default=
+ -1=deleted
+ -2=special
+end
+
+# FILEPASS -------------------------------------------------------------------
+
+shortlist=FILEPASS-TYPE,0,xor,rc4
+shortlist=FILEPASS-MAJOR,1,rc4,crypto-api-2003,crypto-api-2007
+
+# FILTERCOLUMN ---------------------------------------------------------------
+
+combilist=FILTERCOLUMN-FLAGS
+ 0x0001=!and!or
+ 0x0004=op-1-simple
+ 0x0008=op-2-simple
+ 0x0010=top-10
+ 0x0020=!bottom!top
+ 0x0040=percent
+ 0xFF80=uint16,dec,top-10-count
+end
+
+constlist=FILTERCOLUMN-DATATYPE
+ 0=none
+ 2=rk
+ 4=double
+ 6=string
+ 8=boolean
+ 12=blank
+ 14=not-blank
+end
+
+shortlist=FILTERCOLUMN-OPERATOR,0,none,less,equal,less-equal,greater,not-equal,greater-equal
+
+# FONT -----------------------------------------------------------------------
+
+flagslist=FONT-FLAGS
+ 0x0001=bold
+ 0x0002=italic
+ 0x0004=underline
+ 0x0008=strikeout
+ 0x0010=outline
+ 0x0020=shadow
+ 0x0040=condense
+ 0x0080=extend
+end
+
+multilist=FONT-UNDERLINE
+ 0x00=none,single,double
+ 0x21=single-acc,double-acc
+end
+
+shortlist=FONT-ESCAPEMENT,0,none,superscript,subscript
+
+# FORMULA --------------------------------------------------------------------
+
+flagslist=FORMULA-FLAGS-BIFF2
+ 0x0001=recalc-always
+end
+
+flagslist=FORMULA-FLAGS-BIFF3
+ include=FORMULA-FLAGS-BIFF2
+ 0x0002=recalc-onload
+end
+
+flagslist=FORMULA-FLAGS-BIFF5
+ include=FORMULA-FLAGS-BIFF3
+ 0x0008=shared-fmla
+end
+
+shortlist=FORMULA-RESULTTYPE,0,string,boolean,error,empty
+
+# GUTS -----------------------------------------------------------------------
+
+shortlist=GUTS-LEVELS,0,none,,1-level,2-levels,3-levels,4-levels,5-levels,6-levels,7-levels
+
+# HEADERFOOTER ---------------------------------------------------------------
+
+flagslist=HEADERFOOTER-FLAGS
+ ignore=0xFFF0
+ 0x0001=has-even-hf
+ 0x0002=has-first-hf
+ 0x0004=scale-with-sheet
+ 0x0008=align-with-margins
+end
+
+# HIDEOBJ --------------------------------------------------------------------
+
+shortlist=HIDEOBJ,0,show,placeholder,hide
+
+# IMGDATA --------------------------------------------------------------------
+
+constlist=IMGDATA-FORMAT
+ -1=none
+ 2=wmf-pict
+ 9=dib
+ 14=native
+end
+
+shortlist=IMGDATA-ENV,1,windows,apple
+
+# NOTE -----------------------------------------------------------------------
+
+flagslist=NOTE-FLAGS-BIFF8
+ 0x0002=visible
+ 0x0080=row-hidden
+ 0x0100=col-hidden
+end
+
+# NOTESOUND ------------------------------------------------------------------
+
+constlist=NOTESOUND-FORMAT
+ 1=pcm
+ 3=ieee-float
+ 6=a-law
+ 7=mu-law
+ 0xFFFE=extensible
+end
+
+# OBJ ------------------------------------------------------------------------
+
+# object types ---
+
+multilist=OBJ-TYPE-BIFF3
+ 0=group,line,rectangle,oval,arc,chart,textbox,button,picture
+end
+
+multilist=OBJ-TYPE-BIFF4
+ include=OBJ-TYPE-BIFF3
+ 9=polygon
+end
+
+multilist=OBJ-TYPE-BIFF5
+ include=OBJ-TYPE-BIFF4
+ 10=,checkbox,optionbutton,edit,label,dialog,spin,scrollbar,listbox,groupbox
+ 20=dropdown
+end
+
+multilist=OBJ-TYPE-BIFF8
+ include=OBJ-TYPE-BIFF5
+ 25=note
+ 30=drawing
+end
+
+# flags and constants ---
+
+flagslist=OBJ-FLAGS-BIFF3
+ 0x0001=selected
+ 0x0002=auto-size
+ 0x0004=auto-move
+ 0x0010=protected
+ 0x0080=grouped
+ 0x0100=hidden
+ 0x0200=visible
+end
+
+flagslist=OBJ-FLAGS-BIFF4
+ include=OBJ-FLAGS-BIFF3
+ 0x0400=printable
+end
+
+flagslist=OBJ-AUTO-FLAGS
+ 0x01=auto
+end
+
+multilist=OBJ-LINETYPE
+ 0=solid,dash,dot,dash-dot,dash-dot-dot,25%-pattern,50%-pattern,75%-pattern
+ 255=none
+end
+
+shortlist=OBJ-LINEWEIGHT,0,hair,thin,medium,thick
+
+shortlist=OBJ-ARROWHEAD-TYPE,0,none,open,filled,double-end-open,double-end-filled
+shortlist=OBJ-ARROWHEAD-WIDTH,0,narrow,medium,wide
+shortlist=OBJ-ARROWHEAD-LENGTH,0,short,medium,long
+
+combilist=OBJ-LINEENDS
+ 0x000F=uint8,dec,arrowhead-type,OBJ-ARROWHEAD-TYPE
+ 0x00F0=uint8,dec,arrowhead-width,OBJ-ARROWHEAD-WIDTH
+ 0x0F00=uint8,dec,arrowhead-length,OBJ-ARROWHEAD-LENGTH
+end
+
+shortlist=OBJ-LINEDIR,0,topleft-to-bottomright,topright-to-bottomleft,bottomright-to-topleft,bottomleft-to-topright
+
+shortlist=OBJ-ARC-QUADRANT,0,upper-right,upper-left,lower-left,lower-right
+
+combilist=OBJ-FRAMESTYLE-FLAGS
+ 0x0001=rounded
+ 0x0002=shadow
+ 0x03FC=uint16,dec,rounded-diameter
+end
+
+shortlist=OBJ-HORALIGN,0,none,left,center,right,justify
+shortlist=OBJ-VERALIGN,0,none,top,center,bottom,justify
+
+combilist=OBJ-TEXT-FLAGS
+ 0x000E=uint16,dec,hor-align,OBJ-HORALIGN
+ 0x0070=uint16,dec,ver-align,OBJ-VERALIGN
+ 0x0080=auto-size
+ 0x0200=text-locked
+ 0x0400=selected
+end
+
+flagslist=OBJ-PICTURE-FLAGS
+ 0x0001=auto-size
+ 0x0002=linked
+ 0x0008=symbol
+end
+
+flagslist=OBJ-POLYGON-FLAGS
+ 0x0100=closed
+end
+
+flagslist=OBJ-CHART-FLAGS-BIFF5
+ 0x0001=linked-to-sheet
+end
+
+flagslist=OBJ-BUTTON-FLAGS-BIFF5
+ 0x0001=default-btn
+ 0x0002=help-btn
+ 0x0004=cancel-btn
+ 0x0008=close-btn
+end
+
+shortlist=OBJ-CHECKBOX-STATE-BIFF5,0,unchecked,checked,tristate
+
+flagslist=OBJ-CHECKBOX-FLAGS-BIFF5
+ 0x0001=flat
+ 0x0002=box-only
+end
+
+shortlist=OBJ-EDIT-TYPE-BIFF5,0,text,integer,double,reference,formula
+
+flagslist=OBJ-SCROLLBAR-FLAGS-BIFF5
+ 0x0001=visible
+ 0x0002=slider-only
+ 0x0004=tracking
+ 0x0008=flat
+end
+
+combilist=OBJ-LISTBOX-FLAGS-BIFF5
+ 0x0004=linked-edit
+ 0x0008=flat
+ 0x0030=uint8,dec,selection-type,OBJ-LISTBOX-SELTYPE-BIFF5
+end
+
+shortlist=OBJ-LISTBOX-SELTYPE-BIFF5,0,single,multi,range
+
+flagslist=OBJ-GROUPBOX-FLAGS-BIFF5
+ 0x0001=flat
+end
+
+combilist=OBJ-DROPDOWN-FLAGS-BIFF5
+ 0x0003=uint8,dec,type,OBJ-DROPDOWN-TYPE-BIFF5
+ 0x0008=filtered
+end
+
+shortlist=OBJ-DROPDOWN-TYPE-BIFF5,0,listbox,combobox,simple,max
+
+multilist=OBJ-RECNAMES-BIFF8
+ 0x0000=OBJEND,,,,OBJMACRO,,OBJGMO,OBJCF
+ 0x0008=OBJFLAGS,OBJPICTFMLA,OBJCBLS,OBJRBO,OBJSBS,OBJNTS,OBJSBSFMLA,OBJGBODATA
+ 0x0010=OBJEDODATA,OBJRBODATA,OBJCBLSDATA,OBJLBSDATA,OBJCBLSFMLA,OBJCMO,,
+end
+
+flagslist=OBJFLAGS-FLAGS
+ 0x0001=manual-size
+ 0x0002=linked
+ 0x0004=update-on-print
+ 0x0008=symbol
+ 0x0010=control
+ 0x0020=ctls-stream
+ 0x0080=camera-pic
+ 0x0100=default-size
+ 0x0200=auto-load
+end
+
+flagslist=OBJCMO-FLAGS
+ 0x0001=locked
+ 0x0004=default-size
+ 0x0008=published
+ 0x0010=printable
+ 0x0080=disabled
+ 0x0100=auxiliary
+ 0x0200=recalc-on-load
+ 0x1000=recalc-always
+ 0x2000=auto-line
+ 0x4000=auto-area
+end
+
+# PAGELAYOUTVIEW -------------------------------------------------------------
+
+flagslist=PAGELAYOUTVIEW-FLAGS
+ ignore=0xFFF8
+ 0x0001=page-layout-view
+ 0x0002=show-ruler
+ 0x0004=hide-margins
+end
+
+# PAGESETUP ------------------------------------------------------------------
+
+multilist=PAGESETUP-PAPERSIZE
+ 0=undefined,letter,letter-small,tabloid,ledger,legal,statement,executive,a3,a4
+ 10=a4-small,a5,b4,b5,folio,quarto,10x14,11x17,note,envelope-9
+ 20=envelope-10,envelope-11,envelope-12,envelope-14,c,d,e,envelope-dl,envelope-c5,envelope-c3
+ 30=envelope-c4,envelope-c6,envelope-c65,envelope-b4,envelope-b5,envelope-b6,envelope-italy,envelope-monarch,envelope-6-3/4,us-standard-fanfold
+ 40=german-standard-fanfold,german-legal-fanfold,b4,japanese-dbl-postcaed,9x11,10x11,15x11,,
+ 50=envelope-invite,letter-extra,legal-extra,tabloid-extra,a4-extra,letter-transverse,a4-transverse,letter-extra-transverse,super-a-a4,super-b-a3,letter-plus
+ 60=a4-plus,a5-transverse,jis-b5-transverse,a3-extra,a5-extra,b5-extra,a2,a3-transverse,a3-extra-transverse
+end
+
+constlist=PAGESETUP-SCALETOPAGES
+ default=
+ 0=automatic
+end
+
+flagslist=PAGESETUP-FLAGS-BIFF4
+ 0x0001=print-in-rows
+ 0x0002=portrait
+ 0x0004=uninitialized
+ 0x0008=black-and-white
+end
+
+flagslist=PAGESETUP-FLAGS-BIFF5
+ include=PAGESETUP-FLAGS-BIFF4
+ 0x0010=draft-quality
+ 0x0020=print-notes
+ 0x0040=default-orientation
+ 0x0080=use-first-page
+end
+
+combilist=PAGESETUP-FLAGS-BIFF8
+ include=PAGESETUP-FLAGS-BIFF5
+ 0x0200=print-notes-at-end
+ 0x0C00=uint8,dec,print-errors,PAGESETUP-PRINTERRORS
+end
+
+shortlist=PAGESETUP-PRINTERRORS,0,displayed,none,as-dashes,as-na
+
+unitconverter=PAGESETUP-DPI,1,dpi
+
+# PANE -----------------------------------------------------------------------
+
+shortlist=PANE-ID,0,bottom-right,top-right,bottom-left,top-left
+
+# PCDEFINITION ---------------------------------------------------------------
+
+flagslist=PCDEFINITION-FLAGS
+ 0x0001=save-data
+ 0x0002=invalid
+ 0x0004=refresh-on-load
+ 0x0008=optimize-memory
+ 0x0010=background-query
+ 0x0020=enable-refresh
+end
+
+# PCDFIELD -------------------------------------------------------------------
+
+flagslist=PCDFIELD-FLAGS
+ 0x0001=has-items
+ 0x0002=has-unshared-items
+ 0x0004=calculated
+ 0x0008=has-parent
+ 0x0010=range-group
+ 0x0020=is-numeric
+ 0x0040=is-integer
+ 0x0080=has-semi-mixed-types
+ 0x0100=has-min-max
+ 0x0200=16bit-indexes
+ 0x0400=has-non-date
+ 0x0800=has-date
+end
+
+# PCDFRANGEPR ----------------------------------------------------------------
+
+combilist=PCDFRANGEPR-FLAGS
+ ignore=0xFFE0
+ 0x0001=auto-start
+ 0x0002=auto-end
+ 0x001C=uint8,dec,group-by,PCDFRANGEPR-GROUPBY
+end
+
+shortlist=PCDFRANGEPR-GROUPBY,0,numeric,seconds,minutes,hours,days,months,quarters,years
+
+# PCDFSQLTYPE ----------------------------------------------------------------
+
+shortlist=PCDFSQLTYPE-DATATYPE,0,unknown,char,numeric,decimal,int32,int16,float,real,double,,,datetime,var-char
+
+# PCDSOURCE ------------------------------------------------------------------
+
+flagslist=PCDSOURCE-TYPE
+ 0x0001=spreadsheet
+ 0x0002=extern
+ 0x0004=consolidation-area
+ 0x0010=scenario
+end
+
+# PHONETICPR -----------------------------------------------------------------
+
+shortlist=PHONETICPR-TYPE,0,halfwidth-katakana,fullwidth-katakana,hiragana,no-conversion
+shortlist=PHONETICPR-ALIGNMENT,0,no-control,left,center,distributed
+
+combilist=PHONETICPR-FLAGS
+ ignore=0xFFF0
+ 0x0003=uint8,dec,type,PHONETICPR-TYPE
+ 0x000C=uint8,dec,alignment,PHONETICPR-ALIGNMENT
+end
+
+# PROJEXTSHEET ---------------------------------------------------------------
+
+shortlist=PROJEXTSHEET-TYPE,0,sheet,macro,chart
+
+# PTDATAFIELD ----------------------------------------------------------------
+
+shortlist=PTDATAFIELD-SUBTOTAL,0,sum,count-all,average,max,min,product,count-num,std-dev,std-dev-p,variance,variance-p
+shortlist=PTDATAFIELD-SHOWDATAAS,0,normal,diff-from,percent-of,percent-diff-from,running-total-in,percent-of-row,percent-of-column,percent-of-total,index
+
+multilist=PTDATAFIELD-BASEITEM
+ default=
+ 0x7FFB=previous-item,next-item
+end
+
+# PTDEFINITION ---------------------------------------------------------------
+
+flagslist=PTDEFINITION-FLAGS
+ 0x0001=row-grandtotals
+ 0x0002=column-grandtotals
+ 0x0008=auto-format
+ 0x0010=size-auto-format
+ 0x0020=font-auto-format
+ 0x0040=align-auto-format
+ 0x0080=border-auto-format
+ 0x0100=pattern-auto-format
+ 0x0200=number-auto-format
+end
+
+constlist=PTDEFINITION-DATAFIELD-POS
+ default=
+ -1=append
+end
+
+# PTDEFINITION2 --------------------------------------------------------------
+
+combilist=PTDEFINITION2-FLAGS
+ 0x00000001=page-over-then-down
+ 0x000001FE=dec,uint8,page-wrap
+ 0x00010000=enable-wizard
+ 0x00020000=enable-drill
+ 0x00040000=enable-field-props
+ 0x00080000=preserve-formatting
+ 0x00100000=merge-labels
+ 0x00200000=show-error
+ 0x00400000=show-missing
+ 0x00800000=multiple-page-items
+end
+
+# PTFIELD --------------------------------------------------------------------
+
+flagslist=PTFIELD-AXISTYPE
+ 0x0001=row
+ 0x0002=column
+ 0x0004=page
+ 0x0008=data
+end
+
+flagslist=PTFIELD-SUBTOTALS
+ 0x0001=default
+ 0x0002=sum
+ 0x0004=count-all
+ 0x0008=average
+ 0x0010=max
+ 0x0020=min
+ 0x0040=product
+ 0x0080=count-num
+ 0x0100=std-dev
+ 0x0200=std-dev-p
+ 0x0400=variance
+ 0x0800=variance-p
+end
+
+# PTFIELD2 -------------------------------------------------------------------
+
+combilist=PTFIELD2-FLAGS
+ 0x00000001=show-all-items
+ 0x00000002=drag-to-row
+ 0x00000004=drag-to-column
+ 0x00000008=drag-to-page
+ 0x00000010=drag-to-hide
+ 0x00000080=server-based
+ 0x00000200=autosort
+ 0x00000400=ascend-sort
+ 0x00000800=autoshow
+ 0x00001000=autoshow-top
+ 0x00002000=calculated
+ 0x00200000=outline
+ 0x00400000=insert-blank-row
+ 0x00800000=subtotal-top
+ 0xFF000000=uint8,dec,autoshow-item-count
+end
+
+# PTFITEM --------------------------------------------------------------------
+
+multilist=PTFITEM-ITEMTYPE
+ 0=data,default,sum,count-all,average,max,min,product,count-num,std-dev,std-dev-p,variance,variance-p,grandtotal
+ 254=page,none
+end
+
+flagslist=PTFITEM-FLAGS
+ 0x0001=hidden
+ 0x0002=hide-detail
+ 0x0008=calculated
+ 0x0010=missing
+end
+
+constlist=PTFITEM-CACHEIDX
+ default=
+ -1=no-cache-item
+end
+
+# PTPAGEFIELDS ---------------------------------------------------------------
+
+constlist=PTPAGEFIELDS-ITEM
+ default=
+ 0x7FFD=all
+end
+
+# PTROWCOLITEMS --------------------------------------------------------------
+
+shortlist=PTROWCOLITEMS-ITEMTYPE,0,data,default,sum,count-all,average,max,min,product,count-num,std-dev,std-dev-p,variance,variance-p,grandtotal,blank-line
+
+combilist=PTROWCOLITEMS-FLAGS
+ ignore=0xC000
+ 0x0001=field-name
+ 0x01FE=uint16,dec,data-field-idx
+ 0x0200=subtotal
+ 0x0400=blocktotal
+ 0x0800=grandtotal
+ 0x1000=multi-data
+end
+
+# QUERYTABLE -----------------------------------------------------------------
+
+combilist=QUERYTABLE-FLAGS
+ 0x0001=headers
+ 0x0002=row-numbers
+ 0x0004=disable-refresh
+ 0x0008=background
+ 0x0010=first-background
+ 0x0020=refresh-on-load
+ 0x0040=delete-unused
+ 0x0080=fill-formulas
+ 0x0100=adjust-column-width
+ 0x0200=save-data
+ 0x0400=disable-edit
+ 0x2000=overwrite-existing
+end
+
+combilist=QUERYTABLE-AUTOFORMAT-FLAGS
+ 0x0001=apply-num-fmt
+ 0x0002=apply-font
+ 0x0004=apply-alignment
+ 0x0008=apply-border
+ 0x0010=apply-fill
+ 0x0020=apply-protection
+end
+
+# QUERYTABLEREFRESH ----------------------------------------------------------
+
+flagslist=QUERYTABLEREFRESH-FLAGS
+ 0x0001=enable-refresh
+ 0x0002=pivot-cache-invalid
+ 0x0004=olap-pivot-table
+end
+
+flagslist=QUERYTABLEREFRESH-PTFLAGS
+ 0x00000001=disable-draw-drop
+ 0x00000002=hide-totals-annotation
+ 0x00000008=include-empty-rows
+ 0x00000010=include-empty-columns
+end
+
+flagslist=QUERYTABLEREFRESH-QTFLAGS
+ 0x00000001=preserve-formatting
+ 0x00000002=adjust-column-width
+ 0x00000010=ext-data-list
+ 0x00000040=create-table-list
+ 0x00000080=create-dummy-list
+end
+
+# QUERYTABLESETTINGS ---------------------------------------------------------
+
+flagslist=QUERYTABLESETTINGS-FLAGS
+ 0x0001=keep-alive
+ 0x0002=new
+ 0x0004=source-data
+ 0x0008=web-based-prov
+ 0x0010=reinit-list
+ 0x0080=xml
+end
+
+flagslist=QUERYTABLESETTINGS-HTML-FLAGS
+ 0x0001=parse-pre
+ 0x0002=consecutive-delimiters
+ 0x0004=first-row
+ 0x0008=xl97-created
+ 0x0010=text-dates
+ 0x0020=xl2000-refreshed
+end
+
+combilist=QUERYTABLESETTINGS-OLEDB-FLAGS
+ 0x0007=uint8,dec,command-type,QUERYTABLESETTINGS-OLEDB-COMMANDTYPE
+ 0x0008=alt-connection-string
+ 0x0010=no-refresh-cube
+ 0x0020=olap-has-locale
+ 0x0040=server-num-fmt
+ 0x0080=server-fill-color
+ 0x0100=server-font-color
+ 0x0200=server-font-format
+ 0x0400=olap-member-l10n
+end
+
+shortlist=QUERYTABLESETTINGS-OLEDB-COMMANDTYPE,0,none,cube,sql,table,default,list
+
+flagslist=QUERYTABLESETTINGS-ADO-FLAGS
+ 0x0100=ado-refreshable
+end
+
+flagslist=QUERYTABLESETTINGS-EXT-FLAGS
+ 0x0001=text-query
+ 0x0002=table-names
+end
+
+unitconverter=QUERYTABLESETTINGS-INTERVAL,60,sec
+shortlist=QUERYTABLESETTINGS-HTMLFORMAT,1,none,rtf,all
+
+# REFMODE --------------------------------------------------------------------
+
+shortlist=REFMODE,0,R1C1,A1
+
+# ROW ------------------------------------------------------------------------
+
+combilist=ROW-HEIGHT
+ 0x7FFF=uint16,dec,height,CONV-TWIP-TO-PT
+ 0x8000=default-height
+end
+
+combilist=ROW-FLAGS
+ ignore=0x00000100
+ 0x00000007=uint8,dec,outline-level
+ 0x00000010=outline-collapsed
+ 0x00000020=hidden
+ 0x00000040=custom-height
+ 0x00000080=custom-format
+ 0x0FFF0000=uint16,dec,custom-xf-idx
+ 0x10000000=thick-top
+ 0x20000000=thick-bottom
+ 0x40000000=show-phonetic
+end
+
+# SHAREDFEATHEAD -------------------------------------------------------------
+
+shortlist=SHAREDFEATHEAD-TYPE,2,protection,ignored-formula-errors,smarttag,table
+
+flagslist=SHAREDFEATHEAD-PROT-FLAGS
+ 0x00000001=edit-object
+ 0x00000002=edit-scenario
+ 0x00000004=format-cell
+ 0x00000008=format-column
+ 0x00000010=format-row
+ 0x00000020=insert-column
+ 0x00000040=insert-row
+ 0x00000080=insert-hyperlink
+ 0x00000100=delete-column
+ 0x00000200=delete-row
+ 0x00000400=select-locked
+ 0x00000800=sort
+ 0x00001000=use-autofilter
+ 0x00002000=pivottable-report
+ 0x00004000=select-unlocked
+end
+
+# SHEET ----------------------------------------------------------------------
+
+shortlist=SHEET-STATE,0,visible,hidden,very-hidden
+shortlist=SHEET-TYPE,0,worksheet,macrosheet,chartsheet,,,,vb-module
+
+# SHEETEXT -------------------------------------------------------------------
+
+combilist=SHEETEXT-FLAGS1
+ 0x0000007F=uint8,dec,color-idx,SHEETEXT-COLOR
+end
+
+constlist=SHEETEXT-COLOR
+ include=COLORS
+ 0x7F=undefined
+end
+
+combilist=SHEETEXT-FLAGS2
+ include=SHEETEXT-FLAGS1
+ 0x00000080=eval-cond-formats
+ 0x00000100=!published!unpublished
+end
+
+# SHEETPR --------------------------------------------------------------------
+
+shortlist=SHEETPR-WINDOWPOS,0,tiled,horizontal,vertical,cascaded
+
+flagslist=SHEETPR-FLAGS-BIFF3
+ 0x0001=show-autopagebreaks
+ 0x0020=outline-auto-style
+ 0x0040=outline-symbols-below
+ 0x0080=outline-symbols-right
+ 0x0100=fit-to-pages
+ 0x0200=skip-linked-values
+ 0x0400=show-row-outline
+ 0x0800=show-column-outline
+end
+
+flagslist=SHEETPR-FLAGS-BIFF4
+ include=SHEETPR-FLAGS-BIFF3
+ 0x3000=uint8,dec,window-pos,SHEETPR-WINDOWPOS
+ 0x4000=lotus-expr-eval
+ 0x8000=lotus-formula-edit
+end
+
+flagslist=SHEETPR-FLAGS-BIFF5
+ include=SHEETPR-FLAGS-BIFF4
+ exclude=0x0200,0x3000
+ 0x0010=dialog-sheet
+end
+
+# STYLE ----------------------------------------------------------------------
+
+combilist=STYLE-FLAGS
+ 0x0FFF=uint16,dec,xf-idx
+ 0x8000=builtin
+end
+
+shortlist=STYLE-BUILTIN,-1,user-defined,normal,rowlevel,collevel,comma,currency,percent,comma-0,currency-0,hyperlink,followed-hyperlink
+
+# STYLEEXT -------------------------------------------------------------------
+
+flagslist=STYLEEXT-FLAGS
+ 0x01=builtin
+ 0x02=hidden
+ 0x04=custom
+end
+
+shortlist=STYLEEXT-CATEGORY,0,custom,good-bad-neutral,data-model,title-heading,themed,number-format
+
+multilist=STYLEEXT-BUILTIN
+ include=STYLE-BUILTIN
+ 10=note,warning-text,,,,title,heading-1,heading-2,heading-3,heading-4
+ 20=input,output,calculation,check-cell,linked-cell,total,good,bad,neutral,accent1
+ 30=20%-accent1,40%-accent1,60%-accent1,accent2,20%-accent2,40%-accent2,60%-accent2,accent3,20%-accent3,40%-accent3
+ 40=60%-accent3,accent4,20%-accent4,40%-accent4,60%-accent4,accent5,20%-accent5,40%-accent5,60%-accent5,accent6
+ 50=20%-accent6,40%-accent6,60%-accent6,explanatory-text
+end
+
+# THEME ----------------------------------------------------------------------
+
+constlist=THEME-VERSION
+ 0=custom
+ 123820=default
+ 124226=default
+end
+
+# TXO ------------------------------------------------------------------------
+
+combilist=TXO-FLAGS
+ 0x000E=uint16,dec,hor-align,OBJ-HORALIGN
+ 0x0070=uint16,dec,ver-align,OBJ-VERALIGN
+ 0x0200=text-locked
+end
+
+# WINDOW1 --------------------------------------------------------------------
+
+flagslist=WINDOW1-FLAGS
+ 0x0001=hidden
+ 0x0002=minimized
+ 0x0008=show-horizontal-scroll
+ 0x0010=show-vertical-scroll
+ 0x0020=show-tabbar
+end
+
+unitconverter=WINDOW1-TABBARRATIO,/10,%
+
+# WINDOW2 --------------------------------------------------------------------
+
+flagslist=WINDOW2-FLAGS-BIFF3
+ 0x0001=show-formulas
+ 0x0002=show-gridlines
+ 0x0004=show-headings
+ 0x0008=frozen-panes
+ 0x0010=show-zeros
+ 0x0020=default-gridcolor
+ 0x0040=right-to-left
+ 0x0080=show-outline-symbols
+ 0x0100=remove-split-with-freeze
+end
+
+flagslist=WINDOW2-FLAGS-BIFF5
+ include=WINDOW2-FLAGS-BIFF3
+ 0x0200=sheet-selected
+ 0x0400=sheet-active
+end
+
+flagslist=WINDOW2-FLAGS-BIFF8
+ include=WINDOW2-FLAGS-BIFF5
+ 0x0800=pagebreak-mode
+end
+
+# XF -------------------------------------------------------------------------
+
+shortlist=XF-HORALIGN,0,general,left,center,right,fill,block,center-across-sel,distribute
+shortlist=XF-VERALIGN,0,top,center,bottom,justify,distribute
+shortlist=XF-TEXTDIRECTION,0,context,left-to-right,right-to-left
+
+flagslist=XF-PROTECTION-FLAGS
+ 0x01=locked
+ 0x02=formula-hidden
+ 0x04=style-xf
+ 0x08=apostroph-quote
+end
+
+flagslist=XF-USEDATTRIBS-FLAGS
+ 0x04=format
+ 0x08=font
+ 0x10=alignment
+ 0x20=border
+ 0x40=area
+ 0x80=protection
+end
+
+combilist=XF-STYLEFLAGS-BIFF2
+ 0x07=uint8,dec,hor-align,XF-HORALIGN
+ 0x08=left-border
+ 0x10=right-border
+ 0x20=top-border
+ 0x40=bottom-border
+ 0x80=fill
+end
+
+combilist=XF-TYPEFLAGS-BIFF2
+ 0x3F=uint8,dec,fmt-idx,FORMATS
+ 0x40=locked
+ 0x80=formula-hidden
+end
+
+flagslist=XF-TYPEFLAGS-BIFF3
+ include=XF-PROTECTION-FLAGS
+end
+
+combilist=XF-TYPEFLAGS-BIFF4
+ include=XF-TYPEFLAGS-BIFF3
+ 0xFFF0=uint16,dec,parent-xf-idx
+end
+
+combilist=XF-ALIGNMENT-BIFF3
+ 0x0007=uint8,dec,hor-align,XF-HORALIGN
+ 0x0008=text-wrap
+ 0xFFF0=uint16,dec,parent-xf-idx
+end
+
+combilist=XF-ALIGNMENT-BIFF4
+ 0x07=uint8,dec,hor-align,XF-HORALIGN
+ 0x08=text-wrap
+ 0x30=uint8,dec,ver-align,XF-VERALIGN
+ 0xC0=uint8,dec,orientation,TEXTORIENTATION
+end
+
+combilist=XF-ALIGNMENT-BIFF5
+ 0x07=uint8,dec,hor-align,XF-HORALIGN
+ 0x08=text-wrap
+ 0x70=uint8,dec,ver-align,XF-VERALIGN
+ 0x80=justify-lastline
+end
+
+combilist=XF-ORIENTATTRIBS-BIFF5
+ include=XF-USEDATTRIBS-FLAGS
+ 0x03=uint8,dec,orientation,TEXTORIENTATION
+end
+
+combilist=XF-TEXTFLAGS-BIFF8
+ 0x0F=uint8,dec,indent
+ 0x10=shrink-to-fit
+ 0xC0=uint8,dec,text-dir,XF-TEXTDIRECTION
+end
+
+combilist=XF-FILL-BIFF3
+ 0x003F=uint8,dec,fill-pattern,FILLPATTERNS
+ 0x07C0=uint8,dec,fg-color-idx,COLORS
+ 0xF800=uint8,dec,bg-color-idx,COLORS
+end
+
+combilist=XF-BORDER-BIFF3
+ 0x00000007=uint8,dec,top-style,BORDERSTYLES
+ 0x000000F8=uint8,dec,top-color,COLORS
+ 0x00000700=uint8,dec,left-style,BORDERSTYLES
+ 0x0000F800=uint8,dec,left-color,COLORS
+ 0x00070000=uint8,dec,bottom-style,BORDERSTYLES
+ 0x00F80000=uint8,dec,bottom-color,COLORS
+ 0x07000000=uint8,dec,right-style,BORDERSTYLES
+ 0xF8000000=uint8,dec,right-color,COLORS
+end
+
+combilist=XF-FILL-BIFF5
+ 0x0000007F=uint8,dec,fg-color-idx,COLORS
+ 0x00003F80=uint8,dec,bg-color-idx,COLORS
+ 0x003F0000=uint8,dec,fill-pattern,FILLPATTERNS
+ 0x01C00000=uint8,dec,bottom-style,BORDERSTYLES
+ 0xFE000000=uint8,dec,bottom-color,COLORS
+end
+
+combilist=XF-BORDER-BIFF5
+ 0x00000007=uint8,dec,top-style,BORDERSTYLES
+ 0x00000038=uint8,dec,left-style,BORDERSTYLES
+ 0x000001C0=uint8,dec,right-style,BORDERSTYLES
+ 0x0000FE00=uint8,dec,top-color,COLORS
+ 0x007F0000=uint8,dec,left-color,COLORS
+ 0x3F800000=uint8,dec,right-color,COLORS
+end
+
+combilist=XF-BORDERSTYLE-BIFF8
+ 0x000F=uint8,dec,left-style,BORDERSTYLES
+ 0x00F0=uint8,dec,right-style,BORDERSTYLES
+ 0x0F00=uint8,dec,top-style,BORDERSTYLES
+ 0xF000=uint8,dec,bottom-style,BORDERSTYLES
+end
+
+combilist=XF-BORDERCOLOR1-BIFF8
+ 0x007F=uint8,dec,left-color,COLORS
+ 0x3F80=uint8,dec,right-color,COLORS
+ 0x4000=diag-tl-to-br
+ 0x8000=diag-bl-to-tr
+end
+
+combilist=XF-BORDERCOLOR2-BIFF8
+ 0x0000007F=uint8,dec,top-color,COLORS
+ 0x00003F80=uint8,dec,bottom-color,COLORS
+ 0x001FC000=uint8,dec,diag-color,COLORS
+ 0x01E00000=uint8,dec,diag-style,BORDERSTYLES
+ 0xFC000000=uint8,dec,fill-pattern,FILLPATTERNS
+end
+
+combilist=XF-FILLCOLOR-BIFF8
+ 0x007F=uint8,dec,fg-color-idx,COLORS
+ 0x3F80=uint8,dec,bg-color-idx,COLORS
+end
+
+# BIFF2 cell records ----------------------------------------------------------
+
+constlist=XFINDEX-BIFF2
+ default=
+ 63=from-ixfe
+end
+
+combilist=CELL-XFINDEX-BIFF2
+ 0x3F=uint8,dec,xf-idx,XFINDEX-BIFF2
+ 0x40=locked
+ 0x80=formula-hidden
+end
+
+combilist=CELL-XFFORMAT-BIFF2
+ 0x3F=uint8,dec,fmt-idx,FORMATS
+ 0xC0=uint8,dec,font-idx,FONTNAMES
+end
+
+combilist=CELL-XFSTYLE-BIFF2
+ include=XF-STYLEFLAGS-BIFF2
+end
+
+# XFEXT ----------------------------------------------------------------------
+
+multilist=XFEXT-SUBREC
+ 0=,,,,FILL-FGCOLOR
+ 5=FILL-BGCOLOR,FILL-GRADIENT,BORDER-TOP-COLOR,BORDER-BOTTOM-COLOR,BORDER-LEFT-COLOR
+ 10=BORDER-RIGHT-COLOR,BORDER-DIAG-COLOR,,TEXT-COLOR,FONT-SCHEME
+ 15=INDENT
+end
+
+# ============================================================================
diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx
new file mode 100644
index 000000000..9c8acd828
--- /dev/null
+++ b/oox/source/dump/dffdumper.cxx
@@ -0,0 +1,227 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/dump/dffdumper.hxx>
+
+#ifdef DBG_UTIL
+
+namespace oox::dump {
+
+namespace {
+
+const sal_uInt16 DFF_ID_BSE = 0xF007; /// BLIP store entry.
+const sal_uInt16 DFF_ID_BSTORECONTAINER = 0xF001; /// BLIP store container.
+const sal_uInt16 DFF_ID_CHILDANCHOR = 0xF00F; /// Child anchor (in groups).
+const sal_uInt16 DFF_ID_CLIENTANCHOR = 0xF010; /// Client anchor.
+const sal_uInt16 DFF_ID_DG = 0xF008; /// Drawing.
+const sal_uInt16 DFF_ID_DGG = 0xF006; /// Drawing group.
+const sal_uInt16 DFF_ID_OPT = 0xF00B; /// Property set.
+const sal_uInt16 DFF_ID_OPT2 = 0xF121; /// Secondary property set.
+const sal_uInt16 DFF_ID_OPT3 = 0xF122; /// Ternary property set.
+const sal_uInt16 DFF_ID_SP = 0xF00A; /// Shape.
+const sal_uInt16 DFF_ID_SPGR = 0xF009; /// Shape group.
+const sal_uInt16 DFF_ID_SPLITMENUCOLORS = 0xF11E; /// Current toolbar colors.
+
+const sal_uInt16 DFF_OPT_IDMASK = 0x3FFF;
+const sal_uInt16 DFF_OPT_COMPLEX = 0x8000;
+
+} // namespace
+
+bool DffStreamObject::implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize )
+{
+ mnInstVer = rBaseStrm.readuInt16();
+ ornRecId = rBaseStrm.readuInt16();
+ mnRealSize = rBaseStrm.readInt32();
+ ornRecSize = isContainer() ? 0 : mnRealSize;
+ return !rBaseStrm.isEof();
+}
+
+void DffStreamObject::implWriteExtHeader()
+{
+ const char* pcListName = "DFF-RECORD-INST";
+ switch( getRecId() )
+ {
+ case DFF_ID_BSE: pcListName = "DFFBSE-RECORD-INST"; break; // BLIP type
+ case DFF_ID_BSTORECONTAINER: pcListName = "DFFBSTORECONT-RECORD-INST"; break; // BLIP count
+ case DFF_ID_DG: pcListName = "DFFDG-RECORD-INST"; break; // drawing ID
+ case DFF_ID_OPT: pcListName = "DFFOPT-RECORD-INST"; break; // property count
+ case DFF_ID_SP: pcListName = "DFFSP-RECORD-INST"; break; // shape type
+ case DFF_ID_SPLITMENUCOLORS: pcListName = "DFFSPLITMENUC-RECORD-INST"; break; // number of colors
+ }
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeHexItem( "instance", mnInstVer, pcListName );
+ if( isContainer() ) writeDecItem( "container-size", mnRealSize );
+}
+
+void DffStreamObject::implDumpRecordBody()
+{
+ switch( getRecId() )
+ {
+ case DFF_ID_BSE:
+ dumpDec< sal_uInt8 >( "win-type", "DFFBSE-TYPE" );
+ dumpDec< sal_uInt8 >( "mac-type", "DFFBSE-TYPE" );
+ dumpGuid( "guid" );
+ dumpDec< sal_uInt16 >( "tag" );
+ dumpDec< sal_uInt32 >( "blip-size" );
+ dumpDec< sal_uInt32 >( "blip-refcount" );
+ dumpDec< sal_uInt32 >( "blip-streampos" );
+ dumpDec< sal_uInt8 >( "blip-usage", "DFFBSE-USAGE" );
+ dumpDec< sal_uInt8 >( "blip-name-len" );
+ dumpUnused( 2 );
+ break;
+
+ case DFF_ID_CHILDANCHOR:
+ dumpDec< sal_uInt32 >( "left" );
+ dumpDec< sal_uInt32 >( "top" );
+ dumpDec< sal_uInt32 >( "right" );
+ dumpDec< sal_uInt32 >( "bottom" );
+ break;
+
+ case DFF_ID_CLIENTANCHOR:
+ break;
+
+ case DFF_ID_DG:
+ dumpDec< sal_uInt32 >( "shape-count" );
+ dumpHex< sal_uInt32 >( "max-shape-id", "CONV-DEC" );
+ break;
+
+ case DFF_ID_DGG:
+ {
+ dumpHex< sal_uInt32 >( "max-shape-id", "CONV-DEC" );
+ sal_uInt32 nClusters = dumpDec< sal_uInt32 >( "id-cluster-count" );
+ dumpDec< sal_uInt32 >( "shape-count" );
+ dumpDec< sal_uInt32 >( "drawing-count" );
+ mxOut->resetItemIndex( 1 );
+ TableGuard aTabGuard( mxOut, 15, 16 );
+ for( sal_uInt32 nCluster = 1; !mxStrm->isEof() && (nCluster < nClusters); ++nCluster )
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "#cluster" );
+ dumpDec< sal_uInt32 >( "drawing-id" );
+ dumpHex< sal_uInt32 >( "next-free-id", "CONV-DEC" );
+ }
+ }
+ break;
+
+ case DFF_ID_OPT:
+ case DFF_ID_OPT2:
+ case DFF_ID_OPT3:
+ dumpDffOpt();
+ break;
+
+ case DFF_ID_SP:
+ dumpHex< sal_uInt32 >( "shape-id", "CONV-DEC" );
+ dumpHex< sal_uInt32 >( "shape-flags", "DFFSP-FLAGS" );
+ break;
+
+ case DFF_ID_SPGR:
+ dumpDec< sal_uInt32 >( "left" );
+ dumpDec< sal_uInt32 >( "top" );
+ dumpDec< sal_uInt32 >( "right" );
+ dumpDec< sal_uInt32 >( "bottom" );
+ break;
+
+ case DFF_ID_SPLITMENUCOLORS:
+ dumpDffSimpleColor( "fill-color" );
+ dumpDffSimpleColor( "line-color" );
+ dumpDffSimpleColor( "shadow-color" );
+ dumpDffSimpleColor( "3d-color" );
+ break;
+ }
+}
+
+sal_uInt32 DffStreamObject::dumpDffSimpleColor( const String& rName )
+{
+ return dumpHex< sal_uInt32 >( rName, "DFF-SIMPLE-COLOR" );
+}
+
+namespace {
+
+enum class PropType { Binary };
+
+struct PropInfo
+{
+ OUString maName;
+ PropType meType;
+ sal_uInt16 mnId;
+ sal_uInt32 mnSize;
+ explicit PropInfo( const OUString& rName, PropType eType, sal_uInt16 nId, sal_uInt32 nSize ) :
+ maName( rName ), meType( eType ), mnId( nId ), mnSize( nSize ) {}
+};
+
+typedef ::std::vector< PropInfo > PropInfoVector;
+
+} // namespace
+
+void DffStreamObject::dumpDffOpt()
+{
+ sal_uInt16 nPropCount = getInst();
+ PropInfoVector aPropInfos;
+ mxOut->resetItemIndex();
+ for( sal_uInt16 nPropIdx = 0; !mxStrm->isEof() && (nPropIdx < nPropCount); ++nPropIdx )
+ {
+ sal_uInt16 nPropId = dumpDffOptPropHeader();
+ sal_uInt16 nBaseId = nPropId & DFF_OPT_IDMASK;
+ sal_uInt32 nValue = mxStrm->readuInt32();
+
+ IndentGuard aIndent( mxOut );
+ if( getFlag( nPropId, DFF_OPT_COMPLEX ) )
+ {
+ writeHexItem( "complex-size", nValue, "CONV-DEC" );
+ aPropInfos.emplace_back( String( "property-data" ), PropType::Binary, nBaseId, nValue );
+ }
+ else
+ {
+ writeHexItem( "value", nValue );
+ }
+ }
+
+ mxOut->resetItemIndex();
+ for (auto const& propInfo : aPropInfos)
+ {
+ if (mxStrm->isEof())
+ break;
+ mxOut->startMultiItems();
+ writeEmptyItem( "#complex-data" );
+ writeHexItem( "id", propInfo.mnId, "DFFOPT-PROPERTY-NAMES" );
+ mxOut->endMultiItems();
+ IndentGuard aIndent( mxOut );
+ switch(propInfo.meType)
+ {
+ case PropType::Binary:
+ dumpBinary( propInfo.maName, propInfo.mnSize );
+ break;
+ default: assert(false && "missing implementation?");
+ }
+ }
+}
+
+sal_uInt16 DffStreamObject::dumpDffOptPropHeader()
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ TableGuard aTabGuard( mxOut, 11 );
+ writeEmptyItem( "#prop" );
+ return dumpHex< sal_uInt16 >( "id", "DFFOPT-PROPERTY-ID" );
+}
+
+} // namespace oox::dump
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/dump/dffdumper.ini b/oox/source/dump/dffdumper.ini
new file mode 100644
index 000000000..45b5aecc7
--- /dev/null
+++ b/oox/source/dump/dffdumper.ini
@@ -0,0 +1,676 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+
+# Path to additional configuration data, relative to this file.
+include-config-file=dumperbase.ini
+
+# name lists =================================================================
+
+multilist=DFF-RECORD-NAMES
+ 0xF000=DFFDGGCONTAINER,DFFBSTORECONTAINER,DFFDGCONTAINER,DFFSPGRCONTAINER,DFFSPCONTAINER,DFFSOLVERCONTAINER,DFFDGG,DFFBSE
+ 0xF008=DFFDG,DFFSPGR,DFFSP,DFFOPT,DFFTEXTBOX,DFFCLIENTTEXTBOX,DFFANCHOR,DFFCHILDANCHOR
+ 0xF010=DFFCLIENTANCHOR,DFFCLIENTDATA,DFFCONNECTORRULE,DFFALIGNRULE,DFFARCRULE,DFFCLIENTRULE,DFFCLASSID,DFFCALLOUTRULE
+ # 0xF018-0xF117 reserved for pictures
+ 0xF118=DFFREGROUPITEM,DFFSELECTION,DFFCOLORMRU,,,DFFDELETEDPSPL,DFFSPLITMENUCOLORS,DFFOLEOBJECT
+ 0xF120=DFFCOLORSCHEME,DFFOPT2,DFFOPT3
+end
+
+combilist=DFF-RECORD-INST
+ 0x000F=uint8,hex,version,DFF-RECORD-VERSION
+ 0xFFF0=uint16,dec,instance
+end
+
+constlist=DFF-RECORD-VERSION
+ default=
+ 15=container
+end
+
+combilist=DFF-SIMPLE-COLOR
+ 0x000000FF=uint8,dec,red,,filter=0x10000000~0x00000000
+ 0x0000FF00=uint8,dec,green,,filter=0x10000000~0x00000000
+ 0x00FF0000=uint8,dec,blue,,filter=0x10000000~0x00000000
+ 0x000000FF=uint8,dec,scheme-idx,,filter=0x10000000~0x10000000
+ 0x10000000=!rgb!scheme
+ ignore=0x08000000
+end
+
+combilist=DFF-COLOR
+ 0x0000FFFF=uint16,dec,palette-idx,,filter=0xFF000000~0x01000000
+ 0x000000FF=uint8,dec,red,,filter=0xF9000000~0x00000000
+ 0x0000FF00=uint8,dec,green,,filter=0xF9000000~0x00000000
+ 0x00FF0000=uint8,dec,blue,,filter=0xF9000000~0x00000000
+ 0x000000FF=uint8,dec,scheme-idx,,filter=0xFF000000~0x08000000
+ 0x0000FFFF=uint16,dec,system-idx,DFF-SYSTEMCOLOR,filter=0xFF000000~0x10000000
+ 0x00FF0000=uint16,dec,mod-by,,filter=0xFF000000~0x10000000
+ 0x01000000=palette-idx
+ 0x02000000=palette-rgb
+ 0x04000000=system-rgb
+ 0x08000000=scheme-idx
+ 0x10000000=system-idx
+end
+
+combilist=DFF-SYSTEMCOLOR
+ 0x00FF=uint8,dec,color-id,DFF-SYSTEMCOLOR-ID
+ 0x0F00=uint8,dec,mod,DFF-SYSTEMCOLOR-MOD
+ 0x2000=invert-after
+ 0x4000=half-invert-after
+ 0x8000=grey-before
+end
+
+constlist=DFF-SYSTEMCOLOR-ID
+ include=SYSTEMCOLOR
+ 0xF0=shape-fill
+ 0xF1=shape-line-or-fill
+ 0xF2=shape-line
+ 0xF3=shape-shadow
+ 0xF4=current-or-last-used
+ 0xF5=shape-fill-back
+ 0xF6=shape-line-back
+ 0xF7=shape-fill-or-line
+end
+
+shortlist=DFF-SYSTEMCOLOR-MOD,0,none,darken-by,lighten-by,add-grey-by,sub-grey-by,reverse-sub-grey-by,monochrome-by
+
+combilist=DFF-COLORMOD
+ 0x00000300=uint8,dec,type,DFF-COLORMOD-TYPE
+ 0x00FF0000=uint8,dec,level
+ ignore=0x200000FF
+end
+
+shortlist=DFF-COLORMOD-TYPE,0,none,shade,tint
+
+unitconverter=DFF-OPACITY,/655.36,%
+unitconverter=DFF-DEGREES,/65536,°
+
+# DFFBSE ---------------------------------------------------------------------
+
+combilist=DFFBSE-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,blip-type,DFFBSE-TYPE
+end
+
+multilist=DFFBSE-TYPE
+ 0=error,unknown,emf,wmf,pict,jpeg,png,dib
+ 17=tiff,cmyk-jpeg
+end
+
+shortlist=DFFBSE-USAGE,0,default,texture
+
+# DFFBSTORECONTAINER ---------------------------------------------------------
+
+combilist=DFFBSTORECONT-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,blip-count
+end
+
+# DFFDG ----------------------------------------------------------------------
+
+combilist=DFFDG-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,drawing-id
+end
+
+# DFFOPT ---------------------------------------------------------------------
+
+combilist=DFFOPT-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,property-count
+end
+
+combilist=DFFOPT-PROPERTY-ID
+ 0x3FFF=uint16,dec,id,DFFOPT-PROPERTY-NAMES
+ 0x4000=picture
+ 0x8000=complex
+end
+
+multilist=DFFOPT-PROPERTY-NAMES
+ # 0x0000-0x003F: transformation
+ 0x0000=transf-left,transf-top,transf-right,transf-bottom,transf-rotation,transf-page
+ 0x003F=transf-flags
+ # 0x0040-0x007F: protection
+ 0x007F=prot-flags
+ # 0x0080-0x00BF: text
+ 0x0080=text-id,text-left,text-top,text-right,text-bottom,text-wrap-mode,text-scale,text-anchor-mode
+ 0x0088=text-flow,text-font-orient,text-next-shape,text-bidi
+ 0x00BF=text-flags
+ # 0x00C0-0x00FF: text geometry
+ 0x00C0=textgeo-unicode-string,textgeo-rtf-string,textgeo-curve-align,textgeo-def-size,textgeo-spacing,textgeo-font,textgeo-css-font
+ 0x00FF=textgeo-flags
+ # 0x0100-0x013F: picture (BLIP)
+ 0x0100=blip-crop-top,blip-crop-bottom,blip-crop-left,blip-crop-right,blip-id,blip-name,blip-opt,blip-transparency-color
+ 0x0108=blip-contrast,blip-brightness,blip-gamma,blip-ole-id,blip-double-cr-mod,blip-fill-cr-mod,blip-line-cr-mod,blip-print-id
+ 0x0110=blip-print-name,blip-print-opt,blip-movie,,,blip-transparency-color-ext,reserved,blip-transparency-color-ext-mod
+ 0x0118=reserved,reserved,blip-recolor,blip-recolor-ext,reserved,blip-recolor-ext-mod,reserved,reserved
+ 0x013F=blip-flags
+ # 0x0140-0x017F: shape geometry
+ 0x0140=geo-left,geo-top,geo-right,geo-bottom,geo-shape-path,geo-vertices,geo-segment-info,geo-adjust-1
+ 0x0148=geo-adjust-2,geo-adjust-3,geo-adjust-4,geo-adjust-5,geo-adjust-6,geo-adjust-7,geo-adjust-8,
+ 0x0150=,geo-connect-sites,geo-connect-sites-dir,geo-stretch-x,geo-stretch-y,geo-handles,geo-guides,geo-inscribe
+ 0x0158=geo-connect-points
+ 0x017F=geo-flags
+ # 0x0180-0x01BF: fill style
+ 0x0180=fill-type,fill-color,fill-opacity,fill-back-color,fill-back-opacity,fill-cr-mod,fill-blip,fill-blip-name
+ 0x0188=fill-blip-opt,fill-width,fill-height,fill-angle,fill-focus,fill-to-left,fill-to-top,fill-to-right
+ 0x0190=fill-to-bottom,fill-rect-left,fill-rect-top,fill-rect-right,fill-rect-bottom,fill-dz-type,fill-shade-preset,fill-shade-colors
+ 0x0198=fill-origin-x,fill-origin-y,fill-shape-origin-x,fill-shape-origin-y,fill-shade-type,,fill-color-ext,reserved
+ 0x01A0=fill-color-ext-mod,reserved,fill-back-color-ext,reserved,fill-back-color-ext-mod,reserved,reserved,reserved
+ 0x01BF=fill-flags
+ # 0x01C0-0x01FF: line style
+ 0x01C0=line-color,line-opacity,line-back-color,line-cr-mod,line-type,line-fill-blip,line-fill-blip-name,line-fill-blip-opt
+ 0x01C8=line-fill-width,line-fill-height,line-fill-dz-type,line-width,line-miter-limit,line-style,line-dash,line-dash-style
+ 0x01D0=line-start-arrow-head,line-end-arrow-head,line-start-arrow-width,line-start-arrow-length,line-end-arrow-width,line-end-arrow-length,line-join-style,line-end-cap-style
+ 0x01D8=,line-color-ext,reserved,line-color-ext-mod,reserved,line-back-color-ext,reserved,line-back-color-ext-mod
+ 0x01E0=reserved,reserved,reserved
+ 0x01FF=line-flags
+ # 0x0200-0x023F: shadow style
+ 0x0200=shadow-type,shadow-color,shadow-highlight,shadow-cr-mod,shadow-opacity,shadow-offset-x,shadow-offset-y,shadow-2nd-offset-x
+ 0x0208=shadow-2nd-offset-y,,,,,,,
+ 0x0210=shadow-origin-x,shadow-origin-y,shadow-color-ext,reserved,shadow-color-ext-mod,reserved,shadow-highlight-ext,reserved
+ 0x0218=shadow-highlight-ext-mod,reserved,reserved,reserved
+ 0x023F=shadow-flags
+ # 0x0240-0x027F: perspective
+ 0x0240=persp-type,persp-offset-x,persp-offsety,persp-scale-x-to-x,persp-scale-y-to-x,persp-scale-x-to-y,persp-scale-y-to-y,persp-persp-x
+ 0x0248=persp-persp-y,persp-weight,persp-origin-x,persp-origin-y
+ 0x027F=persp-flags
+ # 0x0280-0x02BF: 3d object
+ 0x0280=3dobj-specular-amt,3dobj-diffuse-amt,3dobj-shininess,3dobj-edge-thickness,3dobj-extrude-forward,3dobj-extrude-backward,3dobj-extrude-plane,3dobj-extrusion-color
+ 0x0288=3dobj-cr-mod,3dobj-extrusion-color-ext,reserved,3dobj-extrusion-color-ext-mod,reserved,reserved
+ 0x02BF=3dobj-flags
+ # 0x02C0-0x02FF: 3d style
+ 0x02C0=3dstyle-y-rotation,3dstyle-x-rotation,3dstyle-rotation-axis-x,3dstyle-rotation-axis-y,3dstyle-rotation-axis-z,3dstyle-rotation,3dstyle-rotation-center-x,3dstyle-rotation-center-y
+ 0x02C8=3dstyle-rotation-center-z,3dstyle-render-mode,3dstyle-tolerance,3dstyle-view-point-x,3dstyle-view-point-y,3dstyle-view-point-z,3dstyle-origin-x,3dstyle-origin-y
+ 0x02D0=3dstyle-skew-angle,3dstyle-skew-amount,3dstyle-ambient-intensity,3dstyle-key-light-x,3dstyle-key-light-y,3dstyle-key-light-z,3dstyle-key-light-intensity,3dstyle-fill-light-x
+ 0x02D8=3dstyle-fill-light-y,3dstyle-fill-light-z,3dstyle-fill-light-intensity
+ 0x02FF=3dstyle-flags
+ # 0x0300-0x033F: shape
+ 0x0300=,shape-master,,shape-connect-style,shape-bw-mod,shape-bw-mode-pure-bw,shape-bw-mode-bw,shape-discuss-anchor-id
+ 0x0308=,shape-dia-layout,shape-dia-node-kind,shape-dia-layout-mru,shape-equation-xml
+ 0x033F=shape-flags
+ # 0x0340-0x037F: callout
+ 0x0340=callout-type,callout-box-distance,callout-angle,callout-drop-type,callout-drop-pos,callout-length
+ 0x037F=callout-flags
+ # 0x0380-0x03BF: group or shape
+ 0x0380=group-name,group-description,group-hyperlink,group-wrap-polygon-vertices,group-wrap-left,group-wrap-top,group-wrap-right,group-wrap-bottom
+ 0x0388=group-regroup-id,,,,,group-tooltip,group-script,group-pos-h
+ 0x0390=group-pos-rel-h,group-pos-v,group-pos-rel-v,group-rel-width-hr,group-align-hr,group-height-hr,group-width-hr,group-script-ext-attr
+ 0x0398=group-script-lang,,group-script-lang-attr,group-border-top-color,group-border-left-color,group-border-bottom-color,group-border-right-color,group-table-props
+ 0x03A0=group-table-row-props,,,,,group-web-bot,,
+ 0x03A8=,group-metro-blob,group-rel-z-order,
+ 0x03BF=group-flags
+ # 0x03C0-0x03FF: relative transformation
+ 0x03C0=reltransf-left,reltransf-top,reltransf-right,reltransf-bottom,reltransf-rotation,reltransf-page
+ 0x03FF=reltransf-flags
+ # 0x0400-0x043F: unknown HTML
+ 0x0400=,,uhtml-line-id,uhtml-fill-id,uhtml-pic-id,uhtml-path-id,uhtml-shadow-id,uhtml-persp-id
+ 0x0408=uhtml-text-path-id,uhtml-formulae-id,uhtml-handles-id,uhtml-callout-id,uhtml-lock-id,uhtml-text-id,uhtml-3d-id
+ 0x043F=uhtml-flags
+ # 0x0500-0x053F: diagram
+ 0x0500=dia-type,dia-style,,,dia-rel-table,dia-scale-x,dia-scale-y,dia-def-fontsize
+ 0x0508=dia-constrain-bounds,dia-base-text-scale
+ 0x053F=dia-flags
+ # 0x0540-0x057F: left line style
+ 0x0540=lline-color,lline-opacity,lline-back-color,lline-cr-mod,lline-type,lline-fill-blip,lline-fill-blip-name,lline-fill-blip-opt
+ 0x0548=lline-fill-width,lline-fill-height,lline-fill-dz-type,lline-width,lline-miter-limit,lline-style,lline-dash,lline-dash-style
+ 0x0550=lline-start-arrow-head,lline-end-arrow-head,lline-start-arrow-width,lline-start-arrow-length,lline-end-arrow-width,lline-end-arrow-length,lline-join-style,lline-end-cap-style
+ 0x0558=,lline-color-ext,reserved,lline-color-ext-mod,reserved,lline-back-color-ext,reserved,lline-back-color-ext-mod
+ 0x0560=reserved,reserved,reserved
+ 0x057F=lline-flags
+ # 0x0580-0x05BF: top line style
+ 0x0580=tline-color,tline-opacity,tline-back-color,tline-cr-mod,tline-type,tline-fill-blip,tline-fill-blip-name,tline-fill-blip-opt
+ 0x0588=tline-fill-width,tline-fill-height,tline-fill-dz-type,tline-width,tline-miter-limit,tline-style,tline-dash,tline-dash-style
+ 0x0590=tline-start-arrow-head,tline-end-arrow-head,tline-start-arrow-width,tline-start-arrow-length,tline-end-arrow-width,tline-end-arrow-length,tline-join-style,tline-end-cap-style
+ 0x0598=,tline-color-ext,reserved,tline-color-ext-mod,reserved,tline-back-color-ext,reserved,tline-back-color-ext-mod
+ 0x05A0=reserved,reserved,reserved
+ 0x05BF=tline-flags
+ # 0x05C0-0x05FF: right line style
+ 0x05C0=rline-color,rline-opacity,rline-back-color,rline-cr-mod,rline-type,rline-fill-blip,rline-fill-blip-name,rline-fill-blip-opt
+ 0x05C8=rline-fill-width,rline-fill-height,rline-fill-dz-type,rline-width,rline-miter-limit,rline-style,rline-dash,rline-dash-style
+ 0x05D0=rline-start-arrow-head,rline-end-arrow-head,rline-start-arrow-width,rline-start-arrow-length,rline-end-arrow-width,rline-end-arrow-length,rline-join-style,rline-end-cap-style
+ 0x05D8=,rline-color-ext,reserved,rline-color-ext-mod,reserved,rline-back-color-ext,reserved,rline-back-color-ext-mod
+ 0x05E0=reserved,reserved,reserved
+ 0x05FF=rline-flags
+ # 0x0600-0x063F: bottom line style
+ 0x0600=bline-color,bline-opacity,bline-back-color,bline-cr-mod,bline-type,bline-fill-blip,bline-fill-blip-name,bline-fill-blip-opt
+ 0x0608=bline-fill-width,bline-fill-height,bline-fill-dz-type,bline-width,bline-miter-limit,bline-style,bline-dash,bline-dash-style
+ 0x0610=bline-start-arrow-head,bline-end-arrow-head,bline-start-arrow-width,bline-start-arrow-length,bline-end-arrow-width,bline-end-arrow-length,bline-join-style,bline-end-cap-style
+ 0x0618=,bline-color-ext,reserved,bline-color-ext-mod,reserved,bline-back-color-ext,reserved,bline-back-color-ext-mod
+ 0x0620=reserved,reserved,reserved
+ 0x063F=bline-flags
+ # 0x0680-0x06BF: web component
+ 0x0680=webcomp-html,webcomp-name,webcomp-url
+ 0x06BF=webcomp-flags
+ # 0x0700-0x073F: ink data
+ 0x0700=ink-data
+ 0x073F=ink-flags
+ # 0x0780-0x07BF: signature line
+ 0x0780=,sigline-guid,sigline-provider-guid,sigline-suggested-signer,sigline-suggested-signer-info,sigline-suggested-signer-email,sigline-sign-instruction,sigline-add-xml
+ 0x0788=sigline-provider-url
+ 0x07BF=sigline-flags
+ # 0x07C0-0x07FF: group or shape #2
+ 0x07C0=group2-rel-width,group2-rel-height,group2-rel-pos-x,group2-rel-pos-y,group2-size-rel-h,group2-size-rel-v
+end
+
+constlist=DFFOPT-SIMPLE-PROPERTIES
+ # transformation
+ 0x003F=uint32,hex,flags,DFFOPT-TRANSFORM-FLAGS
+ # protection
+ 0x007F=uint32,hex,flags,DFFOPT-PROTECTION-FLAGS
+ # text
+ 0x00BF=uint32,hex,flags,DFFOPT-TEXT-FLAGS
+ # text geometry
+ 0x00FF=uint32,hex,flags,DFFOPT-TEXTGEO-FLAGS
+ # picture (BLIP)
+ 0x013F=uint32,hex,flags,DFFOPT-BLIP-FLAGS
+ # shape geometry
+ 0x017F=uint32,hex,flags,DFFOPT-GEO-FLAGS
+ # fill style
+ 0x0180=uint32,dec,type,DFFOPT-FILL-TYPE
+ 0x0181=uint32,hex,color,DFF-COLOR
+ 0x0182=int32,fix,opacity,DFF-OPACITY
+ 0x0183=uint32,hex,color,DFF-COLOR
+ 0x0184=int32,fix,opacity,DFF-OPACITY
+ 0x0185=uint32,hex,color,DFF-COLOR
+ 0x0186=uint32,dec,blip-id
+ 0x0188=uint32,dec,blip-opt,DFFOPT-BLIPOPT
+ 0x0189=int32,dec,width
+ 0x018A=int32,dec,height
+ 0x018B=int32,fix,angle,DFF-DEGREES
+ 0x018C=int32,dec,focus,CONV-PERCENT
+ 0x018D=int32,fix,size,DFF-OPACITY
+ 0x018E=int32,fix,size,DFF-OPACITY
+ 0x018F=int32,fix,size,DFF-OPACITY
+ 0x0190=int32,fix,size,DFF-OPACITY
+ 0x0191=int32,fix,size,CONV-EMU-TO-CM
+ 0x0192=int32,fix,size,CONV-EMU-TO-CM
+ 0x0193=int32,fix,size,CONV-EMU-TO-CM
+ 0x0194=int32,fix,size,CONV-EMU-TO-CM
+ 0x0195=uint32,dec,type,DFFOPT-FILL-DZTYPE
+ 0x0196=int32,dec,preset
+ 0x0198=int32,fix,pos,DFF-OPACITY
+ 0x0199=int32,fix,pos,DFF-OPACITY
+ 0x019A=int32,fix,pos,DFF-OPACITY
+ 0x019B=int32,fix,pos,DFF-OPACITY
+ 0x019C=uint32,hex,type,DFFOPT-FILL-SHADETYPE
+ 0x019E=uint32,hex,color,DFF-COLOR
+ 0x01A0=uint32,hex,color-mod,DFF-COLORMOD
+ 0x01A2=uint32,hex,color,DFF-COLOR
+ 0x01A4=uint32,hex,color-mod,DFF-COLORMOD
+ 0x01BF=uint32,hex,flags,DFFOPT-FILL-FLAGS
+ # line style
+ 0x01C0=uint32,hex,color,DFF-COLOR
+ 0x01C2=uint32,hex,color,DFF-COLOR
+ 0x01FF=uint32,hex,flags,DFFOPT-LINE-FLAGS
+ # shadow style
+ 0x0201=uint32,hex,color,DFF-COLOR
+ 0x023F=uint32,hex,flags,DFFOPT-SHADOW-FLAGS
+ # perspective
+ 0x027F=uint32,hex,flags,DFFOPT-PERSP-FLAGS
+ # 3d object
+ 0x02BF=uint32,hex,flags,DFFOPT-3DOBJ-FLAGS
+ # 3d style
+ 0x02FF=uint32,hex,flags,DFFOPT-3DSTYLE-FLAGS
+ # shape
+ 0x033F=uint32,hex,flags,DFFOPT-SHAPE-FLAGS
+ # callout
+ 0x037F=uint32,hex,flags,DFFOPT-CALLOUT-FLAGS
+ # group or shape
+ 0x03BF=uint32,hex,flags,DFFOPT-GROUP-FLAGS
+ # relative transformation
+ 0x03FF=uint32,hex,flags,DFFOPT-TRANSFORM-FLAGS
+ # unknown HTML
+ 0x043F=uint32,hex,flags,DFFOPT-UHTML-FLAGS
+ # diagram
+ 0x053F=uint32,hex,flags,DFFOPT-DIAGRAM-FLAGS
+ # left line style
+ 0x0540=uint32,hex,color,DFF-COLOR
+ 0x0542=uint32,hex,color,DFF-COLOR
+ 0x057F=uint32,hex,flags,DFFOPT-LINE-FLAGS
+ # top line style
+ 0x0580=uint32,hex,color,DFF-COLOR
+ 0x0582=uint32,hex,color,DFF-COLOR
+ 0x05BF=uint32,hex,flags,DFFOPT-LINE-FLAGS
+ # right line style
+ 0x05C0=uint32,hex,color,DFF-COLOR
+ 0x05C2=uint32,hex,color,DFF-COLOR
+ 0x05FF=uint32,hex,flags,DFFOPT-LINE-FLAGS
+ # bottom line style
+ 0x0600=uint32,hex,color,DFF-COLOR
+ 0x0602=uint32,hex,color,DFF-COLOR
+ 0x063F=uint32,hex,flags,DFFOPT-LINE-FLAGS
+ # web component
+ 0x06BF=uint32,hex,flags,DFFOPT-WEBCOMP-FLAGS
+ # ink data
+ 0x073F=uint32,hex,flags,DFFOPT-INK-FLAGS
+ # signature line
+ 0x07BF=uint32,hex,flags,DFFOPT-SIGLINE-FLAGS
+ # group or shape #2
+end
+
+constlist=DFFOPT-COMPLEX-PROPERTIES
+ 0x0186=uint32,hex,blip,blip
+ 0x0187=uint32,hex,blip-name,string
+ 0x0197=uint32,hex,shade-colors,colorarray
+ 0x0380=uint32,hex,shape-name,string
+end
+
+# common
+
+combilist=DFFOPT-BLIPOPT
+ 0x00000003=uint8,dec,type,DFFOPT-BLIPOPT-TYPE
+ 0x00000004=do-not-save
+ 0x00000008=linked
+end
+
+shortlist=DFFOPT-BLIPOPT-TYPE,0,comment,file,url
+
+# transformation
+
+flagslist=DFFOPT-TRANSFORM-FLAGS
+ 0x0001=:flip-h
+ 0x0002=:flip-v
+end
+
+# protection
+
+flagslist=DFFOPT-PROTECTION-FLAGS
+ 0x0001=:lock-against-grouping
+ 0x0002=:lock-adjust-handles
+ 0x0004=:lock-text
+ 0x0008=:lock-vertices
+ 0x0010=:lock-cropping
+ 0x0020=:lock-against-select
+ 0x0040=:lock-position
+ 0x0080=:lock-aspect-ratio
+ 0x0100=:lock-rotation
+ 0x0200=:lock-against-ungrouping
+end
+
+# text
+
+flagslist=DFFOPT-TEXT-FLAGS
+ 0x0002=:fit-shape-to-text
+ 0x0008=:auto-text-margin
+ 0x0010=:select-text
+ ignore=0x0005
+end
+
+# text geometry
+
+flagslist=DFFOPT-TEXTGEO-FLAGS
+ 0x0001=:strike-through
+ 0x0002=:small-caps
+ 0x0004=:shadow
+ 0x0008=:underline
+ 0x0010=:italic
+ 0x0020=:bold
+ 0x0040=:no-measure-along-path
+ 0x0080=:normalize
+ 0x0100=:best-fit
+ 0x0200=:shrink-to-fit
+ 0x0400=:stretch-to-fit
+ 0x0800=:tightening
+ 0x1000=:kerning
+ 0x2000=:vertical
+ 0x4000=:has-effect
+ 0x8000=:reverse-rows
+end
+
+# picture (BLIP)
+
+flagslist=DFFOPT-BLIP-FLAGS
+ 0x0001=:ole-alive
+ 0x0002=:bi-level-display
+ 0x0004=:grayscale
+ 0x0008=:no-hit-test
+ 0x0010=:loop-anim
+ 0x0020=:rewind-anim
+ 0x0040=:preserve-gray
+end
+
+# shape geometry
+
+flagslist=DFFOPT-GEO-FLAGS
+ 0x0001=:fill-support
+ 0x0002=:fill-shade-shape-support
+ 0x0004=:fontwork-support
+ 0x0008=:line-support
+ 0x0010=:3d-support
+ 0x0020=:shadow-support
+end
+
+# fill style
+
+shortlist=DFFOPT-FILL-TYPE,0,solid,pattern,texture,picture,edge-shade,linear-shade,shape-shade,point-shade,title-shade,background
+
+combilist=DFFOPT-FILL-DZTYPE
+ 0x00000003=uint8,dec,unit,DFFOPT-FILL-DZTYPE-UNIT
+ 0x0000000C=uint8,dec,aspect,DFFOPT-FILL-DZTYPE-ASPECT
+end
+
+shortlist=DFFOPT-FILL-DZTYPE-UNIT,0,unused,emu,pixel,shape-size-rel
+shortlist=DFFOPT-FILL-DZTYPE-ASPECT,0,none,fixed,prefer-largest
+
+flagslist=DFFOPT-FILL-SHADETYPE
+ ignore=0x40000000
+ 0x00000001=none
+ 0x00000002=gamma
+ 0x00000004=sigma-transfer
+ 0x00000008=flat-band
+ 0x00000010=one-color
+end
+
+flagslist=DFFOPT-FILL-FLAGS
+ 0x0001=:no-fill-hit-test
+ 0x0002=:fill-to-rect
+ 0x0004=:fill-rel-to-shape
+ 0x0008=:hit-test-fill
+ 0x0010=:has-fill
+ 0x0020=:shape-anchor
+ 0x0040=:recolor-as-pic
+end
+
+# line style
+
+flagslist=DFFOPT-LINE-FLAGS
+ 0x0001=:draw-dash-for-invisible
+ 0x0002=:fill-rel-to-shape
+ 0x0004=:hit-test-line
+ 0x0008=:has-line
+ 0x0010=:arrowhead-support
+ 0x0020=:inset-pen-support
+ 0x0040=:inset-pen
+ 0x0200=:opaque-back-line
+end
+
+# shadow style
+
+flagslist=DFFOPT-SHADOW-FLAGS
+ 0x0001=:obscured-shadow
+ 0x0002=:has-shadow
+end
+
+# perspective
+
+flagslist=DFFOPT-PERSP-FLAGS
+ 0x0001=:has-perspective
+end
+
+# 3d object
+
+flagslist=DFFOPT-3DOBJ-FLAGS
+ 0x0001=:light-face
+ 0x0002=:extrusion-color
+ 0x0004=:metallic
+ 0x0008=:has-3d
+end
+
+# 3d style
+
+flagslist=DFFOPT-3DSTYLE-FLAGS
+ 0x0001=:fill-color-harsh
+ 0x0002=:key-color-harsh
+ 0x0004=:parallel
+ 0x0008=:rotation-center-auto
+ 0x0010=:constrain-rotation
+end
+
+# shape
+
+flagslist=DFFOPT-SHAPE-FLAGS
+ 0x0001=:background
+ 0x0004=:initiator
+ 0x0008=:lock-shape-type
+ 0x0010=:prefer-rel-resize
+ 0x0020=:ole-iconified
+ 0x0040=:flip-v-override
+ 0x0080=:flip-h-override
+ 0x0100=:policy-barcode
+ 0x0200=:policy-label
+end
+
+# callout
+
+flagslist=DFFOPT-CALLOUT-FLAGS
+ 0x0001=:length-specified
+ 0x0002=:drop-auto
+ 0x0004=:minus-y
+ 0x0008=:minus-x
+ 0x0010=:has-text-border
+ 0x0020=:has-accent-bar
+ 0x0040=:is-callout
+end
+
+# group or shape
+
+flagslist=DFFOPT-GROUP-FLAGS
+ 0x0001=:print
+ 0x0002=:hidden
+ 0x0004=:1d-adjustment
+ 0x0008=:is-button
+ 0x0010=:notify-double-click
+ 0x0020=:behind-doc
+ 0x0040=:wrap-edited
+ 0x0080=:script-anchor
+ 0x0100=:really-hidden
+ 0x0200=:allow-overlap
+ 0x0400=:user-drawn
+ 0x0800=:is-hr
+ 0x1000=:no-shade-hr
+ 0x2000=:standard-hr
+ 0x4000=:is-bullet
+ 0x8000=:layout-in-cell
+end
+
+# unknown HTML
+
+flagslist=DFFOPT-UHTML-FLAGS
+ 0x0002=:fake-master
+ 0x0004=:ole-from-html
+end
+
+# diagram
+
+flagslist=DFFOPT-DIAGRAM-FLAGS
+ 0x0001=:pseudo-inline
+ 0x0002=:do-layout
+ 0x0004=:reverse
+ 0x0008=:do-format
+end
+
+# web component
+
+flagslist=DFFOPT-WEBCOMP-FLAGS
+ 0x0001=:is-web-component
+end
+
+# ink data
+
+flagslist=DFFOPT-INK-FLAGS
+ 0x0001=:render-ink
+ 0x0002=:render-shape
+ 0x0004=:hit-test-ink
+ 0x0008=:ink-annotation
+end
+
+# signature line
+
+flagslist=DFFOPT-SIGLINE-FLAGS
+ 0x0001=:is-signature-line
+ 0x0002=:show-sign-instruction
+ 0x0004=:show-sign-comment
+ 0x0008=:show-sign-date
+end
+
+# group or shape #2
+
+# DFFSP ----------------------------------------------------------------------
+
+combilist=DFFSP-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,shape-type,DFFSP-TYPE
+end
+
+multilist=DFFSP-TYPE
+ 0=not-primitive,rectangle,round-rectangle,ellipse,diamond,isoceles-triangle,right-triangle,parallelogram,trapezoid,hexagon
+ 10=octagon,plus,star,arrow,thick-arrow,home-plate,cube,balloon,seal,arc
+ 20=line,plaque,can,donut,text-simple,text-octagon,text-hexagon,text-curve,text-wave,text-ring
+ 30=text-on-curve,text-on-ring,straight-connector-1,bent-connector-2,bent-connector-3,bent-connector-4,bent-connector-5,curved-connector-2,curved-connector-3,curved-connector-4
+ 40=curved-connector-5,callout-1,callout-2,callout-3,accent-callout-1,accent-callout-2,accent-callout-3,border-callout-1,border-callout-2,border-callout-3
+ 50=accent-border-callout-1,accent-border-callout-2,accent-border-callout-3,ribbon,ribbon-2,chevron,pentagon,no-smoking,seal-8,seal-16
+ 60=seal-32,wedge-rect-callout,wedge-rrect-callout,wedge-ellipse-callout,wave,folded-corner,left-arrow,down-arrow,up-arrow,left-right-arrow
+ 70=up-down-arrow,irregular-seal-1,irregular-seal-2,lightning-bolt,heart,picture-frame,quad-arrow,left-arrow-callout,right-arrow-callout,up-arrow-callout
+ 80=down-arrow-callout,left-right-arrow-callout,up-down-arrow-callout,quad-arrow-callout,bevel,left-bracket,right-bracket,left-brace,right-brace,left-up-arrow
+ 90=bent-up-arrow,bent-arrow,seal-24,striped-right-arrow,notched-right-arrow,block-arc,smiley-face,vertical-scroll,horizontal-scroll,circular-arrow
+ 100=notched-circular-arrow,uturn-arrow,curved-right-arrow,curved-left-arrow,curved-up-arrow,curved-down-arrow,cloud-callout,ellipse-ribbon,ellipse-ribbon-2,flow-chart-process
+ 110=flow-chart-decision,flow-chart-input-output,flow-chart-predefined-process,flow-chart-internal-storage,flow-chart-document,flow-chart-multidocument,flow-chart-terminator,flow-chart-preparation,flow-chart-manual-input,flow-chart-manual-operation
+ 120=flow-chart-connector,flow-chart-punched-card,flow-chart-punched-tape,flow-chart-summing-junction,flow-chart-or,flow-chart-collate,flow-chart-sort,flow-chart-extract,flow-chart-merge,flow-chart-offline-storage
+ 130=flow-chart-online-storage,flow-chart-magnetic-tape,flow-chart-magnetic-disk,flow-chart-magnetic-drum,flow-chart-display,flow-chart-delay,text-plain-text,text-stop,text-triangle,text-triangle-inverted
+ 140=text-chevron,text-chevron-inverted,text-ring-inside,text-ring-outside,text-arch-up-curve,text-arch-down-curve,text-circle-curve,text-button-curve,text-arch-up-pour,text-arch-down-pour
+ 150=text-circle-pour,text-button-pour,text-curve-up,text-curve-down,text-cascade-up,text-cascade-down,text-wave-1,text-wave-2,text-wave-3,text-wave-4
+ 160=text-inflate,text-deflate,text-inflate-bottom,text-deflate-bottom,text-inflate-top,text-deflate-top,text-deflate-inflate,text-deflate-inflate-deflate,text-fade-right,text-fade-left
+ 170=text-fade-up,text-fade-down,text-slant-up,text-slant-down,text-can-up,text-can-down,flow-chart-alternate-process,flow-chart-offpage-connector,callout-90,accent-callout-90
+ 180=border-callout-90,accent-border-callout-90,left-right-up-arrow,sun,moon,bracket-pair,brace-pair,seal-4,double-wave,action-button-blank
+ 190=action-button-home,action-button-help,action-button-information,action-button-forward-next,action-button-back-previous,action-button-end,action-button-beginning,action-button-return,action-button-document,action-button-sound
+ 200=action-button-movie,host-control,text-box
+end
+
+flagslist=DFFSP-FLAGS
+ 0x00000001=group
+ 0x00000002=child
+ 0x00000004=patriarch
+ 0x00000008=deleted
+ 0x00000010=ole
+ 0x00000020=has-master
+ 0x00000040=flip-horizontal
+ 0x00000080=flip-vertical
+ 0x00000100=connector
+ 0x00000200=has-anchor
+ 0x00000400=background
+ 0x00000800=has-shape-type
+end
+
+# DFFSPLITMENUCOLORS ---------------------------------------------------------
+
+combilist=DFFSPLITMENUC-RECORD-INST
+ include=DFF-RECORD-INST
+ 0xFFF0=uint16,dec,color-count
+end
+
+# ============================================================================
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
new file mode 100644
index 000000000..61d603228
--- /dev/null
+++ b/oox/source/dump/dumperbase.cxx
@@ -0,0 +1,2580 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/dump/dumperbase.hxx>
+
+#include <algorithm>
+#include <string_view>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/io/TextOutputStream.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <osl/file.hxx>
+#include <rtl/math.hxx>
+#include <rtl/tencinfo.h>
+#include <oox/core/filterbase.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/textinputstream.hxx>
+#include <tools/time.hxx>
+#include <o3tl/string_view.hxx>
+
+#ifdef DBG_UTIL
+
+namespace oox::dump {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::FilterBase;
+
+namespace {
+
+const sal_Unicode OOX_DUMP_BOM = 0xFEFF;
+const sal_Int32 OOX_DUMP_MAXSTRLEN = 80;
+const sal_Int32 OOX_DUMP_INDENT = 2;
+const sal_Unicode OOX_DUMP_BINDOT = '.';
+const sal_Unicode OOX_DUMP_CFG_LISTSEP = ',';
+const sal_Unicode OOX_DUMP_CFG_QUOTE = '\'';
+const sal_Unicode OOX_DUMP_LF = '\n';
+const sal_Unicode OOX_DUMP_ITEMSEP = '=';
+const sal_Int32 OOX_DUMP_BYTESPERLINE = 16;
+const sal_Int64 OOX_DUMP_MAXARRAY = 16;
+
+} // namespace
+
+// file names -----------------------------------------------------------------
+
+OUString InputOutputHelper::convertFileNameToUrl( const OUString& rFileName )
+{
+ OUString aFileUrl;
+ if( ::osl::FileBase::getFileURLFromSystemPath( rFileName, aFileUrl ) == ::osl::FileBase::E_None )
+ return aFileUrl;
+ return OUString();
+}
+
+sal_Int32 InputOutputHelper::getFileNamePos( std::u16string_view rFileUrl )
+{
+ size_t nSepPos = rFileUrl.find( '/' );
+ return (nSepPos == std::u16string_view::npos) ? 0 : (nSepPos + 1);
+}
+
+std::u16string_view InputOutputHelper::getFileNameExtension( std::u16string_view rFileUrl )
+{
+ sal_Int32 nNamePos = getFileNamePos( rFileUrl );
+ size_t nExtPos = rFileUrl.rfind( '.' );
+ if( nExtPos != std::u16string_view::npos && static_cast<sal_Int32>(nExtPos) >= nNamePos )
+ return rFileUrl.substr( nExtPos + 1 );
+ return std::u16string_view();
+}
+
+// input streams --------------------------------------------------------------
+
+Reference< XInputStream > InputOutputHelper::openInputStream(
+ const Reference< XComponentContext >& rxContext, const OUString& rFileName )
+{
+ Reference< XInputStream > xInStrm;
+ if( rxContext.is() ) try
+ {
+ Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(rxContext));
+ xInStrm = xFileAccess->openFileRead( rFileName );
+ }
+ catch( Exception& )
+ {
+ }
+ return xInStrm;
+}
+
+// output streams -------------------------------------------------------------
+
+Reference< XOutputStream > InputOutputHelper::openOutputStream(
+ const Reference< XComponentContext >& rxContext, const OUString& rFileName )
+{
+ Reference< XOutputStream > xOutStrm;
+ if( rxContext.is() ) try
+ {
+ Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(rxContext));
+ xOutStrm = xFileAccess->openFileWrite( rFileName );
+ }
+ catch( Exception& )
+ {
+ }
+ return xOutStrm;
+}
+
+Reference< XTextOutputStream2 > InputOutputHelper::openTextOutputStream(
+ const Reference< XComponentContext >& rxContext, const Reference< XOutputStream >& rxOutStrm, rtl_TextEncoding eTextEnc )
+{
+ Reference< XTextOutputStream2 > xTextOutStrm;
+ const char* pcCharset = rtl_getMimeCharsetFromTextEncoding( eTextEnc );
+ if( rxContext.is() && rxOutStrm.is() && pcCharset ) try
+ {
+ xTextOutStrm = TextOutputStream::create(rxContext);
+ xTextOutStrm->setOutputStream( rxOutStrm );
+ xTextOutStrm->setEncoding( OUString::createFromAscii( pcCharset ) );
+ }
+ catch( Exception& )
+ {
+ }
+ return xTextOutStrm;
+}
+
+Reference< XTextOutputStream2 > InputOutputHelper::openTextOutputStream(
+ const Reference< XComponentContext >& rxContext, const OUString& rFileName, rtl_TextEncoding eTextEnc )
+{
+ return openTextOutputStream( rxContext, openOutputStream( rxContext, rFileName ), eTextEnc );
+}
+
+ItemFormat::ItemFormat() :
+ meDataType( DATATYPE_VOID ),
+ meFmtType( FORMATTYPE_NONE )
+{
+}
+
+void ItemFormat::set( DataType eDataType, FormatType eFmtType, const OUString& rItemName )
+{
+ meDataType = eDataType;
+ meFmtType = eFmtType;
+ maItemName = rItemName;
+ maListName.clear();
+}
+
+OUStringVector::const_iterator ItemFormat::parse( const OUStringVector& rFormatVec )
+{
+ set( DATATYPE_VOID, FORMATTYPE_NONE, OUString() );
+
+ OUStringVector::const_iterator aIt = rFormatVec.begin(), aEnd = rFormatVec.end();
+ OUString aDataType, aFmtType;
+ if( aIt != aEnd ) aDataType = *aIt++;
+ if( aIt != aEnd ) aFmtType = *aIt++;
+ if( aIt != aEnd ) maItemName = *aIt++;
+ if( aIt != aEnd ) maListName = *aIt++;
+
+ meDataType = StringHelper::convertToDataType( aDataType );
+ meFmtType = StringHelper::convertToFormatType( aFmtType );
+
+ if( meFmtType == FORMATTYPE_NONE )
+ {
+ if ( aFmtType == "unused" )
+ set( meDataType, FORMATTYPE_HEX, OOX_DUMP_UNUSED );
+ else if ( aFmtType == "unknown" )
+ set( meDataType, FORMATTYPE_HEX, OOX_DUMP_UNKNOWN );
+ }
+
+ return aIt;
+}
+
+OUStringVector ItemFormat::parse( const OUString& rFormatStr )
+{
+ OUStringVector aFormatVec;
+ StringHelper::convertStringToStringList( aFormatVec, rFormatStr, false );
+ OUStringVector::const_iterator aIt = parse( aFormatVec );
+ return OUStringVector( aIt, const_cast< const OUStringVector& >( aFormatVec ).end() );
+}
+
+// append string to string ----------------------------------------------------
+
+void StringHelper::appendChar( OUStringBuffer& rStr, sal_Unicode cChar, sal_Int32 nCount )
+{
+ for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
+ rStr.append( cChar );
+}
+
+void StringHelper::appendString( OUStringBuffer& rStr, const OUString& rData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendChar( rStr, cFill, nWidth - rData.getLength() );
+ rStr.append( rData );
+}
+
+// append decimal -------------------------------------------------------------
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt8 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int8 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt16 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int16 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt32 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int32 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt64 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ /* Values greater than biggest signed 64bit integer will change to
+ negative when converting to sal_Int64. Therefore, the trailing digit
+ will be written separately. */
+ OUStringBuffer aBuffer;
+ if( nData > 9 )
+ aBuffer.append( static_cast<sal_Int64>(nData / 10 ) );
+ aBuffer.append( static_cast< sal_Unicode >( '0' + (nData % 10) ) );
+ appendString( rStr, aBuffer.makeStringAndClear(), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int64 nData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
+}
+
+void StringHelper::appendDec( OUStringBuffer& rStr, double fData, sal_Int32 nWidth, sal_Unicode cFill )
+{
+ appendString( rStr, ::rtl::math::doubleToUString( fData, rtl_math_StringFormat_G, 15, '.', true ), nWidth, cFill );
+}
+
+// append hexadecimal ---------------------------------------------------------
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_uInt8 nData, bool bPrefix )
+{
+ static const sal_Unicode spcHexDigits[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' };
+ if( bPrefix )
+ rStr.append( "0x" );
+ rStr.append( spcHexDigits[ (nData >> 4) & 0x0F ] ).append( spcHexDigits[ nData & 0x0F ] );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_Int8 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt8 >( nData ), bPrefix );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_uInt16 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt8 >( nData >> 8 ), bPrefix );
+ appendHex( rStr, static_cast< sal_uInt8 >( nData ), false );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_Int16 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt16 >( nData ), bPrefix );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_uInt32 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt16 >( nData >> 16 ), bPrefix );
+ appendHex( rStr, static_cast< sal_uInt16 >( nData ), false );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_Int32 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt32 >( nData ), bPrefix );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_uInt64 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt32 >( nData >> 32 ), bPrefix );
+ appendHex( rStr, static_cast< sal_uInt32 >( nData ), false );
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, sal_Int64 nData, bool bPrefix )
+{
+ appendHex( rStr, static_cast< sal_uInt64 >( nData ), bPrefix );
+}
+
+static sal_uInt64
+lcl_ConvertDouble(double const f)
+{
+ sal_uInt64 i = sal_uInt64();
+ for (size_t j = 0; j < sizeof(double); ++j)
+ { // hopefully both endian independent and strict aliasing safe
+ reinterpret_cast<char *>(&i)[j] = reinterpret_cast<char const *>(&f)[j];
+ }
+ return i;
+}
+
+void StringHelper::appendHex( OUStringBuffer& rStr, double fData, bool bPrefix )
+{
+ appendHex( rStr, lcl_ConvertDouble(fData), bPrefix );
+}
+
+// append shortened hexadecimal -----------------------------------------------
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_uInt8 nData, bool bPrefix )
+{
+ appendHex( rStr, nData, bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_Int8 nData, bool bPrefix )
+{
+ appendHex( rStr, nData, bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_uInt16 nData, bool bPrefix )
+{
+ if( nData > SAL_MAX_UINT8 )
+ appendHex( rStr, nData, bPrefix );
+ else
+ appendHex( rStr, static_cast< sal_uInt8 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_Int16 nData, bool bPrefix )
+{
+ appendShortHex( rStr, static_cast< sal_uInt16 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_uInt32 nData, bool bPrefix )
+{
+ if( nData > SAL_MAX_UINT16 )
+ appendHex( rStr, nData, bPrefix );
+ else
+ appendShortHex( rStr, static_cast< sal_uInt16 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_Int32 nData, bool bPrefix )
+{
+ appendShortHex( rStr, static_cast< sal_uInt32 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_uInt64 nData, bool bPrefix )
+{
+ if( nData > SAL_MAX_UINT32 )
+ appendHex( rStr, nData, bPrefix );
+ else
+ appendShortHex( rStr, static_cast< sal_uInt32 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, sal_Int64 nData, bool bPrefix )
+{
+ appendShortHex( rStr, static_cast< sal_uInt64 >( nData ), bPrefix );
+}
+
+void StringHelper::appendShortHex( OUStringBuffer& rStr, double fData, bool bPrefix )
+{
+ appendHex( rStr, fData, bPrefix );
+}
+
+// append binary --------------------------------------------------------------
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_uInt8 nData, bool bDots )
+{
+ for( sal_uInt8 nMask = 0x80; nMask != 0; (nMask >>= 1) &= 0x7F )
+ {
+ rStr.append( static_cast< sal_Unicode >( (nData & nMask) ? '1' : '0' ) );
+ if( bDots && (nMask == 0x10) )
+ rStr.append( OOX_DUMP_BINDOT );
+ }
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_Int8 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt8 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_uInt16 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt8 >( nData >> 8 ), bDots );
+ if( bDots )
+ rStr.append( OOX_DUMP_BINDOT );
+ appendBin( rStr, static_cast< sal_uInt8 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_Int16 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt16 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_uInt32 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt16 >( nData >> 16 ), bDots );
+ if( bDots )
+ rStr.append( OOX_DUMP_BINDOT );
+ appendBin( rStr, static_cast< sal_uInt16 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_Int32 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt32 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_uInt64 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt32 >( nData >> 32 ), bDots );
+ if( bDots )
+ rStr.append( OOX_DUMP_BINDOT );
+ appendBin( rStr, static_cast< sal_uInt32 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, sal_Int64 nData, bool bDots )
+{
+ appendBin( rStr, static_cast< sal_uInt64 >( nData ), bDots );
+}
+
+void StringHelper::appendBin( OUStringBuffer& rStr, double fData, bool bDots )
+{
+ appendBin( rStr, lcl_ConvertDouble(fData), bDots );
+}
+
+// append formatted value -----------------------------------------------------
+
+void StringHelper::appendBool( OUStringBuffer& rStr, bool bData )
+{
+ rStr.appendAscii( bData ? "true" : "false" );
+}
+
+// encoded text output --------------------------------------------------------
+
+void StringHelper::appendCChar( OUStringBuffer& rStr, sal_Unicode cChar, bool bPrefix )
+{
+ if( cChar > 0x00FF )
+ {
+ if( bPrefix )
+ rStr.append( "\\u" );
+ appendHex( rStr, static_cast< sal_uInt16 >( cChar ), false );
+ }
+ else
+ {
+ if( bPrefix )
+ rStr.append( "\\x" );
+ appendHex( rStr, static_cast< sal_uInt8 >( cChar ), false );
+ }
+}
+
+void StringHelper::appendEncChar( OUStringBuffer& rStr, sal_Unicode cChar, sal_Int32 nCount, bool bPrefix )
+{
+ if( cChar < 0x0020 )
+ {
+ // C-style hex code
+ OUStringBuffer aCode;
+ appendCChar( aCode, cChar, bPrefix );
+ OUString aCodeStr = aCode.makeStringAndClear();
+ for( sal_Int32 nIdx = 0; nIdx < nCount; ++nIdx )
+ rStr.append( aCodeStr );
+ }
+ else
+ {
+ appendChar( rStr, cChar, nCount );
+ }
+}
+
+void StringHelper::appendEncString( OUStringBuffer& rStr, const OUString& rData, bool bPrefix )
+{
+ sal_Int32 nBeg = 0;
+ sal_Int32 nIdx = 0;
+ sal_Int32 nEnd = rData.getLength();
+ while( nIdx < nEnd )
+ {
+ // find next character that needs encoding
+ while( (nIdx < nEnd) && (rData[ nIdx ] >= 0x20) ) ++nIdx;
+ // append portion
+ if( nBeg < nIdx )
+ {
+ if( (nBeg == 0) && (nIdx == nEnd) )
+ rStr.append( rData );
+ else
+ rStr.append( rData.subView(nBeg, nIdx - nBeg) );
+ }
+ // append characters to be encoded
+ while( (nIdx < nEnd) && (rData[ nIdx ] < 0x20) )
+ {
+ appendCChar( rStr, rData[ nIdx ], bPrefix );
+ ++nIdx;
+ }
+ // adjust limits
+ nBeg = nIdx;
+ }
+}
+
+// token list -----------------------------------------------------------------
+
+void StringHelper::appendToken( OUStringBuffer& rStr, std::u16string_view rToken, sal_Unicode cSep )
+{
+ if( (rStr.getLength() > 0) && (!rToken.empty()) )
+ rStr.append( cSep );
+ rStr.append( rToken );
+}
+
+void StringHelper::appendIndex( OUStringBuffer& rStr, sal_Int64 nIdx )
+{
+ OUStringBuffer aToken;
+ appendDec( aToken, nIdx );
+ rStr.append( '[' ).append( aToken.makeStringAndClear() ).append( ']' );
+}
+
+std::u16string_view StringHelper::getToken( std::u16string_view rData, sal_Int32& rnPos, sal_Unicode cSep )
+{
+ return trimSpaces( o3tl::getToken(rData, 0, cSep, rnPos ) );
+}
+
+void StringHelper::enclose( OUStringBuffer& rStr, sal_Unicode cOpen, sal_Unicode cClose )
+{
+ rStr.insert( 0, cOpen ).append( cClose ? cClose : cOpen );
+}
+
+// string conversion ----------------------------------------------------------
+
+namespace {
+
+sal_Int32 lclIndexOf( const OUString& rStr, sal_Unicode cChar, sal_Int32 nStartPos )
+{
+ sal_Int32 nIndex = rStr.indexOf( cChar, nStartPos );
+ return (nIndex < 0) ? rStr.getLength() : nIndex;
+}
+
+OUString lclTrimQuotedStringList( const OUString& rStr )
+{
+ OUStringBuffer aBuffer;
+ sal_Int32 nPos = 0;
+ sal_Int32 nLen = rStr.getLength();
+ while( nPos < nLen )
+ {
+ if( rStr[ nPos ] == OOX_DUMP_CFG_QUOTE )
+ {
+ // quoted string, skip leading quote character
+ ++nPos;
+ // process quoted text and embedded literal quote characters
+ OUStringBuffer aToken;
+ do
+ {
+ // seek to next quote character and add text portion to token buffer
+ sal_Int32 nEnd = lclIndexOf( rStr, OOX_DUMP_CFG_QUOTE, nPos );
+ aToken.append( rStr.subView(nPos, nEnd - nPos) );
+ // process literal quotes
+ while( (nEnd + 1 < nLen) && (rStr[ nEnd ] == OOX_DUMP_CFG_QUOTE) && (rStr[ nEnd + 1 ] == OOX_DUMP_CFG_QUOTE) )
+ {
+ aToken.append( OOX_DUMP_CFG_QUOTE );
+ nEnd += 2;
+ }
+ // nEnd is start of possible next text portion
+ nPos = nEnd;
+ }
+ while( (nPos < nLen) && (rStr[ nPos ] != OOX_DUMP_CFG_QUOTE) );
+ // add token, seek to list separator, ignore text following closing quote
+ aBuffer.append( aToken.makeStringAndClear() );
+ nPos = lclIndexOf( rStr, OOX_DUMP_CFG_LISTSEP, nPos );
+ if( nPos < nLen )
+ aBuffer.append( OOX_DUMP_LF );
+ // set current position behind list separator
+ ++nPos;
+ }
+ else
+ {
+ // find list separator, add token text to buffer
+ sal_Int32 nEnd = lclIndexOf( rStr, OOX_DUMP_CFG_LISTSEP, nPos );
+ aBuffer.append( rStr.subView(nPos, nEnd - nPos) );
+ if( nEnd < nLen )
+ aBuffer.append( OOX_DUMP_LF );
+ // set current position behind list separator
+ nPos = nEnd + 1;
+ }
+ }
+
+ return aBuffer.makeStringAndClear();
+}
+
+} // namespace
+
+std::u16string_view StringHelper::trimSpaces( std::u16string_view rStr )
+{
+ size_t nBeg = 0;
+ while( (nBeg < rStr.size()) && ((rStr[ nBeg ] == ' ') || (rStr[ nBeg ] == '\t')) )
+ ++nBeg;
+ size_t nEnd = rStr.size();
+ while( (nEnd > nBeg) && ((rStr[ nEnd - 1 ] == ' ') || (rStr[ nEnd - 1 ] == '\t')) )
+ --nEnd;
+ return rStr.substr( nBeg, nEnd - nBeg );
+}
+
+OUString StringHelper::trimTrailingNul( const OUString& rStr )
+{
+ sal_Int32 nLastPos = rStr.getLength() - 1;
+ if( (nLastPos >= 0) && (rStr[ nLastPos ] == 0) )
+ return rStr.copy( 0, nLastPos );
+ return rStr;
+}
+
+OString StringHelper::convertToUtf8( std::u16string_view rStr )
+{
+ return OUStringToOString( rStr, RTL_TEXTENCODING_UTF8 );
+}
+
+DataType StringHelper::convertToDataType( std::u16string_view rStr )
+{
+ DataType eType = DATATYPE_VOID;
+ if ( rStr == u"int8" )
+ eType = DATATYPE_INT8;
+ else if ( rStr == u"uint8" )
+ eType = DATATYPE_UINT8;
+ else if ( rStr == u"int16" )
+ eType = DATATYPE_INT16;
+ else if ( rStr == u"uint16" )
+ eType = DATATYPE_UINT16;
+ else if ( rStr == u"int32" )
+ eType = DATATYPE_INT32;
+ else if ( rStr == u"uint32" )
+ eType = DATATYPE_UINT32;
+ else if ( rStr == u"int64" )
+ eType = DATATYPE_INT64;
+ else if ( rStr == u"uint64" )
+ eType = DATATYPE_UINT64;
+ else if ( rStr == u"float" )
+ eType = DATATYPE_FLOAT;
+ else if ( rStr == u"double" )
+ eType = DATATYPE_DOUBLE;
+ return eType;
+}
+
+FormatType StringHelper::convertToFormatType( std::u16string_view rStr )
+{
+ FormatType eType = FORMATTYPE_NONE;
+ if ( rStr == u"dec" )
+ eType = FORMATTYPE_DEC;
+ else if ( rStr == u"hex" )
+ eType = FORMATTYPE_HEX;
+ else if ( rStr == u"shorthex" )
+ eType = FORMATTYPE_SHORTHEX;
+ else if ( rStr == u"bin" )
+ eType = FORMATTYPE_BIN;
+ else if ( rStr == u"fix" )
+ eType = FORMATTYPE_FIX;
+ else if ( rStr == u"bool" )
+ eType = FORMATTYPE_BOOL;
+ return eType;
+}
+
+bool StringHelper::convertFromDec( sal_Int64& ornData, std::u16string_view rData )
+{
+ size_t nPos = 0;
+ size_t nLen = rData.size();
+ bool bNeg = false;
+ if( (nLen > 0) && (rData[ 0 ] == '-') )
+ {
+ bNeg = true;
+ ++nPos;
+ }
+ ornData = 0;
+ for( ; nPos < nLen; ++nPos )
+ {
+ sal_Unicode cChar = rData[ nPos ];
+ if( (cChar < '0') || (cChar > '9') )
+ return false;
+ ornData = (ornData * 10) + (cChar - '0');
+ }
+ if( bNeg )
+ ornData *= -1;
+ return true;
+}
+
+bool StringHelper::convertFromHex( sal_Int64& ornData, std::u16string_view rData )
+{
+ ornData = 0;
+ for( size_t nPos = 0, nLen = rData.size(); nPos < nLen; ++nPos )
+ {
+ sal_Unicode cChar = rData[ nPos ];
+ if( ('0' <= cChar) && (cChar <= '9') )
+ cChar -= '0';
+ else if( ('A' <= cChar) && (cChar <= 'F') )
+ cChar -= ('A' - 10);
+ else if( ('a' <= cChar) && (cChar <= 'f') )
+ cChar -= ('a' - 10);
+ else
+ return false;
+ ornData = (ornData << 4) + cChar;
+ }
+ return true;
+}
+
+bool StringHelper::convertStringToInt( sal_Int64& ornData, std::u16string_view rData )
+{
+ if( (rData.size() > 2) && (rData[ 0 ] == '0') && ((rData[ 1 ] == 'X') || (rData[ 1 ] == 'x')) )
+ return convertFromHex( ornData, rData.substr( 2 ) );
+ return convertFromDec( ornData, rData );
+}
+
+bool StringHelper::convertStringToDouble( double& orfData, std::u16string_view rData )
+{
+ rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
+ sal_Int32 nSize = 0;
+ sal_Unicode const * pBegin = rData.data();
+ sal_Unicode const * pEnd;
+ orfData = rtl_math_uStringToDouble(pBegin,
+ pBegin + rData.size(),
+ '.', '\0',
+ &eStatus, &pEnd);
+ nSize = static_cast<sal_Int32>(pEnd - pBegin);
+ return (eStatus == rtl_math_ConversionStatus_Ok) && (nSize == static_cast<sal_Int32>(rData.size()));
+}
+
+bool StringHelper::convertStringToBool( std::u16string_view rData )
+{
+ if ( rData == u"true" )
+ return true;
+ if ( rData == u"false" )
+ return false;
+ sal_Int64 nData;
+ return convertStringToInt( nData, rData ) && (nData != 0);
+}
+
+OUStringPair StringHelper::convertStringToPair( const OUString& rString, sal_Unicode cSep )
+{
+ OUStringPair aPair;
+ if( !rString.isEmpty() )
+ {
+ sal_Int32 nEqPos = rString.indexOf( cSep );
+ if( nEqPos < 0 )
+ {
+ aPair.first = rString;
+ }
+ else
+ {
+ aPair.first = StringHelper::trimSpaces( rString.subView( 0, nEqPos ) );
+ aPair.second = StringHelper::trimSpaces( rString.subView( nEqPos + 1 ) );
+ }
+ }
+ return aPair;
+}
+
+void StringHelper::convertStringToStringList( OUStringVector& orVec, const OUString& rData, bool bIgnoreEmpty )
+{
+ orVec.clear();
+ OUString aUnquotedData = lclTrimQuotedStringList( rData );
+ sal_Int32 nPos = 0;
+ sal_Int32 nLen = aUnquotedData.getLength();
+ while( (0 <= nPos) && (nPos < nLen) )
+ {
+ std::u16string_view aToken = getToken( aUnquotedData, nPos, OOX_DUMP_LF );
+ if( !bIgnoreEmpty || !aToken.empty() )
+ orVec.push_back( OUString(aToken) );
+ }
+}
+
+void StringHelper::convertStringToIntList( Int64Vector& orVec, const OUString& rData, bool bIgnoreEmpty )
+{
+ orVec.clear();
+ OUString aUnquotedData = lclTrimQuotedStringList( rData );
+ sal_Int32 nPos = 0;
+ sal_Int32 nLen = aUnquotedData.getLength();
+ sal_Int64 nData;
+ while( (0 <= nPos) && (nPos < nLen) )
+ {
+ bool bOk = convertStringToInt( nData, getToken( aUnquotedData, nPos, OOX_DUMP_LF ) );
+ if( !bIgnoreEmpty || bOk )
+ orVec.push_back( bOk ? nData : 0 );
+ }
+}
+
+Base::~Base()
+{
+}
+
+ConfigItemBase::~ConfigItemBase()
+{
+}
+
+void ConfigItemBase::readConfigBlock( TextInputStream& rStrm )
+{
+ readConfigBlockContents( rStrm );
+}
+
+void ConfigItemBase::implProcessConfigItemStr(
+ TextInputStream& /*rStrm*/, const OUString& /*rKey*/, const OUString& /*rData*/ )
+{
+}
+
+void ConfigItemBase::implProcessConfigItemInt(
+ TextInputStream& /*rStrm*/, sal_Int64 /*nKey*/, const OUString& /*rData*/ )
+{
+}
+
+void ConfigItemBase::readConfigBlockContents( TextInputStream& rStrm )
+{
+ bool bLoop = true;
+ while( bLoop && !rStrm.isEof() )
+ {
+ OUString aKey, aData;
+ switch( readConfigLine( rStrm, aKey, aData ) )
+ {
+ case LINETYPE_DATA:
+ processConfigItem( rStrm, aKey, aData );
+ break;
+ case LINETYPE_END:
+ bLoop = false;
+ break;
+ }
+ }
+}
+
+ConfigItemBase::LineType ConfigItemBase::readConfigLine(
+ TextInputStream& rStrm, OUString& orKey, OUString& orData )
+{
+ OUString aLine;
+ while( !rStrm.isEof() && aLine.isEmpty() )
+ {
+ aLine = rStrm.readLine();
+ if( !aLine.isEmpty() && (aLine[ 0 ] == OOX_DUMP_BOM) )
+ aLine = aLine.copy( 1 );
+ aLine = StringHelper::trimSpaces( aLine );
+ if( !aLine.isEmpty() )
+ {
+ // ignore comments (starting with hash or semicolon)
+ sal_Unicode cChar = aLine[ 0 ];
+ if( (cChar == '#') || (cChar == ';') )
+ aLine.clear();
+ }
+ }
+
+ OUStringPair aPair = StringHelper::convertStringToPair( aLine );
+ orKey = aPair.first;
+ orData = aPair.second;
+ return ( !orKey.isEmpty() && (!orData.isEmpty() || orKey != "end" )) ?
+ LINETYPE_DATA : LINETYPE_END;
+}
+
+void ConfigItemBase::processConfigItem(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ sal_Int64 nKey;
+ if( StringHelper::convertStringToInt( nKey, rKey ) )
+ implProcessConfigItemInt( rStrm, nKey, rData );
+ else
+ implProcessConfigItemStr( rStrm, rKey, rData );
+}
+
+NameListBase::~NameListBase()
+{
+}
+
+void NameListBase::setName( sal_Int64 nKey, const String& rName )
+{
+ implSetName( nKey, rName );
+}
+
+void NameListBase::includeList( const NameListRef& rxList )
+{
+ if( rxList )
+ {
+ for (auto const& elem : *rxList)
+ maMap[ elem.first ] = elem.second;
+ implIncludeList( *rxList );
+ }
+}
+
+bool NameListBase::implIsValid() const
+{
+ return true;
+}
+
+void NameListBase::implProcessConfigItemStr(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ if ( rKey == "include" )
+ include( rData );
+ else if ( rKey == "exclude" )
+ exclude( rData );
+ else
+ ConfigItemBase::implProcessConfigItemStr( rStrm, rKey, rData );
+}
+
+void NameListBase::implProcessConfigItemInt(
+ TextInputStream& /*rStrm*/, sal_Int64 nKey, const OUString& rData )
+{
+ implSetName( nKey, rData );
+}
+
+void NameListBase::insertRawName( sal_Int64 nKey, const OUString& rName )
+{
+ maMap[ nKey ] = rName;
+}
+
+const OUString* NameListBase::findRawName( sal_Int64 nKey ) const
+{
+ const_iterator aIt = maMap.find( nKey );
+ return (aIt == end()) ? nullptr : &aIt->second;
+}
+
+void NameListBase::include( const OUString& rListKeys )
+{
+ OUStringVector aVec;
+ StringHelper::convertStringToStringList( aVec, rListKeys, true );
+ for (auto const& elem : aVec)
+ includeList( mrCfgData.getNameList(elem) );
+}
+
+void NameListBase::exclude( const OUString& rKeys )
+{
+ Int64Vector aVec;
+ StringHelper::convertStringToIntList( aVec, rKeys, true );
+ for (auto const& elem : aVec)
+ maMap.erase(elem);
+}
+
+void ItemFormatMap::insertFormats( const NameListRef& rxNameList )
+{
+ if( Base::isValid( rxNameList ) )
+ {
+ for (auto const& elemName : *rxNameList)
+ maMap[ elemName.first ].parse( elemName.second );
+ }
+}
+
+ConstList::ConstList( const SharedConfigData& rCfgData ) :
+ NameListBase( rCfgData ),
+ maDefName( OOX_DUMP_ERR_NONAME ),
+ mbQuoteNames( false )
+{
+}
+
+void ConstList::implProcessConfigItemStr(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ if ( rKey == "default" )
+ maDefName = rData; // Sets a default name for unknown keys.
+ else if ( rKey == "quote-names" )
+ setQuoteNames( StringHelper::convertStringToBool( rData ) );
+ else
+ NameListBase::implProcessConfigItemStr( rStrm, rKey, rData );
+}
+
+void ConstList::implSetName( sal_Int64 nKey, const OUString& rName )
+{
+ insertRawName( nKey, rName );
+}
+
+OUString ConstList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const
+{
+ const OUString* pName = findRawName( nKey );
+ OUString aName = pName ? *pName : maDefName;
+ if( mbQuoteNames )
+ {
+ OUStringBuffer aBuffer( aName );
+ StringHelper::enclose( aBuffer, OOX_DUMP_STRQUOTE );
+ aName = aBuffer.makeStringAndClear();
+ }
+ return aName;
+}
+
+OUString ConstList::implGetNameDbl( const Config& /*rCfg*/, double /*fValue*/ ) const
+{
+ return OUString();
+}
+
+void ConstList::implIncludeList( const NameListBase& rList )
+{
+ if( const ConstList* pConstList = dynamic_cast< const ConstList* >( &rList ) )
+ {
+ maDefName = pConstList->maDefName;
+ mbQuoteNames = pConstList->mbQuoteNames;
+ }
+}
+
+MultiList::MultiList( const SharedConfigData& rCfgData ) :
+ ConstList( rCfgData ),
+ mbIgnoreEmpty( true )
+{
+}
+
+void MultiList::setNamesFromVec( sal_Int64 nStartKey, const OUStringVector& rNames )
+{
+ sal_Int64 nKey = nStartKey;
+ for (auto const& name : rNames)
+ {
+ if( !mbIgnoreEmpty || !name.isEmpty() )
+ insertRawName( nKey, name);
+ ++nKey;
+ }
+}
+
+void MultiList::implProcessConfigItemStr(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ if ( rKey == "ignore-empty" )
+ mbIgnoreEmpty = StringHelper::convertStringToBool( rData );
+ else
+ ConstList::implProcessConfigItemStr( rStrm, rKey, rData );
+}
+
+void MultiList::implSetName( sal_Int64 nKey, const OUString& rName )
+{
+ OUStringVector aNames;
+ StringHelper::convertStringToStringList( aNames, rName, false );
+ setNamesFromVec( nKey, aNames );
+}
+
+FlagsList::FlagsList( const SharedConfigData& rCfgData ) :
+ NameListBase( rCfgData ),
+ mnIgnore( 0 )
+{
+}
+
+void FlagsList::implProcessConfigItemStr(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ if ( rKey == "ignore" )
+ {
+ sal_Int64 nIgnore;
+ if( StringHelper::convertStringToInt( nIgnore, rData ) )
+ setIgnoreFlags( nIgnore );
+ }
+ else
+ {
+ NameListBase::implProcessConfigItemStr( rStrm, rKey, rData );
+ }
+}
+
+void FlagsList::implSetName( sal_Int64 nKey, const OUString& rName )
+{
+ if( (nKey != 0) && ((nKey & (nKey - 1)) == 0) ) // only a single bit set?
+ insertRawName( nKey, rName );
+}
+
+OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const
+{
+ sal_Int64 nFound = mnIgnore;
+ OUStringBuffer aName;
+ // add known flags
+ for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt )
+ {
+ sal_Int64 nMask = aIt->first;
+ setFlag( nFound, nMask );
+ if( !getFlag( mnIgnore, nMask ) )
+ {
+ const OUString& rFlagName = aIt->second;
+ bool bOnOff = rFlagName.startsWith(":");
+ bool bFlag = getFlag( nKey, nMask );
+ if( bOnOff )
+ {
+ StringHelper::appendToken( aName, rFlagName.subView( 1 ) );
+ aName.appendAscii( bFlag ? ":on" : ":off" );
+ }
+ else
+ {
+ bool bNegated = rFlagName.startsWith("!");
+ sal_Int32 nBothSep = bNegated ? rFlagName.indexOf( '!', 1 ) : -1;
+ if( bFlag )
+ {
+ if( !bNegated )
+ StringHelper::appendToken( aName, rFlagName );
+ else if( nBothSep > 0 )
+ StringHelper::appendToken( aName, rFlagName.subView( nBothSep + 1 ) );
+ }
+ else if( bNegated )
+ {
+ if( nBothSep > 0 )
+ StringHelper::appendToken( aName, rFlagName.subView( 1, nBothSep - 1 ) );
+ else
+ StringHelper::appendToken( aName, rFlagName.subView( 1 ) );
+ }
+ }
+ }
+ }
+ // add unknown flags
+ setFlag( nKey, nFound, false );
+ if( nKey != 0 )
+ {
+ OUStringBuffer aUnknown( OOX_DUMP_UNKNOWN );
+ aUnknown.append( OOX_DUMP_ITEMSEP );
+ StringHelper::appendShortHex( aUnknown, nKey );
+ StringHelper::enclose( aUnknown, '(', ')' );
+ StringHelper::appendToken( aName, aUnknown.makeStringAndClear() );
+ }
+ return aName.makeStringAndClear();
+}
+
+OUString FlagsList::implGetNameDbl( const Config& /*rCfg*/, double /*fValue*/ ) const
+{
+ return OUString();
+}
+
+void FlagsList::implIncludeList( const NameListBase& rList )
+{
+ if( const FlagsList* pFlagsList = dynamic_cast< const FlagsList* >( &rList ) )
+ mnIgnore = pFlagsList->mnIgnore;
+}
+
+bool CombiList::ExtItemFormatKey::operator<( const ExtItemFormatKey& rRight ) const
+{
+ return (mnKey < rRight.mnKey) || ((mnKey == rRight.mnKey) && (maFilter < rRight.maFilter));
+}
+
+CombiList::CombiList( const SharedConfigData& rCfgData ) :
+ FlagsList( rCfgData )
+{
+}
+
+void CombiList::implSetName( sal_Int64 nKey, const OUString& rName )
+{
+ if( (nKey & (nKey - 1)) != 0 ) // more than a single bit set?
+ {
+ ::std::set< ExtItemFormatKey > aItemKeys;
+ ExtItemFormat aItemFmt;
+ OUStringVector aRemain = aItemFmt.parse( rName );
+ for (auto const& elemRemain : aRemain)
+ {
+ OUStringPair aPair = StringHelper::convertStringToPair(elemRemain);
+ if ( aPair.first == "noshift" )
+ {
+ aItemFmt.mbShiftValue = StringHelper::convertStringToBool( aPair.second );
+ }
+ else if ( aPair.first == "filter" )
+ {
+ OUStringPair aFilter = StringHelper::convertStringToPair( aPair.second, '~' );
+ ExtItemFormatKey aKey( nKey );
+ if( !aFilter.first.isEmpty() && StringHelper::convertStringToInt( aKey.maFilter.first, aFilter.first ) &&
+ !aFilter.second.isEmpty() && StringHelper::convertStringToInt( aKey.maFilter.second, aFilter.second ) )
+ {
+ if( aKey.maFilter.first == 0 )
+ aKey.maFilter.second = 0;
+ aItemKeys.insert( aKey );
+ }
+ }
+ }
+ if( aItemKeys.empty() )
+ aItemKeys.insert( ExtItemFormatKey( nKey ) );
+ for (auto const& itemKey : aItemKeys)
+ maFmtMap[itemKey] = aItemFmt;
+ }
+ else
+ {
+ FlagsList::implSetName( nKey, rName );
+ }
+}
+
+OUString CombiList::implGetName( const Config& rCfg, sal_Int64 nKey ) const
+{
+ sal_Int64 nFound = 0;
+ OUStringBuffer aName;
+ // add known flag fields
+ for (auto const& fmt : maFmtMap)
+ {
+ const ExtItemFormatKey& rMapKey = fmt.first;
+ sal_Int64 nMask = rMapKey.mnKey;
+ if( (nMask != 0) && ((nKey & rMapKey.maFilter.first) == rMapKey.maFilter.second) )
+ {
+ const ExtItemFormat& rItemFmt = fmt.second;
+
+ sal_uInt64 nUFlags = static_cast< sal_uInt64 >( nKey );
+ sal_uInt64 nUMask = static_cast< sal_uInt64 >( nMask );
+ if( rItemFmt.mbShiftValue )
+ while( (nUMask & 1) == 0 ) { nUFlags >>= 1; nUMask >>= 1; }
+
+ sal_uInt64 nUValue = nUFlags & nUMask;
+ sal_Int64 nSValue = static_cast< sal_Int64 >( nUValue );
+ if( getFlag< sal_uInt64 >( nUValue, (nUMask + 1) >> 1 ) )
+ setFlag( nSValue, static_cast< sal_Int64 >( ~nUMask ) );
+
+ OUStringBuffer aItem( rItemFmt.maItemName );
+ OUStringBuffer aValue;
+ switch( rItemFmt.meDataType )
+ {
+ case DATATYPE_INT8: StringHelper::appendValue( aValue, static_cast< sal_Int8 >( nSValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_UINT8: StringHelper::appendValue( aValue, static_cast< sal_uInt8 >( nUValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_INT16: StringHelper::appendValue( aValue, static_cast< sal_Int16 >( nSValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_UINT16: StringHelper::appendValue( aValue, static_cast< sal_uInt16 >( nUValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_INT32: StringHelper::appendValue( aValue, static_cast< sal_Int32 >( nSValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_UINT32: StringHelper::appendValue( aValue, static_cast< sal_uInt32 >( nUValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_INT64: StringHelper::appendValue( aValue, nSValue, rItemFmt.meFmtType ); break;
+ case DATATYPE_UINT64: StringHelper::appendValue( aValue, nUValue, rItemFmt.meFmtType ); break;
+ case DATATYPE_FLOAT: StringHelper::appendValue( aValue, static_cast< float >( nSValue ), rItemFmt.meFmtType ); break;
+ case DATATYPE_DOUBLE: StringHelper::appendValue( aValue, static_cast< double >( nSValue ), rItemFmt.meFmtType ); break;
+ default:;
+ }
+ StringHelper::appendToken( aItem, aValue.makeStringAndClear(), OOX_DUMP_ITEMSEP );
+ if( !rItemFmt.maListName.isEmpty() )
+ {
+ OUString aValueName = rCfg.getName( rItemFmt.maListName, static_cast< sal_Int64 >( nUValue ) );
+ StringHelper::appendToken( aItem, aValueName, OOX_DUMP_ITEMSEP );
+ }
+ StringHelper::enclose( aItem, '(', ')' );
+ StringHelper::appendToken( aName, aItem.makeStringAndClear() );
+ setFlag( nFound, nMask );
+ }
+ }
+ setFlag( nKey, nFound, false );
+ StringHelper::appendToken( aName, FlagsList::implGetName( rCfg, nKey ) );
+ return aName.makeStringAndClear();
+}
+
+void CombiList::implIncludeList( const NameListBase& rList )
+{
+ if( const CombiList* pCombiList = dynamic_cast< const CombiList* >( &rList ) )
+ maFmtMap = pCombiList->maFmtMap;
+ FlagsList::implIncludeList( rList );
+}
+
+UnitConverter::UnitConverter( const SharedConfigData& rCfgData ) :
+ NameListBase( rCfgData ),
+ mfFactor( 1.0 )
+{
+}
+
+void UnitConverter::implSetName( sal_Int64 /*nKey*/, const OUString& /*rName*/ )
+{
+ // nothing to do
+}
+
+OUString UnitConverter::implGetName( const Config& rCfg, sal_Int64 nKey ) const
+{
+ return implGetNameDbl( rCfg, static_cast< double >( nKey ) );
+}
+
+OUString UnitConverter::implGetNameDbl( const Config& /*rCfg*/, double fValue ) const
+{
+ OUStringBuffer aValue;
+ StringHelper::appendDec( aValue, mfFactor * fValue );
+ aValue.append( maUnitName );
+ return aValue.makeStringAndClear();
+}
+
+void UnitConverter::implIncludeList( const NameListBase& /*rList*/ )
+{
+}
+
+const NameListRef & NameListWrapper::getNameList( const Config& rCfg ) const
+{
+ if (!mxList)
+ mxList = rCfg.getNameList( maName );
+ return mxList;
+}
+
+SharedConfigData::SharedConfigData( const OUString& rFileName,
+ const Reference< XComponentContext >& rxContext, const StorageRef& rxRootStrg,
+ const OUString& rSysFileName ) :
+ mxContext( rxContext ),
+ mxRootStrg( rxRootStrg ),
+ maSysFileName( rSysFileName ),
+ mbLoaded( false )
+{
+ OUString aFileUrl = InputOutputHelper::convertFileNameToUrl( rFileName );
+ if( !aFileUrl.isEmpty() )
+ {
+ sal_Int32 nNamePos = InputOutputHelper::getFileNamePos( aFileUrl );
+ maConfigPath = aFileUrl.copy( 0, nNamePos );
+ mbLoaded = readConfigFile( aFileUrl );
+ }
+}
+
+SharedConfigData::~SharedConfigData()
+{
+}
+
+const OUString* SharedConfigData::getOption( const OUString& rKey ) const
+{
+ ConfigDataMap::const_iterator aIt = maConfigData.find( rKey );
+ return (aIt == maConfigData.end()) ? nullptr : &aIt->second;
+}
+
+void SharedConfigData::setNameList( const OUString& rListName, const NameListRef& rxList )
+{
+ if( !rListName.isEmpty() )
+ maNameLists[ rListName ] = rxList;
+}
+
+void SharedConfigData::eraseNameList( const OUString& rListName )
+{
+ maNameLists.erase( rListName );
+}
+
+NameListRef SharedConfigData::getNameList( const OUString& rListName ) const
+{
+ NameListRef xList;
+ NameListMap::const_iterator aIt = maNameLists.find( rListName );
+ if( aIt != maNameLists.end() )
+ xList = aIt->second;
+ return xList;
+}
+
+bool SharedConfigData::implIsValid() const
+{
+ return mbLoaded && mxContext.is() && mxRootStrg && !maSysFileName.isEmpty();
+}
+
+void SharedConfigData::implProcessConfigItemStr(
+ TextInputStream& rStrm, const OUString& rKey, const OUString& rData )
+{
+ if ( rKey == "include-config-file" )
+ readConfigFile( maConfigPath + rData );
+ else if ( rKey == "constlist" )
+ readNameList< ConstList >( rStrm, rData );
+ else if ( rKey == "multilist" )
+ readNameList< MultiList >( rStrm, rData );
+ else if ( rKey == "flagslist" )
+ readNameList< FlagsList >( rStrm, rData );
+ else if ( rKey == "combilist" )
+ readNameList< CombiList >( rStrm, rData );
+ else if ( rKey == "shortlist" )
+ createShortList( rData );
+ else if ( rKey == "unitconverter" )
+ createUnitConverter( rData );
+ else
+ maConfigData[ rKey ] = rData;
+}
+
+bool SharedConfigData::readConfigFile( const OUString& rFileUrl )
+{
+ bool bLoaded = maConfigFiles.count( rFileUrl ) > 0;
+ if( !bLoaded )
+ {
+ Reference< XInputStream > xInStrm = InputOutputHelper::openInputStream( mxContext, rFileUrl );
+ TextInputStream aTxtStrm( mxContext, xInStrm, RTL_TEXTENCODING_UTF8 );
+ if( !aTxtStrm.isEof() )
+ {
+ maConfigFiles.insert( rFileUrl );
+ readConfigBlockContents( aTxtStrm );
+ bLoaded = true;
+ }
+ }
+ return bLoaded;
+}
+
+void SharedConfigData::createShortList( const OUString& rData )
+{
+ OUStringVector aDataVec;
+ StringHelper::convertStringToStringList( aDataVec, rData, false );
+ if( aDataVec.size() < 3 )
+ return;
+
+ sal_Int64 nStartKey;
+ if( StringHelper::convertStringToInt( nStartKey, aDataVec[ 1 ] ) )
+ {
+ std::shared_ptr< MultiList > xList = createNameList< MultiList >( aDataVec[ 0 ] );
+ if( xList )
+ {
+ aDataVec.erase( aDataVec.begin(), aDataVec.begin() + 2 );
+ xList->setNamesFromVec( nStartKey, aDataVec );
+ }
+ }
+}
+
+void SharedConfigData::createUnitConverter( const OUString& rData )
+{
+ OUStringVector aDataVec;
+ StringHelper::convertStringToStringList( aDataVec, rData, false );
+ if( aDataVec.size() < 2 )
+ return;
+
+ OUString aFactor = aDataVec[ 1 ];
+ bool bRecip = aFactor.startsWith("/");
+ if( bRecip )
+ aFactor = aFactor.copy( 1 );
+ double fFactor;
+ if( StringHelper::convertStringToDouble( fFactor, aFactor ) && (fFactor != 0.0) )
+ {
+ std::shared_ptr< UnitConverter > xList = createNameList< UnitConverter >( aDataVec[ 0 ] );
+ if( xList )
+ {
+ xList->setFactor( bRecip ? (1.0 / fFactor) : fFactor );
+ if( aDataVec.size() >= 3 )
+ xList->setUnitName( aDataVec[ 2 ] );
+ }
+ }
+}
+
+Config::Config( const char* pcEnvVar, const FilterBase& rFilter )
+{
+ construct( pcEnvVar, rFilter );
+}
+
+Config::Config( const char* pcEnvVar, const Reference< XComponentContext >& rxContext, const StorageRef& rxRootStrg, const OUString& rSysFileName )
+{
+ construct( pcEnvVar, rxContext, rxRootStrg, rSysFileName );
+}
+
+Config::~Config()
+{
+}
+
+void Config::construct( const char* pcEnvVar, const FilterBase& rFilter )
+{
+ if( !rFilter.getFileUrl().isEmpty() )
+ construct( pcEnvVar, rFilter.getComponentContext(), rFilter.getStorage(), rFilter.getFileUrl() );
+}
+
+void Config::construct( const char* pcEnvVar, const Reference< XComponentContext >& rxContext, const StorageRef& rxRootStrg, const OUString& rSysFileName )
+{
+ if( pcEnvVar && rxRootStrg && !rSysFileName.isEmpty() )
+ if( const char* pcFileName = ::getenv( pcEnvVar ) )
+ mxCfgData = std::make_shared<SharedConfigData>( OUString::createFromAscii( pcFileName ), rxContext, rxRootStrg, rSysFileName );
+}
+
+const OUString& Config::getStringOption( const String& rKey, const OUString& rDefault ) const
+{
+ const OUString* pData = implGetOption( rKey );
+ return pData ? *pData : rDefault;
+}
+
+bool Config::getBoolOption( const String& rKey, bool bDefault ) const
+{
+ const OUString* pData = implGetOption( rKey );
+ return pData ? StringHelper::convertStringToBool( *pData ) : bDefault;
+}
+
+bool Config::isDumperEnabled() const
+{
+ return getBoolOption( "enable-dumper", false );
+}
+
+bool Config::isImportEnabled() const
+{
+ return getBoolOption( "enable-import", true );
+}
+
+void Config::eraseNameList( const String& rListName )
+{
+ mxCfgData->eraseNameList( rListName );
+}
+
+NameListRef Config::getNameList( const String& rListName ) const
+{
+ return mxCfgData->getNameList( rListName );
+}
+
+bool Config::implIsValid() const
+{
+ return isValid( mxCfgData );
+}
+
+const OUString* Config::implGetOption( const OUString& rKey ) const
+{
+ return mxCfgData->getOption( rKey );
+}
+
+Output::Output( const Reference< XComponentContext >& rxContext, const OUString& rFileName ) :
+ mxStrm( InputOutputHelper::openTextOutputStream( rxContext, rFileName, RTL_TEXTENCODING_UTF8 ) ),
+ mnCol( 0 ),
+ mnItemLevel( 0 ),
+ mnMultiLevel( 0 ),
+ mnItemIdx( 0 ),
+ mnLastItem( 0 )
+{
+ if( mxStrm.is() )
+ mxStrm->writeString( OUString( OOX_DUMP_BOM ) );
+}
+
+void Output::newLine()
+{
+ if( maLine.getLength() > 0 )
+ {
+ mxStrm->writeString( maIndent );
+ maLine.append( '\n' );
+ mxStrm->writeString( maLine.makeStringAndClear() );
+ mnCol = 0;
+ mnLastItem = 0;
+ }
+}
+
+void Output::emptyLine( size_t nCount )
+{
+ for( size_t nIdx = 0; nIdx < nCount; ++nIdx )
+ mxStrm->writeString( OUString('\n') );
+}
+
+void Output::incIndent()
+{
+ OUStringBuffer aBuffer( maIndent );
+ StringHelper::appendChar( aBuffer, ' ', OOX_DUMP_INDENT );
+ maIndent = aBuffer.makeStringAndClear();
+}
+
+void Output::decIndent()
+{
+ if( maIndent.getLength() >= OOX_DUMP_INDENT )
+ maIndent = maIndent.copy( OOX_DUMP_INDENT );
+}
+
+void Output::startTable( sal_Int32 nW1 )
+{
+ startTable( 1, &nW1 );
+}
+
+void Output::startTable( sal_Int32 nW1, sal_Int32 nW2 )
+{
+ sal_Int32 pnColWidths[ 2 ];
+ pnColWidths[ 0 ] = nW1;
+ pnColWidths[ 1 ] = nW2;
+ startTable( 2, pnColWidths );
+}
+
+void Output::startTable( sal_Int32 nW1, sal_Int32 nW2, sal_Int32 nW3, sal_Int32 nW4 )
+{
+ sal_Int32 pnColWidths[ 4 ];
+ pnColWidths[ 0 ] = nW1;
+ pnColWidths[ 1 ] = nW2;
+ pnColWidths[ 2 ] = nW3;
+ pnColWidths[ 3 ] = nW4;
+ startTable( 4, pnColWidths );
+}
+
+void Output::startTable( size_t nColCount, const sal_Int32* pnColWidths )
+{
+ maColPos.clear();
+ maColPos.push_back( 0 );
+ sal_Int32 nColPos = 0;
+ for( size_t nCol = 0; nCol < nColCount; ++nCol )
+ {
+ nColPos = nColPos + pnColWidths[ nCol ];
+ maColPos.push_back( nColPos );
+ }
+}
+
+void Output::tab()
+{
+ tab( mnCol + 1 );
+}
+
+void Output::tab( size_t nCol )
+{
+ mnCol = nCol;
+ if( mnCol < maColPos.size() )
+ {
+ sal_Int32 nColPos = maColPos[ mnCol ];
+ if( maLine.getLength() >= nColPos )
+ maLine.setLength( ::std::max< sal_Int32 >( nColPos - 1, 0 ) );
+ StringHelper::appendChar( maLine, ' ', nColPos - maLine.getLength() );
+ }
+ else
+ {
+ StringHelper::appendChar( maLine, ' ', 2 );
+ }
+}
+
+void Output::endTable()
+{
+ maColPos.clear();
+}
+
+void Output::resetItemIndex( sal_Int64 nIdx )
+{
+ mnItemIdx = nIdx;
+}
+
+void Output::startItem( const String& rItemName )
+{
+ if( mnItemLevel == 0 )
+ {
+ if( (mnMultiLevel > 0) && (maLine.getLength() > 0) )
+ tab();
+ if( rItemName.has() )
+ {
+ writeItemName( rItemName );
+ writeChar( OOX_DUMP_ITEMSEP );
+ }
+ }
+ ++mnItemLevel;
+ mnLastItem = maLine.getLength();
+}
+
+void Output::contItem()
+{
+ if( mnItemLevel > 0 )
+ {
+ if( (maLine.getLength() == 0) || (maLine[ maLine.getLength() - 1 ] != OOX_DUMP_ITEMSEP) )
+ writeChar( OOX_DUMP_ITEMSEP );
+ mnLastItem = maLine.getLength();
+ }
+}
+
+void Output::endItem()
+{
+ if( mnItemLevel > 0 )
+ {
+ maLastItem = maLine.copy( mnLastItem ).makeStringAndClear();
+ if( maLastItem.isEmpty() && mnLastItem > 0 && maLine[ mnLastItem - 1 ] == OOX_DUMP_ITEMSEP )
+ maLine.setLength( mnLastItem - 1 );
+ --mnItemLevel;
+ }
+ if( mnItemLevel == 0 )
+ {
+ if( mnMultiLevel == 0 )
+ newLine();
+ }
+ else
+ contItem();
+}
+
+void Output::startMultiItems()
+{
+ ++mnMultiLevel;
+}
+
+void Output::endMultiItems()
+{
+ if( mnMultiLevel > 0 )
+ --mnMultiLevel;
+ if( mnMultiLevel == 0 )
+ newLine();
+}
+
+void Output::writeChar( sal_Unicode cChar, sal_Int32 nCount )
+{
+ StringHelper::appendEncChar( maLine, cChar, nCount );
+}
+
+void Output::writeAscii( const char* pcStr )
+{
+ if( pcStr )
+ maLine.appendAscii( pcStr );
+}
+
+void Output::writeString( const OUString& rStr )
+{
+ StringHelper::appendEncString( maLine, rStr );
+}
+
+void Output::writeArray( const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
+{
+ const sal_uInt8* pnEnd = pnData ? (pnData + nSize) : nullptr;
+ for( const sal_uInt8* pnByte = pnData; pnByte < pnEnd; ++pnByte )
+ {
+ if( pnByte > pnData )
+ writeChar( cSep );
+ writeHex( *pnByte, false );
+ }
+}
+
+void Output::writeBool( bool bData )
+{
+ StringHelper::appendBool( maLine, bData );
+}
+
+void Output::writeDateTime( const util::DateTime& rDateTime )
+{
+ writeDec( rDateTime.Year, 4, '0' );
+ writeChar( '-' );
+ writeDec( rDateTime.Month, 2, '0' );
+ writeChar( '-' );
+ writeDec( rDateTime.Day, 2, '0' );
+ writeChar( 'T' );
+ writeDec( rDateTime.Hours, 2, '0' );
+ writeChar( ':' );
+ writeDec( rDateTime.Minutes, 2, '0' );
+ writeChar( ':' );
+ writeDec( rDateTime.Seconds, 2, '0' );
+}
+
+bool Output::implIsValid() const
+{
+ return mxStrm.is();
+}
+
+void Output::writeItemName( const String& rItemName )
+{
+ if( rItemName.has() && (rItemName[ 0 ] == '#') )
+ {
+ writeString( rItemName.copy( 1 ) );
+ StringHelper::appendIndex( maLine, mnItemIdx++ );
+ }
+ else
+ writeString( rItemName );
+}
+
+StorageIterator::StorageIterator( const StorageRef& rxStrg ) :
+ mxStrg( rxStrg )
+{
+ if( mxStrg )
+ mxStrg->getElementNames( maNames );
+ maIt = maNames.begin();
+}
+
+StorageIterator::~StorageIterator()
+{
+}
+
+StorageIterator& StorageIterator::operator++()
+{
+ if( maIt != maNames.end() )
+ ++maIt;
+ return *this;
+}
+
+OUString StorageIterator::getName() const
+{
+ OUString aName;
+ if( maIt != maNames.end() )
+ aName = *maIt;
+ return aName;
+}
+
+bool StorageIterator::isStream() const
+{
+ return isValid() && mxStrg->openInputStream( *maIt ).is();
+}
+
+bool StorageIterator::isStorage() const
+{
+ if( !isValid() )
+ return false;
+ StorageRef xStrg = mxStrg->openSubStorage( *maIt, false );
+ return xStrg && xStrg->isStorage();
+}
+
+bool StorageIterator::implIsValid() const
+{
+ return mxStrg && mxStrg->isStorage() && (maIt != maNames.end());
+}
+
+ObjectBase::~ObjectBase()
+{
+}
+
+void ObjectBase::construct( const ConfigRef& rxConfig )
+{
+ mxConfig = rxConfig;
+}
+
+void ObjectBase::construct( const ObjectBase& rParent )
+{
+ *this = rParent;
+}
+
+void ObjectBase::dump()
+{
+ if( isValid() )
+ implDump();
+}
+
+bool ObjectBase::implIsValid() const
+{
+ return isValid( mxConfig );
+}
+
+void ObjectBase::implDump()
+{
+}
+
+void StorageObjectBase::construct( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath )
+{
+ ObjectBase::construct( rParent );
+ mxStrg = rxStrg;
+ maSysPath = rSysPath;
+}
+
+void StorageObjectBase::construct( const ObjectBase& rParent )
+{
+ ObjectBase::construct( rParent );
+ if( ObjectBase::implIsValid() )
+ {
+ mxStrg = cfg().getRootStorage();
+ maSysPath = cfg().getSysFileName();
+ }
+}
+
+bool StorageObjectBase::implIsValid() const
+{
+ return mxStrg && !maSysPath.isEmpty() && ObjectBase::implIsValid();
+}
+
+void StorageObjectBase::implDump()
+{
+ bool bIsStrg = mxStrg->isStorage();
+ bool bIsRoot = mxStrg->isRootStorage();
+ Reference< XInputStream > xBaseStrm;
+ if( !bIsStrg )
+ xBaseStrm = mxStrg->openInputStream( OUString() );
+
+ OUString aSysOutPath = maSysPath;
+ if( bIsRoot ) try
+ {
+ aSysOutPath += OOX_DUMP_DUMPEXT;
+ Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(getContext()));
+ xFileAccess->kill( aSysOutPath );
+ }
+ catch( Exception& )
+ {
+ }
+
+ if( bIsStrg )
+ {
+ extractStorage( mxStrg, OUString(), aSysOutPath );
+ }
+ else if( xBaseStrm.is() )
+ {
+ BinaryInputStreamRef xInStrm( std::make_shared<BinaryXInputStream>( xBaseStrm, false ) );
+ xInStrm->seekToStart();
+ implDumpBaseStream( xInStrm, aSysOutPath );
+ }
+}
+
+void StorageObjectBase::implDumpStream( const Reference< XInputStream >&, const OUString&, const OUString&, const OUString& )
+{
+}
+
+void StorageObjectBase::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
+{
+ extractStorage( rxStrg, rStrgPath, rSysPath );
+}
+
+void StorageObjectBase::implDumpBaseStream( const BinaryInputStreamRef&, const OUString& )
+{
+}
+
+void StorageObjectBase::addPreferredStream( const String& rStrmName )
+{
+ if( rStrmName.has() )
+ maPreferred.emplace_back( rStrmName, false );
+}
+
+void StorageObjectBase::addPreferredStorage( const String& rStrgPath )
+{
+ if( rStrgPath.has() )
+ maPreferred.emplace_back( rStrgPath, true );
+}
+
+OUString StorageObjectBase::getSysFileName(
+ const OUString& rStrmName, std::u16string_view rSysOutPath )
+{
+ // encode all characters < 0x20
+ OUStringBuffer aBuffer;
+ StringHelper::appendEncString( aBuffer, rStrmName, false );
+
+ // replace all characters reserved in file system
+ OUString aFileName = aBuffer.makeStringAndClear();
+ static const sal_Unicode spcReserved[] = { '/', '\\', ':', '*', '?', '<', '>', '|' };
+ for(const sal_Unicode cChar : spcReserved)
+ aFileName = aFileName.replace(cChar, '_');
+
+ // build full path
+ return OUString::Concat(rSysOutPath) + "/" + aFileName;
+}
+
+void StorageObjectBase::extractStream( StorageBase& rStrg, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ BinaryXInputStream aInStrm( rStrg.openInputStream( rStrmName ), true );
+ if( !aInStrm.isEof() )
+ {
+ BinaryXOutputStream aOutStrm( InputOutputHelper::openOutputStream( getContext(), rSysFileName ), true );
+ if( !aOutStrm.isEof() )
+ aInStrm.copyToStream( aOutStrm );
+ }
+ Reference< XInputStream > xDumpStrm = InputOutputHelper::openInputStream( getContext(), rSysFileName );
+ if( xDumpStrm.is() )
+ implDumpStream( xDumpStrm, rStrgPath, rStrmName, rSysFileName );
+}
+
+void StorageObjectBase::extractStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
+{
+ // create directory in file system
+ ::osl::FileBase::RC eRes = ::osl::Directory::create( rSysPath );
+ if( (eRes != ::osl::FileBase::E_None) && (eRes != ::osl::FileBase::E_EXIST) )
+ return;
+
+ // process preferred storages and streams in root storage first
+ if( rStrgPath.isEmpty() )
+ {
+ for (auto const& elemPreferred : maPreferred)
+ extractItem( rxStrg, rStrgPath, elemPreferred.maName, rSysPath, elemPreferred.mbStorage, !elemPreferred.mbStorage );
+ }
+
+ // process children of the storage
+ for( StorageIterator aIt( rxStrg ); aIt.isValid(); ++aIt )
+ {
+ // skip processed preferred items
+ OUString aItemName = aIt.getName();
+ bool bFound = false;
+ if( rStrgPath.isEmpty() )
+ {
+ for (auto const& elemPreferred : maPreferred)
+ {
+ bFound = elemPreferred.maName == aItemName;
+ if (bFound)
+ break;
+ }
+ }
+ if( !bFound )
+ extractItem( rxStrg, rStrgPath, aItemName, rSysPath, aIt.isStorage(), aIt.isStream() );
+ }
+}
+
+void StorageObjectBase::extractItem( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rItemName, std::u16string_view rSysPath, bool bIsStrg, bool bIsStrm )
+{
+ OUString aSysFileName = getSysFileName( rItemName, rSysPath );
+ if( bIsStrg )
+ {
+ OUStringBuffer aStrgPath( rStrgPath );
+ StringHelper::appendToken( aStrgPath, rItemName, '/' );
+ implDumpStorage( rxStrg->openSubStorage( rItemName, false ), aStrgPath.makeStringAndClear(), aSysFileName );
+ }
+ else if( bIsStrm )
+ {
+ extractStream( *rxStrg, rStrgPath, rItemName, aSysFileName );
+ }
+}
+
+OutputObjectBase::~OutputObjectBase()
+{
+}
+
+void OutputObjectBase::construct( const ObjectBase& rParent, const OUString& rSysFileName )
+{
+ ObjectBase::construct( rParent );
+ if( ObjectBase::implIsValid() )
+ {
+ maSysFileName = rSysFileName;
+ mxOut = std::make_shared<Output>( getContext(), rSysFileName + OOX_DUMP_DUMPEXT );
+ }
+}
+
+void OutputObjectBase::construct( const OutputObjectBase& rParent )
+{
+ *this = rParent;
+}
+
+bool OutputObjectBase::implIsValid() const
+{
+ return isValid( mxOut ) && ObjectBase::implIsValid();
+}
+
+void OutputObjectBase::writeEmptyItem( const String& rName )
+{
+ ItemGuard aItem( mxOut, rName );
+}
+
+void OutputObjectBase::writeInfoItem( const String& rName, const String& rData )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeString( rData );
+}
+
+void OutputObjectBase::writeCharItem( const String& rName, sal_Unicode cData )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeChar( OOX_DUMP_STRQUOTE );
+ mxOut->writeChar( cData );
+ mxOut->writeChar( OOX_DUMP_STRQUOTE );
+}
+
+void OutputObjectBase::writeStringItem( const String& rName, const OUString& rData )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeAscii( "(len=" );
+ mxOut->writeDec( rData.getLength() );
+ mxOut->writeAscii( ")," );
+ OUStringBuffer aValue( rData.subView( 0, ::std::min( rData.getLength(), OOX_DUMP_MAXSTRLEN ) ) );
+ StringHelper::enclose( aValue, OOX_DUMP_STRQUOTE );
+ mxOut->writeString( aValue.makeStringAndClear() );
+ if( rData.getLength() > OOX_DUMP_MAXSTRLEN )
+ mxOut->writeAscii( ",cut" );
+}
+
+void OutputObjectBase::writeArrayItem( const String& rName, const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeArray( pnData, nSize, cSep );
+}
+
+void OutputObjectBase::writeDateTimeItem( const String& rName, const util::DateTime& rDateTime )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeDateTime( rDateTime );
+}
+
+void OutputObjectBase::writeGuidItem( const String& rName, const OUString& rGuid )
+{
+ ItemGuard aItem( mxOut, rName );
+ mxOut->writeString( rGuid );
+ aItem.cont();
+ mxOut->writeString( cfg().getStringOption( rGuid, OUString() ) );
+}
+
+InputObjectBase::~InputObjectBase()
+{
+}
+
+void InputObjectBase::construct( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ OutputObjectBase::construct( rParent, rSysFileName );
+ mxStrm = rxStrm;
+}
+
+void InputObjectBase::construct( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm )
+{
+ OutputObjectBase::construct( rParent );
+ mxStrm = rxStrm;
+}
+
+void InputObjectBase::construct( const InputObjectBase& rParent )
+{
+ *this = rParent;
+}
+
+bool InputObjectBase::implIsValid() const
+{
+ return mxStrm && OutputObjectBase::implIsValid();
+}
+
+void InputObjectBase::skipBlock( sal_Int64 nBytes, bool bShowSize )
+{
+ sal_Int64 nEndPos = ::std::min< sal_Int64 >( mxStrm->tell() + nBytes, mxStrm->size() );
+ if( mxStrm->tell() < nEndPos )
+ {
+ if( bShowSize )
+ writeDecItem( "skipped-data-size", static_cast< sal_uInt64 >( nEndPos - mxStrm->tell() ) );
+ mxStrm->seek( nEndPos );
+ }
+}
+
+void InputObjectBase::dumpRawBinary( sal_Int64 nBytes, bool bShowOffset, bool bStream )
+{
+ TableGuard aTabGuard( mxOut,
+ bShowOffset ? 12 : 0,
+ 3 * OOX_DUMP_BYTESPERLINE / 2 + 1,
+ 3 * OOX_DUMP_BYTESPERLINE / 2 + 1,
+ OOX_DUMP_BYTESPERLINE / 2 + 1 );
+
+ sal_Int64 nMaxShowSize = cfg().getIntOption< sal_Int64 >(
+ bStream ? "max-binary-stream-size" : "max-binary-data-size", SAL_MAX_INT64 );
+
+ bool bSeekable = mxStrm->size() >= 0;
+ sal_Int64 nEndPos = bSeekable ? ::std::min< sal_Int64 >( mxStrm->tell() + nBytes, mxStrm->size() ) : 0;
+ sal_Int64 nDumpEnd = bSeekable ? ::std::min< sal_Int64 >( mxStrm->tell() + nMaxShowSize, nEndPos ) : nMaxShowSize;
+ sal_Int64 nPos = bSeekable ? mxStrm->tell() : 0;
+ bool bLoop = true;
+
+ while( bLoop && (nPos < nDumpEnd) )
+ {
+ mxOut->writeHex( static_cast< sal_uInt32 >( nPos ) );
+ mxOut->tab();
+
+ sal_uInt8 pnLineData[ OOX_DUMP_BYTESPERLINE ];
+ sal_Int32 nLineSize = bSeekable ? ::std::min( static_cast< sal_Int32 >( nDumpEnd - mxStrm->tell() ), OOX_DUMP_BYTESPERLINE ) : OOX_DUMP_BYTESPERLINE;
+ sal_Int32 nReadSize = mxStrm->readMemory( pnLineData, nLineSize );
+ bLoop = nReadSize == nLineSize;
+ nPos += nReadSize;
+
+ if( nReadSize > 0 )
+ {
+ const sal_uInt8* pnByte = nullptr;
+ const sal_uInt8* pnEnd = nullptr;
+ for( pnByte = pnLineData, pnEnd = pnLineData + nReadSize; pnByte != pnEnd; ++pnByte )
+ {
+ if( (pnByte - pnLineData) == (OOX_DUMP_BYTESPERLINE / 2) ) mxOut->tab();
+ mxOut->writeHex( *pnByte, false );
+ mxOut->writeChar( ' ' );
+ }
+
+ aTabGuard.tab( 3 );
+ for( pnByte = pnLineData, pnEnd = pnLineData + nReadSize; pnByte != pnEnd; ++pnByte )
+ {
+ if( (pnByte - pnLineData) == (OOX_DUMP_BYTESPERLINE / 2) ) mxOut->tab();
+ mxOut->writeChar( static_cast< sal_Unicode >( (*pnByte < 0x20) ? '.' : *pnByte ) );
+ }
+ mxOut->newLine();
+ }
+ }
+
+ // skip undumped data
+ if( bSeekable )
+ skipBlock( nEndPos - mxStrm->tell() );
+}
+
+void InputObjectBase::dumpBinary( const String& rName, sal_Int64 nBytes, bool bShowOffset )
+{
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( rName );
+ writeDecItem( "size", nBytes );
+ }
+ IndentGuard aIndGuard( mxOut );
+ dumpRawBinary( nBytes, bShowOffset );
+}
+
+void InputObjectBase::dumpRemaining( sal_Int64 nBytes )
+{
+ if( nBytes > 0 )
+ {
+ if( cfg().getBoolOption( "show-trailing-unknown", true ) )
+ dumpBinary( "remaining-data", nBytes, false );
+ else
+ skipBlock( nBytes );
+ }
+}
+
+void InputObjectBase::dumpRemainingTo( sal_Int64 nPos )
+{
+ if( mxStrm->isEof() || (mxStrm->tell() > nPos) )
+ writeInfoItem( "stream-state", OOX_DUMP_ERR_STREAM );
+ else
+ dumpRemaining( nPos - mxStrm->tell() );
+ mxStrm->seek( nPos );
+}
+
+void InputObjectBase::dumpRemainingStream()
+{
+ dumpRemainingTo( mxStrm->size() );
+}
+
+void InputObjectBase::dumpArray( const String& rName, sal_Int32 nBytes, sal_Unicode cSep )
+{
+ sal_Int32 nDumpSize = getLimitedValue< sal_Int32, sal_Int64 >( mxStrm->size() - mxStrm->tell(), 0, nBytes );
+ if( nDumpSize > OOX_DUMP_MAXARRAY )
+ {
+ dumpBinary( rName, nBytes, false );
+ }
+ else if( nDumpSize > 1 )
+ {
+ sal_uInt8 pnData[ OOX_DUMP_MAXARRAY ];
+ mxStrm->readMemory( pnData, nDumpSize );
+ writeArrayItem( rName, pnData, nDumpSize, cSep );
+ }
+ else if( nDumpSize == 1 )
+ dumpHex< sal_uInt8 >( rName );
+}
+
+sal_Unicode InputObjectBase::dumpUnicode( const String& rName )
+{
+ sal_uInt16 nChar = mxStrm->readuInt16();
+ sal_Unicode cChar = static_cast< sal_Unicode >( nChar );
+ writeCharItem( rName( "char" ), cChar );
+ return cChar;
+}
+
+OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc, bool bHideTrailingNul )
+{
+ sal_Int32 nDumpSize = getLimitedValue< sal_Int32, sal_Int64 >( mxStrm->size() - mxStrm->tell(), 0, nLen );
+ OUString aString;
+ if( nDumpSize > 0 )
+ {
+ ::std::vector< char > aBuffer( static_cast< std::size_t >( nLen ) + 1 );
+ sal_Int32 nCharsRead = mxStrm->readMemory(aBuffer.data(), nLen);
+ aBuffer[ nCharsRead ] = 0;
+ aString = OStringToOUString(std::string_view(aBuffer.data()), eTextEnc);
+ }
+ if( bHideTrailingNul )
+ aString = StringHelper::trimTrailingNul( aString );
+ writeStringItem( rName( "text" ), aString );
+ return aString;
+}
+
+OUString InputObjectBase::dumpUnicodeArray( const String& rName, sal_Int32 nLen, bool bHideTrailingNul )
+{
+ OUStringBuffer aBuffer;
+ for( sal_Int32 nIndex = 0; !mxStrm->isEof() && (nIndex < nLen); ++nIndex )
+ {
+ aBuffer.append( static_cast< sal_Unicode >( mxStrm->readuInt16() ) );
+ }
+ OUString aString = aBuffer.makeStringAndClear();
+ if( bHideTrailingNul )
+ aString = StringHelper::trimTrailingNul( aString );
+ writeStringItem( rName( "text" ), aString );
+ return aString;
+}
+
+util::DateTime InputObjectBase::dumpFileTime( const String& rName )
+{
+ util::DateTime aDateTime;
+
+ ItemGuard aItem( mxOut, rName( "file-time" ) );
+ sal_Int64 nFileTime = dumpDec< sal_Int64 >( EMPTY_STRING );
+ // file time is in 10^-7 seconds (100 nanoseconds), convert to nanoseconds
+ nFileTime *= 100;
+ // entire days
+ sal_Int64 nDays = nFileTime / sal_Int64( ::tools::Time::nanoSecPerDay );
+ // number of entire years
+ sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365;
+ // remaining days in the year
+ sal_Int64 nDaysInYear = nDays - (nYears * 365 + nYears / 4 - nYears / 100 + nYears / 400);
+ // the year (file dates start from 1601-01-01)
+ aDateTime.Year = static_cast< sal_uInt16 >( 1601 + nYears );
+ // leap year?
+ bool bLeap = ((aDateTime.Year % 4 == 0) && (aDateTime.Year % 100 != 0)) || (aDateTime.Year % 400 == 0);
+ // static arrays with number of days in month
+ static const sal_Int64 spnDaysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ static const sal_Int64 spnDaysInMonthL[] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ const sal_Int64* pnDaysInMonth = bLeap ? spnDaysInMonthL : spnDaysInMonth;
+ // the month
+ aDateTime.Month = 1;
+ while( nDaysInYear >= *pnDaysInMonth )
+ {
+ nDaysInYear -= *pnDaysInMonth++;
+ ++aDateTime.Month;
+ }
+ // the day
+ aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 );
+ // number of nanoseconds in the day
+ sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::tools::Time::nanoSecPerDay );
+ // nanoseconds
+ aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::tools::Time::nanoSecPerSec );
+ nTimeInDay /= ::tools::Time::nanoSecPerSec;
+ // seconds
+ aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::secondPerMinute );
+ nTimeInDay /= ::tools::Time::secondPerMinute;
+ // minutes
+ aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::minutePerHour );
+ nTimeInDay /= ::tools::Time::minutePerHour;
+ // hours
+ aDateTime.Hours = static_cast< sal_uInt16 >( nTimeInDay );
+
+ writeDateTimeItem( EMPTY_STRING, aDateTime );
+ return aDateTime;
+}
+
+OUString InputObjectBase::dumpGuid( const String& rName )
+{
+ OUStringBuffer aBuffer;
+ sal_uInt32 nData32;
+ sal_uInt16 nData16;
+ sal_uInt8 nData8;
+
+ nData32 = mxStrm->readuInt32();
+ StringHelper::appendHex( aBuffer, nData32, false );
+ aBuffer.append( '-' );
+ nData16 = mxStrm->readuInt16();
+ StringHelper::appendHex( aBuffer, nData16, false );
+ aBuffer.append( '-' );
+ nData16 = mxStrm->readuInt16();
+ StringHelper::appendHex( aBuffer, nData16, false );
+ aBuffer.append( '-' );
+ nData8 = mxStrm->readuChar();
+ StringHelper::appendHex( aBuffer, nData8, false );
+ nData8 = mxStrm->readuChar( );
+ StringHelper::appendHex( aBuffer, nData8, false );
+ aBuffer.append( '-' );
+ for( int nIndex = 0; nIndex < 6; ++nIndex )
+ {
+ nData8 = mxStrm->readuChar( );
+ StringHelper::appendHex( aBuffer, nData8, false );
+ }
+ StringHelper::enclose( aBuffer, '{', '}' );
+ OUString aGuid = aBuffer.makeStringAndClear();
+ writeGuidItem( rName( "guid" ), aGuid );
+ return aGuid;
+}
+
+void InputObjectBase::dumpItem( const ItemFormat& rItemFmt )
+{
+ switch( rItemFmt.meDataType )
+ {
+ case DATATYPE_VOID: break;
+ case DATATYPE_INT8: dumpValue< sal_Int8 >( rItemFmt ); break;
+ case DATATYPE_UINT8: dumpValue< sal_uInt8 >( rItemFmt ); break;
+ case DATATYPE_INT16: dumpValue< sal_Int16 >( rItemFmt ); break;
+ case DATATYPE_UINT16: dumpValue< sal_uInt16 >( rItemFmt ); break;
+ case DATATYPE_INT32: dumpValue< sal_Int32 >( rItemFmt ); break;
+ case DATATYPE_UINT32: dumpValue< sal_uInt32 >( rItemFmt ); break;
+ case DATATYPE_INT64: dumpValue< sal_Int64 >( rItemFmt ); break;
+ case DATATYPE_UINT64: dumpValue< sal_uInt64 >( rItemFmt ); break;
+ case DATATYPE_FLOAT: dumpValue< float >( rItemFmt ); break;
+ case DATATYPE_DOUBLE: dumpValue< double >( rItemFmt ); break;
+ default:;
+ }
+}
+
+BinaryStreamObject::BinaryStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void BinaryStreamObject::dumpBinaryStream( bool bShowOffset )
+{
+ mxStrm->seekToStart();
+ dumpRawBinary( mxStrm->size(), bShowOffset, true );
+ mxOut->emptyLine();
+}
+
+void BinaryStreamObject::implDump()
+{
+ dumpBinaryStream();
+}
+
+void TextStreamObjectBase::construct( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, rtl_TextEncoding eTextEnc, const OUString& rSysFileName )
+{
+ InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+ constructTextStrmObj( eTextEnc );
+}
+
+void TextStreamObjectBase::construct( const OutputObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, rtl_TextEncoding eTextEnc )
+{
+ InputObjectBase::construct( rParent, rxStrm );
+ constructTextStrmObj( eTextEnc );
+}
+
+bool TextStreamObjectBase::implIsValid() const
+{
+ return InputObjectBase::implIsValid() && mxTextStrm;
+}
+
+void TextStreamObjectBase::implDump()
+{
+ implDumpText( *mxTextStrm );
+}
+
+void TextStreamObjectBase::constructTextStrmObj( rtl_TextEncoding eTextEnc )
+{
+ if( mxStrm )
+ mxTextStrm = std::make_shared<TextInputStream>( getContext(), *mxStrm, eTextEnc );
+}
+
+TextLineStreamObject::TextLineStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, rtl_TextEncoding eTextEnc, const OUString& rSysFileName )
+{
+ TextStreamObjectBase::construct( rParent, rxStrm, eTextEnc, rSysFileName );
+}
+
+TextLineStreamObject::TextLineStreamObject( const OutputObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, rtl_TextEncoding eTextEnc )
+{
+ TextStreamObjectBase::construct( rParent, rxStrm, eTextEnc );
+}
+
+void TextLineStreamObject::implDumpText( TextInputStream& rTextStrm )
+{
+ sal_uInt32 nLine = 0;
+ while( !rTextStrm.isEof() )
+ {
+ OUString aLine = rTextStrm.readLine();
+ if( !rTextStrm.isEof() || !aLine.isEmpty() )
+ implDumpLine( aLine, ++nLine );
+ }
+}
+
+void TextLineStreamObject::implDumpLine( const OUString& rLine, sal_uInt32 nLine )
+{
+ TableGuard aTabGuard( mxOut, 8 );
+ mxOut->writeDec( nLine, 6 );
+ mxOut->tab();
+ mxOut->writeString( rLine );
+ mxOut->newLine();
+}
+
+XmlStreamObject::XmlStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ TextStreamObjectBase::construct( rParent, rxStrm, RTL_TEXTENCODING_UTF8, rSysFileName );
+}
+
+void XmlStreamObject::implDumpText( TextInputStream& rTextStrm )
+{
+ /* Buffers a start element and the following element text. Needed to dump
+ matching start/end elements and the element text on the same line. */
+ OUStringBuffer aOldStartElem;
+ // special handling for VML
+ bool bIsVml = o3tl::equalsIgnoreAsciiCase(InputOutputHelper::getFileNameExtension( maSysFileName ), u"vml");
+
+ while( !rTextStrm.isEof() )
+ {
+ // get the next element and the following element text from text stream
+ OUString aElem = rTextStrm.readToChar( '>', true ).trim();
+ OUString aText = rTextStrm.readToChar( '<', false );
+
+ // remove multiple whitespace from element
+ sal_Int32 nPos = 0;
+ while( nPos < aElem.getLength() )
+ {
+ while( (nPos < aElem.getLength()) && (aElem[ nPos ] >= 32) ) ++nPos;
+ if( nPos < aElem.getLength() )
+ aElem = aElem.subView( 0, nPos ) + OUStringChar(' ') + o3tl::trim(aElem.subView( nPos ));
+ ++nPos;
+ }
+
+ sal_Int32 nElemLen = aElem.getLength();
+ if( (nElemLen >= 2) && (aElem[ 0 ] == '<') && (aElem[ nElemLen - 1 ] == '>') )
+ {
+ // determine type of the element
+ bool bSimpleElem = (aElem[ 1 ] == '!') || (aElem[ 1 ] == '?') || (aElem[ nElemLen - 2 ] == '/') ||
+ (bIsVml && (nElemLen == 4) && (aElem[ 1 ] == 'b') && (aElem[ 2 ] == 'r'));
+ bool bStartElem = !bSimpleElem && (aElem[ 1 ] != '/');
+ bool bEndElem = !bSimpleElem && !bStartElem;
+
+ /* Start element or simple element: flush old start element and
+ its text from previous iteration, and start a new indentation
+ level for the new element. Trim whitespace and line breaks from
+ the text of the old start element. */
+ if( (bSimpleElem || bStartElem) && (aOldStartElem.getLength() > 0) )
+ {
+ mxOut->writeString( aOldStartElem.makeStringAndClear().trim() );
+ mxOut->newLine();
+ mxOut->incIndent();
+ }
+
+ /* Start element: remember it and its text, to be able to print the
+ matching end element on the same line in the next iteration. */
+ if( bStartElem )
+ {
+ aOldStartElem.append( aElem + aText );
+ }
+ else
+ {
+ /* End element: if a start element has been remembered in the
+ previous iteration, write it out here untrimmed, to show
+ all whitespace in the element text, and without trailing
+ line break. Code below will add the end element right after
+ it. Otherwise, return to previous indentation level. */
+ if( bEndElem )
+ {
+ if( aOldStartElem.getLength() == 0 )
+ mxOut->decIndent();
+ else
+ mxOut->writeString( aOldStartElem.makeStringAndClear() );
+ }
+
+ /* Write the element. Write following element text in a new
+ line, but only, if it does not contain of white space
+ entirely. */
+ mxOut->writeString( aElem );
+ mxOut->newLine();
+ if( !aText.trim().isEmpty() )
+ {
+ mxOut->writeString( aText );
+ mxOut->newLine();
+ }
+ }
+ }
+ }
+}
+
+void RecordObjectBase::construct( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxBaseStrm, const OUString& rSysFileName,
+ const BinaryInputStreamRef& rxRecStrm, const String& rRecNames, const String& rSimpleRecs )
+{
+ InputObjectBase::construct( rParent, rxRecStrm, rSysFileName );
+ constructRecObjBase( rxBaseStrm, rRecNames, rSimpleRecs );
+}
+
+bool RecordObjectBase::implIsValid() const
+{
+ return mxBaseStrm && InputObjectBase::implIsValid();
+}
+
+void RecordObjectBase::implDump()
+{
+ NameListRef xRecNames = maRecNames.getNameList( cfg() );
+ ItemFormatMap aSimpleRecs( maSimpleRecs.getNameList( cfg() ) );
+
+ while( implStartRecord( *mxBaseStrm, mnRecPos, mnRecId, mnRecSize ) )
+ {
+ // record header
+ mxOut->emptyLine();
+ writeHeader();
+ implWriteExtHeader();
+ IndentGuard aIndGuard( mxOut );
+ sal_Int64 nRecPos = mxStrm->tell();
+
+ // record body
+ if( !mbBinaryOnly && cfg().hasName( xRecNames, mnRecId ) )
+ {
+ ::std::map< sal_Int64, ItemFormat >::const_iterator aIt = aSimpleRecs.find( mnRecId );
+ if( aIt != aSimpleRecs.end() )
+ dumpItem( aIt->second );
+ else
+ implDumpRecordBody();
+ }
+
+ // remaining undumped data
+ if( !mxStrm->isEof() && (mxStrm->tell() == nRecPos) )
+ dumpRawBinary( mnRecSize, false );
+ else
+ dumpRemainingTo( nRecPos + mnRecSize );
+ }
+}
+
+void RecordObjectBase::implWriteExtHeader()
+{
+}
+
+void RecordObjectBase::implDumpRecordBody()
+{
+}
+
+void RecordObjectBase::constructRecObjBase( const BinaryInputStreamRef& rxBaseStrm, const String& rRecNames, const String& rSimpleRecs )
+{
+ mxBaseStrm = rxBaseStrm;
+ maRecNames = rRecNames;
+ maSimpleRecs = rSimpleRecs;
+ mnRecPos = mnRecId = mnRecSize = 0;
+ mbBinaryOnly = false;
+ if( InputObjectBase::implIsValid() )
+ mbShowRecPos = cfg().getBoolOption( "show-record-position", true );
+}
+
+void RecordObjectBase::writeHeader()
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "REC" );
+ if( mbShowRecPos && mxBaseStrm->isSeekable() )
+ writeShortHexItem( "pos", mnRecPos, "CONV-DEC" );
+ writeShortHexItem( "size", mnRecSize, "CONV-DEC" );
+ ItemGuard aItem( mxOut, "id" );
+ mxOut->writeShortHex( mnRecId );
+ addNameToItem( mnRecId, "CONV-DEC" );
+ addNameToItem( mnRecId, maRecNames );
+}
+
+void SequenceRecordObjectBase::construct( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxBaseStrm, const OUString& rSysFileName,
+ const String& rRecNames, const String& rSimpleRecs )
+{
+ BinaryInputStreamRef xRecStrm( std::make_shared<SequenceInputStream>( *mxRecData ) );
+ RecordObjectBase::construct( rParent, rxBaseStrm, rSysFileName, xRecStrm, rRecNames, rSimpleRecs );
+}
+
+bool SequenceRecordObjectBase::implStartRecord( BinaryInputStream& rBaseStrm, sal_Int64& ornRecPos, sal_Int64& ornRecId, sal_Int64& ornRecSize )
+{
+ bool bValid = true;
+ if( rBaseStrm.isSeekable() )
+ {
+ ornRecPos = rBaseStrm.tell();
+ // do not try to overread seekable streams, may cause assertions
+ bValid = ornRecPos < rBaseStrm.size();
+ }
+
+ // read the record header
+ if( bValid )
+ bValid = implReadRecordHeader( rBaseStrm, ornRecId, ornRecSize ) && !rBaseStrm.isEof() && (0 <= ornRecSize) && (ornRecSize <= 0x00100000);
+
+ // read record contents into data sequence
+ if( bValid )
+ {
+ sal_Int32 nRecSize = static_cast< sal_Int32 >( ornRecSize );
+ mxRecData->realloc( nRecSize );
+ bValid = (nRecSize == 0) || (rBaseStrm.readData( *mxRecData, nRecSize ) == nRecSize);
+ mxStrm->seekToStart();
+ }
+ return bValid;
+}
+
+DumperBase::~DumperBase()
+{
+}
+
+bool DumperBase::isImportEnabled() const
+{
+ return !isValid() || cfg().isImportEnabled();
+}
+
+void DumperBase::construct( const ConfigRef& rxConfig )
+{
+ if( isValid( rxConfig ) && rxConfig->isDumperEnabled() )
+ ObjectBase::construct( rxConfig );
+}
+
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/dump/dumperbase.ini b/oox/source/dump/dumperbase.ini
new file mode 100644
index 000000000..efb42651f
--- /dev/null
+++ b/oox/source/dump/dumperbase.ini
@@ -0,0 +1,412 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+#
+# Basic concepts
+#
+# - Character encoding of dumper ini files is UTF-8.
+# - Whitespace characters are generally stripped, e.g. at start and end of
+# lines, before/after equal signs, commas, etc.
+# - Comments start with the hash (#) or semicolon (;) character. Leading
+# whitespace characters are ignored.
+#
+# ----------------------------------------------------------------------------
+
+# Enable entire dumper (default=off). This option does not affect the option
+# 'enable-import'.
+# 0=off, 1=on
+enable-dumper=1
+
+# Enable import after dumping (default=on). Disabling this option allows
+# to dump a file without loading it. This option is independent from the
+# 'enable-dumper' option.
+# 0=off, 1=on
+enable-import=1
+
+# Maximum size of binary stream dumps (default=infinite).
+max-binary-stream-size=65536
+
+# Maximum size of binary data blocks in content dumps (default=infinite).
+max-binary-data-size=128
+
+# Shows unknown trailing data as binary dump (default=on).
+# 0=off, 1=on
+show-trailing-unknown=1
+
+# Shows the absolute stream position of records in the record header field
+# (default=on).
+# 0=off, 1=on
+show-record-position=0
+
+# name lists =================================================================
+#
+# Syntax descriptions
+#
+# - Optional items are enclosed in brackets [].
+# - Optional items that may be repeated are marked with an ellipsis (...).
+# - Items in a set to choose from are separated by vertical lines (|).
+# - <LISTNAME> denotes the name of a list. List names may consist of any non-
+# whitespace characters.
+# - <value>, <firstvalue>, <bitfield>, <bitmask> etc. denote integer values.
+# Decimal and hexadecimal notation is supported, using C/C++ notation.
+# - <bool> denotes a boolean value. Possible values are 0|1|false|true.
+# - <constname> denotes a literal name for a constant or bit.
+#
+# ----------------------------------------------------------------------------
+#
+# constlist
+#
+# Defines names for a list of specific values.
+#
+# Syntax:
+#
+# constlist = <LISTNAME>
+# default = <constname>
+# include = <LISTNAME>[,<LISTNAME>...]
+# exclude = <value>[,<value>...]
+# quote-names = <bool>
+# <value> = <constname>
+# end
+#
+# - default (optional): Declares <constname> as a default name for values not
+# specified in the name list. <constname> may be the empty string. If not
+# set, the literal string '?err:no-name' (unquoted) is the default name.
+# - include (optional): Includes the specified name list(s) into the own list.
+# - exclude (optional): Removes values from the name lists, useful e.g. after
+# a name list has been included.
+# - quote-names (optional): Specifies whether to return the contained names
+# enclosed in single quote (') characters. Default is false.
+#
+# The order of the declarations is important, later declarations may overwrite
+# names generated from earlier declarations.
+#
+# Example:
+#
+# constlist = EXAMPLE-CONSTLIST
+# 1 = my-value
+# include = OTHER-LIST
+# exclude = 2,3
+# 0x0004 = other-value
+# end
+#
+# - Defines the name 'my-value' for the constant 1.
+# - Includes 'OTHER-LIST' which may overwrite the name of the constant 1.
+# - Excludes the names of constants 2 and 3, which may have been included from
+# the name list 'OTHER-LIST'.
+# - Defines the name 'other-value' for the constant 4, which may overwrite the
+# name of this constant included from the name list 'OTHER-LIST'.
+#
+# ----------------------------------------------------------------------------
+#
+# multilist
+#
+# Defines names for contiguous ranges of values.
+#
+# Syntax:
+#
+# multilist = <LISTNAME>
+# default = <constname>
+# include = <LISTNAME>[,<LISTNAME>...]
+# exclude = <value>[,<value>...]
+# ignore-empty = <bool>
+# <firstvalue> = <constname>[,<constname>...]
+# end
+#
+# - default (optional): See constlist above.
+# - include (optional): See constlist above.
+# - exclude (optional): See constlist above.
+# - ignore-empty (optional): Specifies whether to skip empty names in a list.
+# - True = skips an empty entry, the default name will be generated.
+# - False = creates an empty string for the entry.
+# Default is true (skip empty entries).
+#
+# Examples:
+#
+# multilist = EXAMPLE-MULTILIST
+# 0 = value0,value1,,value3
+# 8 = value8
+# end
+#
+# - Defines the names 'value0' for the constant 0, 'value1' for the constant
+# 1, 'value3' for the constant 3, and 'value8' for the constant 8.
+#
+# multilist = EXAMPLE-MULTILIST-2
+# include = EXAMPLE-MULTILIST
+# ignore-empty = false
+# default = other
+# end
+#
+# - Same as example above (includes EXAMPLE-MULTILIST), but defines the empty
+# string for the constant 2. Other constants (less than 0 or greater than 3
+# and not equal to 8) get the default name 'other'.
+#
+# ----------------------------------------------------------------------------
+#
+# shortlist
+#
+# Defines names for a contiguous range of values. The entire list definition
+# is given in a single text line.
+#
+# Syntax:
+#
+# shortlist = <LISTNAME>,<firstvalue>,<constname>[,<constname>...]
+#
+# Uses default settings of the multi-list (i.e. skips empty entries).
+#
+# ----------------------------------------------------------------------------
+#
+# flagslist
+#
+# Defines names for single bits in a bit field.
+#
+# Syntax:
+#
+# flagslist = <LISTNAME>
+# include = <LISTNAME>[,<LISTNAME>...]
+# exclude = <bitfield>[,<bitfield>...]
+# ignore = <bitfield>
+# <bitmask> = <cname> | !<cname> | :<cname> | !<cname0>!<cname1>
+# end
+#
+# - include (optional): See constlist above.
+# - exclude (optional): See constlist above.
+# - ignore (optional): Specifies bits to be ignored. Bits without an explicit
+# name and not set in this declaration will be shown as unknown. Default is
+# to not ignore a bit.
+# - <bitmask>: The bit to be named. Must be a value with a single bit set.
+# - <cname> - Sets a name for the bit that will be shown if the bit is set.
+# Does not show anything if the bit is cleared.
+# - !<cname> - Sets a name for the bit that will be shown if the bit is
+# cleared. Does not show anything if the bit is set.
+# - :<cname> - Sets a name for the bit that will always be shown together
+# with the actual state of the bit, appended as ':on' or ':off'.
+# - !<cname0>!<cname1> - Sets a name for both the cleared bit (cname0), and
+# for the set bit (cname1).
+#
+# ----------------------------------------------------------------------------
+#
+# combilist
+#
+# Defines names for single bits and for embedded values in a bit field. This
+# is an extension of the flagslist described above.
+#
+# Syntax:
+#
+# combilist = <LISTNAME>
+# include = <LISTNAME>[,<LISTNAME>...]
+# exclude = <bitmask>[,<bitmask>...]
+# ignore = <bitfield>
+# <bitmask> = <cname> | !<cname> | :<cname> | !<cname0>!<cname1>
+# <bitfield> = <datatype>,<dataformat>,<bitfieldname>[,<LISTNAME>[,options...]]
+# end
+#
+# - include (optional): See constlist above.
+# - exclude (optional): See constlist above.
+# - ignore (optional): See flagslist above.
+# - <bitmask>: See flagslist above.
+# - <bitfield>: The mask of the embedded bitfield. Must be a value with
+# exactly one sequence of at least 2 consecutive bits.
+# - <datatype>: [u]int8 | [u]int16 | [u]int32 | [u]int64 | float | double
+# - <dataformat>: dec | hex | shorthex | bin | fix | bool
+# - <bitfieldname>: The name of the embedded bitfield.
+# - <LISTAME>: Optional name list with names for the values of the embedded
+# bitfield.
+# - options: Additional options for this bitfield:
+# - filter = <filterbitfield>~<filtervalue>: If set, the entire bitfield
+# will only be written, if the complete data item currently dumped
+# contains exactly the value specified in <filtervalue> in the bitfield
+# specified in <filterbitfield>. Otherwise, nothing is written. It is
+# possible to specify multiple filter rules for this bitfield. In that
+# case, the bitfield will be written, if at least one filter rule
+# applies for the current data item.
+# - noshift = <bool>: If set to 'true', the extracted value will be
+# shifted to the right (normalized). If set to 'false', the value will
+# be written unshifted. Default is 'true'.
+#
+# ----------------------------------------------------------------------------
+#
+# unitconverter
+#
+# Converts values and appends a unit name.
+#
+# Syntax:
+#
+# unitconverter = <LISTNAME>,[/]<factor>[,<unitname>]
+#
+# ----------------------------------------------------------------------------
+
+unitconverter=CONV-DEC,1
+unitconverter=CONV-PERCENT,1,%
+unitconverter=CONV-FLOAT-TO-PERC,100,%
+unitconverter=CONV-DEG,1,°
+unitconverter=CONV-HMM-TO-CM,/1000,cm
+unitconverter=CONV-INCH-TO-CM,2.54,cm
+unitconverter=CONV-PT-TO-CM,/28.346457,cm
+unitconverter=CONV-PT1616-TO-CM,/1857713.4,cm
+unitconverter=CONV-TWIP-TO-CM,/566.92913,cm
+unitconverter=CONV-TWIP-TO-PT,/20,pt
+unitconverter=CONV-EMU-TO-CM,/36000,cm
+
+constlist=BOOLEAN
+ 0=FALSE
+ default=TRUE
+end
+
+combilist=RK-FLAGS
+ 0x00000001=div-100
+ 0x00000002=integer
+ 0xFFFFFFFC=int32,hex,value
+end
+
+constlist=CHARSET
+ 0=win-1252-latin-1
+ 1=system-default
+ 2=symbol
+ 77=apple-roman
+ 128=win-932-japanese-shift-jis
+ 129=win-949-korean-hangul
+ 130=win-1361-korean-johab
+ 134=win-936-chinese-simplified-gbk
+ 136=win-950-chinese-traditional-big5
+ 161=win-1253-greek
+ 162=win-1254-turkish
+ 163=win-1258-vietnamese
+ 177=win-1255-hebrew
+ 178=win-1256-arabic
+ 186=win-1257-baltic
+ 204=win-1251-cyrillic
+ 222=win-874-thai
+ 238=win-1250-latin-2-central-european
+ 255=ibm-850-latin-1
+end
+
+combilist=FONT-PITCHFAMILY
+ 0x0F=uint8,dec,pitch,FONT-PITCH
+ 0xF0=uint8,dec,family,FONT-FAMILY
+end
+
+constlist=FONT-WEIGHT
+ 400=normal
+ 700=bold
+end
+
+shortlist=FONT-PITCH,0,unknown,fixed,variable
+shortlist=FONT-FAMILY,0,unknown,roman,swiss,modern,script,decorative
+
+constlist=CODEPAGES
+ 367=ascii
+ 437=ibm-437-us
+ 708=iso-8859-6
+ 720=ibm-720-arabic
+ 737=ibm-737-greek
+ 775=ibm-775-baltic
+ 850=ibm-850-latin-1
+ 852=ibm-852-latin-2-central-european
+ 855=ibm-855-cyrillic
+ 857=ibm-857-turkish
+ 858=ibm-858-multilingual-latin-1-with-euro
+ 860=ibm-860-portuguese
+ 861=ibm-861-icelandic
+ 862=ibm-862-hebrew
+ 863=ibm-863-canadian-french
+ 864=ibm-864-arabic
+ 865=ibm-865-nordic
+ 866=ibm-866-cyrillic-russian
+ 869=ibm-869-greek-modern
+ 874=win-874-thai
+ 932=win-932-japanese-shift-jis
+ 936=win-936-chinese-simplified-gbk
+ 949=win-949-korean-wansung
+ 950=win-950-chinese-traditional-big5
+ 1200=utf-16
+ 1250=win-1250-latin-2-central-european
+ 1251=win-1251-cyrillic
+ 1252=win-1252-latin-1
+ 1253=win-1253-greek
+ 1254=win-1254-turkish
+ 1255=win-1255-hebrew
+ 1256=win-1256-arabic
+ 1257=win-1257-baltic
+ 1258=win-1258-vietnamese
+ 1361=win-1361-korean-johab
+ 10000=apple-roman
+ 10001=apple-japanese
+ 10002=apple-chinese-traditional
+ 10003=apple-korean
+ 10004=apple-arabic
+ 10005=apple-hebrew
+ 10006=apple-greek
+ 10007=apple-cyrillic
+ 10008=apple-chinese-simplified
+ 10010=apple-romanian
+ 10017=apple-ukrainian
+ 10029=apple-central-european-with-euro
+ 10079=apple-icelandic
+ 10081=apple-turkish
+ 10082=apple-croatian
+ 20127=ascii
+ 20866=koi8-r
+ 21866=koi8-u
+ 28591=iso-8859-1
+ 28592=iso-8859-2
+ 28593=iso-8859-3
+ 28594=iso-8859-4
+ 28595=iso-8859-5
+ 28596=iso-8859-6
+ 28597=iso-8859-7
+ 28598=iso-8859-8
+ 28599=iso-8859-9
+ 28605=iso-8859-15
+ 32768=apple-romanian
+ 32769=win-1252-latin-1
+ 50220=iso-2022-jp
+ 50225=iso-2022-kr
+ 51932=euc-jp
+ 51936=euc-cn
+ 51949=euc-kr
+ 65000=utf-7
+ 65001=utf-8
+end
+
+multilist=COUNTRY
+ 1=usa,canada,latin-america,,,,russia
+ 20=egypt
+ 30=greece,netherlands,belgium,france,spain,,hungary,,,italy
+ 40=,switzerland,,austria,uk,denmark,sweden,norway,poland,germany
+ 50=,,mexico,,,brazil
+ 60=,australia,,,new-zealand,,thailand
+ 80=,japan,korea,,vietnam,,china
+ 90=turkey
+ 210=,,,algeria,,,morocco,,libya
+ 350=,portugal,,,iceland,,,,finland
+ 420=czech
+ 880=,,,,,,taiwan
+ 960=,lebanon,jordan,syria,iraq,kuwait,saudi-arabia
+ 970=,uae,israel,,qatar
+ 980=,iran
+end
+
+multilist=SYSTEMCOLOR
+ 0x00=scrollbar,desktop,active-title,inactive-title,menu,window-back,window-frame,menu-text
+ 0x08=window-text,active-title-text,active-border,inactive-border,app-workspace,highlight,highlight-text,button-face
+ 0x10=button-shadow,disabled-text,button-text,inactive-title-text,button-highlight,button-dark-shadow,button-light-shadow,tooltip-text
+ 0x18=tooltip-back,,hot-light,active-title-2,inactive-title-2,menu-highlight,menubar
+end
+
+# ============================================================================
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
new file mode 100644
index 000000000..92e67c045
--- /dev/null
+++ b/oox/source/dump/oledumper.cxx
@@ -0,0 +1,2085 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <oox/dump/oledumper.hxx>
+
+#include <rtl/tencinfo.h>
+#include <o3tl/string_view.hxx>
+#include <oox/ole/vbainputstream.hxx>
+
+#ifdef DBG_UTIL
+
+namespace oox::dump {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+OUString OleInputObjectBase::dumpAnsiString32( const String& rName )
+{
+ return dumpCharArray( rName, mxStrm->readInt32(), RTL_TEXTENCODING_MS_1252 );
+}
+
+OUString OleInputObjectBase::dumpUniString32( const String& rName )
+{
+ return dumpUnicodeArray( rName, mxStrm->readInt32() );
+}
+
+sal_Int32 OleInputObjectBase::dumpStdClipboardFormat( const String& rName )
+{
+ return dumpDec< sal_Int32 >( rName( "clipboard-format" ), "OLE-STD-CLIPBOARD-FORMAT" );
+}
+
+OUString OleInputObjectBase::dumpAnsiString32OrStdClip( const String& rName )
+{
+ sal_Int32 nLen = mxStrm->readInt32();
+ return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpCharArray( rName, nLen, RTL_TEXTENCODING_MS_1252 );
+}
+
+OUString OleInputObjectBase::dumpUniString32OrStdClip( const String& rName )
+{
+ sal_Int32 nLen = mxStrm->readInt32();
+ return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpUnicodeArray( rName, nLen );
+}
+
+void OleInputObjectBase::writeOleColorItem( const String& rName, sal_uInt32 nColor )
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeHexItem( rName, nColor, "OLE-COLOR" );
+}
+
+sal_uInt32 OleInputObjectBase::dumpOleColor( const String& rName )
+{
+ sal_uInt32 nOleColor = mxStrm->readuInt32();
+ writeOleColorItem( rName, nOleColor );
+ return nOleColor;
+}
+
+StdFontObject::StdFontObject( const InputObjectBase& rParent )
+{
+ construct( rParent );
+}
+
+void StdFontObject::implDump()
+{
+ dumpDec< sal_uInt8 >( "version" );
+ dumpDec< sal_uInt16 >( "charset", "CHARSET" );
+ dumpHex< sal_uInt8 >( "flags", "STDFONT-FLAGS" );
+ dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" );
+ dumpDec< sal_uInt32 >( "height", "STDFONT-HEIGHT" );
+ dumpCharArray( "name", mxStrm->readuInt8(), RTL_TEXTENCODING_ASCII_US );
+}
+
+StdPicObject::StdPicObject( const InputObjectBase& rParent )
+{
+ construct( rParent );
+}
+
+void StdPicObject::implDump()
+{
+ dumpHex< sal_uInt32 >( "identifier", "STDPIC-ID" );
+ sal_uInt32 nSize = dumpHex< sal_uInt32 >( "image-size", "CONV-DEC" );
+ dumpBinary( "image-data", nSize );
+}
+
+OleStreamObject::OleStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ construct( rParent, rxStrm, rSysFileName );
+}
+
+OleCompObjObject::OleCompObjObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) :
+ OleStreamObject( rParent, rxStrm, rSysFileName )
+{
+}
+
+void OleCompObjObject::implDump()
+{
+ dumpUnused( 4 );
+ dumpDec< sal_uInt32 >( "version" );
+ dumpUnused( 20 );
+ dumpAnsiString32( "ansi-display-name" );
+ dumpAnsiString32OrStdClip( "ansi-clipboard-format" );
+ if( mxStrm->getRemaining() >= 4 )
+ {
+ sal_Int32 nLen = mxStrm->readInt32();
+ if( (0 <= nLen) && (nLen <= 40) )
+ {
+ dumpCharArray( "ansi-unused", nLen, RTL_TEXTENCODING_MS_1252 );
+ if( (mxStrm->getRemaining() >= 4) && (dumpHex< sal_Int32 >( "unicode-marker" ) == 0x71B239F4) )
+ {
+ dumpUniString32( "unicode-display-name" );
+ dumpUniString32OrStdClip( "unicode-clipboard-format" );
+ dumpUniString32( "unicode-unused" );
+ }
+ }
+ else
+ writeDecItem( "length", nLen );
+ }
+ dumpRemainingStream();
+}
+
+namespace {
+
+const sal_Int32 OLEPROP_ID_DICTIONARY = 0;
+const sal_Int32 OLEPROP_ID_CODEPAGE = 1;
+
+const sal_uInt16 OLEPROP_TYPE_INT16 = 2;
+const sal_uInt16 OLEPROP_TYPE_INT32 = 3;
+const sal_uInt16 OLEPROP_TYPE_FLOAT = 4;
+const sal_uInt16 OLEPROP_TYPE_DOUBLE = 5;
+const sal_uInt16 OLEPROP_TYPE_DATE = 7;
+const sal_uInt16 OLEPROP_TYPE_STRING = 8;
+const sal_uInt16 OLEPROP_TYPE_STATUS = 10;
+const sal_uInt16 OLEPROP_TYPE_BOOL = 11;
+const sal_uInt16 OLEPROP_TYPE_VARIANT = 12;
+const sal_uInt16 OLEPROP_TYPE_INT8 = 16;
+const sal_uInt16 OLEPROP_TYPE_UINT8 = 17;
+const sal_uInt16 OLEPROP_TYPE_UINT16 = 18;
+const sal_uInt16 OLEPROP_TYPE_UINT32 = 19;
+const sal_uInt16 OLEPROP_TYPE_INT64 = 20;
+const sal_uInt16 OLEPROP_TYPE_UINT64 = 21;
+const sal_uInt16 OLEPROP_TYPE_STRING8 = 30;
+const sal_uInt16 OLEPROP_TYPE_STRING16 = 31;
+const sal_uInt16 OLEPROP_TYPE_FILETIME = 64;
+const sal_uInt16 OLEPROP_TYPE_BLOB = 65;
+const sal_uInt16 OLEPROP_TYPE_STREAM = 66;
+const sal_uInt16 OLEPROP_TYPE_STORAGE = 67;
+const sal_uInt16 OLEPROP_TYPE_CLIPFMT = 71;
+
+const sal_uInt16 OLEPROP_TYPE_SIMPLE = 0x0000;
+const sal_uInt16 OLEPROP_TYPE_VECTOR = 0x1000;
+const sal_uInt16 OLEPROP_TYPE_ARRAY = 0x2000;
+
+const sal_uInt16 CODEPAGE_UNICODE = 1200;
+
+const sal_uInt32 AX_STRING_COMPRESSED = 0x80000000;
+
+} // namespace
+
+OlePropertyStreamObject::OlePropertyStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ construct( rParent, rxStrm, rSysFileName );
+}
+
+void OlePropertyStreamObject::implDump()
+{
+ OUStringVector aGuidVec;
+ ::std::vector< sal_uInt32 > aStartPosVec;
+
+ // dump header
+ writeEmptyItem( "HEADER" );
+ {
+ IndentGuard aIndGuard( mxOut );
+ dumpHex< sal_uInt16 >( "byte-order", "OLEPROP-BYTE-ORDER" );
+ dumpDec< sal_uInt16 >( "version" );
+ dumpDec< sal_uInt16 >( "os-minor" );
+ dumpDec< sal_uInt16 >( "os-type", "OLEPROP-OSTYPE" );
+ dumpGuid( "guid" );
+ sal_Int32 nSectCount = dumpDec< sal_Int32 >( "section-count" );
+
+ // dump table of section positions
+ {
+ TableGuard aTabGuard( mxOut, 15, 60 );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < nSectCount); ++nSectIdx )
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "#section" );
+ aGuidVec.push_back( dumpGuid( "guid" ) );
+ aStartPosVec.push_back( dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" ) );
+ }
+ }
+ }
+ mxOut->emptyLine();
+
+ // dump sections
+ for( size_t nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < aStartPosVec.size()); ++nSectIdx )
+ dumpSection( aGuidVec[ nSectIdx ], aStartPosVec[ nSectIdx ] );
+}
+
+void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nStartPos )
+{
+ // property ID names
+ mxPropIds = cfg().createNameList< ConstList >( "OLEPROP-IDS" );
+ OUString aGuidName = cfg().getStringOption( rGuid, OUString() );
+ if ( aGuidName == "GlobalDocProp" )
+ mxPropIds->includeList( cfg().getNameList( "OLEPROP-GLOBALIDS" ) );
+ else if ( aGuidName == "BuiltinDocProp" )
+ mxPropIds->includeList( cfg().getNameList( "OLEPROP-BUILTINIDS" ) );
+ else
+ mxPropIds->includeList( cfg().getNameList( "OLEPROP-BASEIDS" ) );
+
+ // property ID/position map
+ typedef ::std::map< sal_Int32, sal_uInt32 > PropertyPosMap;
+ PropertyPosMap aPropMap;
+
+ // dump section header line
+ writeSectionHeader( rGuid, nStartPos );
+
+ // seek to section
+ IndentGuard aIndGuard( mxOut );
+ if( startElement( nStartPos ) )
+ {
+ // dump section header
+ dumpDec< sal_Int32 >( "size" );
+ sal_Int32 nPropCount = dumpDec< sal_Int32 >( "property-count" );
+
+ // dump table of property positions
+ {
+ TableGuard aTabGuard( mxOut, 15, 25 );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nPropIdx = 0; !mxStrm->isEof() && (nPropIdx < nPropCount); ++nPropIdx )
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "#property" );
+ sal_Int32 nPropId = dumpDec< sal_Int32 >( "id", mxPropIds );
+ sal_uInt32 nPropPos = nStartPos + dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" );
+ aPropMap[ nPropId ] = nPropPos;
+ }
+ }
+ }
+ mxOut->emptyLine();
+
+ // code page property
+ meTextEnc = RTL_TEXTENCODING_MS_1252;
+ mbIsUnicode = false;
+ PropertyPosMap::iterator aCodePageIt = aPropMap.find( OLEPROP_ID_CODEPAGE );
+ if( aCodePageIt != aPropMap.end() )
+ {
+ dumpCodePageProperty( aCodePageIt->second );
+ aPropMap.erase( aCodePageIt );
+ }
+
+ // dictionary property
+ PropertyPosMap::iterator aDictIt = aPropMap.find( OLEPROP_ID_DICTIONARY );
+ if( aDictIt != aPropMap.end() )
+ {
+ dumpDictionaryProperty( aDictIt->second );
+ aPropMap.erase( aDictIt );
+ }
+
+ // other properties
+ for (auto const& elem : aPropMap)
+ dumpProperty( elem.first, elem.second );
+
+ // remove the user defined list of property ID names
+ cfg().eraseNameList( "OLEPROP-IDS" );
+}
+
+void OlePropertyStreamObject::dumpProperty( sal_Int32 nPropId, sal_uInt32 nStartPos )
+{
+ writePropertyHeader( nPropId, nStartPos );
+ IndentGuard aIndGuard( mxOut );
+ if( startElement( nStartPos ) )
+ dumpPropertyContents( nPropId );
+ mxOut->emptyLine();
+}
+
+void OlePropertyStreamObject::dumpCodePageProperty( sal_uInt32 nStartPos )
+{
+ writePropertyHeader( OLEPROP_ID_CODEPAGE, nStartPos );
+ IndentGuard aIndGuard( mxOut );
+ if( startElement( nStartPos ) )
+ {
+ sal_uInt16 nType = dumpPropertyType();
+ if( nType == OLEPROP_TYPE_INT16 )
+ {
+ sal_uInt16 nCodePage = dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" );
+ rtl_TextEncoding eNewTextEnc = rtl_getTextEncodingFromWindowsCodePage( nCodePage );
+ if( eNewTextEnc != RTL_TEXTENCODING_DONTKNOW )
+ meTextEnc = eNewTextEnc;
+ mbIsUnicode = nCodePage == CODEPAGE_UNICODE;
+ }
+ else
+ dumpPropertyContents( OLEPROP_ID_CODEPAGE );
+ }
+ mxOut->emptyLine();
+}
+
+void OlePropertyStreamObject::dumpDictionaryProperty( sal_uInt32 nStartPos )
+{
+ writePropertyHeader( OLEPROP_ID_DICTIONARY, nStartPos );
+ IndentGuard aIndGuard( mxOut );
+ if( startElement( nStartPos ) )
+ {
+ sal_Int32 nCount = dumpDec< sal_Int32 >( "count" );
+ for( sal_Int32 nIdx = 0; !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ TableGuard aTabGuard( mxOut, 10, 20 );
+ sal_Int32 nId = dumpDec< sal_Int32 >( "id" );
+ OUString aName = dumpString8( "name" );
+ if( mxPropIds )
+ mxPropIds->setName( nId, aName );
+ }
+ }
+ mxOut->emptyLine();
+}
+
+sal_uInt16 OlePropertyStreamObject::dumpPropertyContents( sal_Int32 nPropId )
+{
+ sal_uInt16 nType = dumpPropertyType();
+ sal_uInt16 nBaseType = static_cast< sal_uInt16 >( nType & 0x0FFF );
+ sal_uInt16 nArrayType = static_cast< sal_uInt16 >( nType & 0xF000 );
+ switch( nArrayType )
+ {
+ case OLEPROP_TYPE_SIMPLE: dumpPropertyValue( nPropId, nBaseType ); break;
+ case OLEPROP_TYPE_VECTOR: dumpPropertyVector( nPropId, nBaseType ); break;
+ case OLEPROP_TYPE_ARRAY: /*TODO*/; break;
+ }
+ return nType;
+}
+
+void OlePropertyStreamObject::dumpPropertyValue( sal_Int32 nPropId, sal_uInt16 nBaseType )
+{
+ switch( nBaseType )
+ {
+ case OLEPROP_TYPE_INT16: dumpDec< sal_Int16 >( "value" ); break;
+ case OLEPROP_TYPE_INT32: dumpDec< sal_Int32 >( "value" ); break;
+ case OLEPROP_TYPE_FLOAT: dumpDec< float >( "value" ); break;
+ case OLEPROP_TYPE_DOUBLE: dumpDec< double >( "value" ); break;
+ case OLEPROP_TYPE_DATE: dumpDec< double >( "date" ); break;
+ case OLEPROP_TYPE_STRING: dumpString8( "value" ); break;
+ case OLEPROP_TYPE_STATUS: dumpHex< sal_Int32 >( "status" ); break;
+ case OLEPROP_TYPE_BOOL: dumpBool< sal_Int16 >( "value" ); break;
+ case OLEPROP_TYPE_VARIANT: dumpPropertyContents( nPropId ); break;
+ case OLEPROP_TYPE_INT8: dumpDec< sal_Int8 >( "value" ); break;
+ case OLEPROP_TYPE_UINT8: dumpDec< sal_uInt8 >( "value" ); break;
+ case OLEPROP_TYPE_UINT16: dumpDec< sal_uInt16 >( "value" ); break;
+ case OLEPROP_TYPE_UINT32: dumpDec< sal_uInt32 >( "value" ); break;
+ case OLEPROP_TYPE_INT64: dumpDec< sal_Int64 >( "value" ); break;
+ case OLEPROP_TYPE_UINT64: dumpDec< sal_uInt64 >( "value" ); break;
+ case OLEPROP_TYPE_STRING8: dumpString8( "value" ); break;
+ case OLEPROP_TYPE_STRING16: dumpString16( "value" ); break;
+ case OLEPROP_TYPE_FILETIME: dumpFileTime( "file-time" ); break;
+ case OLEPROP_TYPE_BLOB: dumpBlob( nPropId, "data" ); break;
+ case OLEPROP_TYPE_STREAM: dumpString8( "stream-name" ); break;
+ case OLEPROP_TYPE_STORAGE: dumpString8( "storage-name" ); break;
+ case OLEPROP_TYPE_CLIPFMT: dumpBlob( nPropId, "clip-data" ); break;
+ }
+}
+
+void OlePropertyStreamObject::dumpPropertyVector( sal_Int32 nPropId, sal_uInt16 nBaseType )
+{
+ sal_Int32 nElemCount = dumpDec< sal_Int32 >( "element-count" );
+ for( sal_Int32 nElemIdx = 0; !mxStrm->isEof() && (nElemIdx < nElemCount); ++nElemIdx )
+ {
+ mxOut->resetItemIndex( nElemIdx );
+ writeEmptyItem( "#element" );
+ IndentGuard aIndGuard( mxOut );
+ dumpPropertyValue( nPropId, nBaseType );
+ }
+}
+
+sal_uInt16 OlePropertyStreamObject::dumpPropertyType()
+{
+ return static_cast< sal_uInt16 >( dumpHex< sal_Int32 >( "type", "OLEPROP-TYPE" ) & 0xFFFF );
+}
+
+void OlePropertyStreamObject::dumpBlob( sal_Int32 nPropId, const String& rName )
+{
+ sal_Int32 nSize = dumpDec< sal_Int32 >( "data-size" );
+ if( nSize > 0 )
+ {
+ OUString aPropName = mxPropIds->getName( cfg(), nPropId );
+ if( aPropName == "'_PID_HLINKS'" )
+ dumpHlinks( nSize );
+ else
+ dumpBinary( rName, nSize );
+ }
+}
+
+OUString OlePropertyStreamObject::dumpString8( const String& rName )
+{
+ sal_Int32 nLen = dumpDec< sal_Int32 >( "string-len" );
+ return mbIsUnicode ? dumpCharArray16( rName, nLen ) : dumpCharArray8( rName, nLen );
+}
+
+OUString OlePropertyStreamObject::dumpCharArray8( const String& rName, sal_Int32 nLen )
+{
+ sal_Int32 nNewLen = getLimitedValue< sal_Int32, sal_Int32 >( nLen, 0, 1024 );
+ OUString aData = mxStrm->readCharArrayUC( nNewLen, meTextEnc );
+ writeStringItem( rName, aData );
+ return aData;
+}
+
+OUString OlePropertyStreamObject::dumpString16( const String& rName )
+{
+ sal_Int32 nLen = dumpDec< sal_Int32 >( "string-len" );
+ return dumpCharArray16( rName, nLen );
+}
+
+OUString OlePropertyStreamObject::dumpCharArray16( const String& rName, sal_Int32 nLen )
+{
+ sal_Int32 nNewLen = getLimitedValue< sal_Int32, sal_Int32 >( nLen, 0, 1024 );
+ OUString aData = mxStrm->readUnicodeArray( nNewLen );
+ writeStringItem( rName, aData );
+ if( nNewLen & 1 ) dumpUnused( 2 ); // always padding to 32bit
+ return aData;
+}
+
+bool OlePropertyStreamObject::dumpTypedProperty( const String& rName, sal_uInt16 nExpectedType )
+{
+ writeEmptyItem( rName );
+ IndentGuard aIndGuard( mxOut );
+ return (dumpPropertyContents( -1 ) == nExpectedType) && !mxStrm->isEof();
+}
+
+void OlePropertyStreamObject::dumpHlinks( sal_Int32 nSize )
+{
+ sal_Int64 nEndPos = mxStrm->tell() + nSize;
+ sal_Int32 nCount = dumpDec< sal_Int32 >( "property-count" );
+ bool bValid = true;
+ for( sal_Int32 nHlinkIndex = 0, nHlinkCount = nCount / 6; bValid && !mxStrm->isEof() && (nHlinkIndex < nHlinkCount); ++nHlinkIndex )
+ {
+ writeEmptyItem( "HYPERLINK" );
+ IndentGuard aIndGuard( mxOut );
+ bValid =
+ dumpTypedProperty( "hash", OLEPROP_TYPE_INT32 ) &&
+ dumpTypedProperty( "app", OLEPROP_TYPE_INT32 ) &&
+ dumpTypedProperty( "shape-id", OLEPROP_TYPE_INT32 ) &&
+ dumpTypedProperty( "info", OLEPROP_TYPE_INT32 ) &&
+ dumpTypedProperty( "target", OLEPROP_TYPE_STRING16 ) &&
+ dumpTypedProperty( "location", OLEPROP_TYPE_STRING16 );
+ }
+ dumpRemainingTo( nEndPos );
+}
+
+bool OlePropertyStreamObject::startElement( sal_uInt32 nStartPos )
+{
+ mxStrm->seek( nStartPos );
+ if( mxStrm->isEof() )
+ writeInfoItem( "stream-state", OOX_DUMP_ERR_STREAM );
+ return !mxStrm->isEof();
+}
+
+void OlePropertyStreamObject::writeSectionHeader( const OUString& rGuid, sal_uInt32 nStartPos )
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "SECTION" );
+ writeHexItem( "pos", nStartPos, "CONV-DEC" );
+ writeGuidItem( "guid", rGuid );
+}
+
+void OlePropertyStreamObject::writePropertyHeader( sal_Int32 nPropId, sal_uInt32 nStartPos )
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( "PROPERTY" );
+ writeHexItem( "pos", nStartPos, "CONV-DEC" );
+ writeDecItem( "id", nPropId, mxPropIds );
+}
+
+OleStorageObject::OleStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath )
+{
+ construct( rParent, rxStrg, rSysPath );
+}
+
+void OleStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& /*rStrgPath*/, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ if ( rStrmName == "\001CompObj" )
+ OleCompObjObject( *this, rxStrm, rSysFileName ).dump();
+ else if( rStrmName == "\005SummaryInformation" || rStrmName == "\005DocumentSummaryInformation" )
+ OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump();
+ else
+ BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
+}
+
+ComCtlObjectBase::ComCtlObjectBase( const InputObjectBase& rParent,
+ sal_uInt32 nDataId5, sal_uInt32 nDataId6, sal_uInt16 nVersion, bool bCommonPart, bool bComplexPart ) :
+ mnDataId5( nDataId5 ),
+ mnDataId6( nDataId6 ),
+ mnVersion( nVersion ),
+ mbCommonPart( bCommonPart ),
+ mbComplexPart( bComplexPart )
+{
+ construct( rParent );
+}
+
+void ComCtlObjectBase::implDump()
+{
+ sal_uInt32 nCommonSize = 0;
+ dumpComCtlSize() && dumpComCtlData( nCommonSize ) && (!mbCommonPart || dumpComCtlCommon( nCommonSize )) && (!mbComplexPart || dumpComCtlComplex());
+}
+
+void ComCtlObjectBase::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+}
+
+void ComCtlObjectBase::implDumpCommonTrailing()
+{
+}
+
+bool ComCtlObjectBase::dumpComCtlHeader( sal_uInt32 nExpId, sal_uInt16 nExpMajor, sal_uInt16 nExpMinor )
+{
+ // no idea if all this is correct...
+ sal_uInt32 nId = dumpHex< sal_uInt32 >( "header-id", "COMCTL-HEADER-IDS" );
+ ItemGuard aItem( mxOut, "version" );
+ sal_uInt16 nMinor = mxStrm->readuInt16();
+ sal_uInt16 nMajor = mxStrm->readuInt16();
+ mxOut->writeDec( nMajor );
+ mxOut->writeChar( '.' );
+ mxOut->writeDec( nMinor );
+ return !mxStrm->isEof() && (nId == nExpId) && ((nExpMajor == SAL_MAX_UINT16) || (nExpMajor == nMajor)) && ((nExpMinor == SAL_MAX_UINT16) || (nExpMinor == nMinor));
+}
+
+bool ComCtlObjectBase::dumpComCtlSize()
+{
+ if( dumpComCtlHeader( 0x12344321, 0, 8 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlData( sal_uInt32& ornCommonPartSize )
+{
+ if( dumpComCtlHeader( (mnVersion == 5) ? mnDataId5 : mnDataId6, mnVersion ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ if( mbCommonPart )
+ ornCommonPartSize = dumpDec< sal_uInt32 >( "common-part-size" );
+ implDumpProperties();
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlCommon( sal_uInt32 nPartSize )
+{
+ sal_Int64 nEndPos = mxStrm->tell() + nPartSize;
+ if( (nPartSize >= 16) && dumpComCtlHeader( 0xABCDEF01, 5, 0 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ dumpUnknown( 4 );
+ dumpHex< sal_uInt32 >( "common-flags", "COMCTL-COMMON-FLAGS" );
+ implDumpCommonExtra( nEndPos );
+ dumpRemainingTo( nEndPos );
+ implDumpCommonTrailing();
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlComplex()
+{
+ if( dumpComCtlHeader( 0xBDECDE1F, 5, 1 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ sal_uInt32 nFlags = dumpHex< sal_uInt32 >( "comctl-complex-flags", "COMCTL-COMPLEX-FLAGS" );
+ if( !mxStrm->isEof() && (nFlags & 0x01) )
+ {
+ writeEmptyItem( "font" );
+ IndentGuard aIndGuard2( mxOut );
+ OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
+ if ( aClassName == "StdFont" )
+ StdFontObject( *this ).dump();
+ }
+ if( !mxStrm->isEof() && (nFlags & 0x02) )
+ {
+ writeEmptyItem( "mouse-icon" );
+ IndentGuard aIndGuard2( mxOut );
+ OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
+ if ( aClassName == "StdPic" )
+ StdPicObject( *this ).dump();
+ }
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+ComCtlScrollBarObject::ComCtlScrollBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, SAL_MAX_UINT32, 0x99470A83, nVersion, true, true )
+{
+}
+
+void ComCtlScrollBarObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags", "COMCTL-SCROLLBAR-FLAGS" );
+ dumpDec< sal_Int32 >( "large-change" );
+ dumpDec< sal_Int32 >( "small-change" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int32 >( "value" );
+}
+
+ComCtlProgressBarObject::ComCtlProgressBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E84, 0x97AB8A01, nVersion, true, true )
+{
+}
+
+void ComCtlProgressBarObject::implDumpProperties()
+{
+ dumpDec< float >( "min" );
+ dumpDec< float >( "max" );
+ if( mnVersion == 6 )
+ {
+ dumpBool< sal_uInt16 >( "vertical" );
+ dumpBool< sal_uInt16 >( "smooth-scroll" );
+ }
+}
+
+ComCtlSliderObject::ComCtlSliderObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E86, 0x0A2BAE11, nVersion, true, true )
+{
+}
+
+void ComCtlSliderObject::implDumpProperties()
+{
+ dumpBool< sal_Int32 >( "vertical" );
+ dumpDec< sal_Int32 >( "large-change" );
+ dumpDec< sal_Int32 >( "small-change" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int16 >( "select-range", "COMCTL-SLIDER-SELECTRANGE" );
+ dumpUnused( 2 );
+ dumpDec< sal_Int32 >( "select-start" );
+ dumpDec< sal_Int32 >( "select-length" );
+ dumpDec< sal_Int32 >( "tick-style", "COMCTL-SLIDER-TICKSTYLE" );
+ dumpDec< sal_Int32 >( "tick-frequency" );
+ dumpDec< sal_Int32 >( "value" );
+ if( mnVersion == 6 )
+ dumpBool< sal_Int32 >( "tooltip-below" );
+}
+
+ComCtlUpDownObject::ComCtlUpDownObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xFF3626A0, 0xFF3626A0, nVersion, false, false )
+{
+}
+
+void ComCtlUpDownObject::implDumpProperties()
+{
+ dumpUnknown( 16 ); // buddy-property, somehow
+ dumpDec< sal_Int32 >( "buddy-control" );
+ dumpUnknown( 8 );
+ dumpDec< sal_Int32 >( "value" );
+ dumpUnknown( 4 );
+ dumpDec< sal_Int32 >( "increment" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpHex< sal_uInt32 >( "flags-1", "COMCTL-UPDOWN-FLAGS1" );
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-UPDOWN-FLAGS2" );
+ dumpUnknown( 4 );
+}
+
+ComCtlImageListObject::ComCtlImageListObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E80, 0xE6E17E80, nVersion, true, false )
+{
+}
+
+void ComCtlImageListObject::implDumpProperties()
+{
+ dumpDec< sal_uInt16 >( "image-width" );
+ dumpDec< sal_uInt16 >( "image-height" );
+ dumpOleColor( "mask-color" );
+ dumpBool< sal_Int16 >( "use-mask-color" );
+ dumpUnknown( 2 );
+}
+
+void ComCtlImageListObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 4 );
+ dumpOleColor( "back-color" );
+ dumpUnknown( 4 );
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ sal_uInt8 nFlags = dumpHex< sal_uInt8 >( "text-flags", "COMCTL-IMAGELIST-TEXTFLAGS" );
+ if( nFlags & 0x01 ) dumpUniString32( "caption" );
+ if( nFlags & 0x02 ) dumpUniString32( "key" );
+ }
+}
+
+void ComCtlImageListObject::implDumpCommonTrailing()
+{
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "index" );
+ StdPicObject( *this ).dump();
+ }
+}
+
+ComCtlTabStripObject::ComCtlTabStripObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E8A, 0xD12A7AC1, nVersion, true, true )
+{
+}
+
+void ComCtlTabStripObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags-1", "COMCTL-TABSTRIP-FLAGS1" );
+ dumpDec< sal_uInt16 >( "tab-fixed-width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_uInt16 >( "tab-fixed-height", "CONV-HMM-TO-CM" );
+ if( mnVersion == 6 )
+ {
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TABSTRIP-FLAGS2" );
+ dumpDec< sal_uInt16 >( "tab-min-width", "CONV-HMM-TO-CM" );
+ dumpUnknown( 2 );
+ dumpHex< sal_uInt32 >( "flags-3", "COMCTL-TABSTRIP-FLAGS3" );
+ }
+}
+
+void ComCtlTabStripObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 12 );
+ dumpUniString32( "image-list" );
+ sal_Int32 nTabCount = dumpDec< sal_Int32 >( "tab-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nTabIndex = 0; (nTabIndex < nTabCount) && !mxStrm->isEof(); ++nTabIndex )
+ {
+ writeEmptyItem( "#tab" );
+ IndentGuard aIndGuard( mxOut );
+ dumpUnknown( 4 );
+ sal_uInt32 nTabFlags = dumpHex< sal_uInt32 >( "tab-flags", "COMCTL-TABSTRIP-TABFLAGS" );
+ if( nTabFlags & 0x01 ) dumpUniString32( "caption" );
+ if( nTabFlags & 0x02 ) dumpUniString32( "key" );
+ if( nTabFlags & 0x04 ) dumpUniString32( "tag" );
+ if( nTabFlags & 0x08 ) dumpUniString32( "tooltip" );
+ dumpDec< sal_uInt16 >( "image-id" );
+ }
+}
+
+ComCtlTreeViewObject::ComCtlTreeViewObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E8E, 0x6AC13CB1, nVersion, true, true ),
+ mnStringFlags( 0 )
+{
+}
+
+void ComCtlTreeViewObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags", "COMCTL-TREEVIEW-FLAGS" );
+ dumpDec< sal_Int32 >( "indentation", "CONV-HMM-TO-CM" );
+ if( mnVersion == 6 )
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TREEVIEW-FLAGS2" );
+ mnStringFlags = dumpHex< sal_uInt32 >( "string-flags", "COMCTL-TREEVIEW-STRINGFLAGS" );
+}
+
+void ComCtlTreeViewObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpOleColor( "text-color" );
+ dumpOleColor( "back-color" );
+ dumpUnknown( 4 );
+ if( mnStringFlags & 0x02 )
+ dumpUniString32( "image-list" );
+ dumpUniString32( "path-separator" );
+}
+
+ComCtlStatusBarObject::ComCtlStatusBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E88, SAL_MAX_UINT32, nVersion, true, true )
+{
+}
+
+void ComCtlStatusBarObject::implDumpProperties()
+{
+ dumpBool< sal_Int32 >( "style-simple-text" );
+ dumpBool< sal_Int16 >( "show-tips" );
+ dumpUnknown( 2 );
+}
+
+void ComCtlStatusBarObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 12 );
+ dumpUniString32( "simple-text" );
+ sal_Int32 nPanelCount = dumpDec< sal_Int32 >( "panel-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nPanelIndex = 0; (nPanelIndex < nPanelCount) && !mxStrm->isEof(); ++nPanelIndex )
+ {
+ writeEmptyItem( "#panel" );
+ IndentGuard aIndGuard( mxOut );
+ dumpHex< sal_uInt32 >( "panel-flags", "COMCTL-STATUSBAR-PANELFLAGS" );
+ dumpDec< sal_Int32 >( "current-width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "minimal-width", "CONV-HMM-TO-CM" );
+ sal_uInt32 nTextFlags = dumpHex< sal_uInt32 >( "text-flags", "COMCTL-STATUSBAR-TEXTFLAGS" );
+ if( nTextFlags & 0x01 ) dumpUniString32( "text" );
+ if( nTextFlags & 0x02 ) dumpUniString32( "vis-text" );
+ if( nTextFlags & 0x04 ) dumpUniString32( "key" );
+ if( nTextFlags & 0x08 ) dumpUniString32( "tag" );
+ if( nTextFlags & 0x10 ) dumpUniString32( "tooltip" );
+ }
+}
+
+void ComCtlStatusBarObject::implDumpCommonTrailing()
+{
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "panel-index" );
+ StdPicObject( *this ).dump();
+ }
+}
+
+void AxPropertyObjectBase::construct( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const String& rPropNameList, bool b64BitPropFlags )
+{
+ OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
+ constructAxPropObj( rPropNameList, b64BitPropFlags );
+}
+
+void AxPropertyObjectBase::construct( const InputObjectBase& rParent,
+ const String& rPropNameList, bool b64BitPropFlags )
+{
+ OleInputObjectBase::construct( rParent );
+ constructAxPropObj( rPropNameList, b64BitPropFlags );
+}
+
+bool AxPropertyObjectBase::implIsValid() const
+{
+ return OleInputObjectBase::implIsValid() && mxStrm->isSeekable();
+}
+
+void AxPropertyObjectBase::implDump()
+{
+ mbValid = true;
+ // header
+ setAlignAnchor();
+ dumpVersion();
+ sal_uInt16 nSize = dumpDec< sal_uInt16 >( "size" );
+ mnPropertiesEnd = mxStrm->tell() + nSize;
+ // property flags
+ maLargeProps.clear();
+ maStreamProps.clear();
+ mnPropFlags = dumpHex< sal_Int64, sal_uInt32 >( mb64BitPropFlags, "properties", mxPropNames );
+ mnCurrProp = 0;
+ // properties
+ dumpShortProperties();
+ dumpLargeProperties();
+ setAlignAnchor();
+ if( ensureValid() )
+ implDumpExtended();
+}
+
+void AxPropertyObjectBase::implDumpShortProperties()
+{
+}
+
+void AxPropertyObjectBase::implDumpExtended()
+{
+}
+
+bool AxPropertyObjectBase::ensureValid( bool bCondition )
+{
+ if( mbValid && (!bCondition || mxStrm->isEof()) )
+ {
+ if( !bCondition )
+ writeInfoItem( "state", OOX_DUMP_ERRASCII( "format-error" ) );
+ mbValid = false;
+ }
+ return mbValid;
+}
+
+void AxPropertyObjectBase::setAlignAnchor()
+{
+ mnPropertiesStart = mxStrm->tell();
+}
+
+bool AxPropertyObjectBase::startNextProperty()
+{
+ if( mnCurrProp == 0 ) mnCurrProp = 1; else mnCurrProp <<= 1;
+ bool bHasProp = getFlag( mnPropFlags, mnCurrProp );
+ setFlag( mnPropFlags, mnCurrProp, false );
+ return ensureValid() && bHasProp;
+}
+
+OUString AxPropertyObjectBase::getPropertyName() const
+{
+ return cfg().getName( mxPropNames, mnCurrProp );
+}
+
+sal_uInt32 AxPropertyObjectBase::dumpFlagsProperty( sal_uInt32 nDefault, const char* pcNameList )
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt32 >();
+ return dumpHex< sal_uInt32 >( getPropertyName(), pcNameList );
+ }
+ return nDefault;
+}
+
+sal_uInt32 AxPropertyObjectBase::dumpColorProperty( sal_uInt32 nDefault )
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt32 >();
+ return dumpOleColor( getPropertyName() );
+ }
+ return nDefault;
+}
+
+sal_Unicode AxPropertyObjectBase::dumpUnicodeProperty()
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt16 >();
+ return dumpUnicode( getPropertyName() );
+ }
+ return '\0';
+}
+
+void AxPropertyObjectBase::dumpUnknownProperty()
+{
+ if( startNextProperty() )
+ ensureValid( false );
+}
+
+void AxPropertyObjectBase::dumpPosProperty()
+{
+ if( startNextProperty() )
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 );
+}
+
+void AxPropertyObjectBase::dumpSizeProperty()
+{
+ if( startNextProperty() )
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 );
+}
+
+void AxPropertyObjectBase::dumpGuidProperty( OUString* pValue )
+{
+ if( startNextProperty() )
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue );
+}
+
+void AxPropertyObjectBase::dumpStringProperty( OUString* pValue )
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt32 >();
+ sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "AX-STRINGLEN" );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue );
+ }
+}
+
+void AxPropertyObjectBase::dumpStringArrayProperty()
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt32 >();
+ sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "CONV-DEC" );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRINGARRAY, getPropertyName(), nLen );
+ }
+}
+
+void AxPropertyObjectBase::dumpStreamProperty()
+{
+ if( startNextProperty() )
+ {
+ alignInput< sal_uInt16 >();
+ sal_uInt16 nData = dumpHex< sal_uInt16 >( getPropertyName() );
+ maStreamProps.emplace_back( getPropertyName(), nData );
+ }
+}
+
+void AxPropertyObjectBase::dumpEmbeddedFont()
+{
+ if( ensureValid() )
+ {
+ writeEmptyItem( "embedded-fontdata" );
+ IndentGuard aIndGuard( mxOut );
+ AxCFontNewObject( *this ).dump();
+ }
+}
+
+void AxPropertyObjectBase::dumpToPosition( sal_Int64 nPos )
+{
+ dumpRemainingTo( nPos );
+ mbValid = true;
+ ensureValid();
+}
+
+void AxPropertyObjectBase::constructAxPropObj( const String& rPropNameList, bool b64BitPropFlags )
+{
+ if( OleInputObjectBase::implIsValid() )
+ {
+ mxPropNames = cfg().getNameList( rPropNameList );
+ mb64BitPropFlags = b64BitPropFlags;
+ mbValid = true;
+ }
+}
+
+void AxPropertyObjectBase::dumpVersion()
+{
+ ItemGuard aItem( mxOut, "version" );
+ sal_uInt8 nMinor = mxStrm->readuChar();
+ sal_uInt8 nMajor = mxStrm->readuChar();
+ mxOut->writeDec( nMajor );
+ mxOut->writeChar( '.' );
+ mxOut->writeDec( nMinor );
+}
+
+OUString AxPropertyObjectBase::dumpString( const String& rName, sal_uInt32 nSize, bool bArray )
+{
+ bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
+ sal_uInt32 nBufSize = extractValue< sal_uInt32 >( nSize, 0, 31 );
+ OUString aString = bCompressed ?
+ dumpCharArray( rName, nBufSize, RTL_TEXTENCODING_ISO_8859_1 ) :
+ dumpUnicodeArray( rName, bArray ? nBufSize : (nBufSize / 2) );
+ alignInput< sal_Int32 >();
+ return aString;
+}
+
+void AxPropertyObjectBase::dumpShortProperties()
+{
+ if( ensureValid() )
+ {
+ writeEmptyItem( "short-properties" );
+ IndentGuard aIndGuard( mxOut );
+ implDumpShortProperties();
+ alignInput< sal_uInt32 >();
+ }
+}
+
+void AxPropertyObjectBase::dumpLargeProperties()
+{
+ if( ensureValid( mnPropFlags == 0 ) && !maLargeProps.empty() )
+ {
+ writeEmptyItem( "large-properties" );
+ IndentGuard aIndGuard( mxOut );
+ for (auto const& largeProp : maLargeProps)
+ {
+ if (!ensureValid())
+ break;
+ switch( largeProp.mePropType )
+ {
+ case LargeProperty::PROPTYPE_POS:
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( largeProp.maItemName );
+ dumpDec< sal_Int32 >( "top", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "left", "CONV-HMM-TO-CM" );
+ }
+ break;
+ case LargeProperty::PROPTYPE_SIZE:
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeEmptyItem( largeProp.maItemName );
+ dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
+ }
+ break;
+ case LargeProperty::PROPTYPE_GUID:
+ {
+ OUString aGuid = dumpGuid( largeProp.maItemName );
+ if( largeProp.mpItemValue )
+ *largeProp.mpItemValue = cfg().getStringOption( aGuid, OUString() );
+ }
+ break;
+ case LargeProperty::PROPTYPE_STRING:
+ {
+ OUString aString = dumpString( largeProp.maItemName, largeProp.mnDataSize, false );
+ if( largeProp.mpItemValue )
+ *largeProp.mpItemValue = aString;
+ }
+ break;
+ case LargeProperty::PROPTYPE_STRINGARRAY:
+ {
+ writeEmptyItem( largeProp.maItemName );
+ IndentGuard aIndGuard2( mxOut );
+ mxOut->resetItemIndex();
+ sal_Int64 nEndPos = mxStrm->tell() + largeProp.mnDataSize;
+ while( mxStrm->tell() < nEndPos )
+ {
+ MultiItemsGuard aMultiGuard( mxOut );
+ sal_uInt32 nDataSize = dumpHex< sal_uInt32 >( "#flags", "AX-ARRAYSTRINGLEN" );
+ dumpString( "string", nDataSize, true );
+ }
+ dumpToPosition( nEndPos );
+ }
+ break;
+ }
+ }
+ }
+ dumpToPosition( mnPropertiesEnd );
+
+ if( !ensureValid() || maStreamProps.empty() )
+ return;
+
+ writeEmptyItem( "stream-properties" );
+ IndentGuard aIndGuard( mxOut );
+ for (auto const& streamProp : maStreamProps)
+ {
+ if (!ensureValid())
+ break;
+ writeEmptyItem( streamProp.maItemName );
+ if( ensureValid( streamProp.mnData == 0xFFFF ) )
+ {
+ IndentGuard aIndGuard2( mxOut );
+ OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
+ if ( aClassName == "StdFont" )
+ StdFontObject( *this ).dump();
+ else if ( aClassName == "StdPic" )
+ StdPicObject( *this ).dump();
+ else if ( aClassName == "CFontNew" )
+ AxCFontNewObject( *this ).dump();
+ else
+ ensureValid( false );
+ }
+ }
+}
+
+AxCFontNewObject::AxCFontNewObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-CFONTNEW-PROPERTIES" );
+}
+
+void AxCFontNewObject::implDumpShortProperties()
+{
+ dumpStringProperty();
+ dumpFlagsProperty( 0, "AX-CFONTNEW-FLAGS" );
+ dumpDecProperty< sal_Int32 >( 160 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_uInt8 >( WINDOWS_CHARSET_DEFAULT, "CHARSET" );
+ dumpDecProperty< sal_uInt8 >( 0, "FONT-PITCHFAMILY" );
+ dumpDecProperty< sal_uInt8 >( 1, "AX-CFONTNEW-ALIGNMENT" );
+ dumpDecProperty< sal_uInt16 >( 400, "FONT-WEIGHT" );
+}
+
+AxColumnInfoObject::AxColumnInfoObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-COLUMNINFO-PROPERTIES" );
+}
+
+void AxColumnInfoObject::implDumpShortProperties()
+{
+ dumpDecProperty< sal_Int32 >( -1, "CONV-HMM-TO-CM" );
+}
+
+AxCommandButtonObject::AxCommandButtonObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-COMMANDBUTTON-PROPERTIES" );
+}
+
+void AxCommandButtonObject::implDumpShortProperties()
+{
+ dumpColorProperty( 0x80000012 );
+ dumpColorProperty( 0x80000008 );
+ dumpFlagsProperty( 0x0000001B );
+ dumpStringProperty();
+ dumpImagePosProperty();
+ dumpSizeProperty();
+ dumpMousePtrProperty();
+ dumpStreamProperty();
+ dumpUnicodeProperty();
+ dumpBoolProperty();
+ dumpStreamProperty();
+}
+
+void AxCommandButtonObject::implDumpExtended()
+{
+ dumpEmbeddedFont();
+}
+
+AxMorphControlObject::AxMorphControlObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-MORPH-PROPERTIES", true );
+}
+
+void AxMorphControlObject::implDumpShortProperties()
+{
+ dumpFlagsProperty( 0x2C80081B );
+ dumpColorProperty( 0x80000005 );
+ dumpColorProperty( 0x80000008 );
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpBorderStyleProperty< sal_uInt8 >( 0 );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SCROLLBARS" );
+ mnCtrlType = dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-CONTROLTYPE" );
+ dumpMousePtrProperty();
+ dumpSizeProperty();
+ dumpUnicodeProperty();
+ dumpDecProperty< sal_uInt32 >( 0, "CONV-HMM-TO-CM" );
+ dumpDecProperty< sal_uInt16 >( 1, "AX-MORPH-BOUNDCOLUMN" );
+ dumpDecProperty< sal_Int16 >( -1, "AX-MORPH-TEXTCOLUMN" );
+ dumpDecProperty< sal_Int16 >( 1, "AX-MORPH-COLUMNCOUNT" );
+ dumpDecProperty< sal_uInt16 >( 8 );
+ mnColInfoCount = dumpDecProperty< sal_uInt16 >( 1 );
+ dumpDecProperty< sal_uInt8 >( 2, "AX-MORPH-MATCHENTRYTYPE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-LISTSTYLE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SHOWDROPDOWNMODE" );
+ dumpUnknownProperty();
+ dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-DROPDOWNSTYLE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SELECTIONTYPE" );
+ dumpStringProperty();
+ dumpStringProperty();
+ dumpImagePosProperty();
+ dumpColorProperty( 0x80000006 );
+ dumpSpecialEffectProperty< sal_uInt32 >( 2 );
+ dumpStreamProperty();
+ dumpStreamProperty();
+ dumpUnicodeProperty();
+ dumpUnknownProperty();
+ dumpBoolProperty();
+ dumpStringProperty();
+}
+
+void AxMorphControlObject::implDumpExtended()
+{
+ dumpEmbeddedFont();
+ dumpColumnInfos();
+}
+
+void AxMorphControlObject::dumpColumnInfos()
+{
+ if( ensureValid() && (mnColInfoCount > 0) && ((mnCtrlType == 2) || (mnCtrlType == 3)) )
+ {
+ mxOut->resetItemIndex();
+ for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < mnColInfoCount); ++nIdx )
+ {
+ writeEmptyItem( "#column-info" );
+ IndentGuard aIndGuard( mxOut );
+ AxColumnInfoObject( *this ).dump();
+ }
+ }
+}
+
+AxLabelObject::AxLabelObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-LABEL-PROPERTIES" );
+}
+
+void AxLabelObject::implDumpShortProperties()
+{
+ dumpColorProperty( 0x80000012 );
+ dumpColorProperty( 0x8000000F );
+ dumpFlagsProperty( 0x0080001B );
+ dumpStringProperty();
+ dumpImagePosProperty();
+ dumpSizeProperty();
+ dumpMousePtrProperty();
+ dumpColorProperty( 0x80000006 );
+ dumpBorderStyleProperty< sal_uInt16 >( 0 );
+ dumpSpecialEffectProperty< sal_uInt16 >( 0 );
+ dumpStreamProperty();
+ dumpUnicodeProperty();
+ dumpStreamProperty();
+}
+
+void AxLabelObject::implDumpExtended()
+{
+ dumpEmbeddedFont();
+}
+
+AxImageObject::AxImageObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-IMAGE-PROPERTIES" );
+}
+
+void AxImageObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ dumpUnknownProperty();
+ dumpBoolProperty();
+ dumpColorProperty( 0x80000006 );
+ dumpColorProperty( 0x8000000F );
+ dumpBorderStyleProperty< sal_uInt8 >( 1 );
+ dumpMousePtrProperty();
+ dumpImageSizeModeProperty();
+ dumpSpecialEffectProperty< sal_uInt8 >( 0 );
+ dumpSizeProperty();
+ dumpStreamProperty();
+ dumpImageAlignProperty();
+ dumpBoolProperty();
+ dumpFlagsProperty( 0x0000001B );
+ dumpStreamProperty();
+}
+
+AxScrollBarObject::AxScrollBarObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-SCROLLBAR-PROPERTIES" );
+}
+
+void AxScrollBarObject::implDumpShortProperties()
+{
+ dumpColorProperty( 0x80000012 );
+ dumpColorProperty( 0x8000000F );
+ dumpFlagsProperty( 0x0000001B );
+ dumpSizeProperty();
+ dumpMousePtrProperty();
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 32767 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpHexProperty< sal_uInt32 >( 0 );
+ dumpEnabledProperty();
+ dumpEnabledProperty();
+ dumpDecProperty< sal_Int32 >( 1 );
+ dumpDecProperty< sal_Int32 >( 1 );
+ dumpOrientationProperty();
+ dumpDecProperty< sal_Int16 >( -1, "AX-SCROLLBAR-PROPTHUMB" );
+ dumpDelayProperty();
+ dumpStreamProperty();
+}
+
+AxSpinButtonObject::AxSpinButtonObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-SPINBUTTON-PROPERTIES" );
+}
+
+void AxSpinButtonObject::implDumpShortProperties()
+{
+ dumpColorProperty( 0x80000012 );
+ dumpColorProperty( 0x8000000F );
+ dumpFlagsProperty( 0x0000001B );
+ dumpSizeProperty();
+ dumpHexProperty< sal_uInt32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 100 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpEnabledProperty();
+ dumpEnabledProperty();
+ dumpDecProperty< sal_Int32 >( 1 );
+ dumpOrientationProperty();
+ dumpDelayProperty();
+ dumpStreamProperty();
+ dumpMousePtrProperty();
+}
+
+AxTabStripObject::AxTabStripObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "AX-TABSTRIP-PROPERTIES" );
+}
+
+void AxTabStripObject::implDumpShortProperties()
+{
+ dumpDecProperty< sal_Int32 >( -1 );
+ dumpColorProperty( 0x8000000F );
+ dumpColorProperty( 0x80000012 );
+ dumpUnknownProperty();
+ dumpSizeProperty();
+ dumpStringArrayProperty();
+ dumpMousePtrProperty();
+ dumpUnknownProperty();
+ dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-ORIENTATION" );
+ dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-TABSTYLE" );
+ dumpBoolProperty();
+ dumpHmmProperty();
+ dumpHmmProperty();
+ dumpBoolProperty();
+ dumpUnknownProperty();
+ dumpStringArrayProperty();
+ dumpUnknownProperty();
+ dumpStringArrayProperty();
+ dumpFlagsProperty( 0x0000001B );
+ dumpBoolProperty();
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpStringArrayProperty();
+ mnTabFlagCount = dumpDecProperty< sal_Int32 >( 0 );
+ dumpStringArrayProperty();
+ dumpStreamProperty();
+}
+
+void AxTabStripObject::implDumpExtended()
+{
+ dumpEmbeddedFont();
+ if( mnTabFlagCount > 0 )
+ {
+ writeEmptyItem( "tab-flags" );
+ IndentGuard aIndGuard( mxOut );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnTabFlagCount); ++nIdx )
+ dumpHex< sal_uInt32 >( "#flags", "AX-TABSTRIP-FLAGS" );
+ }
+}
+
+FormControlStreamObject::FormControlStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const OUString* pProgId )
+{
+ construct( rParent, rxStrm, rSysFileName );
+ constructFormCtrlStrmObj( pProgId );
+}
+
+FormControlStreamObject::FormControlStreamObject( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString* pProgId )
+{
+ construct( rParent, rxStrm );
+ constructFormCtrlStrmObj( pProgId );
+}
+
+void FormControlStreamObject::implDump()
+{
+ if( mbReadGuid )
+ maProgId = cfg().getStringOption( dumpGuid(), OUString() );
+
+ if( !maProgId.isEmpty() && !mxStrm->isEof() )
+ {
+ if ( maProgId == "Forms.CommandButton.1" )
+ AxCommandButtonObject( *this ).dump();
+ else if( maProgId == "Forms.TextBox.1" ||
+ maProgId == "Forms.ListBox.1" ||
+ maProgId == "Forms.ComboBox.1" ||
+ maProgId == "Forms.CheckBox.1" ||
+ maProgId == "Forms.OptionButton.1" ||
+ maProgId == "Forms.ToggleButton.1" ||
+ maProgId == "RefEdit.Ctrl" )
+ AxMorphControlObject( *this ).dump();
+ else if ( maProgId == "Forms.Label.1" )
+ AxLabelObject( *this ).dump();
+ else if ( maProgId == "Forms.Image.1" )
+ AxImageObject( *this ).dump();
+ else if ( maProgId == "Forms.ScrollBar.1" )
+ AxScrollBarObject( *this ).dump();
+ else if ( maProgId == "Forms.SpinButton.1" )
+ AxSpinButtonObject( *this ).dump();
+ else if ( maProgId == "Forms.TabStrip.1" )
+ AxTabStripObject( *this ).dump();
+ else if ( maProgId == "MSComCtl2.FlatScrollBar.2" )
+ ComCtlScrollBarObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.ProgCtrl.1" )
+ ComCtlProgressBarObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComctlLib.ProgCtrl.2" )
+ ComCtlProgressBarObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.Slider.1" )
+ ComCtlSliderObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComctlLib.Slider.2" )
+ ComCtlSliderObject( *this, 6 ).dump();
+ else if ( maProgId == "ComCtl2.UpDown.1" )
+ ComCtlUpDownObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComCtl2.UpDown.2" )
+ ComCtlUpDownObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.ImageListCtrl.1" )
+ ComCtlImageListObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComctlLib.ImageListCtrl.2" )
+ ComCtlImageListObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.TabStrip.1" )
+ ComCtlTabStripObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComctlLib.TabStrip.2" )
+ ComCtlTabStripObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.TreeCtrl.1" )
+ ComCtlTreeViewObject( *this, 5 ).dump();
+ else if ( maProgId == "MSComctlLib.TreeCtrl.2" )
+ ComCtlTreeViewObject( *this, 6 ).dump();
+ else if ( maProgId == "COMCTL.SBarCtrl.1" )
+ ComCtlStatusBarObject( *this, 5 ).dump();
+ else if ( maProgId == "StdPic" )
+ StdPicObject( *this ).dump();
+ }
+ dumpRemainingStream();
+}
+
+void FormControlStreamObject::constructFormCtrlStrmObj( const OUString* pProgId )
+{
+ mbReadGuid = pProgId == nullptr;
+ if( pProgId )
+ maProgId = *pProgId;
+}
+
+VbaFormClassInfoObject::VbaFormClassInfoObject( const InputObjectBase& rParent, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-CLASSINFO-PROPERTIES" );
+}
+
+void VbaFormClassInfoObject::implDumpShortProperties()
+{
+ mrFormData.maClassInfoProgIds.emplace_back( );
+ dumpGuidProperty( &mrFormData.maClassInfoProgIds.back() );
+ dumpGuidProperty();
+ dumpUnknownProperty();
+ dumpGuidProperty();
+ dumpFlagsProperty( 0, "VBA-CLASSINFO-FLAGS" );
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpDecProperty< sal_Int32 >( -1 );
+ dumpDecProperty< sal_uInt16 >( 0 );
+ dumpDecProperty< sal_uInt16 >( 0 );
+ dumpDecProperty< sal_uInt16 >( 0, "OLEPROP-TYPE" );
+ dumpDecProperty< sal_uInt16 >( 0 );
+ dumpDecProperty< sal_uInt16 >( 0 );
+ dumpDecProperty< sal_uInt16 >( 0, "OLEPROP-TYPE" );
+ dumpDecProperty< sal_Int32 >( -1 );
+ dumpDecProperty< sal_uInt16 >( 0 );
+}
+
+namespace {
+
+const sal_uInt32 VBA_FORMSITE_OBJSTREAM = 0x0010;
+
+const sal_uInt16 VBA_FORMSITE_CLASSTABLEINDEX = 0x8000;
+const sal_uInt16 VBA_FORMSITE_CLASSTABLEMASK = 0x7FFF;
+
+} // namespace
+
+VbaFormSiteObject::VbaFormSiteObject( const InputObjectBase& rParent, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-FORMSITE-PROPERTIES" );
+}
+
+void VbaFormSiteObject::implDumpShortProperties()
+{
+ VbaFormSiteInfo aSiteInfo;
+ dumpStringProperty();
+ dumpStringProperty();
+ sal_Int32 nId = dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ sal_uInt32 nFlags = dumpFlagsProperty( 0x00000033, "VBA-FORMSITE-FLAGS" );
+ sal_uInt32 nLength = dumpDecProperty< sal_uInt32 >( 0 );
+ dumpDecProperty< sal_Int16 >( -1 );
+ sal_uInt16 nClassId = dumpHexProperty< sal_uInt16 >( 0x7FFF, "VBA-FORMSITE-CLASSIDCACHE" );
+ dumpPosProperty();
+ dumpDecProperty< sal_uInt16 >( 0 );
+ dumpUnknownProperty();
+ dumpStringProperty();
+ dumpStringProperty();
+ dumpStringProperty();
+ dumpStringProperty();
+
+ sal_uInt16 nIndex = nClassId & VBA_FORMSITE_CLASSTABLEMASK;
+ if( getFlag( nClassId, VBA_FORMSITE_CLASSTABLEINDEX ) )
+ {
+ if( nIndex < mrFormData.maClassInfoProgIds.size() )
+ aSiteInfo.maProgId = mrFormData.maClassInfoProgIds[ nIndex ];
+ }
+ else
+ {
+ if( cfg().hasName( "VBA-FORMSITE-CLASSNAMES", nIndex ) )
+ aSiteInfo.maProgId = cfg().getName( "VBA-FORMSITE-CLASSNAMES", nIndex );
+ }
+ aSiteInfo.mnId = nId;
+ aSiteInfo.mnLength = nLength;
+ aSiteInfo.mbInStream = getFlag( nFlags, VBA_FORMSITE_OBJSTREAM );
+
+ mrFormData.maSiteInfos.push_back( aSiteInfo );
+}
+
+VbaFormDesignExtObject::VbaFormDesignExtObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-FORMDESIGNEXT-PROPERTIES" );
+}
+
+void VbaFormDesignExtObject::implDumpShortProperties()
+{
+ dumpFlagsProperty( 0x00015F55, "VBA-FORMDESIGNEXT-FLAGS" );
+ dumpHmmProperty();
+ dumpHmmProperty();
+ dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-CLICKCTRLMODE" );
+ dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-DBLCLICKCTRLMODE" );
+}
+
+namespace {
+
+const sal_uInt32 AX_FORM_HASDESIGNEXTENDER = 0x00004000;
+const sal_uInt32 AX_FORM_SKIPCLASSTABLE = 0x00008000;
+
+const sal_uInt8 AX_FORM_SITECOUNTTYPE_COUNT = 0x80;
+const sal_uInt8 AX_FORM_SITECOUNTTYPE_MASK = 0x7F;
+
+} // namespace
+
+VbaFStreamObject::VbaFStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ AxPropertyObjectBase::construct( rParent, rxStrm, rSysFileName, "VBA-FORM-PROPERTIES" );
+}
+
+void VbaFStreamObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ dumpColorProperty( 0x8000000F );
+ dumpColorProperty( 0x80000012 );
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpUnknownProperty();
+ dumpUnknownProperty();
+ mnFlags = dumpFlagsProperty( 0x00000004, "VBA-FORM-FLAGS" );
+ dumpBorderStyleProperty< sal_uInt8 >( 0 );
+ dumpMousePtrProperty();
+ dumpHexProperty< sal_uInt8 >( 0x0C, "VBA-FORM-SCROLLBARS" );
+ dumpSizeProperty();
+ dumpSizeProperty();
+ dumpPosProperty();
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpUnknownProperty();
+ dumpStreamProperty();
+ dumpDecProperty< sal_uInt8 >( 0, "VBA-FORM-CYCLE" );
+ dumpSpecialEffectProperty< sal_uInt8 >( 0 );
+ dumpColorProperty( 0x80000012 );
+ dumpStringProperty();
+ dumpStreamProperty();
+ dumpStreamProperty();
+ dumpDecProperty< sal_Int32 >( 100, "CONV-PERCENT" );
+ dumpImageAlignProperty();
+ dumpBoolProperty();
+ dumpImageSizeModeProperty();
+ dumpDecProperty< sal_uInt32 >( 0 );
+ dumpDecProperty< sal_uInt32 >( 0 );
+}
+
+void VbaFStreamObject::implDumpExtended()
+{
+ dumpClassInfos();
+ dumpSiteData();
+ dumpDesignExtender();
+ dumpRemainingStream();
+}
+
+void VbaFStreamObject::dumpClassInfos()
+{
+ if( ensureValid() && !getFlag( mnFlags, AX_FORM_SKIPCLASSTABLE ) )
+ {
+ mxOut->emptyLine();
+ sal_uInt16 nCount = dumpDec< sal_uInt16 >( "class-info-count" );
+ mxOut->resetItemIndex();
+ for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
+ {
+ writeEmptyItem( "#class-info" );
+ IndentGuard aIndGuard( mxOut );
+ VbaFormClassInfoObject( *this, mrFormData ).dump();
+ }
+ }
+}
+
+void VbaFStreamObject::dumpFormSites( sal_uInt32 nCount )
+{
+ mxOut->resetItemIndex();
+ for( sal_uInt32 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "#form-site" );
+ IndentGuard aIndGuard( mxOut );
+ VbaFormSiteObject( *this, mrFormData ).dump();
+ }
+}
+
+void VbaFStreamObject::dumpSiteData()
+{
+ if( !ensureValid() )
+ return;
+
+ mxOut->emptyLine();
+ setAlignAnchor();
+ sal_uInt32 nSiteCount = dumpDec< sal_uInt32 >( "site-count" );
+ sal_uInt32 nSiteLength = dumpDec< sal_uInt32 >( "site-data-size" );
+ sal_Int64 nEndPos = mxStrm->tell() + nSiteLength;
+ if( !ensureValid( nEndPos <= mxStrm->size() ) )
+ return;
+
+ mxOut->resetItemIndex();
+ sal_uInt32 nSiteIdx = 0;
+ while( ensureValid() && (nSiteIdx < nSiteCount) )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "#site-info" );
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_uInt8 >( "depth" );
+ sal_uInt8 nTypeCount = dumpHex< sal_uInt8 >( "type-count", "VBA-FORM-SITE-TYPECOUNT" );
+ if( getFlag( nTypeCount, AX_FORM_SITECOUNTTYPE_COUNT ) )
+ {
+ dumpDec< sal_uInt8 >( "repeated-type" );
+ nSiteIdx += (nTypeCount & AX_FORM_SITECOUNTTYPE_MASK);
+ }
+ else
+ {
+ ++nSiteIdx;
+ }
+ }
+ alignInput< sal_uInt32 >();
+ dumpFormSites( nSiteCount );
+ dumpToPosition( nEndPos );
+}
+
+void VbaFStreamObject::dumpDesignExtender()
+{
+ if( ensureValid() && getFlag( mnFlags, AX_FORM_HASDESIGNEXTENDER ) )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "design-extender" );
+ IndentGuard aIndGuard( mxOut );
+ VbaFormDesignExtObject( *this ).dump();
+ }
+}
+
+VbaOStreamObject::VbaOStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void VbaOStreamObject::implDump()
+{
+ for (auto const& siteInfo : mrFormData.maSiteInfos)
+ {
+ if (mxStrm->isEof())
+ break;
+ if( (siteInfo.mbInStream) && (siteInfo.mnLength > 0) )
+ {
+ mxOut->emptyLine();
+ writeDecItem( "control-id", siteInfo.mnId );
+ writeInfoItem( "prog-id", siteInfo.maProgId );
+ IndentGuard aIndGuard( mxOut );
+ BinaryInputStreamRef xRelStrm( std::make_shared<RelativeInputStream>( *mxStrm, siteInfo.mnLength ) );
+ FormControlStreamObject( *this, xRelStrm, &siteInfo.maProgId ).dump();
+ }
+ }
+ dumpRemainingStream();
+}
+
+VbaPageObject::VbaPageObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-PAGE-PROPERTIES" );
+}
+
+void VbaPageObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ dumpDecProperty< sal_uInt32 >( 0, "VBA-PAGE-TRANSITIONEFFECT" );
+ dumpDecProperty< sal_uInt32 >( 0, "AX-CONV-MS" );
+}
+
+VbaMultiPageObject::VbaMultiPageObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-MULTIPAGE-PROPERTIES" );
+}
+
+void VbaMultiPageObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ mnPageCount = dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpBoolProperty();
+}
+
+void VbaMultiPageObject::implDumpExtended()
+{
+ if( ensureValid() && (mnPageCount > 0) )
+ {
+ writeEmptyItem( "page-ids" );
+ IndentGuard aIndGuard( mxOut );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnPageCount); ++nIdx )
+ dumpDec< sal_Int32 >( "#id" );
+ }
+}
+
+VbaXStreamObject::VbaXStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void VbaXStreamObject::implDump()
+{
+ for( size_t nIdx = 0, nCount = mrFormData.maSiteInfos.size(); !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "page" );
+ IndentGuard aIndGuard( mxOut );
+ VbaPageObject( *this ).dump();
+ }
+ if( !mxStrm->isEof() )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "multi-page" );
+ IndentGuard aIndGuard( mxOut );
+ VbaMultiPageObject( *this ).dump();
+ }
+ dumpRemainingStream();
+}
+
+VbaContainerStorageObject::VbaContainerStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
+ OleStorageObject( rParent, rxStrg, rSysPath )
+{
+ addPreferredStream( "f" );
+}
+
+void VbaContainerStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ if ( rStrmName == "f" )
+ VbaFStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ else if ( rStrmName == "o" )
+ VbaOStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ else if ( rStrmName == "x" )
+ VbaXStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ else
+ OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
+}
+
+void VbaContainerStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
+{
+ if( isFormStorage( rStrgPath ) )
+ VbaContainerStorageObject( *this, rxStrg, rSysPath ).dump();
+ else
+ OleStorageObject( *this, rxStrg, rSysPath ).dump();
+}
+
+bool VbaContainerStorageObject::isFormStorage( const OUString& rStrgPath ) const
+{
+ if( (rStrgPath.getLength() >= 3) && (rStrgPath[ 0 ] == 'i') )
+ {
+ std::u16string_view aId = rStrgPath.subView( 1 );
+ if( (aId.size() == 2) && (aId[ 0 ] == '0') )
+ aId = aId.substr( 1 );
+ sal_Int32 nId = o3tl::toInt32(aId);
+ if( (nId > 0) && (std::u16string_view(OUString::number( nId )) == aId) )
+ for (auto const& siteInfo : maFormData.maSiteInfos)
+ if( siteInfo.mnId == nId )
+ return true;
+ }
+ return false;
+}
+
+VbaSharedData::VbaSharedData() :
+ meTextEnc( RTL_TEXTENCODING_MS_1252 )
+{
+}
+
+bool VbaSharedData::isModuleStream( const OUString& rStrmName ) const
+{
+ return maStrmOffsets.count( rStrmName ) > 0;
+}
+
+sal_Int32 VbaSharedData::getStreamOffset( const OUString& rStrmName ) const
+{
+ StreamOffsetMap::const_iterator aIt = maStrmOffsets.find( rStrmName );
+ return (aIt == maStrmOffsets.end()) ? 0 : aIt->second;
+}
+
+VbaDirStreamObject::VbaDirStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaSharedData& rVbaData ) :
+ mrVbaData( rVbaData )
+{
+ mxInStrm = rxStrm;
+ if( mxInStrm )
+ {
+ BinaryInputStreamRef xVbaStrm( std::make_shared<::oox::ole::VbaInputStream>( *mxInStrm ) );
+ SequenceRecordObjectBase::construct( rParent, xVbaStrm, rSysFileName, "VBA-DIR-RECORD-NAMES", "VBA-DIR-SIMPLE-RECORDS" );
+ }
+}
+
+bool VbaDirStreamObject::implIsValid() const
+{
+ return mxInStrm && SequenceRecordObjectBase::implIsValid();
+}
+
+bool VbaDirStreamObject::implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize )
+{
+ ornRecId = rBaseStrm.readuInt16();
+ ornRecSize = rBaseStrm.readInt32();
+
+ // for no obvious reason, PROJECTVERSION record contains size field of 4, but is 6 bytes long
+ if( ornRecId == 9 )
+ ornRecSize = 6;
+
+ return !rBaseStrm.isEof();
+}
+
+void VbaDirStreamObject::implDumpRecordBody()
+{
+ switch( getRecId() )
+ {
+ case 0x0003:
+ mrVbaData.meTextEnc = rtl_getTextEncodingFromWindowsCodePage( dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" ) );
+ break;
+ case 0x0004:
+ dumpByteString( "name" );
+ break;
+ case 0x0005:
+ dumpByteString( "description" );
+ break;
+ case 0x0006:
+ dumpByteString( "helpfile-path" );
+ break;
+ case 0x0009:
+ dumpDec< sal_uInt32 >( "major" );
+ dumpDec< sal_uInt16 >( "minor" );
+ break;
+ case 0x000C:
+ dumpByteString( "constants" );
+ break;
+ case 0x000D:
+ dumpByteStringWithLength( "lib-id" );
+ dumpUnused( 6 );
+ break;
+ case 0x000E:
+ dumpByteStringWithLength( "lib-id-absolute" );
+ dumpByteStringWithLength( "lib-id-relative" );
+ dumpDec< sal_uInt32 >( "major" );
+ dumpDec< sal_uInt16 >( "minor" );
+ break;
+ case 0x0016:
+ dumpByteString( "name" );
+ break;
+ case 0x0019:
+ dumpByteString( "name" );
+ maCurrStream.clear();
+ mnCurrOffset = 0;
+ break;
+ case 0x001A:
+ maCurrStream = dumpByteString( "stream-name" );
+ break;
+ case 0x001C:
+ dumpByteString( "description" );
+ break;
+ case 0x002B:
+ if( !maCurrStream.isEmpty() )
+ mrVbaData.maStrmOffsets[ maCurrStream ] = mnCurrOffset;
+ maCurrStream.clear();
+ mnCurrOffset = 0;
+ break;
+ case 0x002F:
+ dumpByteStringWithLength( "lib-id-twiddled" );
+ dumpUnused( 6 );
+ break;
+ case 0x0030:
+ dumpByteStringWithLength( "lib-id-extended" );
+ dumpUnused( 6 );
+ dumpGuid( "original-typelib" );
+ dumpDec< sal_uInt32 >( "cookie" );
+ break;
+ case 0x0031:
+ mnCurrOffset = dumpHex< sal_Int32 >( "stream-offset", "CONV-DEC" );
+ break;
+ case 0x0032:
+ dumpUniString( "stream-name" );
+ break;
+ case 0x0033:
+ dumpByteString( "lib-id-original" );
+ break;
+ case 0x003C:
+ dumpUniString( "constants" );
+ break;
+ case 0x003D:
+ dumpByteString( "helpfile-path" );
+ break;
+ case 0x003E:
+ dumpUniString( "name" );
+ break;
+ case 0x0040:
+ dumpUniString( "description" );
+ break;
+ case 0x0047:
+ dumpUniString( "name" );
+ break;
+ case 0x0048:
+ dumpUniString( "description" );
+ break;
+ }
+}
+
+OUString VbaDirStreamObject::dumpByteString( const String& rName )
+{
+ return dumpCharArray( rName, static_cast< sal_Int32 >( getRecSize() ), mrVbaData.meTextEnc );
+}
+
+OUString VbaDirStreamObject::dumpUniString( const String& rName )
+{
+ return dumpUnicodeArray( rName, static_cast< sal_Int32 >( getRecSize() / 2 ) );
+}
+
+OUString VbaDirStreamObject::dumpByteStringWithLength( const String& rName )
+{
+ return dumpCharArray( rName, mxStrm->readInt32(), mrVbaData.meTextEnc );
+}
+
+VbaModuleStreamObject::VbaModuleStreamObject(
+ const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm,
+ const OUString& rSysFileName, VbaSharedData& rVbaData, sal_Int32 nStrmOffset ) :
+ mrVbaData( rVbaData ),
+ mnStrmOffset( nStrmOffset )
+{
+ InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void VbaModuleStreamObject::implDump()
+{
+ dumpBinary( "perf-cache", mnStrmOffset );
+ mxOut->emptyLine();
+ writeEmptyItem( "source-code" );
+ IndentGuard aIndGuard( mxOut );
+ BinaryInputStreamRef xVbaStrm( std::make_shared<::oox::ole::VbaInputStream>( *mxStrm ) );
+ TextLineStreamObject( *this, xVbaStrm, mrVbaData.meTextEnc ).dump();
+}
+
+VbaStorageObject::VbaStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath, VbaSharedData& rVbaData ) :
+ OleStorageObject( rParent, rxStrg, rSysPath ),
+ mrVbaData( rVbaData )
+{
+ addPreferredStream( "dir" );
+}
+
+void VbaStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ if( rStrgPath.isEmpty() && rStrmName == "dir" )
+ VbaDirStreamObject( *this, rxStrm, rSysFileName, mrVbaData ).dump();
+ else if( mrVbaData.isModuleStream( rStrmName ) )
+ VbaModuleStreamObject( *this, rxStrm, rSysFileName, mrVbaData, mrVbaData.getStreamOffset( rStrmName ) ).dump();
+ else
+ OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
+}
+
+VbaFormStorageObject::VbaFormStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath, VbaSharedData& rVbaData ) :
+ VbaContainerStorageObject( rParent, rxStrg, rSysPath ),
+ mrVbaData( rVbaData )
+{
+}
+
+void VbaFormStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ if ( rStrmName == "\003VBFrame" )
+ TextLineStreamObject( *this, rxStrm, mrVbaData.meTextEnc, rSysFileName ).dump();
+ else
+ VbaContainerStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
+}
+
+VbaProjectStorageObject::VbaProjectStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
+ OleStorageObject( rParent, rxStrg, rSysPath )
+{
+ addPreferredStorage( "VBA" );
+}
+
+void VbaProjectStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ if( rStrgPath.isEmpty() && rStrmName == "PROJECT" )
+ TextLineStreamObject( *this, rxStrm, maVbaData.meTextEnc, rSysFileName ).dump();
+ else
+ OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
+}
+
+void VbaProjectStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
+{
+ if ( rStrgPath == "VBA" )
+ VbaStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump();
+ else
+ VbaFormStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump();
+}
+
+ActiveXStorageObject::ActiveXStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
+ VbaContainerStorageObject( rParent, rxStrg, rSysPath )
+{
+}
+
+void ActiveXStorageObject::implDumpBaseStream( const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ FormControlStreamObject( *this, rxStrm, rSysFileName ).dump();
+}
+
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/dump/oledumper.ini b/oox/source/dump/oledumper.ini
new file mode 100644
index 000000000..2d33c6c4f
--- /dev/null
+++ b/oox/source/dump/oledumper.ini
@@ -0,0 +1,904 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+
+# Path to additional configuration data, relative to this file.
+include-config-file=dumperbase.ini
+
+# OLE name lists =============================================================
+
+constlist=OLE-STD-CLIPBOARD-FORMAT
+ 2=bmp
+ 3=wmf
+ 8=dib
+ 14=emf
+end
+
+combilist=OLE-COLOR
+ 0x0000FFFF=uint32,dec,palette-index,,filter=0xFF000000~0x01000000
+ 0x000000FF=uint32,dec,red,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000
+ 0x0000FF00=uint32,dec,green,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000
+ 0x00FF0000=uint32,dec,blue,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000
+ 0x0000FFFF=uint32,dec,system-color,SYSTEMCOLOR,filter=0xFF000000~0x80000000
+ 0xFF000000=uint8,dec,type,OLE-COLORTYPE
+end
+
+constlist=OLE-COLORTYPE
+ 0x00=default
+ 0x01=palette
+ 0x02=rgb
+ 0x80=system-color
+end
+
+multilist=OLE-MOUSEPTR
+ 0=default,arrow,cross,i-beam
+ 6=size-diag-down,size-vert,size-diag-up,size-hor
+ 10=up-arrow,hour-glass,no-drop,app-starting,help,size-all
+ 99=custom
+end
+
+# StdFont --------------------------------------------------------------------
+
+{0BE35203-8F91-11CE-9DE3-00AA004BB851}=StdFont
+
+flagslist=STDFONT-FLAGS
+ 0x01=bold
+ 0x02=italic
+ 0x04=underline
+ 0x08=strikeout
+end
+
+unitconverter=STDFONT-HEIGHT,/10000,pt
+
+# StdPic ---------------------------------------------------------------------
+
+{0BE35204-8F91-11CE-9DE3-00AA004BB851}=StdPic
+
+shortlist=STDPIC-ID,0x0000746C,StdPic
+
+# StdHlink -------------------------------------------------------------------
+
+{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}=StdHlink
+{79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}=URLMoniker
+{00000303-0000-0000-C000-000000000046}=FileMoniker
+{00000304-0000-0000-C000-000000000046}=ItemMoniker
+{00000305-0000-0000-C000-000000000046}=AntiMoniker
+{00000309-0000-0000-C000-000000000046}=CompositeMoniker
+
+flagslist=STDHLINK-FLAGS
+ 0x00000001=has-target
+ 0x00000002=!relative!absolute
+ 0x00000004=display-specified
+ 0x00000008=has-location
+ 0x00000010=has-display
+ 0x00000020=has-guid
+ 0x00000040=has-creation-time
+ 0x00000080=has-frame
+ 0x00000100=!as-guid!as-string
+ 0x00000200=has-abs-from-rel
+end
+
+flagslist=STDHLINK-URL-FLAGS
+ 0x00000001=allow-relative
+ 0x00000002=wildcard-scheme
+ 0x00000004=implicit-file-scheme
+ 0x00000008=no-fragment
+ 0x00000010=no-canonicalize
+ 0x00000020=canonicalize
+ 0x00000040=dos-path
+ 0x00000080=decode-extra-info
+ 0x00000100=no-decode-extra-info
+ 0x00000200=crack-unknown-schemes
+ 0x00000400=no-crack-unknown-schemes
+ 0x00000800=preprocess-html
+ 0x00001000=no-preprocess-html
+ 0x00002000=registry-settings
+ 0x00004000=no-registry-settings
+ 0x00008000=no-encode-forbidden-chars
+end
+
+# OLE property stream --------------------------------------------------------
+
+{F29F85E0-4FF9-1068-AB91-08002B27B3D9}=GlobalDocProp
+{D5CDD502-2E9C-101B-9397-08002B2CF9AE}=BuiltinDocProp
+{D5CDD505-2E9C-101B-9397-08002B2CF9AE}=CustomDocProp
+
+constlist=OLEPROP-BYTE-ORDER
+ 0xFEFF=big-endian
+ 0xFFFE=little-endian
+end
+
+shortlist=OLEPROP-OSTYPE,0,dos,mac,win32,unix
+
+multilist=OLEPROP-BASEIDS
+ quote-names=1
+ default=
+ 0=dictionary,codepage
+end
+
+multilist=OLEPROP-GLOBALIDS
+ include=OLEPROP-BASEIDS
+ 2=title,subject,author,keywords,comments,template,last-author,rev-number
+ 10=edit-time,last-printed,create-time,last-saved,page-count,word-count,char-count,thumbnail,appname,security
+end
+
+multilist=OLEPROP-BUILTINIDS
+ include=OLEPROP-BASEIDS
+ 2=category,pres-target,byte-count,line-count,para-count,slide-count,note-count,hidden-slide-count
+ 10=clips,scale-crop,heading-pairs,part-titles,manager,company,links-uptodate
+end
+
+multilist=OLEPROP-TYPE-SIMPLE
+ 0=empty,null,int16,int32,float,double,currency,date,string8,dispatch
+ 10=error,bool,variant,unknown,decimal,int8,uint8,uint16,uint32
+ 20=int64,uint64,int,uint,void,hresult,ptr,savearray,c-array,userdef
+ 30=string8,string16,,,,,record,intptr,uintptr
+ 64=time-stamp,blob,stream,storage,stream-obj,storage-obj
+ 70=blob-obj,clip-fmt,guid,vers-stream
+ 0x0FFF=str8-blob
+end
+
+combilist=OLEPROP-TYPE
+ 0x0FFF=int32,dec,base-type,OLEPROP-TYPE-SIMPLE
+ 0x1000=vector
+ 0x2000=array
+ 0x4000=byref
+end
+
+# ComCtl controls ============================================================
+
+constlist=COMCTL-HEADER-IDS
+ 0x0A2BAE11=COMCTL_SLIDER_60
+ 0x12344321=COMCTL_SIZE
+ 0x6AC13CB1=COMCTL_TREEVIEW_60
+ 0x97AB8A01=COMCTL_PROGRESSBAR_60
+ 0x99470A83=COMCTL_SCROLLBAR_60
+ 0xABCDEF01=COMCTL_COMMONDATA
+ 0xBDECDE1F=COMCTL_COMPLEXDATA
+ 0xD12A7AC1=COMCTL_TABSTRIP_60
+ 0xE6E17E80=COMCTL_IMAGELIST_50_60
+ 0xE6E17E84=COMCTL_PROGRESSBAR_50
+ 0xE6E17E86=COMCTL_SLIDER_50
+ 0xE6E17E88=COMCTL_STATUSBAR_50
+ 0xE6E17E8A=COMCTL_TABSTRIP_50
+ 0xE6E17E8E=COMCTL_TREEVIEW_50
+ 0xFF3626A0=COMCTL_UPDOWN_50_60
+end
+
+combilist=COMCTL-COMMON-FLAGS
+ ignore=0xFFFF8000
+ 0x00000001=flat-border
+ 0x00000002=enabled
+ 0x00000004=3d-border
+ 0x000007F8=uint8,dec,mouse-ptr,OLE-MOUSEPTR
+ 0x00000800=ole-drag-auto
+ 0x00002000=ole-drop-manual
+end
+
+flagslist=COMCTL-COMPLEX-FLAGS
+ ignore=0xFFFFFFFC
+ 0x00000001=font
+ 0x00000002=mouse-icon
+end
+
+# flat scrollbar -------------------------------------------------------------
+
+{FE38753A-44A3-11D1-B5B7-0000C09000C4}=MSComCtl2.FlatScrollBar.2
+
+combilist=COMCTL-SCROLLBAR-FLAGS
+ 0x00000003=uint8,dec,appearance,COMCTL-SCROLLBAR-APPEARANCE
+ 0x0000000C=uint8,dec,arrows,COMCTL-SCROLLBAR-ARROWS
+ 0x00000010=!vertical!horizontal
+end
+
+shortlist=COMCTL-SCROLLBAR-APPEARANCE,0,3d,flat,track-3d
+shortlist=COMCTL-SCROLLBAR-ARROWS,0,both,left-up,right-down
+
+# progress bar ---------------------------------------------------------------
+
+{0713E8D2-850A-101B-AFC0-4210102A8DA7}=COMCTL.ProgCtrl.1
+{35053A22-8589-11D1-B16A-00C0F0283628}=MSComctlLib.ProgCtrl.2
+
+# slider ---------------------------------------------------------------------
+
+{373FF7F0-EB8B-11CD-8820-08002B2F4F5A}=COMCTL.Slider.1
+{F08DF954-8592-11D1-B16A-00C0F0283628}=MSComctlLib.Slider.2
+
+constlist=COMCTL-SLIDER-SELECTRANGE
+ 0x00000000=off
+ 0x0000FFFF=on
+end
+
+shortlist=COMCTL-SLIDER-TICKSTYLE,0,bottom-right,top-left,both,no-ticks
+
+# updown ---------------------------------------------------------------------
+
+{026371C0-1B7C-11CF-9D53-00AA003C9CB6}=ComCtl2.UpDown.1
+{603C7E80-87C2-11D1-8BE3-0000F8754DA1}=MSComCtl2.UpDown.2
+
+flagslist=COMCTL-UPDOWN-FLAGS1
+ 0x00000001=!align-left!align-right
+ 0x00000004=!vertical!horizontal
+end
+
+flagslist=COMCTL-UPDOWN-FLAGS2
+ 0x00000004=wrap
+ 0x00000020=ole-drop-manual
+ 0x00000080=enabled
+end
+
+# image list -----------------------------------------------------------------
+
+{58DA8D8F-9D6A-101B-AFC0-4210102A8DA7}=COMCTL.ImageListCtrl.1
+{2C247F23-8591-11D1-B16A-00C0F0283628}=MSComctlLib.ImageListCtrl.2
+
+flagslist=COMCTL-IMAGELIST-TEXTFLAGS
+ 0x01=key
+ 0x02=tag
+end
+
+# tab strip ------------------------------------------------------------------
+
+{9ED94440-E5E8-101B-B9B5-444553540000}=COMCTL.TabStrip.1
+{1EFB6596-857C-11D1-B16A-00C0F0283628}=MSComctlLib.TabStrip.2
+
+combilist=COMCTL-TABSTRIP-FLAGS1
+ ignore=0xFFFFFFE0
+ 0x00000001=multi-row
+ 0x00000002=show-tooltips
+ 0x00000018=uint8,dec,tab-width-style,COMCTL-TABSTRIP-TABWIDTHSTYLE
+end
+
+combilist=COMCTL-TABSTRIP-FLAGS2
+ ignore=0xFFFF0000
+ 0x00000003=uint8,dec,style,COMCTL-TABSTRIP-STYLE
+ 0x00000004=hot-tracking
+ 0x00000008=multi-select
+ 0x00000030=uint8,dec,placement,COMCTL-TABSTRIP-PLACEMENT
+ 0x00000040=separators
+end
+
+flagslist=COMCTL-TABSTRIP-FLAGS3
+ ignore=0xFFFF0000
+ 0x00000001=tabstyle-opposite
+end
+
+shortlist=COMCTL-TABSTRIP-TABWIDTHSTYLE,0,justified,non-justified,fixed
+shortlist=COMCTL-TABSTRIP-STYLE,0,tabs,tab-buttons,flat-buttons
+shortlist=COMCTL-TABSTRIP-PLACEMENT,0,top,bottom,left,right
+
+flagslist=COMCTL-TABSTRIP-TABFLAGS
+ 0x00000001=caption
+ 0x00000002=key
+ 0x00000004=tag
+ 0x00000008=tooltip
+end
+
+# tree view ------------------------------------------------------------------
+
+{0713E8A2-850A-101B-AFC0-4210102A8DA7}=COMCTL.TreeCtrl.1
+{C74190B6-8589-11D1-B16A-00C0F0283628}=MSComctlLib.TreeCtrl.2
+
+combilist=COMCTL-TREEVIEW-FLAGS
+ ignore=0xFFFF0000
+ 0x00000001=!tree-lines!root-lines
+ 0x0000001C=uint8,dec,style,COMCTL-TREEVIEW-STYLE
+ 0x00000020=label-edit
+ 0x00000080=hide-selection
+ 0x00000100=sorted
+end
+
+flagslist=COMCTL-TREEVIEW-STRINGFLAGS
+ ignore=0xFFFFFFF8
+ 0x00000001=separator
+ 0x00000002=image-list
+end
+
+shortlist=COMCTL-TREEVIEW-STYLE,0,text,pic-text,plusminus-text,plusminus-pic-text,treelines-text,treelines-pic-text,treelines-plusminus-text,treelines-plusminus-pic-text
+
+flagslist=COMCTL-TREEVIEW-FLAGS2
+ 0x00000001=checkboxes
+ 0x00000002=full-row-select
+ 0x00000004=hot-tracking
+ 0x00000008=scroll
+ 0x00000010=single-select
+end
+
+# status bar -----------------------------------------------------------------
+
+{6B7E638F-850A-101B-AFC0-4210102A8DA7}=COMCTL.SBarCtrl.1
+
+combilist=COMCTL-STATUSBAR-PANELFLAGS
+ ignore=0xFFFFF000
+ 0x00000007=uint8,dec,style,COMCTL-STATUSBAR-STYLE
+ 0x00000018=uint8,dec,alignment,COMCTL-STATUSBAR-ALIGN
+ 0x00000060=uint8,dec,bevel,COMCTL-STATUSBAR-BEVEL
+ 0x00000080=enabled
+ 0x00000300=uint8,dec,autosize,COMCTL-STATUSBAR-AUTOSIZE
+ 0x00000400=visible
+end
+
+shortlist=COMCTL-STATUSBAR-STYLE,0,text,caps,num,ins,scrl,time,date,kana
+shortlist=COMCTL-STATUSBAR-ALIGN,0,left,center,right
+shortlist=COMCTL-STATUSBAR-BEVEL,0,no-bevel,inset,raised
+shortlist=COMCTL-STATUSBAR-AUTOSIZE,0,no-auto,spring,content
+
+flagslist=COMCTL-STATUSBAR-TEXTFLAGS
+ 0x00000001=text
+ 0x00000002=vis-text
+ 0x00000004=key
+ 0x00000008=tag
+ 0x00000010=tooltip
+end
+
+# other controls =============================================================
+
+# Microsoft Web Browser
+{8856F961-340A-11D0-A96B-00C04FD705A2}=Shell.Explorer.2
+
+# ActiveX name lists =========================================================
+
+combilist=AX-STRINGLEN
+ 0x80000000=!unicode!compressed
+ 0x7FFFFFFF=int32,dec,buffer-size
+end
+
+combilist=AX-ARRAYSTRINGLEN
+ 0x80000000=!unicode!compressed
+ 0x7FFFFFFF=int32,dec,len
+end
+
+combilist=AX-FLAGS
+ 0x00000001=reserved-1
+ 0x00000002=enabled
+ 0x00000004=locked
+ 0x00000008=opaque
+ 0x00000010=reserved-2
+ 0x00000400=column-heads
+ 0x00000800=entire-rows
+ 0x00001000=existing-entries-only
+ 0x00002000=caption-left
+ 0x00004000=editable
+ 0x00078000=uint8,dec,ime-mode,AX-IMEMODE
+ 0x00080000=drag-enabled
+ 0x00100000=enter-as-newline
+ 0x00200000=keep-selection
+ 0x00400000=tab-as-character
+ 0x00800000=word-wrap
+ 0x02000000=borders-suppressed
+ 0x04000000=select-line
+ 0x08000000=single-char-select
+ 0x10000000=auto-size
+ 0x20000000=hide-selection
+ 0x40000000=maxlength-autotab
+ 0x80000000=multi-line
+end
+
+multilist=AX-IMEMODE
+ 0=no-control,on,off,disabled
+ 4=hiragana,fillwidth-katakana,halfwidth-katakana
+ 7=fullwidth-alpha,halfwidth-alpha
+ 9=fullwidth-hangul,halfwidth-hangul
+ 11=fullwidth-hanzi,halfwidth-hanzi
+end
+
+combilist=AX-IMAGEPOS
+ 0x0000FFFF=uint16,dec,image,AX-POS
+ 0xFFFF0000=uint16,dec,label,AX-POS
+end
+
+unitconverter=AX-CONV-MS,1,ms
+
+shortlist=AX-ENABLED,0,disabled,enabled
+shortlist=AX-BORDERSTYLE,0,none,single
+shortlist=AX-SPECIALEFFECT,0,flat,raised,sunken,etched,,,bump
+shortlist=AX-ORIENTATION,-1,auto,vertical,horizontal
+shortlist=AX-POS,0,top-left,top,top-right,left,center,right,bottom-left,bottom,bottom-right
+shortlist=AX-IMAGEALIGN,0,top-left,top-right,center,bottom-left,bottom-right
+shortlist=AX-IMAGESIZEMODE,0,clip,stretch,,stretch-ratio
+
+# CFontNew -------------------------------------------------------------------
+
+{AFC20920-DA4E-11CE-B94300AA006887B4}=CFontNew
+
+flagslist=AX-CFONTNEW-PROPERTIES
+ 0x0001=font-name
+ 0x0002=flags
+ 0x0004=font-size
+ 0x0008=font-offset
+ 0x0010=charset
+ 0x0020=pitch-family
+ 0x0040=alignment
+ 0x0080=font-weight
+end
+
+flagslist=AX-CFONTNEW-FLAGS
+ 0x00000001=bold
+ 0x00000002=italic
+ 0x00000004=underline
+ 0x00000008=strikeout
+ 0x00002000=sunken
+ 0x00002000=sunken
+ 0x40000000=auto-color
+end
+
+shortlist=AX-CFONTNEW-ALIGNMENT,1,left,right,center
+
+# column info ----------------------------------------------------------------
+
+flagslist=AX-COLUMNINFO-PROPERTIES
+ 0x00000001=column-width
+end
+
+# command button -------------------------------------------------------------
+
+{D7053240-CE69-11CD-A777-00DD01143C57}=Forms.CommandButton.1
+
+flagslist=AX-COMMANDBUTTON-PROPERTIES
+ 0x00000001=text-color
+ 0x00000002=fill-color
+ 0x00000004=flags
+ 0x00000008=caption
+ 0x00000010=image-pos
+ 0x00000020=size
+ 0x00000040=mouse-ptr
+ 0x00000080=image
+ 0x00000100=accelerator
+ 0x00000200=no-take-focus
+ 0x00000400=mouse-icon
+end
+
+# toggle button, check box, option button, text box, list box, combo box -----
+
+{8BD21D10-EC42-11CE-9E0D-00AA006002F3}=Forms.TextBox.1
+{8BD21D20-EC42-11CE-9E0D-00AA006002F3}=Forms.ListBox.1
+{8BD21D30-EC42-11CE-9E0D-00AA006002F3}=Forms.ComboBox.1
+{8BD21D40-EC42-11CE-9E0D-00AA006002F3}=Forms.CheckBox.1
+{8BD21D50-EC42-11CE-9E0D-00AA006002F3}=Forms.OptionButton.1
+{8BD21D60-EC42-11CE-9E0D-00AA006002F3}=Forms.ToggleButton.1
+{00024512-0000-0000-C000-000000000046}=RefEdit.Ctrl
+
+flagslist=AX-MORPH-PROPERTIES
+ 0x0000000000000001=flags
+ 0x0000000000000002=fill-color
+ 0x0000000000000004=text-color
+ 0x0000000000000008=max-length
+ 0x0000000000000010=border-style
+ 0x0000000000000020=scrollbars
+ 0x0000000000000040=control-type
+ 0x0000000000000080=mouse-ptr
+ 0x0000000000000100=size
+ 0x0000000000000200=password-char
+ 0x0000000000000400=list-width
+ 0x0000000000000800=bound-column
+ 0x0000000000001000=text-column
+ 0x0000000000002000=column-count
+ 0x0000000000004000=list-rowcount
+ 0x0000000000008000=column-info-count
+ 0x0000000000010000=match-entry-mode
+ 0x0000000000020000=list-style
+ 0x0000000000040000=show-dropdown-mode
+ 0x0000000000100000=dropdown-style
+ 0x0000000000200000=selection-type
+ 0x0000000000400000=value
+ 0x0000000000800000=caption
+ 0x0000000001000000=image-pos
+ 0x0000000002000000=border-color
+ 0x0000000004000000=special-effect
+ 0x0000000008000000=mouse-icon
+ 0x0000000010000000=image
+ 0x0000000020000000=accelerator
+ 0x0000000080000000=reserved
+ 0x0000000100000000=groupname
+end
+
+shortlist=AX-MORPH-SCROLLBARS,0,none,horizontal,vertical,both
+shortlist=AX-MORPH-CONTROLTYPE,1,edit,listbox,combobox,checkbox,optionbutton,togglebutton,dropdown-listbox
+shortlist=AX-MORPH-MATCHENTRYTYPE,0,first-letter,complete,none
+shortlist=AX-MORPH-LISTSTYLE,0,plain,with-buttons
+shortlist=AX-MORPH-SHOWDROPDOWNMODE,0,never,on-focus,always
+shortlist=AX-MORPH-DROPDOWNSTYLE,0,no-symbol,arrow,ellipsis,underline
+shortlist=AX-MORPH-SELECTIONTYPE,0,single,multi,range
+
+constlist=AX-MORPH-BOUNDCOLUMN
+ default=
+ 0=value-is-row-index
+end
+
+constlist=AX-MORPH-TEXTCOLUMN
+ default=
+ -1=first-column-with-width
+ 0=row-numbers
+end
+
+constlist=AX-MORPH-COLUMNCOUNT
+ default=
+ -1=all-columns
+end
+
+# label ----------------------------------------------------------------------
+
+{978C9E23-D4B0-11CE-BF2D-00AA003F40D0}=Forms.Label.1
+
+flagslist=AX-LABEL-PROPERTIES
+ 0x00000001=text-color
+ 0x00000002=fill-color
+ 0x00000004=flags
+ 0x00000008=caption
+ 0x00000010=image-pos
+ 0x00000020=size
+ 0x00000040=mouse-ptr
+ 0x00000080=border-color
+ 0x00000100=border-style
+ 0x00000200=special-effect
+ 0x00000400=image
+ 0x00000800=accelerator
+ 0x00001000=mouse-icon
+end
+
+# image ----------------------------------------------------------------------
+
+{4C599241-6926-101B-9992-00000B65C6F9}=Forms.Image.1
+
+flagslist=AX-IMAGE-PROPERTIES
+ 0x00000004=auto-size
+ 0x00000008=border-color
+ 0x00000010=fill-color
+ 0x00000020=border-style
+ 0x00000040=mouse-ptr
+ 0x00000080=image-size-mode
+ 0x00000100=special-effect
+ 0x00000200=size
+ 0x00000400=image
+ 0x00000800=image-align
+ 0x00001000=image-tiling
+ 0x00002000=flags
+ 0x00004000=mouse-icon
+end
+
+# scroll bar -----------------------------------------------------------------
+
+{DFD181E0-5E2F-11CE-A449-00AA004A803D}=Forms.ScrollBar.1
+
+flagslist=AX-SCROLLBAR-PROPERTIES
+ 0x00000001=arrow-color
+ 0x00000002=fill-color
+ 0x00000004=flags
+ 0x00000008=size
+ 0x00000010=mouse-ptr
+ 0x00000020=min
+ 0x00000040=max
+ 0x00000080=value
+ 0x00000100=unused
+ 0x00000200=prev-enabled
+ 0x00000400=next-enabled
+ 0x00000800=step
+ 0x00001000=page-step
+ 0x00002000=orientation
+ 0x00004000=prop-thumb
+ 0x00008000=delay
+ 0x00010000=mouse-icon
+end
+
+shortlist=AX-SCROLLBAR-PROPTHUMB,-1,proportional,fixed
+
+# spin button ----------------------------------------------------------------
+
+{79176FB0-B7F2-11CE-97EF-00AA006D2776}=Forms.SpinButton.1
+
+flagslist=AX-SPINBUTTON-PROPERTIES
+ 0x00000001=arrow-color
+ 0x00000002=fill-color
+ 0x00000004=flags
+ 0x00000008=size
+ 0x00000010=unused
+ 0x00000020=min
+ 0x00000040=max
+ 0x00000080=value
+ 0x00000100=prev-enabled
+ 0x00000200=next-enabled
+ 0x00000400=step
+ 0x00000800=orientation
+ 0x00001000=delay
+ 0x00002000=mouse-icon
+ 0x00004000=mouse-ptr
+end
+
+# tab strip ------------------------------------------------------------------
+
+{EAE50EB0-4A62-11CE-BED6-00AA00611080}=Forms.TabStrip.1
+
+flagslist=AX-TABSTRIP-PROPERTIES
+ 0x00000001=selected-tab
+ 0x00000002=fill-color
+ 0x00000004=text-color
+ 0x00000010=size
+ 0x00000020=tab-captions
+ 0x00000040=mouse-ptr
+ 0x00000100=tab-orientation
+ 0x00000200=tab-style
+ 0x00000400=multi-row
+ 0x00000800=tab-fixed-width
+ 0x00001000=tab-fixed-height
+ 0x00002000=tooltips
+ 0x00008000=tooltip-strings
+ 0x00020000=tab-names
+ 0x00040000=flags
+ 0x00080000=new-version
+ 0x00100000=tabs-allocated
+ 0x00200000=tags
+ 0x00400000=tab-flag-count
+ 0x00800000=accelerators
+ 0x01000000=mouse-icon
+end
+
+shortlist=AX-TABSTRIP-ORIENTATION,0,top,bottom,left,right
+shortlist=AX-TABSTRIP-TABSTYLE,0,tabs,buttons,none
+
+flagslist=AX-TABSTRIP-FLAGS
+ 0x00000001=visible
+ 0x00000002=enabled
+end
+
+# VBA forms ==================================================================
+
+# form class info ------------------------------------------------------------
+
+flagslist=VBA-CLASSINFO-PROPERTIES
+ 0x00000001=class-id
+ 0x00000002=disp-event
+ 0x00000008=default-prog
+ 0x00000010=class-flags
+ 0x00000020=method-count
+ 0x00000040=dispatch-id-bind
+ 0x00000080=get-bind-index
+ 0x00000100=put-bind-index
+ 0x00000200=bind-type
+ 0x00000400=get-value-index
+ 0x00000800=put-value-index
+ 0x00001000=value-type
+ 0x00002000=dispatch-id-rowset
+ 0x00004000=set-rowset
+end
+
+combilist=VBA-CLASSINFO-FLAGS
+ 0x0000FFFF=uint16,hex,classtable-flags,VBA-CLASSTABLE-CLASSFLAGS
+ 0xFFFF0000=uint16,hex,var-flags,VBA-CLASSTABLE-VARFLAGS
+end
+
+flagslist=VBA-CLASSTABLE-CLASSFLAGS
+ 0x0001=exclusive-value
+ 0x0002=dual-interface
+ 0x0004=no-aggregation
+end
+
+flagslist=VBA-CLASSTABLE-VARFLAGS
+ 0x0001=read-only
+ 0x0002=source
+ 0x0004=bindable
+ 0x0008=request-edit
+ 0x0010=display-bind
+ 0x0020=default-bind
+ 0x0040=hidden
+ 0x0080=restricted
+ 0x0100=default-coll-elem
+ 0x0200=ui-default
+ 0x0400=non-browsable
+ 0x0800=replaceable
+ 0x1000=immediate-bind
+end
+
+# form site ------------------------------------------------------------------
+
+flagslist=VBA-FORMSITE-PROPERTIES
+ 0x00000001=name
+ 0x00000002=tag
+ 0x00000004=id
+ 0x00000008=help-context-id
+ 0x00000010=flags
+ 0x00000020=stream-size
+ 0x00000040=tab-index
+ 0x00000080=class-id-cache-index
+ 0x00000100=pos
+ 0x00000200=group-id
+ 0x00000800=tool-tip
+ 0x00001000=licence-key
+ 0x00002000=control-source
+ 0x00004000=row-source
+end
+
+flagslist=VBA-FORMSITE-FLAGS
+ 0x00000001=tabstop
+ 0x00000002=visible
+ 0x00000004=default
+ 0x00000008=cancel
+ 0x00000010=!storage!obj-stream
+ 0x00000020=auto-size
+ 0x00000100=preserve-height
+ 0x00000200=fit-to-parent
+ 0x00002000=select-child
+ 0x00040000=container
+end
+
+combilist=VBA-FORMSITE-CLASSIDCACHE
+ 0x7FFF=uint16,dec,cache-idx,VBA-FORMSITE-CLASSIDCACHEINDEX,filter=0x8000~0x0000
+ 0x7FFF=uint16,dec,class-table-idx,,filter=0x8000~0x8000
+ 0x8000=!predefined-class-id!class-table-index
+end
+
+constlist=VBA-FORMSITE-CLASSNAMES
+ 7=Forms.Form.1
+ 12=Forms.Image.1
+ 14=Forms.Frame.1
+ 15=Internal.MorphData
+ 16=Forms.SpinButton.1
+ 17=Forms.CommandButton.1
+ 18=Forms.TabStrip.1
+ 21=Forms.Label.1
+ 23=Forms.TextBox.1
+ 24=Forms.ListBox.1
+ 25=Forms.ComboBox.1
+ 26=Forms.CheckBox.1
+ 27=Forms.OptionButton.1
+ 28=Forms.ToggleButton.1
+ 47=Forms.ScrollBar.1
+ 57=Forms.MultiPage.1
+end
+
+constlist=VBA-FORMSITE-CLASSIDCACHEINDEX
+ include=VBA-FORMSITE-CLASSNAMES
+ 0x7FFF=invalid
+end
+
+# form design extender ------------------------------------------------------
+
+flagslist=VBA-FORMDESIGNEXT-PROPERTIES
+ 0x00000001=flags
+ 0x00000002=grid-x
+ 0x00000004=grid-y
+ 0x00000008=click-control-mode
+ 0x00000010=dblclick-control-mode
+end
+
+flagslist=VBA-FORMDESIGNEXT-FLAGS
+ 0x00000001=inherit-design-mode
+ 0x00000002=design-mode
+ 0x00000004=inherit-show-toolbox
+ 0x00000008=show-toolbox
+ 0x00000010=inherit-show-grid
+ 0x00000020=show-grid
+ 0x00000040=inherit-snap-to-grid
+ 0x00000080=snap-to-grid
+ 0x00000100=inherit-grid-x
+ 0x00000200=inherit-grid-y
+ 0x00000400=inherit-click-control-mode
+ 0x00000800=inherit-dblclick-control-mode
+ 0x00001000=inherit-show-invisible
+ 0x00002000=show-invisible
+ 0x00004000=inherit-show-tooltips
+ 0x00008000=show-tooltips
+ 0x00010000=inherit-immediate-layout
+ 0x00020000=immediate-layout
+end
+
+shortlist=VBA-FORMDESIGNEXT-CLICKCTRLMODE,-2,inherit,default,insertion-point,select-then-insert
+shortlist=VBA-FORMDESIGNEXT-DBLCLICKCTRLMODE,-2,inherit,,select-text,edit-code,edit-properties
+
+# form -----------------------------------------------------------------------
+
+{C62A69F0-16DC-11CE-9E98-00AA00574A4F}=Forms.Form.1
+{6E182020-F460-11CE-9BCD-00AA00608E01}=Forms.Frame.1
+
+flagslist=VBA-FORM-PROPERTIES
+ 0x00000002=fill-color
+ 0x00000004=text-color
+ 0x00000008=next-available-id
+ 0x00000040=flags
+ 0x00000080=border-style
+ 0x00000100=mouse-ptr
+ 0x00000200=scrollbars
+ 0x00000400=display-size
+ 0x00000800=logical-size
+ 0x00001000=scroll-pos
+ 0x00002000=group-count
+ 0x00008000=mouse-icon
+ 0x00010000=cycle
+ 0x00020000=special-effect
+ 0x00040000=border-color
+ 0x00080000=caption
+ 0x00100000=font
+ 0x00200000=image
+ 0x00400000=zoom
+ 0x00800000=image-align
+ 0x01000000=image-tiling
+ 0x02000000=image-sizemode
+ 0x04000000=shape-cookie
+ 0x08000000=draw-buffer
+end
+
+flagslist=VBA-FORM-FLAGS
+ 0x00000004=enabled
+ 0x00004000=has-design-extender
+ 0x00008000=!has-class-table!skip-class-table
+end
+
+flagslist=VBA-FORM-SCROLLBARS
+ 0x01=horizontal
+ 0x02=vertical
+ 0x04=keep-horizontal
+ 0x08=keep-vertical
+ 0x10=vertical-left
+end
+
+shortlist=VBA-FORM-CYCLE,0,all-forms,,current-form
+
+combilist=VBA-FORM-SITE-TYPECOUNT
+ 0x7F=uint8,dec,type-count
+ 0x80=!type!count
+end
+
+# page -----------------------------------------------------------------------
+
+flagslist=VBA-PAGE-PROPERTIES
+ 0x00000002=transition-effect
+ 0x00000004=transition-period
+end
+
+shortlist=VBA-PAGE-TRANSITIONEFFECT,0,none,cover-up,cover-right-up,cover-right,cover-right-down,cover-down,cover-left-down,cover-left,cover-left-up,push-up,push-right,push-down,push-left
+
+# multi page -----------------------------------------------------------------
+
+{46E31370-3F7A-11CE-BED6-00AA00611080}=Forms.MultiPage.1
+
+flagslist=VBA-MULTIPAGE-PROPERTIES
+ 0x00000002=page-count
+ 0x00000004=id
+ 0x00000008=enabled
+end
+
+# VBA project name lists =====================================================
+
+multilist=VBA-DIR-RECORD-NAMES
+ 0x0000=,PROJECTSYSKIND,PROJECTLCID,PROJECTCODEPAGE,PROJECTNAME,PROJECTDOCSTRING,PROJECTHELPFILEPATH1,PROJECTHELPCONTEXT
+ 0x0008=PROJECTLIBFLAGS,PROJECTVERSION,,,PROJECTCONSTANTS,REFERENCEREGISTERED,REFERENCEPROJECT,PROJECTMODULES
+ 0x0010=PROJECTEND,,,PROJECTCOOKIE,PROJECTLCIDINVOKE,,REFERENCENAME,
+ 0x0018=,MODULENAME,MODULESTREAMNAME,,MODULEDOCSTRING,,MODULEHELPCONTEXT,
+ 0x0020=,MODULETYPEPROCEDURAL,MODULETYPEDOCUMENT,,,MODULEREADONLY,,
+ 0x0028=MODULEPRIVATE,,,MODULEEND,MODULECOOKIE,,,REFERENCECONTROL
+ 0x0030=REFERENCEEXTENDED,MODULEOFFSET,MODULESTREAMNAMEUNICODE,REFERENCEORIGINAL,,,,
+ 0x0038=,,,,PROJECTCONSTANTSUNICODE,PROJECTHELPFILEPATH2,REFERENCENAMEUNICODE,
+ 0x0040=PROJECTDOCSTRINGUNICODE,,,,,,,MODULENAMEUNICODE
+ 0x0048=MODULEDOCSTRINGUNICODE,,,,,,,
+end
+
+constlist=VBA-DIR-SIMPLE-RECORDS
+ 0x0001=uint32,dec,platform,VBA-DIR-PROJECTSYSKIND-PLATFORM
+ 0x0002=uint32,hex,lang-id
+ 0x0007=uint32,dec,help-context-id
+ 0x0008=uint32,hex,libflags
+ 0x000F=uint16,dec,module-count
+ 0x0013=int16,dec,cookie
+ 0x0014=uint32,hex,lang-id
+ 0x001E=uint32,dec,help-context-id
+ 0x002C=int16,dec,cookie
+end
+
+shortlist=VBA-DIR-PROJECTSYSKIND-PLATFORM,0,16-bit-windows,32-bit-windows,macintosh
+
+# ============================================================================
diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx
new file mode 100644
index 000000000..c65b79206
--- /dev/null
+++ b/oox/source/dump/pptxdumper.cxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/dump/pptxdumper.hxx>
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <oox/dump/oledumper.hxx>
+#include <oox/dump/xlsbdumper.hxx>
+#include <oox/helper/zipstorage.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <o3tl/string_view.hxx>
+
+#ifdef DBG_UTIL
+
+namespace oox::dump::pptx {
+
+using namespace ::com::sun::star::io;
+//using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::FilterBase;
+
+RootStorageObject::RootStorageObject( const DumperBase& rParent )
+{
+ StorageObjectBase::construct( rParent );
+}
+
+void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+{
+ std::u16string_view aExt( InputOutputHelper::getFileNameExtension( rStrmName ) );
+ if( o3tl::equalsIgnoreAsciiCase(aExt, u"pptx") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"potx") )
+ {
+ Dumper( getContext(), rxStrm, rSysFileName ).dump();
+ }
+#ifdef FIXME
+ else if(
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlsb") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlsm") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlsx") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xltm") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xltx") )
+ {
+ ::oox::dump::xlsb::Dumper( getContext(), rxStrm, rSysFileName ).dump();
+ }
+ else if(
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xla") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlc") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlm") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xls") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlt") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xlw") )
+ {
+ ::oox::dump::biff::Dumper( getContext(), rxStrm, rSysFileName ).dump();
+ }
+#endif
+ else if(
+ o3tl::equalsIgnoreAsciiCase(aExt, u"xml") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"vml") ||
+ o3tl::equalsIgnoreAsciiCase(aExt, u"rels") )
+ {
+ XmlStreamObject( *this, rxStrm, rSysFileName ).dump();
+ }
+ else if( o3tl::equalsIgnoreAsciiCase(aExt, u"bin") )
+ {
+ if( rStrgPath == "ppt" && rStrmName == "vbaProject.bin" )
+ {
+ StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, false );
+ VbaProjectStorageObject( *this, xStrg, rSysFileName ).dump();
+ }
+ else if ( rStrgPath == "ppt/embeddings" )
+ {
+ StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, false );
+ OleStorageObject( *this, xStrg, rSysFileName ).dump();
+ }
+ else if ( rStrgPath == "ppt/activeX" )
+ {
+ StorageRef xStrg = std::make_shared<::oox::ole::OleStorage>( getContext(), rxStrm, true );
+ ActiveXStorageObject( *this, xStrg, rSysFileName ).dump();
+ }
+ else
+ {
+ BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
+ }
+ }
+}
+
+#define DUMP_PPTX_CONFIG_ENVVAR "OOO_PPTXDUMPER"
+
+Dumper::Dumper( const FilterBase& rFilter )
+{
+ ConfigRef xCfg = std::make_shared<Config>( DUMP_PPTX_CONFIG_ENVVAR, rFilter );
+ DumperBase::construct( xCfg );
+}
+
+Dumper::Dumper( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm, const OUString& rSysFileName )
+{
+ if( rxContext.is() && rxInStrm.is() )
+ {
+ StorageRef xStrg = std::make_shared<ZipStorage>( rxContext, rxInStrm );
+ ConfigRef xCfg = std::make_shared<Config>( DUMP_PPTX_CONFIG_ENVVAR, rxContext, xStrg, rSysFileName );
+ DumperBase::construct( xCfg );
+ }
+}
+
+void Dumper::implDump()
+{
+ RootStorageObject( *this ).dump();
+}
+
+} // namespace oox::dump::pptx
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/dump/pptxdumper.ini b/oox/source/dump/pptxdumper.ini
new file mode 100644
index 000000000..5bfd267e7
--- /dev/null
+++ b/oox/source/dump/pptxdumper.ini
@@ -0,0 +1,35 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+
+# Path to additional configuration data, relative to this file.
+include-config-file=dumperbase.ini
+
+# Enable entire dumper (default=off). This option does not affect the option
+# 'enable-import'.
+# 0=off, 1=on, missing: setting from dumperbase.ini
+# enable-dumper=1
+
+# Enable import after dumping (default=on). Disabling this option allows
+# to dump a file without loading it. This option is independent from the
+# 'enable-dumper' option.
+# 0=off, 1=on, missing: setting from dumperbase.ini
+# enable-import=1
+
+# ============================================================================
diff --git a/oox/source/dump/xlsbdumper.ini b/oox/source/dump/xlsbdumper.ini
new file mode 100644
index 000000000..9a28f8268
--- /dev/null
+++ b/oox/source/dump/xlsbdumper.ini
@@ -0,0 +1,1204 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# dumper settings ============================================================
+
+# Path to additional configuration data, relative to this file.
+include-config-file=dumperbase.ini
+include-config-file=oledumper.ini
+
+# Enable entire dumper. This option does not affect the option 'enable-import'.
+# 0=off, 1=on, missing = use setting from dumperbase.ini
+# enable-dumper=1
+
+# Enable import after dumping. Disabling this option allows to dump a file
+# without loading it. This option is independent from the 'enable-dumper'
+# option.
+# 0=off, 1=on, missing = use setting from dumperbase.ini
+# enable-import=1
+
+# name lists =================================================================
+
+# common ---------------------------------------------------------------------
+
+unitconverter=CONV-TINT,/327.67,%
+unitconverter=CONV-COLWIDTH,/256,chars
+
+constlist=ERRORCODES
+ 0x00=#NULL!
+ 0x07=#DIV/0!
+ 0x0F=#VALUE!
+ 0x17=#REF!
+ 0x1D=#NAME?
+ 0x24=#NUM!
+ 0x2A=#N/A
+end
+
+flagslist=STRING-FLAGS
+ 0x01=rich-string
+ 0x02=phonetic-text
+end
+
+combilist=CELL-XFID
+ 0x00FFFFFF=int32,dec,xf-id
+ 0x01000000=show-phonetic
+end
+
+combilist=PHONETIC-FLAGS
+ ignore=0x0030
+ 0x0003=uint8,dec,type,PHONETICPR-TYPE
+ 0x000C=uint8,dec,alignment,PHONETICPR-ALIGNMENT
+end
+
+shortlist=COLOR-TYPE,0,auto,indexed,rgb,theme
+
+combilist=COLOR-FLAGS
+ 0x01=rgb-valid
+ 0xFE=uint8,dec,type,COLOR-TYPE
+end
+
+multilist=PALETTE-COLORS
+ default=
+ 0=ega-black,ega-white,ega-red,ega-green,ega-blue,ega-yellow,ega-magenta,ega-cyan
+ 64=sys-window-text
+ 65=sys-window-bg
+ 67=sys-button-face
+ 77=sys-window-text-chart
+ 78=sys-window-bg-chart
+ 79=auto-border-chart
+ 80=sys-tooltip-bg
+ 81=sys-tooltip-text
+end
+
+constlist=TEXTROTATION
+ default=
+ 255=stacked
+end
+
+multilist=BORDERSTYLES
+ 0=none,thin,medium,dash,dot
+ 5=thick,double,hair,medium-dash,thin-dash-dot
+ 10=medium-dash-dot,thin-dash-dot-dot,medium-dash-dot-dot,slant-dash-dot
+end
+
+multilist=FILLPATTERNS
+ 0=no-fill,solid-fill,50%-grey,75%-grey,25%-grey
+ 5=hor-stripe,ver-stripe,rev-diag-stripe,diag-stripe,diag-crosshatch
+ 10=thick-diag-crosshatch,thin-hor-stripe,thin-ver-stripe,thin-rev-diag-stripe,thin-diag-stripe
+ 15=thin-hor-crosshatch,thin-diag-crosshatch,12.5%-grey,6.25%-grey
+ 40=gradient
+end
+
+# formulas -------------------------------------------------------------------
+
+flagslist=FORMULA-FLAGS
+ 0x0002=recalc-always
+end
+
+multilist=BASETOKENS
+ 0x00=,tExp,tTbl,tAdd,tSub,tMul,tDiv,tPower
+ 0x08=tConcat,tLT,tLE,tEQ,tGE,tGT,tNE,tIsect
+ 0x10=tList,tRange,tUplus,tUminus,tPercent,tParen,tMissArg,tStr
+ 0x18=tTable,tAttr,,,tErr,tBool,tInt,tNum
+end
+
+constlist=TOKENCLASSES
+ 0x20=R
+ 0x40=V
+ 0x60=A
+end
+
+multilist=CLASSTOKENS
+ 0x00=tArray,tFunc,tFuncVar,tName,tRef,tArea,tMemArea,tMemErr
+ 0x08=tMemNoMem,tMemFunc,tRefErr,tAreaErr,tRefN,tAreaN,tMemAreaN,tMemNoMemN
+ 0x18=,tNameX,tRef3d,tArea3d,tRefErr3d,tAreaErr3d
+end
+
+combilist=FUNCID
+ 0x7FFF=uint16,dec,func-id
+ 0x8000=command
+end
+
+combilist=PARAMCOUNT-CMD
+ 0x7F=uint8,dec,count
+ 0x80=prompt
+end
+
+combilist=REFRELFLAGS
+ 0x3FFF=uint16,dec,value
+ 0x4000=col-rel
+ 0x8000=row-rel
+end
+
+flagslist=TABLEFLAGS
+ 0x0001=single-column
+ 0x0002=column-range
+ 0x0004=#all
+ 0x0008=#headers
+ 0x0010=#data
+ 0x0020=#totals
+ 0x0040=#this-row
+ 0x0080=bracket-spaces
+ 0x0100=sep-spaces
+ 0x0200=single-row
+ 0x0400=single-cell
+end
+
+flagslist=ATTRTYPES
+ 0x01=volatile
+ 0x02=if
+ 0x04=choose
+ 0x08=skip
+ 0x10=sum
+ 0x20=assign
+ 0x40=space
+ 0x80=iferror
+end
+
+shortlist=ATTRSPACETYPES,0,space-before-token,cr-before-token,space-before-open,cr-before-open,space-before-close,cr-before-close,leading-space
+
+shortlist=ARRAYVALUE-TYPE,0,number,string,boolean,,error
+
+# record names ---------------------------------------------------------------
+
+multilist=RECORD-NAMES
+ 0x0000=ROW,CELL_BLANK,CELL_RK,CELL_ERROR,CELL_BOOL,CELL_DOUBLE,CELL_STRING,CELL_SI
+ 0x0008=FORMULA_STRING,FORMULA_DOUBLE,FORMULA_BOOL,FORMULA_ERROR,MULTCELL_BLANK,MULTCELL_RK,MULTCELL_ERROR,MULTCELL_BOOL
+ 0x0010=MULTCELL_DOUBLE,MULTCELL_STRING,MULTCELL_SI,SI,PCITEM_MISSING,PCITEM_DOUBLE,PCITEM_BOOL,PCITEM_ERROR
+ 0x0018=PCITEM_STRING,PCITEM_DATE,PCITEM_INDEX,PCITEMA_MISSING,PCITEMA_DOUBLE,PCITEMA_BOOL,PCITEMA_ERROR,PCITEMA_STRING
+ 0x0020=PCITEMA_DATE,PCRECORD,PCRECORDDT,FRT,FRT_END,,,DEFINEDNAME
+ 0x0028=BINARYINDEXROWS,,BINARYINDEXBLOCK,FONT,NUMFMT,FILL,BORDER,XF
+ 0x0030=CELLSTYLE,,,,,,,
+ 0x0038=,,,,COL,MULTCELL_RSTRING,CELL_RSTRING,CALCCHAINCELL
+ 0x0040=DATAVALIDATION,,,,,,,
+
+ 0x0080=FILEVERSION,WORKSHEET,WORKSHEET_END,WORKBOOK,WORKBOOK_END,SHEETVIEWS,SHEETVIEWS_END,BOOKVIEWS
+ 0x0088=BOOKVIEWS_END,SHEETVIEW,SHEETVIEW_END,CHARTSHEETVIEWS,CHARTSHEETVIEWS_END,CHARTSHEETVIEW,CHARTSHEETVIEW_END,SHEETS
+ 0x0090=SHEETS_END,SHEETDATA,SHEETDATA_END,SHEETPR,DIMENSION,,,PANE
+ 0x0098=SELECTION,WORKBOOKPR,SMARTTAGPR,FILERECOVERYPR,SHEET,CALCPR,WORKBOOKVIEW,SST
+ 0x00A0=SST_END,AUTOFILTER,AUTOFILTER_END,FILTERCOLUMN,FILTERCOLUMN_END,DISCRETEFILTERS,DISCRETEFILTERS_END,DISCRETEFILTER
+ 0x00A8=COLORFILTER,ICONFILTER,TOP10FILTER,DYNAMICFILTER,CUSTOMFILTERS,CUSTOMFILTERS_END,CUSTOMFILTER,AFDATEGROUPITEM
+ 0x00B0=MERGECELL,MERGECELLS,MERGECELLS_END,PCDEFINITION,PCDEFINITION_END,PCDFIELDS,PCDFIELDS_END,PCDFIELD
+ 0x00B8=PCDFIELD_END,PCDSOURCE,PCDSOURCE_END,PCDSHEETSOURCE,PCDSHEETSOURCE_END,PCDFSHAREDITEMS,PCDFSHAREDITEMS_END,PCITEM_ARRAY
+ 0x00C0=PCITEM_ARRAY_END,PCRECORDS,PCRECORDS_END,,,,,
+ 0x00C8=,CONNECTION,CONNECTION_END,,,,,
+
+ 0x00D8=,,,PCDFIELDGROUP,PCDFIELDGROUP_END,PCDFGROUPITEMS,PCDFGROUPITEMS_END,PCDFRANGEPR
+ 0x00E0=PCDFRANGEPR_END,PCDFDISCRETEPR,PCDFDISCRETEPR_END,,,,,
+
+ 0x00F0=,,,,,,,PIVOTAREA
+ 0x00F8=PIVOTAREA_END,PTREFERENCES,PTREFERENCES_END,PTREFERENCE,PTREFERENCE_END,,,
+ 0x0100=,,,,,WEBPR,WEBPR_END,WEBPRTABLES
+ 0x0108=WEBPRTABLES_END,,,,,,,
+ 0x0110=,,,,,BINARYINDEX_END,STYLESHEET,STYLESHEET_END
+ 0x0118=PTDEFINITION,PTFITEM_END,PTFITEM,PTFITEMS,PTFITEMS_END,PTFIELD,PTFIELD_END,PTFIELDS
+ 0x0120=PTFIELDS_END,PTPAGEFIELD,PTPAGEFIELD_END,PTPAGEFIELDS,PTPAGEFIELDS_END,PTDATAFIELD,PTDATAFIELD_END,PTDATAFIELDS
+ 0x0128=PTDATAFIELDS_END,,,,,,,
+ 0x0130=,,,,,PTROWFIELDS,PTROWFIELDS_END,PTCOLFIELDS
+ 0x0138=PTCOLFIELDS_END,PTLOCATION_END,PTLOCATION,PTDEFINITION_END,,,,
+
+ 0x0150=,,,,,,,TABLE
+ 0x0158=TABLE_END,TABLECOLUMNS,TABLECOLUMNS_END,TABLECOLUMN,TABLECOLUMN_END,,,CALCEDCOLUMNFMLA
+ 0x0160=,EXTERNALREFS,EXTERNALREFS_END,EXTERNALREF,,EXTERNALSELF,EXTERNALSAME,EXTSHEETNAMES
+ 0x0168=EXTERNALBOOK,,EXTERNALSHEETS,EXTSHEETDATA,EXTSHEETDATA_END,,EXTROW,EXTCELL_BLANK
+ 0x0170=EXTCELL_DOUBLE,EXTCELL_BOOL,EXTCELL_ERROR,EXTCELL_STRING,,,,
+ 0x0178=,,,,,,PTREFERENCEITEM,PTREFERENCEITEM_END
+ 0x0180=PIVOTCACHES,PIVOTCACHES_END,PIVOTCACHE,PIVOTCACHE_END,,,COLS,COLS_END
+ 0x0188=ROWBREAKS,ROWBREAKS_END,COLBREAKS,COLBREAKS_END,BRK,CUSTOMWORKBOOKVIEW,,
+
+ 0x01A0=,,,,,,CUSTOMSHEETVIEWS,CUSTOMSHEETVIEW
+ 0x01A8=CUSTOMSHEETVIEW_END,CUSTOMSHEETVIEWS_END,ARRAY,SHAREDFMLA,DATATABLE,CONNECTIONS,CONNECTIONS_END,
+
+ 0x01B8=,,,,,,,QUERYTABLE
+ 0x01C0=QUERYTABLE_END,QUERYTABLEREFRESH,QUERYTABLEREFRESH_END,,,,,
+ 0x01C8=,,,AUTOSORTSCOPE,AUTOSORTSCOPE_END,CONDFORMATTING,CONDFORMATTING_END,CFRULE
+ 0x01D0=CFRULE_END,ICONSET,ICONSET_END,DATABAR,DATABAR_END,COLORSCALE,COLORSCALE_END,CFVO
+ 0x01D8=,COLORS,COLORS_END,RGBCOLOR,PAGEMARGINS,PRINTOPTIONS,PAGESETUP,HEADERFOOTER
+ 0x01E0=HEADERFOOTER_END,PTCHARTFORMAT,PTCHARTFORMAT_END,PTCHARTFORMATS,PTCHARTFORMATS_END,SHEETFORMATPR,,
+ 0x01E8=,,,,,,HYPERLINK,
+ 0x01F0=,,,,SCENARIOS,SCENARIOS_END,SCENARIO,SCENARIO_END
+ 0x01F8=INPUTCELLS,DXFS,DXFS_END,DXF,TABLESTYLES,TABLESTYLES_END,,
+ 0x0200=,TABLESTYLEINFO,VOLTYPES,VOLTYPES_END,VOLTYPE,VOLTYPE_END,VOLTYPEMAIN,VOLTYPEMAIN_END
+ 0x0208=VOLTYPETP,VOLTYPETP_END,VOLTYPESTP,VOLTYPETR,,VOLTYPE_ERROR,,
+ 0x0210=CALCCHAIN,CALCCHAIN_END,,,,,,SHEETPROTECTION
+ 0x0218=,PHONETICPR,,,,,,
+ 0x0220=,,,,,OLESIZE,DRAWING,LEGACYDRAWING
+
+ 0x0230=,,PICTURE,,CFCOLOR,INDEXEDCOLORS,INDEXEDCOLORS_END,
+ 0x0238=,MRUCOLORS,MRUCOLORS_END,,COLOR,DATAVALIDATIONS,DATAVALIDATIONS_END,
+ 0x0240=,EXTERNALNAME,DDEITEMVALUES,DDEITEMVALUES_END,DDEITEM_DOUBLE,DDEITEM_ERROR,DDEITEM_STRING,DDEITEM_EMPTY
+ 0x0248=DDEITEM_BOOL,EXTERNALNAMEREF,EXTERNALNAMEFLAGS,EXTERNALNAME_END,EXTERNALBOOK_END,,,
+ 0x0250=,,,,,,,PTFILTERS
+ 0x0258=PTFILTERS_END,PTFILTER,PTFILTER_END,FILLS,FILLS_END,,,
+ 0x0260=,,,FONTS,FONTS_END,BORDERS,BORDERS_END,NUMFMTS
+ 0x0268=NUMFMTS_END,CELLXFS,CELLXFS_END,CELLSTYLES,CELLSTYLES_END,,,
+ 0x0270=,,CELLSTYLEXFS,CELLSTYLEXFS_END,COMMENTS,COMMENTS_END,COMMENTAUTHORS,COMMENTAUTHORS_END
+ 0x0278=COMMENTAUTHOR,COMMENTLIST,COMMENTLIST_END,COMMENT,COMMENT_END,COMMENTTEXT,OLEOBJECTS,OLEOBJECT
+ 0x0280=OLEOBJECTS_END,,,CONTROLS,CONTROL,CONTROLS_END,,
+ 0x0288=,,,CHARTSHEETPR,CHARTPAGESETUP,CUSTOMCHARTVIEWS,CUSTOMCHARTVIEWS_END,CUSTOMCHARTVIEW
+ 0x0290=CUSTOMCHARTVIEW_END,,,,TABLEPARTS,TABLEPART,TABLEPARTS_END,SHEETCALCPR
+ 0x0298=FUNCTIONGROUPS,FUNCTIONGROUP,FUNCTIONGROUPS_END,EXTERNALADDIN,,CHARTPROTECTION,,
+end
+
+# simple records -------------------------------------------------------------
+
+constlist=SIMPLE-RECORDS
+ 0x001A=int32,dec,item-index
+ 0x00AC=int32,dec,relation,CUSTOMFILTERS-RELATION
+ 0x00B5=int32,dec,count
+ 0x00C1=int32,dec,count
+ 0x00DD=int32,dec,count
+ 0x00E1=int32,dec,count
+ 0x00F9=int32,dec,count
+ 0x0107=int32,dec,count
+ 0x011B=int32,dec,count
+ 0x011F=int32,dec,count
+ 0x0123=int32,dec,count
+ 0x0159=int32,dec,count
+ 0x017E=int32,dec,item-index
+ 0x01DD=uint16,hex,flags,PRINTOPTIONS-FLAGS
+ 0x01E3=int32,dec,count
+ 0x01F9=int32,dec,count
+ 0x0204=int32,dec,type,VOLTYPE-TYPE
+ 0x020D=uint8,dec,error-code,ERRORCODES
+ 0x0244=double,dec,value
+ 0x0245=uint8,dec,error-code,ERRORCODES
+ 0x0248=uint8,dec,value,BOOLEAN
+ 0x0257=int32,dec,count
+ 0x025B=int32,dec,count
+ 0x0263=int32,dec,count
+ 0x0265=int32,dec,count
+ 0x0267=int32,dec,count
+ 0x0269=int32,dec,count
+ 0x026B=int32,dec,count
+ 0x0272=int32,dec,count
+ 0x0294=int32,dec,count
+ 0x0297=uint8,hex,flags,SHEETCALCPR-FLAGS
+ 0x0298=uint8,dec,builtin-count
+end
+
+# ARRAY ----------------------------------------------------------------------
+
+flagslist=ARRAY-FLAGS
+ ignore=0xFE
+ 0x01=recalc-always
+end
+
+# BORDER ---------------------------------------------------------------------
+
+flagslist=BORDER-FLAGS
+ 0x01=diag-tl-to-br
+ 0x02=diag-bl-to-tr
+end
+
+# CALCPR ---------------------------------------------------------------------
+
+shortlist=CALCPR-CALCMODE,0,manual,auto,auto-no-tables
+
+flagslist=CALCPR-FLAGS
+ 0x0001=calc-on-load
+ 0x0002=a1
+ 0x0004=iterate
+ 0x0008=full-precision
+ 0x0010=calc-complete
+ 0x0020=calc-on-save
+ 0x0040=concurrent
+ 0x0080=manual-processors
+ 0x0100=force-full-calc
+end
+
+# CELLSTYLE ------------------------------------------------------------------
+
+flagslist=CELLSTYLE-FLAGS
+ 0x0001=builtin
+ 0x0002=hidden
+ 0x0004=custom
+end
+
+multilist=CELLSTYLE-BUILTIN
+ 0=normal,rowlevel,collevel,comma,currency,percent,comma-0,currency-0,hyperlink,followed-hyperlink
+ 10=note,warning-text,,,,title,heading-1,heading-2,heading-3,heading-4
+ 20=input,output,calculation,check-cell,linked-cell,total,good,bad,neutral,accent1
+ 30=20%-accent1,40%-accent1,60%-accent1,accent2,20%-accent2,40%-accent2,60%-accent2,accent3,20%-accent3,40%-accent3
+ 40=60%-accent3,accent4,20%-accent4,40%-accent4,60%-accent4,accent5,20%-accent5,40%-accent5,60%-accent5,accent6
+ 50=20%-accent6,40%-accent6,60%-accent6,explanatory-text
+end
+
+# CFRULE ---------------------------------------------------------------------
+
+shortlist=CFRULE-TYPE,1,cell-is,expression,color-scale,data-bar,top-ten,icon-set
+
+multilist=CFRULE-SUBTYPE
+ 0=cell-is,expression,color-scale,data-bar,icon-set,top-ten,,unique-values,contains-text,contains-blanks
+ 10=not-contains-blanks,contains-errors,not-contains-errors,,,today,tomorrow,yesterday,last-7-days,last-month
+ 20=next-month,this-week,next-week,last-week,this-month,above-average,below-average,duplicate-values,,equal-above-average
+ 30=equal-below-average
+end
+
+shortlist=CFRULE-CELL-OPERATOR,1,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
+shortlist=CFRULE-TEXT-OPERATOR,0,contains,not-contains,begins-with,ends-with
+shortlist=CFRULE-DATE-OPERATOR,0,today,yesterday,last-7-days,this-week,last-week,last-month,tomorrow,next-week,next-month,this-month
+shortlist=CFRULE-OTHER-OPERATOR,0,none
+
+flagslist=CFRULE-FLAGS
+ 0x0001=table-row
+ 0x0002=stop-if-true
+ 0x0004=above-average
+ 0x0008=bottom
+ 0x0010=percent
+end
+
+# CHARTPAGESETUP ------------------------------------------------------------------
+
+combilist=CHARTPAGESETUP-FLAGS
+ 0x0001=landscape
+ 0x0002=uninitialized
+ 0x0004=black-and-white
+ 0x0008=default-orientation
+ 0x0010=use-first-page
+ 0x0020=draft-quality
+end
+
+# CHARTSHEETPR ---------------------------------------------------------------
+
+flagslist=CHARTSHEETPR-FLAGS
+ 0x0001=published
+end
+
+# CHARTSHEETVIEW -------------------------------------------------------------
+
+flagslist=CHARTSHEETVIEW-FLAGS
+ 0x0001=selected
+ 0x0002=zoom-to-fit
+end
+
+# COL ------------------------------------------------------------------------
+
+combilist=COL-FLAGS
+ 0x0001=hidden
+ 0x0002=custom-width
+ 0x0004=best-fit
+ 0x0008=show-phonetic
+ 0x0700=uint8,dec,outline-level
+ 0x1000=outline-collapsed
+end
+
+# CONNECTION -----------------------------------------------------------------
+
+shortlist=CONNECTION-SAVEPASSWORD,1,on,off
+unitconverter=CONNECTION-INTERVAL,60,sec
+shortlist=CONNECTION-SOURCETYPE,1,odbc,dao,file,html,ole-db,text,ado,dsp
+shortlist=CONNECTION-RECONNECTTYPE,1,as-required,always,never
+shortlist=CONNECTION-CREDENTIALS,0,integrated,none,stored-sso,prompt
+
+flagslist=CONNECTION-FLAGS
+ 0x0001=keep-alive
+ 0x0002=new
+ 0x0004=deleted
+ 0x0008=only-use-conn-file
+ 0x0010=background
+ 0x0020=refresh-on-load
+ 0x0040=save-data
+end
+
+flagslist=CONNECTION-STRINGFLAGS
+ 0x0001=has-source-file
+ 0x0002=has-source-conn-file
+ 0x0004=has-description
+ 0x0008=has-name
+ 0x0010=has-sso-id
+end
+
+# CUSTOMFILTER ---------------------------------------------------------------
+
+constlist=CUSTOMFILTER-DATATYPE
+ 4=double
+ 6=string
+ 8=boolean
+ 12=blank
+ 14=not-blank
+end
+
+shortlist=CUSTOMFILTER-OPERATOR,1,less,equal,less-equal,greater,not-equal,greater-equal
+
+# CUSTOMFILTERS --------------------------------------------------------------
+
+shortlist=CUSTOMFILTERS-RELATION,0,and,or
+
+# DATATABLE ------------------------------------------------------------------
+
+flagslist=DATATABLE-FLAGS
+ 0x01=row-table
+ 0x02=table-2d
+ 0x04=ref1-deleted
+ 0x08=ref2-deleted
+ 0x10=recalc-always
+end
+
+# DATAVALIDATION -------------------------------------------------------------
+
+combilist=DATAVALIDATION-FLAGS
+ 0x0000000F=uint8,dec,type,DATAVALIDATION-TYPE
+ 0x00000070=uint8,dec,error-style,DATAVALIDATION-ERRORSTYLE
+ 0x00000080=string-list
+ 0x00000100=ignore-empty
+ 0x00000200=no-dropdown
+ 0x00040000=show-input-box
+ 0x00080000=show-error-box
+ 0x00F00000=uint8,dec,operator,DATAVALIDATION-OPERATOR
+end
+
+shortlist=DATAVALIDATION-TYPE,0,any,whole,decimal,list,date,time,text-length,custom
+shortlist=DATAVALIDATION-OPERATOR,0,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
+shortlist=DATAVALIDATION-ERRORSTYLE,0,error,warning,info
+
+# DATAVALIDATIONS ------------------------------------------------------------
+
+combilist=DATAVALIDATIONS-FLAGS
+ 0x0001=disable-prompts
+end
+
+# DEFINEDNAME ----------------------------------------------------------------
+
+combilist=DEFINEDNAME-FLAGS
+ 0x00000001=hidden
+ 0x00000002=function
+ 0x00000004=vba
+ 0x00000008=macro
+ 0x00000010=complex
+ 0x00000020=built-in
+ 0x00007FC0=int32,dec,func-group,DEFINEDNAME-FUNCGROUP
+ 0x00008000=published
+ 0x00010000=workbook-param
+end
+
+shortlist=DEFINEDNAME-FUNCGROUP,0,none,financial,date-time,math-trig,statistical,lookup-ref,database,text,logical,information,commands,customizing,macro-control,dde-external,user-definded
+
+constlist=DEFINEDNAME-SHEETID
+ default=
+ -1=global
+end
+
+# DISCRETEFILTERS --------------------------------------------------------------------
+
+shortlist=DISCRETEFILTERS-CALTYPE,0,none,gregorian,gregorian-us,japan,taiwan,korea,hijri,thai,hebrew,gregorian-mideast-fr,gregorian-ar,gregorian-xlit-en,gregorian-xlit-fr
+
+# DXF ------------------------------------------------------------------------
+
+flagslist=DXF-FLAGS
+ 0x00008000=border-outline
+end
+
+multilist=DXF-SUBREC
+ 0=FILL-PATTERN,FILL-FGCOLOR,FILL-BGCOLOR,FILL-GRADIENT,FILL-STOP
+ 5=FONT-COLOR,BORDER-TOP,BORDER-BOTTOM,BORDER-LEFT,BORDER-RIGHT
+ 10=BORDER-DIAGONAL,BORDER-VERTICAL,BORDER-HORIZONTAL,BORDER-DIAGUP,BORDER-DIAGDOWN
+ 15=ALIGN-HORIZONTAL,ALIGN-VERTICAL,ALIGN-ROTATION,ALIGN-INDENT,ALIGN-READINGORDER
+ 20=ALIGN-WRAPTEXT,ALIGN-JUSTLASTLINE,ALIGN-SHRINKTOFIT,,FONT-NAME
+ 25=FONT-WEIGHT,FONT-UNDERLINE,FONT-ESCAPEMENT,FONT-ITALIC,FONT-STRIKE
+ 30=FONT-OUTLINE,FONT-SHADOW,FONT-CONDENSE,FONT-EXTEND,FONT-CHARSET
+ 35=FONT-PITCHFAMILY,FONT-HEIGHT,FONT-SCHEME,NUMFMT-CODE,
+ 40=,NUMFMT-ID,ALIGN-RELINDENT,PROT-LOCKED,PROT-HIDDEN
+end
+
+# EXTERNALBOOK ---------------------------------------------------------------
+
+shortlist=EXTERNALBOOK-TYPE,0,book,dde-link,ole-link
+
+# EXTERNALNAMEFLAGS ----------------------------------------------------------
+
+flagslist=EXTERNALNAMEFLAGS-FLAGS
+ 0x0002=automatic
+ 0x0004=pic-link
+ 0x0008=dde-stddocumentname
+ 0x0010=ole-link
+ 0x0020=iconified
+end
+
+# EXTERNALSHEETS -------------------------------------------------------------
+
+constlist=EXTERNALSHEETS-ID
+ default=
+ -1=deleted
+ -2=special
+end
+
+# EXTSHEETDATA ---------------------------------------------------------------
+
+flagslist=EXTSHEETDATA-FLAGS
+ 0x01=refresh-error
+end
+
+# FILL -----------------------------------------------------------------------
+
+shortlist=FILL-GRADIENTTYPE,0,linear,path
+
+# FILTERCOLUMN ---------------------------------------------------------------
+
+flagslist=FILTERCOLUMN-FLAGS
+ 0x0001=hidden-button
+ 0x0002=show-button
+end
+
+# FONT -----------------------------------------------------------------------
+
+flagslist=FONT-FLAGS
+ 0x0001=bold
+ 0x0002=italic
+ 0x0004=underline
+ 0x0008=strikeout
+ 0x0010=outline
+ 0x0020=shadow
+ 0x0040=condense
+ 0x0080=extend
+end
+
+multilist=FONT-UNDERLINE
+ 0x00=none,single,double
+ 0x21=single-acc,double-acc
+end
+
+shortlist=FONT-SCHEME,0,none,major,minor
+shortlist=FONT-ESCAPEMENT,0,none,superscript,subscript
+
+# HEADERFOOTER ---------------------------------------------------------------
+
+flagslist=HEADERFOOTER-FLAGS
+ 0x0001=diff-odd-even
+ 0x0002=diff-dirst
+ 0x0004=scale-with-doc
+ 0x0008=align-with-margins
+end
+
+# OLEOBJECT ------------------------------------------------------------------
+
+shortlist=OLEOBJECT-ASPECT,1,content,,,icon
+shortlist=OLEOBJECT-UPDATE,0,na,automatic,,manual
+
+flagslist=OLEOBJECT-FLAGS
+ 0x0001=linked
+ 0x0002=auto-load
+end
+
+# PAGESETUP ------------------------------------------------------------------
+
+multilist=PAGESETUP-PAPERSIZE
+ 0=undefined,letter,letter-small,tabloid,ledger,legal,statement,executive,a3,a4
+ 10=a4-small,a5,b4,b5,folio,quarto,10x14,11x17,note,envelope-9
+ 20=envelope-10,envelope-11,envelope-12,envelope-14,c,d,e,envelope-dl,envelope-c5,envelope-c3
+ 30=envelope-c4,envelope-c6,envelope-c65,envelope-b4,envelope-b5,envelope-b6,envelope-italy,envelope-monarch,envelope-6-3/4,us-standard-fanfold
+ 40=german-standard-fanfold,german-legal-fanfold,b4,japanese-dbl-postcaed,9x11,10x11,15x11,,
+ 50=envelope-invite,letter-extra,legal-extra,tabloid-extra,a4-extra,letter-transverse,a4-transverse,letter-extra-transverse,super-a-a4,super-b-a3,letter-plus
+ 60=a4-plus,a5-transverse,jis-b5-transverse,a3-extra,a5-extra,b5-extra,a2,a3-transverse,a3-extra-transverse
+end
+
+constlist=PAGESETUP-SCALETOPAGES
+ default=
+ 0=automatic
+end
+
+combilist=PAGESETUP-FLAGS
+ 0x0001=print-in-rows
+ 0x0002=landscape
+ 0x0004=uninitialized
+ 0x0008=black-and-white
+ 0x0010=draft-quality
+ 0x0020=print-notes
+ 0x0040=default-orientation
+ 0x0080=use-first-page
+ 0x0100=print-notes-at-end
+ 0x0600=uint8,dec,print-errors,PAGESETUP-PRINTERRORS
+end
+
+shortlist=PAGESETUP-PRINTERRORS,0,displayed,none,as-dashes,as-na
+
+unitconverter=PAGESETUP-DPI,1,dpi
+
+# PANE -----------------------------------------------------------------------
+
+shortlist=PANE-ID,0,bottom-right,top-right,bottom-left,top-left
+
+flagslist=PANE-FLAGS
+ 0x01=frozen
+ 0x02=remove-split-with-freeze
+end
+
+# PCDEFINITION ---------------------------------------------------------------
+
+flagslist=PCDEFINITION-FLAGS1
+ 0x01=save-data
+ 0x02=invalid
+ 0x04=refresh-on-load
+ 0x08=optimize-memory
+ 0x10=enable-refresh
+ 0x20=background-query
+ 0x40=upgrade-on-refresh
+ 0x80=tuple-cache
+end
+
+constlist=PCDEFINITION-MISSINGITEMS
+ default=
+ -1=clear-automatic
+ 0=clear-always
+end
+
+flagslist=PCDEFINITION-FLAGS2
+ 0x01=has-username
+ 0x02=has-rel-id
+ 0x04=support-subquery
+ 0x08=support-drilldown
+end
+
+# PCDFIELD -------------------------------------------------------------------
+
+flagslist=PCDFIELD-FLAGS
+ 0x0001=server-field
+ 0x0002=no-unique-items
+ 0x0004=database-field
+ 0x0008=has-caption
+ 0x0010=member-property-field
+ 0x0100=has-formula
+ 0x0200=has-property-name
+end
+
+# PCDFRANGEPR ----------------------------------------------------------------
+
+shortlist=PCDFRANGEPR-GROUPBY,0,numeric,seconds,minutes,hours,days,months,quarters,years
+
+flagslist=PCDFRANGEPR-FLAGS
+ 0x01=auto-start
+ 0x02=auto-end
+ 0x04=date-group
+end
+
+# PCDFSHAREDITEMS ------------------------------------------------------------
+
+flagslist=PCDFSHAREDITEMS-FLAGS
+ 0x0001=has-semi-mixed-types
+ 0x0002=has-non-date
+ 0x0004=has-date
+ 0x0008=has-string-bool-err
+ 0x0010=has-blank
+ 0x0020=has-mixed-types
+ 0x0040=is-numeric
+ 0x0080=is-integer
+ 0x0100=has-min-max
+ 0x0200=long-text
+end
+
+# PCDSOURCE ------------------------------------------------------------------
+
+shortlist=PCDSOURCE-TYPE,0,worksheet,external,consolidation,scenario
+
+# PCDWORKSHEETSOURCE ---------------------------------------------------------
+
+flagslist=PCDWORKSHEETSOURCE-FLAGS
+ 0x01=has-rel-id
+ 0x02=has-sheet
+end
+
+# PCITEM_ARRAY ---------------------------------------------------------------
+
+constlist=PCITEM_ARRAY-TYPE
+ 0x0001=double
+ 0x0002=string
+ 0x0010=error
+ 0x0020=date
+end
+
+# PHONETICPR -----------------------------------------------------------------
+
+shortlist=PHONETICPR-TYPE,0,halfwidth-katakana,fullwidth-katakana,hiragana,no-conversion
+shortlist=PHONETICPR-ALIGNMENT,0,no-control,left,center,distributed
+
+# PIVOTAREA ------------------------------------------------------------------
+
+shortlist=PIVOTAREA-TYPE,0,none,normal,data,all,origin,button,top-right
+
+flagslist=PIVOTAREA-FLAGS1
+ 0x01=data-only
+ 0x02=label-only
+ 0x04=grand-row
+ 0x08=grand-col
+ 0x10=cache-based
+ 0x20=line-mode
+ 0x40=part
+ 0x80=fuzzy
+end
+
+combilist=PIVOTAREA-FLAGS2
+ 0x0001=row
+ 0x0002=col
+ 0x0004=page
+ 0x0008=data
+ 0x0FF0=uint8,dec,pos-on-axis
+end
+
+# PRINTOPTIONS ---------------------------------------------------------------
+
+flagslist=PRINTOPTIONS-FLAGS
+ 0x0001=horizontal-centered
+ 0x0002=vertical-centered
+ 0x0004=print-headings
+ 0x0008=print-gridlines
+ 0x0010=gridlines-set
+end
+
+# Pivot table globals --------------------------------------------------------
+
+constlist=PT-FIELDINDEX
+ default=
+ -2=data-field
+end
+
+# PTDATAFIELD ----------------------------------------------------------------
+
+shortlist=PTDATAFIELD-SUBTOTAL,0,sum,count-all,average,max,min,product,count-num,std-dev,std-dev-p,var,var-p
+shortlist=PTDATAFIELD-SHOWDATAAS,0,normal,difference,percent,percent-diff,run-total,percent-of-row,percent-of-col,percent-of-total,index
+
+constlist=PTDATAFIELD-BASEITEM
+ default=
+ 0x001000FC=previous-item
+ 0x001000FD=next-item
+end
+
+# PTDEFINITION ---------------------------------------------------------------
+
+flagslist=PTDEFINITION-FLAGS1
+ 0x01=show-items
+ 0x02=edit-data
+ 0x04=disable-field-list
+ 0x08=refresh-on-load
+ 0x10=hide-calc-members
+ 0x20=with-hidden-totals
+ 0x40=show-multiple-label
+end
+
+combilist=PTDEFINITION-FLAGS2
+ 0x0001=hide-data-drop-down
+ 0x0010=hide-drill
+ 0x0020=print-drill
+ 0x0040=show-member-prop-tips
+ 0x0080=hide-data-tips
+ 0x7F00=uint8,dec,indent
+ 0x8000=hide-headers
+end
+
+flagslist=PTDEFINITION-FLAGS3
+ ignore=0x00010000
+ 0x00000001=hide-drop-zones
+ 0x00000002=no-asterisk-totals
+ 0x00000004=show-empty-row
+ 0x00000008=show-empty-col
+ 0x00000010=enable-wizard
+ 0x00000020=enable-drill
+ 0x00000040=enable-field-props
+ 0x00000080=preserve-formatting
+ 0x00000100=use-auto-formatting
+ 0x00000200=show-error
+ 0x00000400=show-missing
+ 0x00000800=page-over-then-down
+ 0x00001000=multiple-page-items
+ 0x00002000=row-grand-totals
+ 0x00004000=col-grand-totals
+ 0x00008000=field-print-titles
+ 0x00020000=item-print-titles
+ 0x00040000=merge-item
+ 0x00080000=has-data-caption
+ 0x00100000=has-grand-total-caption
+ 0x00200000=has-page-field-style
+ 0x00400000=has-pivot-table-style
+ 0x00800000=has-vacated-style
+ 0x01000000=apply-num-fmt
+ 0x02000000=apply-font
+ 0x04000000=apply-alignment
+ 0x08000000=apply-border
+ 0x10000000=apply-fill
+ 0x20000000=apply-protection
+ 0x40000000=has-tag
+end
+
+flagslist=PTDEFINITION-FLAGS4
+ 0x00000001=compact
+ 0x00000002=outline
+ 0x00000004=outline-data
+ 0x00000008=compact-data
+ 0x00000010=no-grid-drop-zones
+ 0x00000020=published
+ 0x00000040=!has-error-caption
+ 0x00000080=!has-missing-caption
+ 0x00000100=immersive-off
+ 0x00000200=single-field-filters
+ 0x00000400=has-row-header-caption
+ 0x00000800=has-col-header-caption
+ 0x00001000=field-list-sort-asc
+ 0x00004000=no-custom-list-sort
+end
+
+shortlist=PTDEFINITION-DATAFIELD-AXIS,1,row-axis,col-axis
+
+constlist=PTDEFINITION-DATAFIELD-POS
+ default=
+ -1=append
+end
+
+# PTFIELD --------------------------------------------------------------------
+
+flagslist=PTFIELD-FLAGS1
+ 0x00000001=row
+ 0x00000002=col
+ 0x00000004=page
+ 0x00000008=data
+ 0x00000100=default
+ 0x00000200=sum
+ 0x00000400=count-all
+ 0x00000800=average
+ 0x00001000=max
+ 0x00002000=min
+ 0x00004000=product
+ 0x00008000=count-num
+ 0x00010000=std-dev
+ 0x00020000=std-dev-p
+ 0x00040000=variance
+ 0x00080000=variance-p
+ 0x01000000=drilled-level
+ 0x02000000=hide-dropdown
+ 0x04000000=hidden-level
+ 0x08000000=has-member-prop-caption
+ 0x10000000=compact
+ 0x20000000=has-display-name
+ 0x40000000=has-subtotal-caption
+ 0x80000000=source-ordered
+end
+
+flagslist=PTFIELD-FLAGS2
+ 0x00000001=drag-to-row
+ 0x00000002=drag-to-col
+ 0x00000004=drag-to-page
+ 0x00000008=drag-to-hide
+ 0x00000010=drag-to-data
+ 0x00000020=show-all-items
+ 0x00000040=outline
+ 0x00000080=insert-blank-row
+ 0x00000100=subtotal-top
+ 0x00000200=server-based
+ 0x00000800=insert-page-break
+ 0x00001000=autosort
+ 0x00002000=ascend-sort
+ 0x00004000=autoshow
+ 0x00008000=autoshow-top
+ 0x00010000=hide-new-items
+ 0x00020000=has-value-filter
+ 0x00040000=exclude-new-items
+ 0x00080000=multiple-page-items
+ 0x00100000=simple-data-sort
+ 0x00200000=show-member-prop-report
+ 0x00400000=show-member-prop-tooltip
+ 0x00800000=show-member-prop-caption
+ 0x01000000=items-drilled
+end
+
+# PTFILTER -------------------------------------------------------------------
+
+multilist=PTFILTER-TYPE
+ 0=unknown,count,percent,sum,caption-equal,caption-not-equal,caption-begins-width,caption-not-begins-with,caption-ends-width,caption-not-ends-with
+ 10=caption-contains,caption-not-contains,caption-greater-than,caption-greater-equal,caption-less-than,caption-less-equal,caption-between,caption-not-between,value-equal,value-not-equal
+ 20=value-greater-than,value-greater-equal,value-less-than,value-less-equal,value-between,value-not-between,date-equal,date-older-than,date-newer-than,date-between
+ 30=date-tomorrow,date-today,date-yesterday,date-next-week,date-this-week,date-last-week,date-next-month,date-this-month,date-last-month,date-next-quarter
+ 40=date-this-quarter,date-last-quarter,date-next-year,date-this-year,date-last-year,year-to-date,date-q1,date-q2,date-q3,date-q4
+ 50=date-jan,date-feb,date-mar,date-apr,date-may,date-jun,date-jul,date-aug,date-sep,date-oct
+ 60=date-nov,date-dec,date-not-equal,date-older-equal,date-newer-equal,date-not-between
+end
+
+flagslist=PTFILTER-FLAGS
+ 0x0001=has-name
+ 0x0002=has-description
+ 0x0004=has-str-value1
+ 0x0008=has-str-value2
+end
+
+# PTFITEM --------------------------------------------------------------------
+
+shortlist=PTFITEM-TYPE,0,data,default,sum,count-all,average,max,min,product,count-numbers,std-dev,std-dev-p,var,var-p,grand-total,blank
+
+flagslist=PTFITEM-FLAGS
+ 0x0001=hidden
+ 0x0002=hide-detail
+ 0x0004=calculated
+ 0x0008=missing
+ 0x0010=has-name
+ 0x0020=drilled-member
+ 0x0040=can-have-children
+ 0x0080=collapsed-member
+ 0x0100=olap-filter-selected
+end
+
+# PTPAGEFIELD ----------------------------------------------------------------
+
+constlist=PTPAGEFIELD-ITEM
+ default=
+ 0x001000FE=multiple-items
+end
+
+flagslist=PTPAGEFIELD-FLAGS
+ 0x01=has-unique-name
+ 0x02=has-member-caption
+end
+
+# PTREFERENCE ----------------------------------------------------------------
+
+flagslist=PTREFERENCE-FLAGS1
+ 0x0001=data
+ 0x0002=default
+ 0x0004=sum
+ 0x0008=count-all
+ 0x0010=average
+ 0x0020=max
+ 0x0040=min
+ 0x0080=product
+ 0x0100=count-num
+ 0x0200=std-dev
+ 0x0400=std-dev-p
+ 0x0800=variance
+ 0x1000=variance-p
+end
+
+flagslist=PTREFERENCE-FLAGS2
+ 0x01=selected
+end
+
+# QUERYTABLE -----------------------------------------------------------------
+
+combilist=QUERYTABLE-FLAGS
+ 0x00000001=headers
+ 0x00000002=row-numbers
+ 0x00000004=disable-refresh
+ 0x00000008=background
+ 0x00000010=first-background
+ 0x00000020=refresh-on-load
+ 0x000000C0=uint8,dec,grow-shrink,QUERYTABLE-GROWSHRINK
+ 0x00000100=fill-formulas
+ 0x00000200=save-data
+ 0x00000400=disable-edit
+ 0x00000800=preserve-formatting
+ 0x00001000=adjust-column-width
+ 0x00002000=intermediate
+ 0x00004000=apply-num-fmt
+ 0x00008000=apply-font
+ 0x00010000=apply-alignment
+ 0x00020000=apply-border
+ 0x00040000=apply-fill
+ 0x00080000=apply-protection
+end
+
+shortlist=QUERYTABLE-GROWSHRINK,0,insert-clear,insert-delete,overwrite-clear
+
+# ROW ------------------------------------------------------------------------
+
+combilist=ROW-FLAGS1
+ 0x0001=thick-top
+ 0x0002=thick-bottom
+ 0x0700=uint8,dec,outline-level
+ 0x0800=outline-collapsed
+ 0x1000=hidden
+ 0x2000=custom-height
+ 0x4000=custom-format
+end
+
+flagslist=ROW-FLAGS2
+ 0x01=show-phonetic
+end
+
+# SHEET ----------------------------------------------------------------------
+
+shortlist=SHEET-STATE,0,visible,hidden,very-hidden
+
+# SHEETCALCPR ----------------------------------------------------------------
+
+flagslist=SHEETCALCPR-FLAGS
+ 0x01=calc-on-load
+end
+
+# SHEETFORMATPR --------------------------------------------------------------
+
+flagslist=SHEETFORMATPR-FLAGS
+ 0x0001=custom-row-height
+ 0x0002=rows-hidden
+end
+
+# SHEETPR --------------------------------------------------------------------
+
+flagslist=SHEETPR-FLAGS1
+ 0x0001=show-autopagebreaks
+ 0x0008=published
+ 0x0010=dialog-sheet
+ 0x0020=outline-auto-style
+ 0x0040=row-symbols-below
+ 0x0080=column-symbols-right
+ 0x0100=fit-to-pages
+ 0x0400=show-outline-symbols
+ 0x1000=is-row-synched
+ 0x2000=is-col-synched
+ 0x4000=lotus-formula-eval
+ 0x8000=lotus-formula-entry
+end
+
+flagslist=SHEETPR-FLAGS2
+ 0x01=is-filtered
+ 0x02=eval-cond-formats
+end
+
+# SHEETVIEW ------------------------------------------------------------------
+
+flagslist=SHEETVIEW-FLAGS
+ 0x0001=window-protected
+ 0x0002=show-formulas
+ 0x0004=show-gridlines
+ 0x0008=show-headings
+ 0x0010=show-zeros
+ 0x0020=right-to-left
+ 0x0040=selected
+ 0x0080=show-ruler
+ 0x0100=show-outline-symbols
+ 0x0200=default-gridcolor
+ 0x0400=show-whitespace
+end
+
+shortlist=SHEETVIEW-TYPE,0,normal,pagebreak-preview,page-layout
+
+# TABLE ----------------------------------------------------------------------
+
+shortlist=TABLE-TYPE,0,worksheet,,,query-table
+
+flagslist=TABLE-FLAGS
+ 0x00000001=totals-row-shown
+ 0x00000002=published
+ 0x00000004=insert-row
+ 0x00000008=insert-row-shift
+end
+
+# TABLESTYLEINFO -------------------------------------------------------------
+
+flagslist=TABLESTYLEINFO-FLAGS
+ 0x0001=show-first-column
+ 0x0002=show-last-column
+ 0x0004=show-row-stripes
+ 0x0008=show-column-stripes
+ 0x0010=show-row-headers
+ 0x0020=show-column-headers
+end
+
+# TOP10FILTER ----------------------------------------------------------------
+
+flagslist=TOP10FILTER-FLAGS
+ 0x01=!bottom!top
+ 0x02=percent
+ 0x04=applied
+end
+
+# VOLTYPE --------------------------------------------------------------------
+
+shortlist=VOLTYPE-TYPE,0,realtime-data,olap-functions
+
+# WEBPR ----------------------------------------------------------------------
+
+combilist=WEBPR-FLAGS
+ 0x000000FF=uint8,dec,html-format,WEBPR-HTMLFORMAT
+ 0x00000100=xml
+ 0x00000200=source-data
+ 0x00000400=parse-pre
+ 0x00000800=consecutive-delimiters
+ 0x00001000=first-row
+ 0x00002000=xl97-created
+ 0x00004000=text-dates
+ 0x00008000=xl2000-refreshed
+ 0x00010000=html-tables
+end
+
+shortlist=WEBPR-HTMLFORMAT,0,none,rtf,all
+
+flagslist=WEBPR-STRINGFLAGS
+ 0x01=has-post-method
+ 0x02=has-edit-page
+ 0x04=has-url
+end
+
+# WORKBBOKPR -----------------------------------------------------------------
+
+combilist=WORKBBOKPR-FLAGS
+ 0x00000001=date-1904
+ 0x00000004=hide-border-unsel-tables
+ 0x00000008=filter-privacy
+ 0x00000010=prompted-solutions
+ 0x00000020=show-ink-annotation
+ 0x00000040=backup-file
+ 0x00000080=strip-extlink-values
+ 0x00000300=uint8,dec,update-links,WORKBBOKPR-UPDATELINKS
+ 0x00000400=hide-pivot-fieldlist
+ 0x00000800=publish-items
+ 0x00001000=check-compatibility
+ 0x00006000=uint8,dec,show-objects,WORKBBOKPR-SHOWOBJECTS
+ 0x00008000=show-pivotchart-filter
+ 0x00010000=autocompress-pic
+ 0x00020000=refresh-all-links
+end
+
+shortlist=WORKBBOKPR-UPDATELINKS,0,ask-user,never,always
+shortlist=WORKBBOKPR-SHOWOBJECTS,0,show,placeholder,hide
+
+# WORKBOOKVIEW ---------------------------------------------------------------
+
+flagslist=WORKBOOKVIEW-FLAGS
+ 0x01=hidden
+ 0x02=minimized
+ 0x08=show-horizontal-scroll
+ 0x10=show-vertical-scroll
+ 0x20=show-tabbar
+ 0x40=autofilter-date-grouping
+end
+
+# XF -------------------------------------------------------------------------
+
+shortlist=XF-HORALIGN,0,general,left,center,right,fill,block,center-across-sel,distribute
+shortlist=XF-VERALIGN,0,top,center,bottom,justify,distribute
+shortlist=XF-TEXTDIRECTION,0,context,left-to-right,right-to-left
+
+combilist=XF-ALIGNMENT
+ 0x000000FF=uint8,dec,rotation,TEXTROTATION
+ 0x0000FF00=uint8,dec,indent
+ 0x00070000=uint8,dec,hor-align,XF-HORALIGN
+ 0x00380000=uint8,dec,ver-align,XF-VERALIGN
+ 0x00400000=text-wrap
+ 0x00800000=justify-lastline
+ 0x01000000=shrink-to-fit
+ 0x0C000000=uint8,dec,text-dir,XF-TEXTDIRECTION
+ 0x10000000=locked
+ 0x20000000=formula-hidden
+ 0x80000000=quote-prefix
+end
+
+flagslist=XF-USEDFLAGS
+ 0x0001=format
+ 0x0002=font
+ 0x0004=alignment
+ 0x0008=border
+ 0x0010=fill
+ 0x0020=protection
+end
+
+# ============================================================================
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx
new file mode 100644
index 000000000..a0998f195
--- /dev/null
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -0,0 +1,178 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+// FIXME? This file is nearly identical to xmloff/source/chart/ColorPropertySet.cxx
+
+#include "ColorPropertySet.hxx"
+
+#include <cppuhelper/implbase.hxx>
+#include <osl/diagnose.h>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+namespace
+{
+class lcl_ColorPropertySetInfo : public ::cppu::WeakImplHelper<
+ XPropertySetInfo >
+{
+public:
+ explicit lcl_ColorPropertySetInfo( bool bFillColor );
+
+protected:
+ // ____ XPropertySetInfo ____
+ virtual Sequence< Property > SAL_CALL getProperties() override;
+ virtual Property SAL_CALL getPropertyByName( const OUString& aName ) override;
+ virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override;
+
+private:
+ OUString m_aColorPropName;
+ Property m_aColorProp;
+};
+
+lcl_ColorPropertySetInfo::lcl_ColorPropertySetInfo( bool bFillColor ) :
+ // note: length of FillColor and LineColor is 9
+ m_aColorPropName( (bFillColor ? "FillColor" : "LineColor"), 9, RTL_TEXTENCODING_ASCII_US ),
+ m_aColorProp( m_aColorPropName, -1,
+ cppu::UnoType<sal_Int32>::get(), 0)
+{}
+
+Sequence< Property > SAL_CALL lcl_ColorPropertySetInfo::getProperties()
+{
+
+ return Sequence< Property >( & m_aColorProp, 1 );
+}
+
+Property SAL_CALL lcl_ColorPropertySetInfo::getPropertyByName( const OUString& aName )
+{
+ if( aName == m_aColorPropName )
+ return m_aColorProp;
+ throw UnknownPropertyException( m_aColorPropName, static_cast< uno::XWeak * >( this ));
+}
+
+sal_Bool SAL_CALL lcl_ColorPropertySetInfo::hasPropertyByName( const OUString& Name )
+{
+ return Name == m_aColorPropName;
+}
+
+} // anonymous namespace
+
+namespace oox::drawingml
+{
+
+ColorPropertySet::ColorPropertySet( ::Color nColor, bool bFillColor /* = true */ ) :
+ // note: length of FillColor and LineColor is 9
+ m_aColorPropName( (bFillColor ? "FillColor" : "LineColor"), 9, RTL_TEXTENCODING_ASCII_US ),
+ m_nColor( nColor ),
+ m_bIsFillColor( bFillColor ),
+ m_nDefaultColor( 0x0099ccff ) // blue 8
+{}
+
+ColorPropertySet::~ColorPropertySet()
+{}
+
+// ____ XPropertySet ____
+
+Reference< XPropertySetInfo > SAL_CALL ColorPropertySet::getPropertySetInfo()
+{
+ if( ! m_xInfo.is())
+ m_xInfo.set( new lcl_ColorPropertySetInfo( m_bIsFillColor ));
+
+ return m_xInfo;
+}
+
+void SAL_CALL ColorPropertySet::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
+{
+ if (rPropertyName != m_aColorPropName)
+ {
+ // trying to catch these cases in the next crash testing
+ assert(false);
+ return;
+ }
+
+ aValue >>= m_nColor;
+}
+
+uno::Any SAL_CALL ColorPropertySet::getPropertyValue( const OUString& aPropertyName )
+{
+ if( aPropertyName == "FillStyle" && m_bIsFillColor )
+ {
+ return uno::Any(css::drawing::FillStyle_SOLID);
+ }
+ else if (aPropertyName == m_aColorPropName)
+ return uno::Any( m_nColor );
+
+ throw UnknownPropertyException(aPropertyName);
+}
+
+void SAL_CALL ColorPropertySet::addPropertyChangeListener( const OUString& /* aPropertyName */, const Reference< XPropertyChangeListener >& /* xListener */ )
+{
+ OSL_FAIL( "Not Implemented" );
+}
+
+void SAL_CALL ColorPropertySet::removePropertyChangeListener( const OUString& /* aPropertyName */, const Reference< XPropertyChangeListener >& /* aListener */ )
+{
+ OSL_FAIL( "Not Implemented" );
+}
+
+void SAL_CALL ColorPropertySet::addVetoableChangeListener( const OUString& /* PropertyName */, const Reference< XVetoableChangeListener >& /* aListener */ )
+{
+ OSL_FAIL( "Not Implemented" );
+}
+
+void SAL_CALL ColorPropertySet::removeVetoableChangeListener( const OUString& /* PropertyName */, const Reference< XVetoableChangeListener >& /* aListener */ )
+{
+ OSL_FAIL( "Not Implemented" );
+}
+
+// ____ XPropertyState ____
+
+PropertyState SAL_CALL ColorPropertySet::getPropertyState( const OUString& /* PropertyName */ )
+{
+ return PropertyState_DIRECT_VALUE;
+}
+
+Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Sequence< OUString >& /* aPropertyName */ )
+{
+ PropertyState aState = PropertyState_DIRECT_VALUE;
+ // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence
+ return Sequence<PropertyState>(&aState, 1);
+}
+
+void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyName )
+{
+ if( PropertyName == m_aColorPropName )
+ m_nColor = m_nDefaultColor;
+}
+
+uno::Any SAL_CALL ColorPropertySet::getPropertyDefault( const OUString& aPropertyName )
+{
+ if( aPropertyName == m_aColorPropName )
+ return uno::Any( m_nDefaultColor );
+
+ return uno::Any();
+}
+
+} // namespace oox::drawingml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/ColorPropertySet.hxx b/oox/source/export/ColorPropertySet.hxx
new file mode 100644
index 000000000..70213a731
--- /dev/null
+++ b/oox/source/export/ColorPropertySet.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef XMLOFF_COLORPROPERTYSET_HXX
+#define XMLOFF_COLORPROPERTYSET_HXX
+
+// FIXME? this file is identical to xmloff/source/chart/ColorPropertySet.hxx
+
+#include <cppuhelper/implbase.hxx>
+#include <tools/color.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+
+namespace oox::drawingml
+{
+
+class ColorPropertySet : public ::cppu::WeakImplHelper<
+ css::beans::XPropertySet,
+ css::beans::XPropertyState >
+{
+public:
+ // if bFillColor == false, the color is a LineColor
+ explicit ColorPropertySet( ::Color nColor, bool bFillColor = true );
+ virtual ~ColorPropertySet() override;
+
+protected:
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
+ virtual void SAL_CALL setPropertyValue(
+ const OUString& aPropertyName,
+ const css::uno::Any& aValue ) override;
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ const OUString& PropertyName ) override;
+ virtual void SAL_CALL addPropertyChangeListener(
+ const OUString& aPropertyName,
+ const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
+ virtual void SAL_CALL removePropertyChangeListener(
+ const OUString& aPropertyName,
+ const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
+ virtual void SAL_CALL addVetoableChangeListener(
+ const OUString& PropertyName,
+ const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const OUString& PropertyName,
+ const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
+
+ // ____ XPropertyState ____
+ virtual css::beans::PropertyState SAL_CALL getPropertyState(
+ const OUString& PropertyName ) override;
+ virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
+ const css::uno::Sequence< OUString >& aPropertyName ) override;
+ virtual void SAL_CALL setPropertyToDefault(
+ const OUString& PropertyName ) override;
+ virtual css::uno::Any SAL_CALL getPropertyDefault(
+ const OUString& aPropertyName ) override;
+
+private:
+ css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
+ OUString m_aColorPropName;
+ ::Color m_nColor;
+ bool m_bIsFillColor;
+ ::Color m_nDefaultColor;
+};
+
+} // namespace xmloff::chart
+
+// XMLOFF_COLORPROPERTYSET_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/DMLPresetShapeExport.cxx b/oox/source/export/DMLPresetShapeExport.cxx
new file mode 100644
index 000000000..a2d08ec3e
--- /dev/null
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -0,0 +1,1658 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include <oox/export/DMLPresetShapeExport.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+
+#include <osl/diagnose.h>
+#include <filter/msfilter/util.hxx>
+
+#include <string_view>
+
+using namespace ::css;
+using namespace ::css::drawing;
+
+namespace oox::drawingml
+{
+// DMLPresetShapeExporter class
+
+// ctor
+DMLPresetShapeExporter::DMLPresetShapeExporter(DrawingML* pDMLExporter,
+ css::uno::Reference<css::drawing::XShape> xShape)
+ : m_pDMLexporter(pDMLExporter)
+{
+ // This class only work with custom shapes!
+ OSL_ASSERT(xShape->getShapeType() == "com.sun.star.drawing.CustomShape");
+
+ m_xShape = xShape;
+ m_bHasHandleValues = false;
+ uno::Reference<beans::XPropertySet> xShapeProps(m_xShape, uno::UNO_QUERY);
+ css::uno::Sequence<css::beans::PropertyValue> aCustomShapeGeometry
+ = xShapeProps->getPropertyValue("CustomShapeGeometry")
+ .get<uno::Sequence<beans::PropertyValue>>();
+
+ for (sal_uInt32 i = 0; i < aCustomShapeGeometry.size(); i++)
+ {
+ if (aCustomShapeGeometry[i].Name == "Type")
+ {
+ m_sPresetShapeType = aCustomShapeGeometry[i].Value.get<OUString>();
+ }
+ if (aCustomShapeGeometry[i].Name == "Handles")
+ {
+ m_bHasHandleValues = true;
+ m_HandleValues
+ = aCustomShapeGeometry[i]
+ .Value
+ .get<css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>>();
+ }
+ if (aCustomShapeGeometry[i].Name == "AdjustmentValues")
+ {
+ m_AdjustmentValues
+ = aCustomShapeGeometry[i]
+ .Value
+ .get<css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>>();
+ }
+ if (aCustomShapeGeometry[i].Name == "MirroredX")
+ {
+ m_bIsFlipped.first = aCustomShapeGeometry[i].Value.get<bool>();
+ }
+ if (aCustomShapeGeometry[i].Name == "MirroredY")
+ {
+ m_bIsFlipped.second = aCustomShapeGeometry[i].Value.get<bool>();
+ }
+ //if (aCustomShapeGeometry[i].Name == "Equations")
+ //{
+ // m_Equations = aCustomShapeGeometry[i].Value.get<css::uno::Sequence<OUString>>();
+ //}
+ //if (aCustomShapeGeometry[i].Name == "Path")
+ //{
+ // m_Path = aCustomShapeGeometry[i]
+ // .Value.get<css::uno::Sequence<css::beans::PropertyValue>>();
+ //}
+ //if (aCustomShapeGeometry[i].Name == "ViewBox")
+ //{
+ // m_ViewBox = aCustomShapeGeometry[i].Value.get<css::awt::Rectangle>();
+ //}
+ }
+};
+
+// dtor
+DMLPresetShapeExporter::~DMLPresetShapeExporter(){
+ // Do nothing
+};
+
+bool DMLPresetShapeExporter::HasHandleValue() const { return m_bHasHandleValues; }
+
+const OUString& DMLPresetShapeExporter::GetShapeType() const { return m_sPresetShapeType; }
+
+const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>&
+DMLPresetShapeExporter::GetHandleValues() const
+{
+ return m_HandleValues;
+};
+
+const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>&
+DMLPresetShapeExporter::GetAdjustmentValues() const
+{
+ return m_AdjustmentValues;
+};
+
+css::uno::Any DMLPresetShapeExporter::GetHandleValueOfModificationPoint(sal_Int32 nPoint,
+ std::u16string_view sType)
+{
+ uno::Any aRet;
+ if (GetHandleValues().getLength() > nPoint)
+ {
+ for (sal_Int32 i = 0; i < GetHandleValues()[nPoint].getLength(); i++)
+ {
+ if (GetHandleValues()[nPoint][i].Name == sType)
+ {
+ aRet = GetHandleValues()[nPoint][i].Value;
+ break;
+ }
+ }
+ }
+ return aRet;
+};
+
+DMLPresetShapeExporter::RadiusAdjustmentValue
+DMLPresetShapeExporter::GetAdjustmentPointRadiusValue(sal_Int32 nPoint)
+{
+ RadiusAdjustmentValue aRet;
+ try
+ {
+ auto aValPos = GetHandleValueOfModificationPoint(nPoint, u"Position")
+ .get<EnhancedCustomShapeParameterPair>();
+ aRet.nMinVal = GetHandleValueOfModificationPoint(nPoint, u"RadiusRangeMinimum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nMaxVal = GetHandleValueOfModificationPoint(nPoint, u"RadiusRangeMaximum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nCurrVal = GetAdjustmentValues()[aValPos.First.Value.get<long>()].Value.get<double>();
+ }
+ catch (...)
+ {
+ // Do nothing.
+ }
+ return aRet;
+};
+
+DMLPresetShapeExporter::AngleAdjustmentValue
+DMLPresetShapeExporter::GetAdjustmentPointAngleValue(sal_Int32 nPoint)
+{
+ AngleAdjustmentValue aRet;
+ try
+ {
+ auto aValPos = GetHandleValueOfModificationPoint(nPoint, u"Position")
+ .get<EnhancedCustomShapeParameterPair>();
+ aRet.nMinVal = 0;
+ aRet.nMaxVal = 360;
+ aRet.nCurrVal = GetAdjustmentValues()[aValPos.Second.Value.get<long>()].Value.get<double>();
+ }
+ catch (...)
+ {
+ // Do nothing.
+ }
+ return aRet;
+};
+
+DMLPresetShapeExporter::XAdjustmentValue
+DMLPresetShapeExporter::GetAdjustmentPointXValue(sal_Int32 nPoint)
+{
+ XAdjustmentValue aRet;
+ try
+ {
+ auto aValPos = GetHandleValueOfModificationPoint(nPoint, u"Position")
+ .get<EnhancedCustomShapeParameterPair>();
+ aRet.nMinVal = GetHandleValueOfModificationPoint(nPoint, u"RangeXMinimum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nMaxVal = GetHandleValueOfModificationPoint(nPoint, u"RangeXMaximum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nCurrVal = GetAdjustmentValues()[aValPos.First.Value.get<long>()].Value.get<double>();
+ }
+ catch (...)
+ {
+ // Do nothing.
+ }
+ return aRet;
+};
+
+DMLPresetShapeExporter::YAdjustmentValue
+DMLPresetShapeExporter::GetAdjustmentPointYValue(sal_Int32 nPoint)
+{
+ YAdjustmentValue aRet;
+ try
+ {
+ auto aValPos = GetHandleValueOfModificationPoint(nPoint, u"Position")
+ .get<EnhancedCustomShapeParameterPair>();
+ aRet.nMinVal = GetHandleValueOfModificationPoint(nPoint, u"RangeYMinimum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nMaxVal = GetHandleValueOfModificationPoint(nPoint, u"RangeYMaximum")
+ .get<EnhancedCustomShapeParameter>()
+ .Value.get<double>();
+ aRet.nCurrVal = GetAdjustmentValues()[aValPos.Second.Value.get<long>()].Value.get<double>();
+ }
+ catch (...)
+ {
+ // Do nothing.
+ }
+ return aRet;
+};
+
+bool DMLPresetShapeExporter::WriteShape()
+{
+ if (m_pDMLexporter && m_xShape)
+ {
+ // Case 1: We do not have adjustment points of the shape: just export it as preset
+ if (!m_bHasHandleValues)
+ {
+ OUString sShapeType = GetShapeType();
+ const OString& sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType);
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ m_pDMLexporter->WritePresetShape(sPresetShape);
+ return true;
+ }
+ else // Case2: There are adjustment points what have to be converted and exported.
+ {
+ return WriteShapeWithAVlist();
+ }
+ }
+ return false;
+};
+
+bool DMLPresetShapeExporter::WriteAV(const OUString& sValName, const OUString& sVal)
+{
+ try
+ {
+ m_pDMLexporter->GetFS()->singleElementNS(XML_a, XML_gd, XML_name, sValName, XML_fmla, sVal);
+ return true;
+ }
+ catch (...)
+ {
+ return false;
+ }
+};
+
+bool DMLPresetShapeExporter::StartAVListWriting()
+{
+ try
+ {
+ const OString& pShape = msfilter::util::GetOOXMLPresetGeometry(GetShapeType());
+ m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_avLst);
+ return true;
+ }
+ catch (...)
+ {
+ return false;
+ }
+};
+bool DMLPresetShapeExporter::EndAVListWriting()
+{
+ try
+ {
+ m_pDMLexporter->GetFS()->endElementNS(XML_a, XML_avLst);
+ m_pDMLexporter->GetFS()->endElementNS(XML_a, XML_prstGeom);
+ return true;
+ }
+ catch (...)
+ {
+ return false;
+ }
+};
+
+bool DMLPresetShapeExporter::WriteShapeWithAVlist()
+{
+ // Remark: This method is under development. If a shape type is implemented, the corresponding,
+ // return must be set to true. False means nothing done true, export done. There are many
+ // types which do not have pairs in LO, they are do not have to be mapped, because import
+ // filter it does with GrabBag, this method only maps the SDR ones to OOXML shapes.
+
+ OString sShapeType(msfilter::util::GetOOXMLPresetGeometry(GetShapeType()));
+
+ // OOXML uses 60th of degree, so 360 degree is 21 600 000 60thdeg
+ const tools::Long nConstOfMaxDegreeOf60th = 21600000;
+ try
+ {
+ if (sShapeType == "accentBorderCallout1")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "accentBorderCallout2")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "accentBorderCallout3")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "accentCallout1")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "accentCallout2")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "accentCallout3")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonBackPrevious")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonBeginning")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonBlank")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonDocument")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonEnd")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonForwardNext")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonHelp")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonHome")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonInformation")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonMovie")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonReturn")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "actionButtonSound")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "arc")
+ {
+ // LO does not have handle points for this, so CustGeom is enough.
+ return false;
+ }
+ if (sShapeType == "bentArrow")
+ {
+ // LO has only one type, which have to be rotated, without handling points
+ // So CustGeom enough.
+ return false;
+ }
+ if (sShapeType == "bentConnector2")
+ {
+ // CustGeom Enough
+ return false;
+ }
+ if (sShapeType == "bentConnector3")
+ {
+ // CustGeom Enough
+ return false;
+ }
+ if (sShapeType == "bentConnector4")
+ {
+ // CustGeom Enough
+ return false;
+ }
+ if (sShapeType == "bentConnector5")
+ {
+ // CustGeom Enough
+ return false;
+ }
+ if (sShapeType == "bentUpArrow")
+ {
+ // CustGeom Enough, no handle points
+ return false;
+ }
+ if (sShapeType == "bevel")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * 50000);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "blockArc")
+ {
+ auto aPointR = GetAdjustmentPointRadiusValue(0);
+ auto aPointA = GetAdjustmentPointAngleValue(0);
+ if (!aPointA.nCurrVal.has_value() || !aPointA.nMaxVal.has_value()
+ || !aPointA.nMinVal.has_value() || !aPointR.nCurrVal.has_value()
+ || !aPointR.nMaxVal.has_value() || !aPointR.nMinVal.has_value())
+ return false;
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nVal1
+ = std::lround((*aPointA.nCurrVal < 0 ? 360 + *aPointA.nCurrVal : *aPointA.nCurrVal)
+ / (*aPointA.nMaxVal - *aPointA.nMinVal) * nConstOfMaxDegreeOf60th);
+ tools::Long nVal2 = std::lround(
+ (*aPointA.nCurrVal > 180 ? 360 - *aPointA.nCurrVal : 180 - *aPointA.nCurrVal)
+ / (*aPointA.nMaxVal - *aPointA.nMinVal) * nConstOfMaxDegreeOf60th);
+ tools::Long nVal3 = std::lround(
+ 50000 - (*aPointR.nCurrVal / (*aPointR.nMaxVal - *aPointR.nMinVal) * 50000));
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "borderCallout1")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "borderCallout2")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "borderCallout3")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "bracePair")
+ {
+ auto aPoint1 = GetAdjustmentPointYValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * 25000);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "bracketPair")
+ {
+ auto aPoint1 = GetAdjustmentPointYValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * 50000);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "callout1")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "callout2")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "callout3")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "can")
+ {
+ return false;
+ // Do the export as before.
+ }
+ if (sShapeType == "chartPlus")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "chartStar")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "chartX")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "chord")
+ {
+ // CustGeom, because LO does not have handle points
+ return false;
+ }
+ if (sShapeType == "circularArrow")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "cloud")
+ {
+ // CustGeom enough
+ return false;
+ }
+ if (sShapeType == "cloudCallout")
+ {
+ return false;
+ // Works fine without this, so export it like before.
+ }
+ if (sShapeType == "cornerTabs")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "cube")
+ {
+ // Works fine without this, so export it like before.
+ return false;
+ }
+ if (sShapeType == "curvedConnector2")
+ {
+ // Not necessary to be mapped
+ return false;
+ }
+ if (sShapeType == "curvedConnector3")
+ {
+ // Not necessary to be mapped
+ return false;
+ }
+ if (sShapeType == "curvedConnector4")
+ {
+ // Not necessary to be mapped
+ return false;
+ }
+ if (sShapeType == "curvedConnector5")
+ {
+ // Not necessary to be mapped
+ return false;
+ }
+ if (sShapeType == "curvedDownArrow")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "curvedLeftArrow")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "curvedRightArrow")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "curvedUpArrow")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "decagon")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "diagStripe")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "diamond")
+ {
+ // It does not have handle points so it do not have to be mapped.
+ return false;
+ }
+ if (sShapeType == "dodecagon")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "donut")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "doubleWave")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "downArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1 = std::lround((*aPointX.nMaxVal - *aPointX.nCurrVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointY.nMaxVal - *aPointY.nCurrVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "downArrowCallout")
+ {
+ auto aNeckFromBox = GetAdjustmentPointXValue(1);
+ auto aHeadFromNeck = GetAdjustmentPointXValue(2);
+ auto aHeadHeight = GetAdjustmentPointYValue(1);
+ auto aBoxHeight = GetAdjustmentPointYValue(0);
+ if (!aNeckFromBox.nCurrVal.has_value() || !aNeckFromBox.nMaxVal.has_value()
+ || !aNeckFromBox.nMinVal.has_value() || !aHeadFromNeck.nCurrVal.has_value()
+ || !aHeadFromNeck.nMaxVal.has_value() || !aHeadFromNeck.nMinVal.has_value()
+ || !aHeadHeight.nCurrVal.has_value() || !aHeadHeight.nMaxVal.has_value()
+ || !aHeadHeight.nMinVal.has_value() || !aBoxHeight.nCurrVal.has_value()
+ || !aBoxHeight.nMaxVal.has_value() || !aBoxHeight.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1
+ = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal3
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround((*aNeckFromBox.nMaxVal - *aNeckFromBox.nCurrVal)
+ / (*aNeckFromBox.nMaxVal - *aNeckFromBox.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((10800 - *aHeadFromNeck.nCurrVal)
+ / (10800 - *aHeadFromNeck.nMinVal) * nMaxVal2);
+ tools::Long nVal3
+ = std::lround((*aHeadHeight.nMaxVal - *aHeadHeight.nCurrVal)
+ / (*aHeadHeight.nMaxVal - *aHeadHeight.nMinVal) * nMaxVal3);
+ tools::Long nVal4 = std::lround((*aBoxHeight.nCurrVal - *aBoxHeight.nMinVal)
+ / (21600 - *aBoxHeight.nMinVal) * 100000);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && WriteAV(u"adj4", OUString(u"val " + OUString::number(nVal4)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "ellipse")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "ellipseRibbon")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "ellipseRibbon2")
+ {
+ // LO does not have this type, so it does not necessary to be mapped.
+ return false;
+ }
+ if (sShapeType == "flowChartAlternateProcess")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartCollate")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartConnector")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDecision")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDecision")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDelay")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDisplay")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDocument")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartExtract")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartInputOutput")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartInternalStorage")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartMagneticDisk")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartMagneticDrum")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartMagneticTape")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartManualInput")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartManualOperation")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartMerge")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartMultidocument")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartOfflineStorage")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartOffpageConnector")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartOnlineStorage")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartOr")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartDecision")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartPredefinedProcess")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartPreparation")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartPunchedCard")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartPunchedTape")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartSort")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartSummingJunction")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "flowChartTerminator")
+ {
+ // Does not have handle points, so preset enough.
+ return false;
+ }
+ if (sShapeType == "foldedCorner")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "frame")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "funnel")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "gear6")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "gear9")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "halfFrame")
+ {
+ // LO does not have this type, not necessary to map
+ return false;
+ }
+ if (sShapeType == "heart")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "heptagon")
+ {
+ // LO does not have this type, not necessary to map
+ return false;
+ }
+ if (sShapeType == "hexagon")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal = 50000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * nMaxVal);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"vf", OUString(u"val " + OUString::number(115470)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "homePlate")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "horizontalScroll")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "irregularSeal1")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "irregularSeal2")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "leftArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 100000
+ * (double(m_xShape->getSize().Width)
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height));
+ tools::Long nVal1 = std::lround((*aPointY.nMaxVal - *aPointY.nCurrVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointX.nCurrVal - *aPointX.nMinVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "leftArrowCallout")
+ {
+ auto aBoxWidth = GetAdjustmentPointXValue(0);
+ auto aNeckLength = GetAdjustmentPointXValue(1);
+ auto aNeckFromBox = GetAdjustmentPointYValue(1);
+ auto aHeadFromNeck = GetAdjustmentPointYValue(2);
+ if (!aBoxWidth.nCurrVal.has_value() || !aBoxWidth.nMaxVal.has_value()
+ || !aBoxWidth.nMinVal.has_value() || !aNeckLength.nCurrVal.has_value()
+ || !aNeckLength.nMaxVal.has_value() || !aNeckLength.nMinVal.has_value()
+ || !aNeckFromBox.nCurrVal.has_value() || !aNeckFromBox.nMaxVal.has_value()
+ || !aNeckFromBox.nMinVal.has_value() || !aHeadFromNeck.nCurrVal.has_value()
+ || !aHeadFromNeck.nMaxVal.has_value() || !aHeadFromNeck.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal3
+ = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround((*aNeckFromBox.nMaxVal - *aNeckFromBox.nCurrVal)
+ / (*aNeckFromBox.nMaxVal - *aNeckFromBox.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((10800 - *aHeadFromNeck.nCurrVal)
+ / (10800 - *aHeadFromNeck.nMinVal) * nMaxVal2);
+ tools::Long nVal3 = std::lround((*aNeckLength.nCurrVal - *aNeckLength.nMinVal)
+ / (21600 - *aNeckLength.nMinVal) * nMaxVal3);
+ tools::Long nVal4 = std::lround((*aBoxWidth.nMaxVal - *aBoxWidth.nCurrVal)
+ / (*aBoxWidth.nMaxVal - *aBoxWidth.nMinVal) * 100000);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && WriteAV(u"adj4", OUString(u"val " + OUString::number(nVal4)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "leftBrace")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "leftBracket")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "leftCircularArrow")
+ {
+ // LO does not have this type, not necessary to map
+ return false;
+ }
+ if (sShapeType == "leftRightArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 50000
+ * (double(m_xShape->getSize().Width)
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height));
+ tools::Long nVal1 = std::lround((*aPointY.nMaxVal - *aPointY.nCurrVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointX.nCurrVal - *aPointX.nMinVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "leftRightArrowCallout")
+ {
+ auto aNeckFromBox = GetAdjustmentPointXValue(1);
+ auto aHeadFromNeck = GetAdjustmentPointXValue(2);
+ auto aHeadHeight = GetAdjustmentPointYValue(1);
+ auto aBoxHeight = GetAdjustmentPointYValue(0);
+ if (!aNeckFromBox.nCurrVal.has_value() || !aNeckFromBox.nMaxVal.has_value()
+ || !aNeckFromBox.nMinVal.has_value() || !aHeadFromNeck.nCurrVal.has_value()
+ || !aHeadFromNeck.nMaxVal.has_value() || !aHeadFromNeck.nMinVal.has_value()
+ || !aHeadHeight.nCurrVal.has_value() || !aHeadHeight.nMaxVal.has_value()
+ || !aHeadHeight.nMinVal.has_value() || !aBoxHeight.nCurrVal.has_value()
+ || !aBoxHeight.nMaxVal.has_value() || !aBoxHeight.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1
+ = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal3
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround((*aNeckFromBox.nMaxVal - *aNeckFromBox.nCurrVal)
+ / (*aNeckFromBox.nMaxVal - *aNeckFromBox.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((10800 - *aHeadFromNeck.nCurrVal)
+ / (10800 - *aHeadFromNeck.nMinVal) * nMaxVal2);
+ tools::Long nVal3 = std::lround((*aHeadHeight.nCurrVal - *aHeadHeight.nMinVal)
+ / (21600 - *aHeadHeight.nMinVal) * nMaxVal3);
+ tools::Long nVal4 = std::lround((*aBoxHeight.nCurrVal - *aBoxHeight.nMinVal)
+ / (10800 - *aBoxHeight.nMinVal) * 100000);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && WriteAV(u"adj4", OUString(u"val " + OUString::number(nVal4)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "leftRightCircularArrow")
+ {
+ // Not found in word
+ return false;
+ }
+ if (sShapeType == "leftRightRibbon")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "leftRightUpArrow")
+ {
+ // TODO?
+ // MS Word stretches the arrow to fit the bounding box; LO doesn't
+ return false;
+ }
+ if (sShapeType == "leftUpArrow")
+ {
+ // MS Word's and LO's interpretations of what a leftUpArrow should look like
+ // are too different to find a compromise :(
+ }
+ if (sShapeType == "lightningBolt")
+ {
+ // Difference between the SDR and OOXML variants, custgeom?
+ return false;
+ }
+ if (sShapeType == "line")
+ {
+ // Not necessary
+ return false;
+ }
+ if (sShapeType == "lineInv")
+ {
+ // Not necessary
+ return false;
+ }
+ if (sShapeType == "mathDivide")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "mathEqual")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "mathMinus")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "mathMultiply")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "mathNotEqual")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "mathPlus")
+ {
+ // LO does not have this type so mapping not necessary
+ return false;
+ }
+ if (sShapeType == "nonIsoscelesTrapezoid")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "noSmoking")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "notchedRightArrow")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "octagon")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * 50000);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "parallelogram")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * nMaxVal);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "pentagon")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "pie")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "pieWedge")
+ {
+ // Not found in word.
+ return false;
+ }
+ if (sShapeType == "plaque")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "plaqueTabs")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "plus")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * 50000);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "quadArrow")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "quadArrowCallout")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "rect")
+ {
+ // preset enough without AV points.
+ return false;
+ }
+ if (sShapeType == "ribbon")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "ribbon2")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "rightArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 100000
+ * (double(m_xShape->getSize().Width)
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height));
+ tools::Long nVal1 = std::lround((*aPointY.nMaxVal - *aPointY.nCurrVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointX.nMaxVal - *aPointX.nCurrVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "rightArrowCallout")
+ {
+ auto aBoxWidth = GetAdjustmentPointXValue(0);
+ auto aNeckLength = GetAdjustmentPointXValue(1);
+ auto aNeckFromBox = GetAdjustmentPointYValue(1);
+ auto aHeadFromNeck = GetAdjustmentPointYValue(2);
+ if (!aBoxWidth.nCurrVal.has_value() || !aBoxWidth.nMaxVal.has_value()
+ || !aBoxWidth.nMinVal.has_value() || !aNeckLength.nCurrVal.has_value()
+ || !aNeckLength.nMaxVal.has_value() || !aNeckLength.nMinVal.has_value()
+ || !aNeckFromBox.nCurrVal.has_value() || !aNeckFromBox.nMaxVal.has_value()
+ || !aNeckFromBox.nMinVal.has_value() || !aHeadFromNeck.nCurrVal.has_value()
+ || !aHeadFromNeck.nMaxVal.has_value() || !aHeadFromNeck.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal3
+ = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround((*aNeckFromBox.nMaxVal - *aNeckFromBox.nCurrVal)
+ / (*aNeckFromBox.nMaxVal - *aNeckFromBox.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((10800 - *aHeadFromNeck.nCurrVal)
+ / (10800 - *aHeadFromNeck.nMinVal) * nMaxVal2);
+ tools::Long nVal3
+ = std::lround((*aNeckLength.nMaxVal - *aNeckLength.nCurrVal)
+ / (*aNeckLength.nMaxVal - *aNeckLength.nMinVal) * nMaxVal3);
+ tools::Long nVal4 = std::lround((*aBoxWidth.nCurrVal - *aBoxWidth.nMinVal)
+ / (21600 - *aBoxWidth.nMinVal) * 100000);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && WriteAV(u"adj4", OUString(u"val " + OUString::number(nVal4)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "rightBrace")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "rightBracket")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "round1Rect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "round2DiagRect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "round2SameRect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "roundRect")
+ {
+ tools::Long nVal1 = 0;
+ if (m_xShape->getSize().Width >= m_xShape->getSize().Height)
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value())
+ return false;
+ nVal1 = std::lround(*aPointX.nCurrVal / (*aPointX.nMaxVal - *aPointX.nMinVal)
+ * 50000);
+ }
+ else
+ {
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointY.nCurrVal.has_value() || !aPointY.nMaxVal.has_value()
+ || !aPointY.nMinVal.has_value())
+ return false;
+ nVal1 = std::lround(*aPointY.nCurrVal / (*aPointY.nMaxVal - *aPointY.nMinVal)
+ * 50000);
+ }
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "rtTriangle")
+ {
+ // Does not have AV points not necessary to map
+ return false;
+ }
+ if (sShapeType == "smileyFace")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "snip1Rect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "snip2DiagRect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "snip2SameRect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "snipRoundRect")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "squareTabs")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "star10")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "star12")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "star16")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "star24")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "star32")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "star4")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "star5")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "star6")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "star7")
+ {
+ // LO does not have this, so not necessary to map.
+ return false;
+ }
+ if (sShapeType == "star8")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "straightConnector1")
+ {
+ // Not necessary to map.
+ return false;
+ }
+ if (sShapeType == "stripedRightArrow")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "sun")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "swooshArrow")
+ {
+ // Not found in word.
+ return false;
+ }
+ if (sShapeType == "teardrop")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "trapezoid")
+ {
+ // Preset enough.
+ return false;
+ }
+ if (sShapeType == "triangle")
+ {
+ auto aPoint1 = GetAdjustmentPointXValue(0);
+ if (!aPoint1.nCurrVal.has_value() || !aPoint1.nMaxVal.has_value()
+ || !aPoint1.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal = 100000;
+ tools::Long nVal1
+ = std::lround(*aPoint1.nCurrVal / (*aPoint1.nMaxVal - *aPoint1.nMinVal) * nMaxVal);
+ return StartAVListWriting()
+ && WriteAV(u"adj", OUString(u"val " + OUString::number(nVal1)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "upArrowCallout")
+ {
+ auto aNeckFromBox = GetAdjustmentPointXValue(1);
+ auto aHeadFromNeck = GetAdjustmentPointXValue(2);
+ auto aHeadHeight = GetAdjustmentPointYValue(1);
+ auto aBoxHeight = GetAdjustmentPointYValue(0);
+ if (!aNeckFromBox.nCurrVal.has_value() || !aNeckFromBox.nMaxVal.has_value()
+ || !aNeckFromBox.nMinVal.has_value() || !aHeadFromNeck.nCurrVal.has_value()
+ || !aHeadFromNeck.nMaxVal.has_value() || !aHeadFromNeck.nMinVal.has_value()
+ || !aHeadHeight.nCurrVal.has_value() || !aHeadHeight.nMaxVal.has_value()
+ || !aHeadHeight.nMinVal.has_value() || !aBoxHeight.nCurrVal.has_value()
+ || !aBoxHeight.nMaxVal.has_value() || !aBoxHeight.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1
+ = 100000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Width
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nMaxVal3
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1
+ = std::lround((*aNeckFromBox.nMaxVal - *aNeckFromBox.nCurrVal)
+ / (*aNeckFromBox.nMaxVal - *aNeckFromBox.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((10800 - *aHeadFromNeck.nCurrVal)
+ / (10800 - *aHeadFromNeck.nMinVal) * nMaxVal2);
+ tools::Long nVal3 = std::lround((*aHeadHeight.nCurrVal - *aHeadHeight.nMinVal)
+ / (21600 - *aHeadHeight.nMinVal) * nMaxVal3);
+ tools::Long nVal4 = std::lround((*aBoxHeight.nCurrVal - *aBoxHeight.nMinVal)
+ / (10800 - *aBoxHeight.nMinVal) * 100000);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && WriteAV(u"adj3", OUString(u"val " + OUString::number(nVal3)))
+ && WriteAV(u"adj4", OUString(u"val " + OUString::number(nVal4)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "upDownArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 50000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1 = std::lround((*aPointX.nMaxVal - *aPointX.nCurrVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointY.nCurrVal - *aPointY.nMinVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "upArrow")
+ {
+ auto aPointX = GetAdjustmentPointXValue(0);
+ auto aPointY = GetAdjustmentPointYValue(0);
+ if (!aPointX.nCurrVal.has_value() || !aPointX.nMaxVal.has_value()
+ || !aPointX.nMinVal.has_value() || !aPointY.nCurrVal.has_value()
+ || !aPointY.nMaxVal.has_value() || !aPointY.nMinVal.has_value())
+ return false;
+
+ m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, IsXFlipped(), IsYFlipped(),
+ false, false);
+ tools::Long nMaxVal1 = 100000;
+ tools::Long nMaxVal2
+ = 100000 * m_xShape->getSize().Height
+ / std::min(m_xShape->getSize().Width, m_xShape->getSize().Height);
+ tools::Long nVal1 = std::lround((*aPointX.nMaxVal - *aPointX.nCurrVal)
+ / (*aPointX.nMaxVal - *aPointX.nMinVal) * nMaxVal1);
+ tools::Long nVal2 = std::lround((*aPointY.nCurrVal - *aPointY.nMinVal)
+ / (*aPointY.nMaxVal - *aPointY.nMinVal) * nMaxVal2);
+ return StartAVListWriting()
+ && WriteAV(u"adj1", OUString(u"val " + OUString::number(nVal1)))
+ && WriteAV(u"adj2", OUString(u"val " + OUString::number(nVal2)))
+ && EndAVListWriting();
+ }
+ if (sShapeType == "upDownArrowCallout")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "uturnArrow")
+ {
+ // LO does not have like this.
+ return false;
+ }
+ if (sShapeType == "verticalScroll")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "wave")
+ {
+ // LO does not have.
+ return false;
+ }
+ if (sShapeType == "wedgeEllipseCallout")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "wedgeRectCallout")
+ {
+ // TODO
+ return false;
+ }
+ if (sShapeType == "wedgeRoundRectCallout")
+ {
+ // TODO
+ return false;
+ }
+ }
+ catch (...)
+ {
+ // Problem detected with the writing, aborting and trying to find another way.
+ return false;
+ }
+
+ // Default, nothing happened return.
+ return false;
+};
+}
diff --git a/oox/source/export/README b/oox/source/export/README
new file mode 100644
index 000000000..56195b977
--- /dev/null
+++ b/oox/source/export/README
@@ -0,0 +1,2 @@
+presetTextWarpDefinitions.xml and presetShapeDefinitions.xml come from the
+OOXML documentation (TC45).
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
new file mode 100644
index 000000000..8a6d5fa7d
--- /dev/null
+++ b/oox/source/export/chartexport.cxx
@@ -0,0 +1,4685 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/export/chartexport.hxx>
+#include <oox/token/relationship.hxx>
+#include <oox/export/utils.hxx>
+#include <drawingml/chart/typegroupconverter.hxx>
+
+#include <cstdio>
+#include <limits>
+
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
+#include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
+#include <com/sun/star/chart/XAxisZSupplier.hpp>
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#include <com/sun/star/chart/X3DDisplay.hpp>
+#include <com/sun/star/chart/XStatisticDisplay.hpp>
+#include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp>
+#include <com/sun/star/chart/ChartSymbolType.hpp>
+#include <com/sun/star/chart/ChartAxisMarks.hpp>
+#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
+#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart/ChartSolidType.hpp>
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
+#include <com/sun/star/chart/XDiagramPositioning.hpp>
+#include <com/sun/star/chart/TimeIncrement.hpp>
+#include <com/sun/star/chart/TimeInterval.hpp>
+#include <com/sun/star/chart/TimeUnit.hpp>
+
+#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart2/DataPointLabel.hpp>
+#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
+#include <com/sun/star/chart2/DataPointCustomLabelFieldType.hpp>
+#include <com/sun/star/chart2/Symbol.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
+#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
+#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
+#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
+#include <com/sun/star/chart2/AxisType.hpp>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+
+#include <com/sun/star/table/CellAddress.hpp>
+#include <com/sun/star/sheet/XFormulaParser.hpp>
+#include <com/sun/star/sheet/FormulaToken.hpp>
+#include <com/sun/star/sheet/AddressConvention.hpp>
+
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/embed/XVisualObject.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <comphelper/random.hxx>
+#include <utility>
+#include <xmloff/SchXMLSeriesHelper.hxx>
+#include "ColorPropertySet.hxx"
+
+#include <svl/numformat.hxx>
+#include <svl/numuno.hxx>
+#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
+
+#include <set>
+#include <unordered_set>
+
+#include <o3tl/temporary.hxx>
+#include <o3tl/sorted_vector.hxx>
+
+using namespace css;
+using namespace css::uno;
+using namespace css::drawing;
+using namespace ::oox::core;
+using css::beans::PropertyValue;
+using css::beans::XPropertySet;
+using css::container::XNamed;
+using css::table::CellAddress;
+using css::sheet::XFormulaParser;
+using ::oox::core::XmlFilterBase;
+using ::sax_fastparser::FSHelperPtr;
+
+namespace cssc = css::chart;
+
+namespace oox::drawingml {
+
+namespace {
+
+bool isPrimaryAxes(sal_Int32 nIndex)
+{
+ assert(nIndex == 0 || nIndex == 1);
+ return nIndex != 1;
+}
+
+class lcl_MatchesRole
+{
+public:
+ explicit lcl_MatchesRole( const OUString & aRole ) :
+ m_aRole( aRole )
+ {}
+
+ bool operator () ( const Reference< chart2::data::XLabeledDataSequence > & xSeq ) const
+ {
+ if( !xSeq.is() )
+ return false;
+ Reference< beans::XPropertySet > xProp( xSeq->getValues(), uno::UNO_QUERY );
+ OUString aRole;
+
+ return ( xProp.is() &&
+ (xProp->getPropertyValue( "Role" ) >>= aRole ) &&
+ m_aRole == aRole );
+ }
+
+private:
+ OUString m_aRole;
+};
+
+}
+
+static Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram, bool& bHasDateCategories )
+{
+ bHasDateCategories = false;
+ Reference< chart2::data::XLabeledDataSequence > xResult;
+ try
+ {
+ Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
+ xDiagram, uno::UNO_QUERY_THROW );
+ const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+ for( const auto& xCooSys : aCooSysSeq )
+ {
+ OSL_ASSERT( xCooSys.is());
+ for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
+ {
+ const sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nN);
+ for(sal_Int32 nI=0; nI<=nMaxAxisIndex; ++nI)
+ {
+ Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension( nN, nI );
+ OSL_ASSERT( xAxis.is());
+ if( xAxis.is())
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ if( aScaleData.Categories.is())
+ {
+ bHasDateCategories = aScaleData.AxisType == chart2::AxisType::DATE;
+ xResult.set( aScaleData.Categories );
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+
+ return xResult;
+}
+
+static Reference< chart2::data::XLabeledDataSequence >
+ lcl_getDataSequenceByRole(
+ const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aLabeledSeq,
+ const OUString & rRole )
+{
+ Reference< chart2::data::XLabeledDataSequence > aNoResult;
+
+ const Reference< chart2::data::XLabeledDataSequence > * pBegin = aLabeledSeq.getConstArray();
+ const Reference< chart2::data::XLabeledDataSequence > * pEnd = pBegin + aLabeledSeq.getLength();
+ const Reference< chart2::data::XLabeledDataSequence > * pMatch =
+ ::std::find_if( pBegin, pEnd, lcl_MatchesRole( rRole ));
+
+ if( pMatch != pEnd )
+ return *pMatch;
+
+ return aNoResult;
+}
+
+static bool lcl_hasCategoryLabels( const Reference< chart2::XChartDocument >& xChartDoc )
+{
+ //categories are always the first sequence
+ Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram());
+ bool bDateCategories;
+ Reference< chart2::data::XLabeledDataSequence > xCategories( lcl_getCategories( xDiagram, bDateCategories ) );
+ return xCategories.is();
+}
+
+static bool lcl_isCategoryAxisShifted( const Reference< chart2::XDiagram >& xDiagram )
+{
+ bool bCategoryPositionShifted = false;
+ try
+ {
+ Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
+ xDiagram, uno::UNO_QUERY_THROW);
+ const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+ for (const auto& xCooSys : aCooSysSeq)
+ {
+ OSL_ASSERT(xCooSys.is());
+ if( 0 < xCooSys->getDimension() && 0 <= xCooSys->getMaximumAxisIndexByDimension(0) )
+ {
+ Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension(0, 0);
+ OSL_ASSERT(xAxis.is());
+ if (xAxis.is())
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ bCategoryPositionShifted = aScaleData.ShiftedCategoryPosition;
+ break;
+ }
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+
+ return bCategoryPositionShifted;
+}
+
+static sal_Int32 lcl_getCategoryAxisType( const Reference< chart2::XDiagram >& xDiagram, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
+{
+ sal_Int32 nAxisType = -1;
+ try
+ {
+ Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
+ xDiagram, uno::UNO_QUERY_THROW);
+ const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+ for( const auto& xCooSys : aCooSysSeq )
+ {
+ OSL_ASSERT(xCooSys.is());
+ if( nDimensionIndex < xCooSys->getDimension() && nAxisIndex <= xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex) )
+ {
+ Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension(nDimensionIndex, nAxisIndex);
+ OSL_ASSERT(xAxis.is());
+ if( xAxis.is() )
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ nAxisType = aScaleData.AxisType;
+ break;
+ }
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+
+ return nAxisType;
+}
+
+static OUString lclGetTimeUnitToken( sal_Int32 nTimeUnit )
+{
+ switch( nTimeUnit )
+ {
+ case cssc::TimeUnit::DAY: return "days";
+ case cssc::TimeUnit::MONTH: return "months";
+ case cssc::TimeUnit::YEAR: return "years";
+ default: OSL_ENSURE(false, "lclGetTimeUnitToken - unexpected time unit");
+ }
+ return "days";
+}
+
+static cssc::TimeIncrement lcl_getDateTimeIncrement( const Reference< chart2::XDiagram >& xDiagram, sal_Int32 nAxisIndex )
+{
+ cssc::TimeIncrement aTimeIncrement;
+ try
+ {
+ Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
+ xDiagram, uno::UNO_QUERY_THROW);
+ const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+ for( const auto& xCooSys : aCooSysSeq )
+ {
+ OSL_ASSERT(xCooSys.is());
+ if( 0 < xCooSys->getDimension() && nAxisIndex <= xCooSys->getMaximumAxisIndexByDimension(0) )
+ {
+ Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension(0, nAxisIndex);
+ OSL_ASSERT(xAxis.is());
+ if( xAxis.is() )
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ aTimeIncrement = aScaleData.TimeIncrement;
+ break;
+ }
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+
+ return aTimeIncrement;
+}
+
+static bool lcl_isSeriesAttachedToFirstAxis(
+ const Reference< chart2::XDataSeries > & xDataSeries )
+{
+ bool bResult=true;
+
+ try
+ {
+ sal_Int32 nAxisIndex = 0;
+ Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW );
+ xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex;
+ bResult = (0==nAxisIndex);
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+
+ return bResult;
+}
+
+static OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
+{
+ OUStringBuffer aResult;
+ bool bPrecedeWithSpace = false;
+ for( const auto& rString : rSequence )
+ {
+ if( !rString.isEmpty())
+ {
+ if( bPrecedeWithSpace )
+ aResult.append( ' ' );
+ aResult.append( rString );
+ bPrecedeWithSpace = true;
+ }
+ }
+ return aResult.makeStringAndClear();
+}
+
+static Sequence< OUString > lcl_getLabelSequence( const Reference< chart2::data::XDataSequence > & xLabelSeq )
+{
+ Sequence< OUString > aLabels;
+
+ uno::Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xLabelSeq, uno::UNO_QUERY );
+ if( xTextualDataSequence.is())
+ {
+ aLabels = xTextualDataSequence->getTextualData();
+ }
+ else if( xLabelSeq.is())
+ {
+ const Sequence< uno::Any > aAnies( xLabelSeq->getData());
+ aLabels.realloc( aAnies.getLength());
+ auto pLabels = aLabels.getArray();
+ for( sal_Int32 i=0; i<aAnies.getLength(); ++i )
+ aAnies[i] >>= pLabels[i];
+ }
+
+ return aLabels;
+}
+
+static void lcl_fillCategoriesIntoStringVector(
+ const Reference< chart2::data::XDataSequence > & xCategories,
+ ::std::vector< OUString > & rOutCategories )
+{
+ OSL_ASSERT( xCategories.is());
+ if( !xCategories.is())
+ return;
+ Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xCategories, uno::UNO_QUERY );
+ if( xTextualDataSequence.is())
+ {
+ rOutCategories.clear();
+ const Sequence< OUString > aTextData( xTextualDataSequence->getTextualData());
+ rOutCategories.insert( rOutCategories.end(), aTextData.begin(), aTextData.end() );
+ }
+ else
+ {
+ Sequence< uno::Any > aAnies( xCategories->getData());
+ rOutCategories.resize( aAnies.getLength());
+ for( sal_Int32 i=0; i<aAnies.getLength(); ++i )
+ aAnies[i] >>= rOutCategories[i];
+ }
+}
+
+static ::std::vector< double > lcl_getAllValuesFromSequence( const Reference< chart2::data::XDataSequence > & xSeq )
+{
+ ::std::vector< double > aResult;
+
+ Reference< chart2::data::XNumericalDataSequence > xNumSeq( xSeq, uno::UNO_QUERY );
+ if( xNumSeq.is())
+ {
+ const Sequence< double > aValues( xNumSeq->getNumericalData());
+ aResult.insert( aResult.end(), aValues.begin(), aValues.end() );
+ }
+ else if( xSeq.is())
+ {
+ Sequence< uno::Any > aAnies( xSeq->getData());
+ aResult.resize( aAnies.getLength(), std::numeric_limits<double>::quiet_NaN() );
+ for( sal_Int32 i=0; i<aAnies.getLength(); ++i )
+ aAnies[i] >>= aResult[i];
+ }
+ return aResult;
+}
+
+static sal_Int32 lcl_getChartType( std::u16string_view sChartType )
+{
+ chart::TypeId eChartTypeId = chart::TYPEID_UNKNOWN;
+ if( sChartType == u"com.sun.star.chart.BarDiagram"
+ || sChartType == u"com.sun.star.chart2.ColumnChartType" )
+ eChartTypeId = chart::TYPEID_BAR;
+ else if( sChartType == u"com.sun.star.chart.AreaDiagram"
+ || sChartType == u"com.sun.star.chart2.AreaChartType" )
+ eChartTypeId = chart::TYPEID_AREA;
+ else if( sChartType == u"com.sun.star.chart.LineDiagram"
+ || sChartType == u"com.sun.star.chart2.LineChartType" )
+ eChartTypeId = chart::TYPEID_LINE;
+ else if( sChartType == u"com.sun.star.chart.PieDiagram"
+ || sChartType == u"com.sun.star.chart2.PieChartType" )
+ eChartTypeId = chart::TYPEID_PIE;
+ else if( sChartType == u"com.sun.star.chart.DonutDiagram"
+ || sChartType == u"com.sun.star.chart2.DonutChartType" )
+ eChartTypeId = chart::TYPEID_DOUGHNUT;
+ else if( sChartType == u"com.sun.star.chart.XYDiagram"
+ || sChartType == u"com.sun.star.chart2.ScatterChartType" )
+ eChartTypeId = chart::TYPEID_SCATTER;
+ else if( sChartType == u"com.sun.star.chart.NetDiagram"
+ || sChartType == u"com.sun.star.chart2.NetChartType" )
+ eChartTypeId = chart::TYPEID_RADARLINE;
+ else if( sChartType == u"com.sun.star.chart.FilledNetDiagram"
+ || sChartType == u"com.sun.star.chart2.FilledNetChartType" )
+ eChartTypeId = chart::TYPEID_RADARAREA;
+ else if( sChartType == u"com.sun.star.chart.StockDiagram"
+ || sChartType == u"com.sun.star.chart2.CandleStickChartType" )
+ eChartTypeId = chart::TYPEID_STOCK;
+ else if( sChartType == u"com.sun.star.chart.BubbleDiagram"
+ || sChartType == u"com.sun.star.chart2.BubbleChartType" )
+ eChartTypeId = chart::TYPEID_BUBBLE;
+
+ return eChartTypeId;
+}
+
+static sal_Int32 lcl_generateRandomValue()
+{
+ return comphelper::rng::uniform_int_distribution(0, 100000000-1);
+}
+
+static sal_Int32 lcl_getAlphaFromTransparenceGradient(const awt::Gradient& rGradient, bool bStart)
+{
+ // Our alpha is a gray color value.
+ sal_uInt8 nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
+ // drawingML alpha is a percentage on a 0..100000 scale.
+ return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
+}
+
+bool DataLabelsRange::empty() const
+{
+ return maLabels.empty();
+}
+
+size_t DataLabelsRange::count() const
+{
+ return maLabels.size();
+}
+
+bool DataLabelsRange::hasLabel(sal_Int32 nIndex) const
+{
+ return maLabels.find(nIndex) != maLabels.end();
+}
+
+const OUString & DataLabelsRange::getRange() const
+{
+ return maRange;
+}
+
+void DataLabelsRange::setRange(const OUString& rRange)
+{
+ maRange = rRange;
+}
+
+void DataLabelsRange::setLabel(sal_Int32 nIndex, const OUString& rText)
+{
+ maLabels.emplace(nIndex, rText);
+}
+
+DataLabelsRange::LabelsRangeMap::const_iterator DataLabelsRange::begin() const
+{
+ return maLabels.begin();
+}
+
+DataLabelsRange::LabelsRangeMap::const_iterator DataLabelsRange::end() const
+{
+ return maLabels.end();
+}
+
+ChartExport::ChartExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, Reference< frame::XModel > const & xModel, XmlFilterBase* pFB, DocumentType eDocumentType )
+ : DrawingML( std::move(pFS), pFB, eDocumentType )
+ , mnXmlNamespace( nXmlNamespace )
+ , mnSeriesCount(0)
+ , mxChartModel( xModel )
+ , mpURLTransformer(std::make_shared<URLTransformer>())
+ , mbHasCategoryLabels( false )
+ , mbHasZAxis( false )
+ , mbIs3DChart( false )
+ , mbStacked(false)
+ , mbPercent(false)
+ , mbHasDateCategories(false)
+{
+}
+
+void ChartExport::SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer)
+{
+ mpURLTransformer = pTransformer;
+}
+
+sal_Int32 ChartExport::getChartType( )
+{
+ OUString sChartType = mxDiagram->getDiagramType();
+ return lcl_getChartType( sChartType );
+}
+
+namespace {
+
+uno::Sequence< beans::PropertyValue > createArguments(
+ const OUString & rRangeRepresentation, bool bUseColumns)
+{
+ css::chart::ChartDataRowSource eRowSource = css::chart::ChartDataRowSource_ROWS;
+ if (bUseColumns)
+ eRowSource = css::chart::ChartDataRowSource_COLUMNS;
+
+ uno::Sequence<beans::PropertyValue> aArguments{
+ { "DataRowSource", -1, uno::Any(eRowSource), beans::PropertyState_DIRECT_VALUE },
+ { "FirstCellAsLabel", -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
+ { "HasCategories", -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
+ { "CellRangeRepresentation", -1, uno::Any(rRangeRepresentation),
+ beans::PropertyState_DIRECT_VALUE }
+ };
+
+ return aArguments;
+}
+
+Reference<chart2::XDataSeries> getPrimaryDataSeries(const Reference<chart2::XChartType>& xChartType)
+{
+ Reference< chart2::XDataSeriesContainer > xDSCnt(xChartType, uno::UNO_QUERY_THROW);
+
+ // export dataseries for current chart-type
+ const Sequence< Reference< chart2::XDataSeries > > aSeriesSeq(xDSCnt->getDataSeries());
+ for (const auto& rSeries : aSeriesSeq)
+ {
+ Reference<chart2::XDataSeries> xSource(rSeries, uno::UNO_QUERY);
+ if (xSource.is())
+ return xSource;
+ }
+
+ return Reference<chart2::XDataSeries>();
+}
+
+}
+
+Sequence< Sequence< OUString > > ChartExport::getSplitCategoriesList( const OUString& rRange )
+{
+ Reference< chart2::XChartDocument > xChartDoc(getModel(), uno::UNO_QUERY);
+ OSL_ASSERT(xChartDoc.is());
+ if (xChartDoc.is())
+ {
+ Reference< chart2::data::XDataProvider > xDataProvider(xChartDoc->getDataProvider());
+ OSL_ENSURE(xDataProvider.is(), "No DataProvider");
+ if (xDataProvider.is())
+ {
+ //detect whether the first series is a row or a column
+ bool bSeriesUsesColumns = true;
+ Reference< chart2::XDiagram > xDiagram(xChartDoc->getFirstDiagram());
+ try
+ {
+ Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(xDiagram, uno::UNO_QUERY_THROW);
+ const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(xCooSysCnt->getCoordinateSystems());
+ for (const auto& rCooSys : aCooSysSeq)
+ {
+ const Reference< chart2::XChartTypeContainer > xCTCnt(rCooSys, uno::UNO_QUERY_THROW);
+ const Sequence< Reference< chart2::XChartType > > aChartTypeSeq(xCTCnt->getChartTypes());
+ for (const auto& rChartType : aChartTypeSeq)
+ {
+ Reference< chart2::XDataSeries > xDataSeries = getPrimaryDataSeries(rChartType);
+ if (xDataSeries.is())
+ {
+ uno::Reference< chart2::data::XDataSource > xSeriesSource(xDataSeries, uno::UNO_QUERY);
+ const uno::Sequence< beans::PropertyValue > rArguments = xDataProvider->detectArguments(xSeriesSource);
+ for (const beans::PropertyValue& rProperty : rArguments)
+ {
+ if (rProperty.Name == "DataRowSource")
+ {
+ css::chart::ChartDataRowSource eRowSource;
+ if (rProperty.Value >>= eRowSource)
+ {
+ bSeriesUsesColumns = (eRowSource == css::chart::ChartDataRowSource_COLUMNS);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ // detect we have an inner data table or not
+ if (xChartDoc->hasInternalDataProvider() && rRange == "categories")
+ {
+ try
+ {
+ css::uno::Reference< css::chart2::XAnyDescriptionAccess > xDataAccess(xChartDoc->getDataProvider(), uno::UNO_QUERY);
+ const Sequence< Sequence< uno::Any > >aAnyCategories(bSeriesUsesColumns ? xDataAccess->getAnyRowDescriptions() : xDataAccess->getAnyColumnDescriptions());
+ auto pMax = std::max_element(aAnyCategories.begin(), aAnyCategories.end(),
+ [](const Sequence<uno::Any>& a, const Sequence<uno::Any>& b) {
+ return a.getLength() < b.getLength(); });
+
+ //minimum is 1!
+ if (pMax != aAnyCategories.end() && pMax->getLength() > 1)
+ {
+ sal_Int32 nLevelCount = pMax->getLength();
+ //we have complex categories
+ //sort the categories name
+ Sequence<Sequence<OUString>>aFinalSplitSource(nLevelCount);
+ auto pFinalSplitSource = aFinalSplitSource.getArray();
+ for (sal_Int32 i = 0; i < nLevelCount; i++)
+ {
+ sal_Int32 nElemLabel = 0;
+ pFinalSplitSource[nLevelCount - i - 1].realloc(aAnyCategories.getLength());
+ auto pSeq = pFinalSplitSource[nLevelCount - i - 1].getArray();
+ for (auto const& elemLabel : aAnyCategories)
+ {
+ // make sure elemLabel[i] exists!
+ if (elemLabel.getLength() > i)
+ {
+ pSeq[nElemLabel] = elemLabel[i].get<OUString>();
+ nElemLabel++;
+ }
+ }
+ }
+ return aFinalSplitSource;
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+ }
+ else
+ {
+ try
+ {
+ uno::Reference< chart2::data::XDataSource > xCategoriesSource(xDataProvider->createDataSource(
+ createArguments(rRange, bSeriesUsesColumns)));
+
+ if (xCategoriesSource.is())
+ {
+ const Sequence< Reference< chart2::data::XLabeledDataSequence >> aCategories = xCategoriesSource->getDataSequences();
+ if (aCategories.getLength() > 1)
+ {
+ //we have complex categories
+ //sort the categories name
+ Sequence<Sequence<OUString>> aFinalSplitSource(aCategories.getLength());
+ std::transform(aCategories.begin(), aCategories.end(),
+ std::reverse_iterator(asNonConstRange(aFinalSplitSource).end()),
+ [](const Reference<chart2::data::XLabeledDataSequence>& xCat) {
+ return lcl_getLabelSequence(xCat->getValues()); });
+ return aFinalSplitSource;
+ }
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+ }
+ }
+ }
+
+ return Sequence< Sequence< OUString>>(0);
+}
+
+OUString ChartExport::parseFormula( const OUString& rRange )
+{
+ OUString aResult;
+ Reference< XFormulaParser > xParser;
+ uno::Reference< lang::XMultiServiceFactory > xSF = GetFB()->getModelFactory();
+ if( xSF.is() )
+ {
+ try
+ {
+ xParser.set( xSF->createInstance("com.sun.star.sheet.FormulaParser"), UNO_QUERY );
+ }
+ catch( Exception& )
+ {
+ }
+ }
+
+ SAL_WARN_IF(!xParser.is(), "oox", "creating formula parser failed");
+
+ if( xParser.is() )
+ {
+ Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY );
+ // rRange is the result of a
+ // css::chart2::data::XDataSequence::getSourceRangeRepresentation()
+ // call that returns the range in the document's current UI notation.
+ // Creating a FormulaParser defaults to the same notation, for
+ // parseFormula() do not attempt to override the FormulaConvention
+ // property with css::sheet::AddressConvention::OOO or some such.
+ /* TODO: it would be much better to introduce a
+ * getSourceRangeRepresentation(css::sheet::AddressConvention) to
+ * return the ranges in a specific convention than converting them with
+ * the overhead of creating an XFormulaParser for each... */
+ uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
+ if( xParserProps.is() )
+ {
+ xParserProps->setPropertyValue("FormulaConvention", uno::Any(css::sheet::AddressConvention::XL_OOX) );
+ // For referencing named ranges correctly with special excel chart syntax.
+ xParserProps->setPropertyValue("RefConventionChartOOXML", uno::Any(true) );
+ }
+ aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
+ }
+ else
+ {
+ //FIXME: currently just using simple converter, e.g $Sheet1.$A$1:$C$1 -> Sheet1!$A$1:$C$1
+ OUString aRange( rRange );
+ if( aRange.startsWith("$") )
+ aRange = aRange.copy(1);
+ aRange = aRange.replaceAll(".$", "!$" );
+ aResult = aRange;
+ }
+
+ return aResult;
+}
+
+void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nID, sal_Int32 nChartCount )
+{
+ FSHelperPtr pFS = GetFS();
+
+ Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
+
+ pFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
+
+ pFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
+
+ // TODO: get the correct chart name chart id
+ OUString sName = "Object 1";
+ Reference< XNamed > xNamed( xShape, UNO_QUERY );
+ if (xNamed.is())
+ sName = xNamed->getName();
+
+ pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(nID),
+ XML_name, sName);
+
+ OUString sURL;
+ if ( GetProperty( xShapeProps, "URL" ) )
+ mAny >>= sURL;
+ if( !sURL.isEmpty() )
+ {
+ OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HYPERLINK),
+ mpURLTransformer->getTransformedString(sURL),
+ mpURLTransformer->isExternalURL(sURL));
+
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ }
+ pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
+
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
+
+ if( GetDocumentType() == DOCUMENT_PPTX )
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+ pFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
+
+ // visual chart properties
+ WriteShapeTransformation( xShape, mnXmlNamespace );
+
+ // writer chart object
+ pFS->startElement(FSNS(XML_a, XML_graphic));
+ pFS->startElement( FSNS( XML_a, XML_graphicData ),
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart" );
+ OUString sId;
+ const char* sFullPath = nullptr;
+ const char* sRelativePath = nullptr;
+ switch( GetDocumentType() )
+ {
+ case DOCUMENT_DOCX:
+ {
+ sFullPath = "word/charts/chart";
+ sRelativePath = "charts/chart";
+ break;
+ }
+ case DOCUMENT_PPTX:
+ {
+ sFullPath = "ppt/charts/chart";
+ sRelativePath = "../charts/chart";
+ break;
+ }
+ case DOCUMENT_XLSX:
+ {
+ sFullPath = "xl/charts/chart";
+ sRelativePath = "../charts/chart";
+ break;
+ }
+ default:
+ {
+ sFullPath = "charts/chart";
+ sRelativePath = "charts/chart";
+ break;
+ }
+ }
+ OUString sFullStream = OUStringBuffer()
+ .appendAscii(sFullPath)
+ .append(OUString::number(nChartCount) + ".xml")
+ .makeStringAndClear();
+ OUString sRelativeStream = OUStringBuffer()
+ .appendAscii(sRelativePath)
+ .append(OUString::number(nChartCount) + ".xml" )
+ .makeStringAndClear();
+ FSHelperPtr pChart = CreateOutputStream(
+ sFullStream,
+ sRelativeStream,
+ pFS->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
+ OUStringToOString(oox::getRelationship(Relationship::CHART), RTL_TEXTENCODING_UTF8).getStr(),
+ &sId );
+
+ XmlFilterBase* pFB = GetFB();
+ pFS->singleElement( FSNS( XML_c, XML_chart ),
+ FSNS(XML_xmlns, XML_c), pFB->getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS(XML_xmlns, XML_r), pFB->getNamespaceURL(OOX_NS(officeRel)),
+ FSNS(XML_r, XML_id), sId );
+
+ pFS->endElement( FSNS( XML_a, XML_graphicData ) );
+ pFS->endElement( FSNS( XML_a, XML_graphic ) );
+ pFS->endElementNS( mnXmlNamespace, XML_graphicFrame );
+
+ SetFS( pChart );
+ ExportContent();
+}
+
+void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc )
+{
+ if( !xChartDoc.is())
+ return;
+
+ try
+ {
+ Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
+ OSL_ENSURE( xDataProvider.is(), "No DataProvider" );
+ if( xDataProvider.is())
+ {
+ mbHasCategoryLabels = lcl_hasCategoryLabels( xChartDoc );
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+}
+
+void ChartExport::ExportContent()
+{
+ Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
+ OSL_ASSERT( xChartDoc.is() );
+ if( !xChartDoc.is() )
+ return;
+ InitRangeSegmentationProperties( xChartDoc );
+ // TODO: export chart
+ ExportContent_( );
+}
+
+void ChartExport::ExportContent_()
+{
+ Reference< css::chart::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
+ if( xChartDoc.is())
+ {
+ // determine if data comes from the outside
+ bool bIncludeTable = true;
+
+ Reference< chart2::XChartDocument > xNewDoc( xChartDoc, uno::UNO_QUERY );
+ if( xNewDoc.is())
+ {
+ // check if we have own data. If so we must not export the complete
+ // range string, as this is our only indicator for having own or
+ // external data. @todo: fix this in the file format!
+ Reference< lang::XServiceInfo > xDPServiceInfo( xNewDoc->getDataProvider(), uno::UNO_QUERY );
+ if( ! (xDPServiceInfo.is() && xDPServiceInfo->getImplementationName() == "com.sun.star.comp.chart.InternalDataProvider" ))
+ {
+ bIncludeTable = false;
+ }
+ }
+ exportChartSpace( xChartDoc, bIncludeTable );
+ }
+ else
+ {
+ OSL_FAIL( "Couldn't export chart due to wrong XModel" );
+ }
+}
+
+void ChartExport::exportChartSpace( const Reference< css::chart::XChartDocument >& xChartDoc,
+ bool bIncludeTable )
+{
+ FSHelperPtr pFS = GetFS();
+ XmlFilterBase* pFB = GetFB();
+ pFS->startElement( FSNS( XML_c, XML_chartSpace ),
+ FSNS( XML_xmlns, XML_c ), pFB->getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS( XML_xmlns, XML_a ), pFB->getNamespaceURL(OOX_NS(dml)),
+ FSNS( XML_xmlns, XML_r ), pFB->getNamespaceURL(OOX_NS(officeRel)));
+ // TODO: get the correct editing language
+ pFS->singleElement(FSNS(XML_c, XML_lang), XML_val, "en-US");
+
+ pFS->singleElement(FSNS(XML_c, XML_roundedCorners), XML_val, "0");
+
+ if( !bIncludeTable )
+ {
+ // TODO:external data
+ }
+ //XML_chart
+ exportChart(xChartDoc);
+
+ // TODO: printSettings
+ // TODO: style
+ // TODO: text properties
+ // TODO: shape properties
+ Reference< XPropertySet > xPropSet = xChartDoc->getArea();
+ if( xPropSet.is() )
+ exportShapeProps( xPropSet );
+
+ //XML_externalData
+ exportExternalData(xChartDoc);
+
+ // export additional shapes in chart
+ exportAdditionalShapes(xChartDoc);
+
+ pFS->endElement( FSNS( XML_c, XML_chartSpace ) );
+}
+
+void ChartExport::exportExternalData( const Reference< css::chart::XChartDocument >& xChartDoc )
+{
+ // Embedded external data is grab bagged for docx file hence adding export part of
+ // external data for docx files only.
+ if(GetDocumentType() != DOCUMENT_DOCX)
+ return;
+
+ OUString externalDataPath;
+ Reference< beans::XPropertySet > xDocPropSet( xChartDoc->getDiagram(), uno::UNO_QUERY );
+ if( xDocPropSet.is())
+ {
+ try
+ {
+ Any aAny( xDocPropSet->getPropertyValue( "ExternalData" ));
+ aAny >>= externalDataPath;
+ }
+ catch( beans::UnknownPropertyException & )
+ {
+ SAL_WARN("oox", "Required property not found in ChartDocument");
+ }
+ }
+ if(externalDataPath.isEmpty())
+ return;
+
+ // Here adding external data entry to relationship.
+ OUString relationPath = externalDataPath;
+ // Converting absolute path to relative path.
+ if( externalDataPath[ 0 ] != '.' && externalDataPath[ 1 ] != '.')
+ {
+ sal_Int32 nSepPos = externalDataPath.indexOf( '/', 0 );
+ if( nSepPos > 0)
+ {
+ relationPath = relationPath.copy( nSepPos, ::std::max< sal_Int32 >( externalDataPath.getLength(), 0 ) - nSepPos );
+ relationPath = ".." + relationPath;
+ }
+ }
+ FSHelperPtr pFS = GetFS();
+ OUString type = oox::getRelationship(Relationship::PACKAGE);
+ if (relationPath.endsWith(".bin"))
+ type = oox::getRelationship(Relationship::OLEOBJECT);
+
+ OUString sRelId = GetFB()->addRelation(pFS->getOutputStream(),
+ type,
+ relationPath);
+ pFS->singleElementNS(XML_c, XML_externalData, FSNS(XML_r, XML_id), sRelId);
+}
+
+void ChartExport::exportAdditionalShapes( const Reference< css::chart::XChartDocument >& xChartDoc )
+{
+ Reference< beans::XPropertySet > xDocPropSet(xChartDoc, uno::UNO_QUERY);
+ if (!xDocPropSet.is())
+ return;
+
+ css::uno::Reference< css::drawing::XShapes > mxAdditionalShapes;
+ // get a sequence of non-chart shapes
+ try
+ {
+ Any aShapesAny = xDocPropSet->getPropertyValue("AdditionalShapes");
+ if( (aShapesAny >>= mxAdditionalShapes) && mxAdditionalShapes.is() )
+ {
+ OUString sId;
+ const char* sFullPath = nullptr;
+ const char* sRelativePath = nullptr;
+ sal_Int32 nDrawing = getNewDrawingUniqueId();
+
+ switch (GetDocumentType())
+ {
+ case DOCUMENT_DOCX:
+ {
+ sFullPath = "word/drawings/drawing";
+ sRelativePath = "../drawings/drawing";
+ break;
+ }
+ case DOCUMENT_PPTX:
+ {
+ sFullPath = "ppt/drawings/drawing";
+ sRelativePath = "../drawings/drawing";
+ break;
+ }
+ case DOCUMENT_XLSX:
+ {
+ sFullPath = "xl/drawings/drawing";
+ sRelativePath = "../drawings/drawing";
+ break;
+ }
+ default:
+ {
+ sFullPath = "drawings/drawing";
+ sRelativePath = "drawings/drawing";
+ break;
+ }
+ }
+ OUString sFullStream = OUStringBuffer()
+ .appendAscii(sFullPath)
+ .append(OUString::number(nDrawing) + ".xml")
+ .makeStringAndClear();
+ OUString sRelativeStream = OUStringBuffer()
+ .appendAscii(sRelativePath)
+ .append(OUString::number(nDrawing) + ".xml")
+ .makeStringAndClear();
+
+ sax_fastparser::FSHelperPtr pDrawing = CreateOutputStream(
+ sFullStream,
+ sRelativeStream,
+ GetFS()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml",
+ OUStringToOString(oox::getRelationship(Relationship::CHARTUSERSHAPES), RTL_TEXTENCODING_UTF8).getStr(),
+ &sId);
+
+ GetFS()->singleElementNS(XML_c, XML_userShapes, FSNS(XML_r, XML_id), sId);
+
+ XmlFilterBase* pFB = GetFB();
+ pDrawing->startElement(FSNS(XML_c, XML_userShapes),
+ FSNS(XML_xmlns, XML_cdr), pFB->getNamespaceURL(OOX_NS(dmlChartDr)),
+ FSNS(XML_xmlns, XML_a), pFB->getNamespaceURL(OOX_NS(dml)),
+ FSNS(XML_xmlns, XML_c), pFB->getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS(XML_xmlns, XML_r), pFB->getNamespaceURL(OOX_NS(officeRel)));
+
+ const sal_Int32 nShapeCount(mxAdditionalShapes->getCount());
+ for (sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++)
+ {
+ Reference< drawing::XShape > xShape;
+ mxAdditionalShapes->getByIndex(nShapeId) >>= xShape;
+ SAL_WARN_IF(!xShape.is(), "xmloff.chart", "Shape without an XShape?");
+ if (!xShape.is())
+ continue;
+
+ // TODO: absSizeAnchor: we import both (absSizeAnchor and relSizeAnchor), but there is no essential difference between them.
+ pDrawing->startElement(FSNS(XML_cdr, XML_relSizeAnchor));
+ uno::Reference< beans::XPropertySet > xShapeProperties(xShape, uno::UNO_QUERY);
+ if( xShapeProperties.is() )
+ {
+ Reference<embed::XVisualObject> xVisObject(mxChartModel, uno::UNO_QUERY);
+ awt::Size aPageSize = xVisObject->getVisualAreaSize(embed::Aspects::MSOLE_CONTENT);
+ WriteFromTo( xShape, aPageSize, pDrawing );
+
+ ShapeExport aExport(XML_cdr, pDrawing, nullptr, GetFB(), GetDocumentType(), nullptr, true);
+ aExport.WriteShape(xShape);
+ }
+ pDrawing->endElement(FSNS(XML_cdr, XML_relSizeAnchor));
+ }
+ pDrawing->endElement(FSNS(XML_c, XML_userShapes));
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "AdditionalShapes not found");
+ }
+}
+
+void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xChartDoc )
+{
+ Reference< chart2::XChartDocument > xNewDoc( xChartDoc, uno::UNO_QUERY );
+ mxDiagram.set( xChartDoc->getDiagram() );
+ if( xNewDoc.is())
+ mxNewDiagram.set( xNewDoc->getFirstDiagram());
+
+ // get Properties of ChartDocument
+ bool bHasMainTitle = false;
+ OUString aSubTitle;
+ bool bHasLegend = false;
+ Reference< beans::XPropertySet > xDocPropSet( xChartDoc, uno::UNO_QUERY );
+ if( xDocPropSet.is())
+ {
+ try
+ {
+ Any aAny( xDocPropSet->getPropertyValue("HasMainTitle"));
+ aAny >>= bHasMainTitle;
+ aAny = xDocPropSet->getPropertyValue("HasLegend");
+ aAny >>= bHasLegend;
+ }
+ catch( beans::UnknownPropertyException & )
+ {
+ SAL_WARN("oox", "Required property not found in ChartDocument");
+ }
+ } // if( xDocPropSet.is())
+
+ Reference< beans::XPropertySet > xPropSubTitle( xChartDoc->getSubTitle(), UNO_QUERY );
+ if( xPropSubTitle.is())
+ {
+ try
+ {
+ xPropSubTitle->getPropertyValue("String") >>= aSubTitle;
+ }
+ catch( beans::UnknownPropertyException & )
+ {
+ }
+ }
+
+ // chart element
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_chart));
+
+ // titles
+ if( bHasMainTitle )
+ {
+ exportTitle( xChartDoc->getTitle(), !aSubTitle.isEmpty() ? &aSubTitle : nullptr );
+ pFS->singleElement(FSNS(XML_c, XML_autoTitleDeleted), XML_val, "0");
+ }
+ else if( !aSubTitle.isEmpty() )
+ {
+ exportTitle( xChartDoc->getSubTitle(), nullptr );
+ pFS->singleElement(FSNS(XML_c, XML_autoTitleDeleted), XML_val, "0");
+ }
+ else
+ {
+ pFS->singleElement(FSNS(XML_c, XML_autoTitleDeleted), XML_val, "1");
+ }
+
+ InitPlotArea( );
+ if( mbIs3DChart )
+ {
+ exportView3D();
+
+ // floor
+ Reference< beans::XPropertySet > xFloor = mxNewDiagram->getFloor();
+ if( xFloor.is() )
+ {
+ pFS->startElement(FSNS(XML_c, XML_floor));
+ exportShapeProps( xFloor );
+ pFS->endElement( FSNS( XML_c, XML_floor ) );
+ }
+
+ // LibreOffice doesn't distinguish between sideWall and backWall (both are using the same color).
+ // It is controlled by the same Wall property.
+ Reference< beans::XPropertySet > xWall = mxNewDiagram->getWall();
+ if( xWall.is() )
+ {
+ // sideWall
+ pFS->startElement(FSNS(XML_c, XML_sideWall));
+ exportShapeProps( xWall );
+ pFS->endElement( FSNS( XML_c, XML_sideWall ) );
+
+ // backWall
+ pFS->startElement(FSNS(XML_c, XML_backWall));
+ exportShapeProps( xWall );
+ pFS->endElement( FSNS( XML_c, XML_backWall ) );
+ }
+
+ }
+ // plot area
+ exportPlotArea( xChartDoc );
+ // legend
+ if( bHasLegend )
+ exportLegend( xChartDoc );
+
+ uno::Reference<beans::XPropertySet> xDiagramPropSet(xChartDoc->getDiagram(), uno::UNO_QUERY);
+ uno::Any aPlotVisOnly = xDiagramPropSet->getPropertyValue("IncludeHiddenCells");
+ bool bIncludeHiddenCells = false;
+ aPlotVisOnly >>= bIncludeHiddenCells;
+ pFS->singleElement(FSNS(XML_c, XML_plotVisOnly), XML_val, ToPsz10(!bIncludeHiddenCells));
+
+ exportMissingValueTreatment(Reference<beans::XPropertySet>(mxDiagram, uno::UNO_QUERY));
+
+ pFS->endElement( FSNS( XML_c, XML_chart ) );
+}
+
+void ChartExport::exportMissingValueTreatment(const uno::Reference<beans::XPropertySet>& xPropSet)
+{
+ if (!xPropSet.is())
+ return;
+
+ sal_Int32 nVal = 0;
+ uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+ if (!(aAny >>= nVal))
+ return;
+
+ const char* pVal = nullptr;
+ switch (nVal)
+ {
+ case cssc::MissingValueTreatment::LEAVE_GAP:
+ pVal = "gap";
+ break;
+ case cssc::MissingValueTreatment::USE_ZERO:
+ pVal = "zero";
+ break;
+ case cssc::MissingValueTreatment::CONTINUE:
+ pVal = "span";
+ break;
+ default:
+ SAL_WARN("oox", "unknown MissingValueTreatment value");
+ break;
+ }
+
+ FSHelperPtr pFS = GetFS();
+ pFS->singleElement(FSNS(XML_c, XML_dispBlanksAs), XML_val, pVal);
+}
+
+void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& xChartDoc )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_legend));
+
+ Reference< beans::XPropertySet > xProp( xChartDoc->getLegend(), uno::UNO_QUERY );
+ if( xProp.is() )
+ {
+ // position
+ css::chart::ChartLegendPosition aLegendPos = css::chart::ChartLegendPosition_NONE;
+ try
+ {
+ Any aAny( xProp->getPropertyValue( "Alignment" ));
+ aAny >>= aLegendPos;
+ }
+ catch( beans::UnknownPropertyException & )
+ {
+ SAL_WARN("oox", "Property Align not found in ChartLegend");
+ }
+
+ const char* strPos = nullptr;
+ switch( aLegendPos )
+ {
+ case css::chart::ChartLegendPosition_LEFT:
+ strPos = "l";
+ break;
+ case css::chart::ChartLegendPosition_RIGHT:
+ strPos = "r";
+ break;
+ case css::chart::ChartLegendPosition_TOP:
+ strPos = "t";
+ break;
+ case css::chart::ChartLegendPosition_BOTTOM:
+ strPos = "b";
+ break;
+ case css::chart::ChartLegendPosition_NONE:
+ case css::chart::ChartLegendPosition::ChartLegendPosition_MAKE_FIXED_SIZE:
+ // nothing
+ break;
+ }
+
+ if( strPos != nullptr )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_legendPos), XML_val, strPos);
+ }
+
+ // legendEntry
+ Reference<chart2::XCoordinateSystemContainer> xCooSysContainer(mxNewDiagram, UNO_QUERY_THROW);
+ const Sequence<Reference<chart2::XCoordinateSystem>> xCooSysSequence(xCooSysContainer->getCoordinateSystems());
+
+ sal_Int32 nIndex = 0;
+ bool bShowLegendEntry;
+ for (const auto& rCooSys : xCooSysSequence)
+ {
+ PropertySet aCooSysProp(rCooSys);
+ bool bSwapXAndY = aCooSysProp.getBoolProperty(PROP_SwapXAndYAxis);
+
+ Reference<chart2::XChartTypeContainer> xChartTypeContainer(rCooSys, UNO_QUERY_THROW);
+ const Sequence<Reference<chart2::XChartType>> xChartTypeSequence(xChartTypeContainer->getChartTypes());
+ if (!xChartTypeSequence.hasElements())
+ continue;
+
+ for (const auto& rCT : xChartTypeSequence)
+ {
+ Reference<chart2::XDataSeriesContainer> xDSCont(rCT, UNO_QUERY);
+ if (!xDSCont.is())
+ continue;
+
+ OUString aChartType(rCT->getChartType());
+ bool bIsPie = lcl_getChartType(aChartType) == chart::TYPEID_PIE;
+ if (bIsPie)
+ {
+ PropertySet xChartTypeProp(rCT);
+ bIsPie = !xChartTypeProp.getBoolProperty(PROP_UseRings);
+ }
+ const Sequence<Reference<chart2::XDataSeries>> aDataSeriesSeq = xDSCont->getDataSeries();
+ if (bSwapXAndY)
+ nIndex += aDataSeriesSeq.getLength() - 1;
+ for (const auto& rDataSeries : aDataSeriesSeq)
+ {
+ PropertySet aSeriesProp(rDataSeries);
+ bool bVaryColorsByPoint = aSeriesProp.getBoolProperty(PROP_VaryColorsByPoint);
+ if (bVaryColorsByPoint || bIsPie)
+ {
+ Sequence<sal_Int32> deletedLegendEntriesSeq;
+ aSeriesProp.getProperty(deletedLegendEntriesSeq, PROP_DeletedLegendEntries);
+ for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq))
+ {
+ pFS->startElement(FSNS(XML_c, XML_legendEntry));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val,
+ OString::number(nIndex + deletedLegendEntry));
+ pFS->singleElement(FSNS(XML_c, XML_delete), XML_val, "1");
+ pFS->endElement(FSNS(XML_c, XML_legendEntry));
+ }
+ Reference<chart2::data::XDataSource> xDSrc(rDataSeries, UNO_QUERY);
+ if (!xDSrc.is())
+ continue;
+
+ const Sequence<Reference<chart2::data::XLabeledDataSequence>> aDataSeqs = xDSrc->getDataSequences();
+ for (const auto& rDataSeq : aDataSeqs)
+ {
+ Reference<chart2::data::XDataSequence> xValues = rDataSeq->getValues();
+ if (!xValues.is())
+ continue;
+
+ sal_Int32 nDataSeqSize = xValues->getData().getLength();
+ nIndex += nDataSeqSize;
+ }
+ }
+ else
+ {
+ bShowLegendEntry = aSeriesProp.getBoolProperty(PROP_ShowLegendEntry);
+ if (!bShowLegendEntry)
+ {
+ pFS->startElement(FSNS(XML_c, XML_legendEntry));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val,
+ OString::number(nIndex));
+ pFS->singleElement(FSNS(XML_c, XML_delete), XML_val, "1");
+ pFS->endElement(FSNS(XML_c, XML_legendEntry));
+ }
+ bSwapXAndY ? nIndex-- : nIndex++;
+ }
+ }
+ if (bSwapXAndY)
+ nIndex += aDataSeriesSeq.getLength() + 1;
+ }
+ }
+
+ uno::Any aRelativePos = xProp->getPropertyValue("RelativePosition");
+ if (aRelativePos.hasValue())
+ {
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
+
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
+ chart2::RelativePosition aPos = aRelativePos.get<chart2::RelativePosition>();
+
+ const double x = aPos.Primary;
+ const double y = aPos.Secondary;
+
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
+
+ uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
+ if (aRelativeSize.hasValue())
+ {
+ chart2::RelativeSize aSize = aRelativeSize.get<chart2::RelativeSize>();
+
+ const double w = aSize.Primary;
+ const double h = aSize.Secondary;
+
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, OString::number(w));
+
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, OString::number(h));
+ }
+
+ SAL_WARN_IF(aPos.Anchor != css::drawing::Alignment_TOP_LEFT, "oox", "unsupported anchor position");
+
+ pFS->endElement(FSNS(XML_c, XML_manualLayout));
+ pFS->endElement(FSNS(XML_c, XML_layout));
+ }
+
+ if (strPos != nullptr)
+ {
+ uno::Any aOverlay = xProp->getPropertyValue("Overlay");
+ if(aOverlay.get<bool>())
+ pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "1");
+ else
+ pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "0");
+ }
+
+ // shape properties
+ exportShapeProps( xProp );
+
+ // draw-chart:txPr text properties
+ exportTextProps( xProp );
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_legend ) );
+}
+
+void ChartExport::exportTitle( const Reference< XShape >& xShape, const OUString* pSubText)
+{
+ OUString sText;
+ Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
+ if( xPropSet.is())
+ {
+ xPropSet->getPropertyValue("String") >>= sText;
+ }
+
+ // tdf#101322: add subtitle to title
+ if( pSubText )
+ sText = sText.isEmpty() ? *pSubText : sText + "\n" + *pSubText;
+
+ if( sText.isEmpty() )
+ return;
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_title));
+
+ pFS->startElement(FSNS(XML_c, XML_tx));
+ pFS->startElement(FSNS(XML_c, XML_rich));
+
+ // TODO: bodyPr
+ const char* sWritingMode = nullptr;
+ bool bVertical = false;
+ xPropSet->getPropertyValue("StackedText") >>= bVertical;
+ if( bVertical )
+ sWritingMode = "wordArtVert";
+
+ sal_Int32 nRotation = 0;
+ xPropSet->getPropertyValue("TextRotation") >>= nRotation;
+
+ pFS->singleElement( FSNS( XML_a, XML_bodyPr ),
+ XML_vert, sWritingMode,
+ XML_rot, oox::drawingml::calcRotationValue(nRotation) );
+ // TODO: lstStyle
+ pFS->singleElement(FSNS(XML_a, XML_lstStyle));
+ // FIXME: handle multiple paragraphs to parse aText
+ pFS->startElement(FSNS(XML_a, XML_p));
+
+ pFS->startElement(FSNS(XML_a, XML_pPr));
+
+ bool bDummy = false;
+ sal_Int32 nDummy;
+ WriteRunProperties(xPropSet, false, XML_defRPr, true, bDummy, nDummy );
+
+ pFS->endElement( FSNS( XML_a, XML_pPr ) );
+
+ pFS->startElement(FSNS(XML_a, XML_r));
+ bDummy = false;
+ WriteRunProperties( xPropSet, false, XML_rPr, true, bDummy, nDummy );
+ pFS->startElement(FSNS(XML_a, XML_t));
+ pFS->writeEscaped( sText );
+ pFS->endElement( FSNS( XML_a, XML_t ) );
+ pFS->endElement( FSNS( XML_a, XML_r ) );
+
+ pFS->endElement( FSNS( XML_a, XML_p ) );
+
+ pFS->endElement( FSNS( XML_c, XML_rich ) );
+ pFS->endElement( FSNS( XML_c, XML_tx ) );
+
+ uno::Any aManualLayout = xPropSet->getPropertyValue("RelativePosition");
+ if (aManualLayout.hasValue())
+ {
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
+
+ Reference<embed::XVisualObject> xVisObject(mxChartModel, uno::UNO_QUERY);
+ awt::Size aPageSize = xVisObject->getVisualAreaSize(embed::Aspects::MSOLE_CONTENT);
+
+ awt::Size aSize = xShape->getSize();
+ awt::Point aPos2 = xShape->getPosition();
+ // rotated shapes need special handling...
+ double fSin = fabs(sin(basegfx::deg2rad<100>(nRotation)));
+ // remove part of height from X direction, if title is rotated down
+ if( nRotation*0.01 > 180.0 )
+ aPos2.X -= static_cast<sal_Int32>(fSin * aSize.Height + 0.5);
+ // remove part of width from Y direction, if title is rotated up
+ else if( nRotation*0.01 > 0.0 )
+ aPos2.Y -= static_cast<sal_Int32>(fSin * aSize.Width + 0.5);
+
+ double x = static_cast<double>(aPos2.X) / static_cast<double>(aPageSize.Width);
+ double y = static_cast<double>(aPos2.Y) / static_cast<double>(aPageSize.Height);
+ /*
+ pFS->singleElement(FSNS(XML_c, XML_wMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_hMode), XML_val, "edge");
+ */
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
+ /*
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, "");
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, "");
+ */
+ pFS->endElement(FSNS(XML_c, XML_manualLayout));
+ pFS->endElement(FSNS(XML_c, XML_layout));
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "0");
+
+ // shape properties
+ if( xPropSet.is() )
+ {
+ exportShapeProps( xPropSet );
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_title ) );
+}
+
+namespace {
+
+ std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(const Reference< chart2::XChartType >& xChartType)
+ {
+ std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitSeries;
+ std::map<sal_Int32, size_t> aMapAxisToIndex;
+
+ Reference< chart2::XDataSeriesContainer > xDSCnt(xChartType, uno::UNO_QUERY);
+ if (xDSCnt.is())
+ {
+ sal_Int32 nAxisIndexOfFirstSeries = -1;
+ const Sequence< Reference< chart2::XDataSeries > > aSeriesSeq(xDSCnt->getDataSeries());
+ for (const uno::Reference<chart2::XDataSeries>& xSeries : aSeriesSeq)
+ {
+ Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY);
+ if (!xPropSet.is())
+ continue;
+
+ sal_Int32 nAxisIndex = -1;
+ uno::Any aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ aAny >>= nAxisIndex;
+ size_t nVectorPos = 0;
+ if (nAxisIndexOfFirstSeries == -1)
+ {
+ nAxisIndexOfFirstSeries = nAxisIndex;
+ }
+
+ auto it = aMapAxisToIndex.find(nAxisIndex);
+ if (it == aMapAxisToIndex.end())
+ {
+ aSplitSeries.emplace_back();
+ nVectorPos = aSplitSeries.size() - 1;
+ aMapAxisToIndex.insert(std::pair<sal_Int32, size_t>(nAxisIndex, nVectorPos));
+ }
+ else
+ {
+ nVectorPos = it->second;
+ }
+
+ uno::Sequence<Reference<chart2::XDataSeries> >& rAxisSeriesSeq = aSplitSeries[nVectorPos];
+ sal_Int32 nLength = rAxisSeriesSeq.getLength();
+ rAxisSeriesSeq.realloc(nLength + 1);
+ rAxisSeriesSeq.getArray()[nLength] = xSeries;
+ }
+ // if the first series attached to secondary axis, then export those series first, which are attached to primary axis
+ // also the MS Office export every time in this order
+ if (aSplitSeries.size() > 1 && nAxisIndexOfFirstSeries == 1)
+ {
+ std::swap(aSplitSeries[0], aSplitSeries[1]);
+ }
+ }
+
+ return aSplitSeries;
+ }
+
+}
+
+void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >& xChartDoc)
+{
+ Reference< chart2::XCoordinateSystemContainer > xBCooSysCnt( mxNewDiagram, uno::UNO_QUERY );
+ if( ! xBCooSysCnt.is())
+ return;
+
+ // plot-area element
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_plotArea));
+
+ Reference<beans::XPropertySet> xWall(mxNewDiagram, uno::UNO_QUERY);
+ if( xWall.is() )
+ {
+ uno::Any aAny = xWall->getPropertyValue("RelativePosition");
+ if (aAny.hasValue())
+ {
+ chart2::RelativePosition aPos = aAny.get<chart2::RelativePosition>();
+ aAny = xWall->getPropertyValue("RelativeSize");
+ chart2::RelativeSize aSize = aAny.get<chart2::RelativeSize>();
+ uno::Reference< css::chart::XDiagramPositioning > xDiagramPositioning( xChartDoc->getDiagram(), uno::UNO_QUERY );
+ exportManualLayout(aPos, aSize, xDiagramPositioning->isExcludingDiagramPositioning() );
+ }
+ }
+
+ // chart type
+ const Sequence< Reference< chart2::XCoordinateSystem > >
+ aCooSysSeq( xBCooSysCnt->getCoordinateSystems());
+
+ // tdf#123647 Save empty chart as empty bar chart.
+ if (!aCooSysSeq.hasElements())
+ {
+ pFS->startElement(FSNS(XML_c, XML_barChart));
+ pFS->singleElement(FSNS(XML_c, XML_barDir), XML_val, "col");
+ pFS->singleElement(FSNS(XML_c, XML_grouping), XML_val, "clustered");
+ pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, "0");
+ exportAxesId(true);
+ pFS->endElement(FSNS(XML_c, XML_barChart));
+ }
+
+ for( const auto& rCS : aCooSysSeq )
+ {
+ Reference< chart2::XChartTypeContainer > xCTCnt( rCS, uno::UNO_QUERY );
+ if( ! xCTCnt.is())
+ continue;
+ mnSeriesCount=0;
+ const Sequence< Reference< chart2::XChartType > > aCTSeq( xCTCnt->getChartTypes());
+ for( const auto& rCT : aCTSeq )
+ {
+ Reference< chart2::XDataSeriesContainer > xDSCnt( rCT, uno::UNO_QUERY );
+ if( ! xDSCnt.is())
+ return;
+ Reference< chart2::XChartType > xChartType( rCT, uno::UNO_QUERY );
+ if( ! xChartType.is())
+ continue;
+ // note: if xDSCnt.is() then also aCTSeq[nCTIdx]
+ OUString aChartType( xChartType->getChartType());
+ sal_Int32 eChartType = lcl_getChartType( aChartType );
+ switch( eChartType )
+ {
+ case chart::TYPEID_BAR:
+ {
+ exportBarChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_AREA:
+ {
+ exportAreaChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_LINE:
+ {
+ exportLineChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_BUBBLE:
+ {
+ exportBubbleChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_OFPIE:
+ {
+ break;
+ }
+ case chart::TYPEID_DOUGHNUT:
+ case chart::TYPEID_PIE:
+ {
+ exportPieChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_RADARLINE:
+ case chart::TYPEID_RADARAREA:
+ {
+ exportRadarChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_SCATTER:
+ {
+ exportScatterChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_STOCK:
+ {
+ exportStockChart( xChartType );
+ break;
+ }
+ case chart::TYPEID_SURFACE:
+ {
+ exportSurfaceChart( xChartType );
+ break;
+ }
+ default:
+ {
+ SAL_WARN("oox", "ChartExport::exportPlotArea -- not support chart type");
+ break;
+ }
+ }
+
+ }
+ }
+ //Axis Data
+ exportAxes( );
+ // Data Table
+ exportDataTable();
+
+ // shape properties
+ /*
+ * Export the Plot area Shape Properties
+ * eg: Fill and Outline
+ */
+ Reference< css::chart::X3DDisplay > xWallFloorSupplier( mxDiagram, uno::UNO_QUERY );
+ // tdf#114139 For 2D charts Plot Area equivalent is Chart Wall.
+ // Unfortunately LibreOffice doesn't have Plot Area equivalent for 3D charts.
+ // It means that Plot Area couldn't be displayed and changed for 3D chars in LibreOffice.
+ // We cannot write Wall attributes into Plot Area for 3D charts, because Wall us used as background wall.
+ if( !mbIs3DChart && xWallFloorSupplier.is() )
+ {
+ Reference< beans::XPropertySet > xWallPropSet = xWallFloorSupplier->getWall();
+ if( xWallPropSet.is() )
+ {
+ uno::Any aAny = xWallPropSet->getPropertyValue("LineStyle");
+ sal_Int32 eChartType = getChartType( );
+ // Export LineStyle_NONE instead of default linestyle of PlotArea border, because LibreOffice
+ // make invisible the Wall shape properties, in case of these charts. Or in the future set
+ // the default LineStyle of these charts to LineStyle_NONE.
+ bool noSupportWallProp = ( (eChartType == chart::TYPEID_PIE) || (eChartType == chart::TYPEID_RADARLINE) || (eChartType == chart::TYPEID_RADARAREA) );
+ if ( noSupportWallProp && (aAny != drawing::LineStyle_NONE) )
+ {
+ xWallPropSet->setPropertyValue( "LineStyle", uno::Any(drawing::LineStyle_NONE) );
+ }
+ exportShapeProps( xWallPropSet );
+ }
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_plotArea ) );
+
+}
+
+void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
+ const css::chart2::RelativeSize& rSize,
+ const bool bIsExcludingDiagramPositioning)
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
+
+ // By default layoutTarget is set to "outer" and we shouldn't save it in that case
+ if ( bIsExcludingDiagramPositioning )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_layoutTarget), XML_val, "inner");
+ }
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
+
+ double x = rPos.Primary;
+ double y = rPos.Secondary;
+ const double w = rSize.Primary;
+ const double h = rSize.Secondary;
+ switch (rPos.Anchor)
+ {
+ case drawing::Alignment_LEFT:
+ y -= (h/2);
+ break;
+ case drawing::Alignment_TOP_LEFT:
+ break;
+ case drawing::Alignment_BOTTOM_LEFT:
+ y -= h;
+ break;
+ case drawing::Alignment_TOP:
+ x -= (w/2);
+ break;
+ case drawing::Alignment_CENTER:
+ x -= (w/2);
+ y -= (h/2);
+ break;
+ case drawing::Alignment_BOTTOM:
+ x -= (w/2);
+ y -= h;
+ break;
+ case drawing::Alignment_TOP_RIGHT:
+ x -= w;
+ break;
+ case drawing::Alignment_BOTTOM_RIGHT:
+ x -= w;
+ y -= h;
+ break;
+ case drawing::Alignment_RIGHT:
+ y -= (h/2);
+ x -= w;
+ break;
+ default:
+ SAL_WARN("oox", "unhandled alignment case for manual layout export " << static_cast<sal_uInt16>(rPos.Anchor));
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
+
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
+
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, OString::number(w));
+
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, OString::number(h));
+
+ pFS->endElement(FSNS(XML_c, XML_manualLayout));
+ pFS->endElement(FSNS(XML_c, XML_layout));
+}
+
+void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet )
+{
+ // Similar to DrawingML::WriteFill, but gradient access via name
+ if (!GetProperty( xPropSet, "FillStyle" ))
+ return;
+ FillStyle aFillStyle(FillStyle_NONE);
+ mAny >>= aFillStyle;
+
+ // map full transparent background to no fill
+ if (aFillStyle == FillStyle_SOLID && GetProperty( xPropSet, "FillTransparence" ))
+ {
+ sal_Int16 nVal = 0;
+ mAny >>= nVal;
+ if ( nVal == 100 )
+ aFillStyle = FillStyle_NONE;
+ }
+ OUString sFillTransparenceGradientName;
+ if (aFillStyle == FillStyle_SOLID
+ && GetProperty(xPropSet, "FillTransparenceGradientName") && (mAny >>= sFillTransparenceGradientName)
+ && !sFillTransparenceGradientName.isEmpty())
+ {
+ awt::Gradient aTransparenceGradient;
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Any rTransparenceValue = xTransparenceGradient->getByName(sFillTransparenceGradientName);
+ rTransparenceValue >>= aTransparenceGradient;
+ if (aTransparenceGradient.StartColor == 0xffffff && aTransparenceGradient.EndColor == 0xffffff)
+ aFillStyle = FillStyle_NONE;
+ }
+ switch( aFillStyle )
+ {
+ case FillStyle_SOLID:
+ exportSolidFill(xPropSet);
+ break;
+ case FillStyle_GRADIENT :
+ exportGradientFill( xPropSet );
+ break;
+ case FillStyle_BITMAP :
+ exportBitmapFill( xPropSet );
+ break;
+ case FillStyle_HATCH:
+ exportHatch(xPropSet);
+ break;
+ case FillStyle_NONE:
+ mpFS->singleElementNS(XML_a, XML_noFill);
+ break;
+ default:
+ ;
+ }
+}
+
+void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet)
+{
+ // Similar to DrawingML::WriteSolidFill, but gradient access via name
+ // and currently no InteropGrabBag
+ // get fill color
+ if (!GetProperty( xPropSet, "FillColor" ))
+ return;
+ sal_uInt32 nFillColor = mAny.get<sal_uInt32>();
+
+ sal_Int32 nAlpha = MAX_PERCENT;
+ if (GetProperty( xPropSet, "FillTransparence" ))
+ {
+ sal_Int32 nTransparency = 0;
+ mAny >>= nTransparency;
+ // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
+ nAlpha = (MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
+ }
+ // OOXML has no separate transparence gradient but uses transparency in the gradient stops.
+ // So we merge transparency and color and use gradient fill in such case.
+ awt::Gradient aTransparenceGradient;
+ bool bNeedGradientFill(false);
+ OUString sFillTransparenceGradientName;
+ if (GetProperty(xPropSet, "FillTransparenceGradientName")
+ && (mAny >>= sFillTransparenceGradientName)
+ && !sFillTransparenceGradientName.isEmpty())
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Any rTransparenceValue = xTransparenceGradient->getByName(sFillTransparenceGradientName);
+ rTransparenceValue >>= aTransparenceGradient;
+ if (aTransparenceGradient.StartColor != aTransparenceGradient.EndColor)
+ bNeedGradientFill = true;
+ else if (aTransparenceGradient.StartColor != 0)
+ nAlpha = lcl_getAlphaFromTransparenceGradient(aTransparenceGradient, true);
+ }
+ // write XML
+ if (bNeedGradientFill)
+ {
+ awt::Gradient aPseudoColorGradient;
+ aPseudoColorGradient.XOffset = aTransparenceGradient.XOffset;
+ aPseudoColorGradient.YOffset = aTransparenceGradient.YOffset;
+ aPseudoColorGradient.StartIntensity = 100;
+ aPseudoColorGradient.EndIntensity = 100;
+ aPseudoColorGradient.Angle = aTransparenceGradient.Angle;
+ aPseudoColorGradient.Border = aTransparenceGradient.Border;
+ aPseudoColorGradient.Style = aTransparenceGradient.Style;
+ aPseudoColorGradient.StartColor = nFillColor;
+ aPseudoColorGradient.EndColor = nFillColor;
+ aPseudoColorGradient.StepCount = aTransparenceGradient.StepCount;
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
+ WriteGradientFill(aPseudoColorGradient, aTransparenceGradient);
+ mpFS->endElementNS(XML_a, XML_gradFill);
+ }
+ else
+ WriteSolidFill(::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha);
+}
+
+void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet )
+{
+ if (!xPropSet.is())
+ return;
+
+ if (GetProperty(xPropSet, "FillHatchName"))
+ {
+ OUString aHatchName;
+ mAny >>= aHatchName;
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xHatchTable( xFact->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY );
+ uno::Any rValue = xHatchTable->getByName(aHatchName);
+ css::drawing::Hatch aHatch;
+ rValue >>= aHatch;
+ WritePattFill(xPropSet, aHatch);
+ }
+
+}
+
+void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
+{
+ if( !xPropSet.is() )
+ return;
+
+ OUString sFillBitmapName;
+ xPropSet->getPropertyValue("FillBitmapName") >>= sFillBitmapName;
+
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ try
+ {
+ uno::Reference< container::XNameAccess > xBitmapTable( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
+ uno::Any rValue = xBitmapTable->getByName( sFillBitmapName );
+ if (rValue.has<uno::Reference<awt::XBitmap>>())
+ {
+ uno::Reference<awt::XBitmap> xBitmap = rValue.get<uno::Reference<awt::XBitmap>>();
+ uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ if (xGraphic.is())
+ {
+ WriteXGraphicBlipFill(xPropSet, xGraphic, XML_a, true, true);
+ }
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "ChartExport::exportBitmapFill");
+ }
+}
+
+void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet )
+{
+ if( !xPropSet.is() )
+ return;
+
+ OUString sFillGradientName;
+ xPropSet->getPropertyValue("FillGradientName") >>= sFillGradientName;
+
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ try
+ {
+ uno::Reference< container::XNameAccess > xGradient( xFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY );
+ uno::Any rGradientValue = xGradient->getByName( sFillGradientName );
+ awt::Gradient aGradient;
+ if( rGradientValue >>= aGradient )
+ {
+ awt::Gradient aTransparenceGradient;
+ mpFS->startElementNS(XML_a, XML_gradFill);
+ OUString sFillTransparenceGradientName;
+ if( (xPropSet->getPropertyValue("FillTransparenceGradientName") >>= sFillTransparenceGradientName) && !sFillTransparenceGradientName.isEmpty())
+ {
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Any rTransparenceValue = xTransparenceGradient->getByName(sFillTransparenceGradientName);
+ rTransparenceValue >>= aTransparenceGradient;
+ WriteGradientFill(aGradient, aTransparenceGradient);
+ }
+ else
+ {
+ WriteGradientFill(aGradient, aTransparenceGradient, xPropSet);
+ }
+ mpFS->endElementNS(XML_a, XML_gradFill);
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ TOOLS_INFO_EXCEPTION("oox", "ChartExport::exportGradientFill");
+ }
+}
+
+void ChartExport::exportDataTable( )
+{
+ FSHelperPtr pFS = GetFS();
+ Reference< beans::XPropertySet > aPropSet( mxDiagram, uno::UNO_QUERY );
+
+ bool bShowVBorder = false;
+ bool bShowHBorder = false;
+ bool bShowOutline = false;
+
+ if (GetProperty( aPropSet, "DataTableHBorder"))
+ mAny >>= bShowHBorder;
+ if (GetProperty( aPropSet, "DataTableVBorder"))
+ mAny >>= bShowVBorder;
+ if (GetProperty( aPropSet, "DataTableOutline"))
+ mAny >>= bShowOutline;
+
+ if (!(bShowVBorder || bShowHBorder || bShowOutline))
+ return;
+
+ pFS->startElement(FSNS(XML_c, XML_dTable));
+ if (bShowHBorder)
+ pFS->singleElement( FSNS( XML_c, XML_showHorzBorder ),
+ XML_val, "1" );
+ if (bShowVBorder)
+ pFS->singleElement(FSNS(XML_c, XML_showVertBorder), XML_val, "1");
+ if (bShowOutline)
+ pFS->singleElement(FSNS(XML_c, XML_showOutline), XML_val, "1");
+
+ pFS->endElement( FSNS( XML_c, XML_dTable));
+
+}
+void ChartExport::exportAreaChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ sal_Int32 nTypeId = XML_areaChart;
+ if (mbIs3DChart)
+ nTypeId = XML_area3DChart;
+ pFS->startElement(FSNS(XML_c, nTypeId));
+
+ exportGrouping();
+ bool bPrimaryAxes = true;
+ exportSeries(xChartType, splitDataSeries, bPrimaryAxes);
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement(FSNS(XML_c, nTypeId));
+ }
+}
+
+void ChartExport::exportBarChart(const Reference< chart2::XChartType >& xChartType)
+{
+ sal_Int32 nTypeId = XML_barChart;
+ if (mbIs3DChart)
+ nTypeId = XML_bar3DChart;
+ FSHelperPtr pFS = GetFS();
+
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ pFS->startElement(FSNS(XML_c, nTypeId));
+ // bar direction
+ bool bVertical = false;
+ Reference< XPropertySet > xPropSet(mxDiagram, uno::UNO_QUERY);
+ if (GetProperty(xPropSet, "Vertical"))
+ mAny >>= bVertical;
+
+ const char* bardir = bVertical ? "bar" : "col";
+ pFS->singleElement(FSNS(XML_c, XML_barDir), XML_val, bardir);
+
+ exportGrouping(true);
+
+ exportVaryColors(xChartType);
+
+ bool bPrimaryAxes = true;
+ exportSeries(xChartType, splitDataSeries, bPrimaryAxes);
+
+ Reference< XPropertySet > xTypeProp(xChartType, uno::UNO_QUERY);
+
+ if (xTypeProp.is() && GetProperty(xTypeProp, "GapwidthSequence"))
+ {
+ uno::Sequence< sal_Int32 > aBarPositionSequence;
+ mAny >>= aBarPositionSequence;
+ if (aBarPositionSequence.hasElements())
+ {
+ sal_Int32 nGapWidth = aBarPositionSequence[0];
+ pFS->singleElement(FSNS(XML_c, XML_gapWidth), XML_val, OString::number(nGapWidth));
+ }
+ }
+
+ if (mbIs3DChart)
+ {
+ // Shape
+ namespace cssc = css::chart;
+ sal_Int32 nGeom3d = cssc::ChartSolidType::RECTANGULAR_SOLID;
+ if (xPropSet.is() && GetProperty(xPropSet, "SolidType"))
+ mAny >>= nGeom3d;
+ const char* sShapeType = nullptr;
+ switch (nGeom3d)
+ {
+ case cssc::ChartSolidType::RECTANGULAR_SOLID:
+ sShapeType = "box";
+ break;
+ case cssc::ChartSolidType::CONE:
+ sShapeType = "cone";
+ break;
+ case cssc::ChartSolidType::CYLINDER:
+ sShapeType = "cylinder";
+ break;
+ case cssc::ChartSolidType::PYRAMID:
+ sShapeType = "pyramid";
+ break;
+ }
+ pFS->singleElement(FSNS(XML_c, XML_shape), XML_val, sShapeType);
+ }
+
+ //overlap
+ if (!mbIs3DChart && xTypeProp.is() && GetProperty(xTypeProp, "OverlapSequence"))
+ {
+ uno::Sequence< sal_Int32 > aBarPositionSequence;
+ mAny >>= aBarPositionSequence;
+ if (aBarPositionSequence.hasElements())
+ {
+ sal_Int32 nOverlap = aBarPositionSequence[0];
+ // Stacked/Percent Bar/Column chart Overlap-workaround
+ // Export the Overlap value with 100% for stacked charts,
+ // because the default overlap value of the Bar/Column chart is 0% and
+ // LibreOffice do nothing with the overlap value in Stacked charts case,
+ // unlike the MS Office, which is interpreted differently.
+ if ((mbStacked || mbPercent) && nOverlap != 100)
+ {
+ nOverlap = 100;
+ pFS->singleElement(FSNS(XML_c, XML_overlap), XML_val, OString::number(nOverlap));
+ }
+ else // Normal bar chart
+ {
+ pFS->singleElement(FSNS(XML_c, XML_overlap), XML_val, OString::number(nOverlap));
+ }
+ }
+ }
+
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement(FSNS(XML_c, nTypeId));
+ }
+}
+
+void ChartExport::exportBubbleChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ pFS->startElement(FSNS(XML_c, XML_bubbleChart));
+
+ exportVaryColors(xChartType);
+
+ bool bPrimaryAxes = true;
+ exportSeries(xChartType, splitDataSeries, bPrimaryAxes);
+
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement(FSNS(XML_c, XML_bubbleChart));
+ }
+}
+
+void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_doughnutChart));
+
+ exportVaryColors(xChartType);
+
+ bool bPrimaryAxes = true;
+ exportAllSeries(xChartType, bPrimaryAxes);
+ // firstSliceAng
+ exportFirstSliceAng( );
+ //FIXME: holeSize
+ pFS->singleElement(FSNS(XML_c, XML_holeSize), XML_val, OString::number(50));
+
+ pFS->endElement( FSNS( XML_c, XML_doughnutChart ) );
+}
+
+namespace {
+
+void writeDataLabelsRange(const FSHelperPtr& pFS, const XmlFilterBase* pFB, DataLabelsRange& rDLblsRange)
+{
+ if (rDLblsRange.empty())
+ return;
+
+ pFS->startElement(FSNS(XML_c, XML_extLst));
+ pFS->startElement(FSNS(XML_c, XML_ext), XML_uri, "{02D57815-91ED-43cb-92C2-25804820EDAC}", FSNS(XML_xmlns, XML_c15), pFB->getNamespaceURL(OOX_NS(c15)));
+ pFS->startElement(FSNS(XML_c15, XML_datalabelsRange));
+
+ // Write cell range.
+ pFS->startElement(FSNS(XML_c15, XML_f));
+ pFS->writeEscaped(rDLblsRange.getRange());
+ pFS->endElement(FSNS(XML_c15, XML_f));
+
+ // Write all labels.
+ pFS->startElement(FSNS(XML_c15, XML_dlblRangeCache));
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(rDLblsRange.count()));
+ for (const auto& rLabelKV: rDLblsRange)
+ {
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(rLabelKV.first));
+ pFS->startElement(FSNS(XML_c, XML_v));
+ pFS->writeEscaped(rLabelKV.second);
+ pFS->endElement(FSNS( XML_c, XML_v ));
+ pFS->endElement(FSNS(XML_c, XML_pt));
+ }
+
+ pFS->endElement(FSNS(XML_c15, XML_dlblRangeCache));
+
+ pFS->endElement(FSNS(XML_c15, XML_datalabelsRange));
+ pFS->endElement(FSNS(XML_c, XML_ext));
+ pFS->endElement(FSNS(XML_c, XML_extLst));
+}
+
+}
+
+void ChartExport::exportLineChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ sal_Int32 nTypeId = XML_lineChart;
+ if( mbIs3DChart )
+ nTypeId = XML_line3DChart;
+ pFS->startElement(FSNS(XML_c, nTypeId));
+
+ exportGrouping( );
+
+ exportVaryColors(xChartType);
+ // TODO: show marker symbol in series?
+ bool bPrimaryAxes = true;
+ exportSeries(xChartType, splitDataSeries, bPrimaryAxes);
+
+ // show marker?
+ sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ if( GetProperty( xPropSet, "SymbolType" ) )
+ mAny >>= nSymbolType;
+
+ if( !mbIs3DChart )
+ {
+ exportHiLowLines();
+ exportUpDownBars(xChartType);
+ const char* marker = nSymbolType == css::chart::ChartSymbolType::NONE? "0":"1";
+ pFS->singleElement(FSNS(XML_c, XML_marker), XML_val, marker);
+ }
+
+ exportAxesId(bPrimaryAxes, true);
+
+ pFS->endElement( FSNS( XML_c, nTypeId ) );
+ }
+}
+
+void ChartExport::exportPieChart( const Reference< chart2::XChartType >& xChartType )
+{
+ sal_Int32 eChartType = getChartType( );
+ if(eChartType == chart::TYPEID_DOUGHNUT)
+ {
+ exportDoughnutChart( xChartType );
+ return;
+ }
+ FSHelperPtr pFS = GetFS();
+ sal_Int32 nTypeId = XML_pieChart;
+ if( mbIs3DChart )
+ nTypeId = XML_pie3DChart;
+ pFS->startElement(FSNS(XML_c, nTypeId));
+
+ exportVaryColors(xChartType);
+
+ bool bPrimaryAxes = true;
+ exportAllSeries(xChartType, bPrimaryAxes);
+
+ if( !mbIs3DChart )
+ {
+ // firstSliceAng
+ exportFirstSliceAng( );
+ }
+
+ pFS->endElement( FSNS( XML_c, nTypeId ) );
+}
+
+void ChartExport::exportRadarChart( const Reference< chart2::XChartType >& xChartType)
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_radarChart));
+
+ // radarStyle
+ sal_Int32 eChartType = getChartType( );
+ const char* radarStyle = nullptr;
+ if( eChartType == chart::TYPEID_RADARAREA )
+ radarStyle = "filled";
+ else
+ radarStyle = "marker";
+ pFS->singleElement(FSNS(XML_c, XML_radarStyle), XML_val, radarStyle);
+
+ exportVaryColors(xChartType);
+ bool bPrimaryAxes = true;
+ exportAllSeries(xChartType, bPrimaryAxes);
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement( FSNS( XML_c, XML_radarChart ) );
+}
+
+void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType >& xChartType,
+ const css::uno::Sequence<css::uno::Reference<chart2::XDataSeries>>* pSeries)
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_scatterChart));
+ // TODO:scatterStyle
+
+ sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ if( GetProperty( xPropSet, "SymbolType" ) )
+ mAny >>= nSymbolType;
+
+ const char* scatterStyle = "lineMarker";
+ if (nSymbolType == css::chart::ChartSymbolType::NONE)
+ {
+ scatterStyle = "line";
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_scatterStyle), XML_val, scatterStyle);
+
+ exportVaryColors(xChartType);
+ // FIXME: should export xVal and yVal
+ bool bPrimaryAxes = true;
+ if (pSeries)
+ exportSeries(xChartType, *pSeries, bPrimaryAxes);
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement( FSNS( XML_c, XML_scatterChart ) );
+}
+
+void ChartExport::exportScatterChart( const Reference< chart2::XChartType >& xChartType )
+{
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ bool bExported = false;
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ bExported = true;
+ exportScatterChartSeries(xChartType, &splitDataSeries);
+ }
+ if (!bExported)
+ exportScatterChartSeries(xChartType, nullptr);
+}
+
+void ChartExport::exportStockChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ const std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+ for (const auto& splitDataSeries : aSplitDataSeries)
+ {
+ if (!splitDataSeries.hasElements())
+ continue;
+
+ pFS->startElement(FSNS(XML_c, XML_stockChart));
+
+ bool bPrimaryAxes = true;
+ exportCandleStickSeries(splitDataSeries, bPrimaryAxes);
+
+ // export stock properties
+ Reference< css::chart::XStatisticDisplay > xStockPropProvider(mxDiagram, uno::UNO_QUERY);
+ if (xStockPropProvider.is())
+ {
+ exportHiLowLines();
+ exportUpDownBars(xChartType);
+ }
+
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement(FSNS(XML_c, XML_stockChart));
+ }
+}
+
+void ChartExport::exportHiLowLines()
+{
+ FSHelperPtr pFS = GetFS();
+ // export the chart property
+ Reference< css::chart::XStatisticDisplay > xChartPropProvider( mxDiagram, uno::UNO_QUERY );
+
+ if (!xChartPropProvider.is())
+ return;
+
+ Reference< beans::XPropertySet > xStockPropSet = xChartPropProvider->getMinMaxLine();
+ if( !xStockPropSet.is() )
+ return;
+
+ pFS->startElement(FSNS(XML_c, XML_hiLowLines));
+ exportShapeProps( xStockPropSet );
+ pFS->endElement( FSNS( XML_c, XML_hiLowLines ) );
+}
+
+void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChartType)
+{
+ if(xChartType->getChartType() != "com.sun.star.chart2.CandleStickChartType")
+ return;
+
+ FSHelperPtr pFS = GetFS();
+ // export the chart property
+ Reference< css::chart::XStatisticDisplay > xChartPropProvider( mxDiagram, uno::UNO_QUERY );
+ if(!xChartPropProvider.is())
+ return;
+
+ // updownbar
+ pFS->startElement(FSNS(XML_c, XML_upDownBars));
+ // TODO: gapWidth
+ pFS->singleElement(FSNS(XML_c, XML_gapWidth), XML_val, OString::number(150));
+
+ Reference< beans::XPropertySet > xChartPropSet = xChartPropProvider->getUpBar();
+ if( xChartPropSet.is() )
+ {
+ pFS->startElement(FSNS(XML_c, XML_upBars));
+ // For Linechart with UpDownBars, spPr is not getting imported
+ // so no need to call the exportShapeProps() for LineChart
+ if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType")
+ {
+ exportShapeProps(xChartPropSet);
+ }
+ pFS->endElement( FSNS( XML_c, XML_upBars ) );
+ }
+ xChartPropSet = xChartPropProvider->getDownBar();
+ if( xChartPropSet.is() )
+ {
+ pFS->startElement(FSNS(XML_c, XML_downBars));
+ if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType")
+ {
+ exportShapeProps(xChartPropSet);
+ }
+ pFS->endElement( FSNS( XML_c, XML_downBars ) );
+ }
+ pFS->endElement( FSNS( XML_c, XML_upDownBars ) );
+}
+
+void ChartExport::exportSurfaceChart( const Reference< chart2::XChartType >& xChartType )
+{
+ FSHelperPtr pFS = GetFS();
+ sal_Int32 nTypeId = XML_surfaceChart;
+ if( mbIs3DChart )
+ nTypeId = XML_surface3DChart;
+ pFS->startElement(FSNS(XML_c, nTypeId));
+ exportVaryColors(xChartType);
+ bool bPrimaryAxes = true;
+ exportAllSeries(xChartType, bPrimaryAxes);
+ exportAxesId(bPrimaryAxes);
+
+ pFS->endElement( FSNS( XML_c, nTypeId ) );
+}
+
+void ChartExport::exportAllSeries(const Reference<chart2::XChartType>& xChartType, bool& rPrimaryAxes)
+{
+ Reference< chart2::XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY );
+ if( ! xDSCnt.is())
+ return;
+
+ // export dataseries for current chart-type
+ Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries());
+ exportSeries(xChartType, aSeriesSeq, rPrimaryAxes);
+}
+
+void ChartExport::exportVaryColors(const Reference<chart2::XChartType>& xChartType)
+{
+ FSHelperPtr pFS = GetFS();
+ try
+ {
+ Reference<chart2::XDataSeries> xDataSeries = getPrimaryDataSeries(xChartType);
+ Reference<beans::XPropertySet> xDataSeriesProps(xDataSeries, uno::UNO_QUERY_THROW);
+ Any aAnyVaryColors = xDataSeriesProps->getPropertyValue("VaryColorsByPoint");
+ bool bVaryColors = false;
+ aAnyVaryColors >>= bVaryColors;
+ pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, ToPsz10(bVaryColors));
+ }
+ catch (...)
+ {
+ pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, "0");
+ }
+}
+
+void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
+ const Sequence<Reference<chart2::XDataSeries> >& rSeriesSeq, bool& rPrimaryAxes )
+{
+ OUString aLabelRole = xChartType->getRoleOfSequenceForSeriesLabel();
+ OUString aChartType( xChartType->getChartType());
+ sal_Int32 eChartType = lcl_getChartType( aChartType );
+
+ for( const auto& rSeries : rSeriesSeq )
+ {
+ // export series
+ Reference< chart2::data::XDataSource > xSource( rSeries, uno::UNO_QUERY );
+ if( xSource.is())
+ {
+ Reference< chart2::XDataSeries > xDataSeries( xSource, uno::UNO_QUERY );
+ Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt(
+ xSource->getDataSequences());
+ // search for main sequence and create a series element
+ {
+ sal_Int32 nMainSequenceIndex = -1;
+ sal_Int32 nSeriesLength = 0;
+ Reference< chart2::data::XDataSequence > xValuesSeq;
+ Reference< chart2::data::XDataSequence > xLabelSeq;
+ sal_Int32 nSeqIdx=0;
+ for( ; nSeqIdx<aSeqCnt.getLength(); ++nSeqIdx )
+ {
+ Reference< chart2::data::XDataSequence > xTempValueSeq( aSeqCnt[nSeqIdx]->getValues() );
+ if( nMainSequenceIndex==-1 )
+ {
+ Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
+ OUString aRole;
+ if( xSeqProp.is())
+ xSeqProp->getPropertyValue("Role") >>= aRole;
+ // "main" sequence
+ if( aRole == aLabelRole )
+ {
+ xValuesSeq.set( xTempValueSeq );
+ xLabelSeq.set( aSeqCnt[nSeqIdx]->getLabel());
+ nMainSequenceIndex = nSeqIdx;
+ }
+ }
+ sal_Int32 nSequenceLength = (xTempValueSeq.is()? xTempValueSeq->getData().getLength() : sal_Int32(0));
+ if( nSeriesLength < nSequenceLength )
+ nSeriesLength = nSequenceLength;
+ }
+
+ // have found the main sequence, then xValuesSeq and
+ // xLabelSeq contain those. Otherwise both are empty
+ {
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElement(FSNS(XML_c, XML_ser));
+
+ // TODO: idx and order
+ pFS->singleElement( FSNS( XML_c, XML_idx ),
+ XML_val, OString::number(mnSeriesCount) );
+ pFS->singleElement( FSNS( XML_c, XML_order ),
+ XML_val, OString::number(mnSeriesCount++) );
+
+ // export label
+ if( xLabelSeq.is() )
+ exportSeriesText( xLabelSeq );
+
+ Reference<XPropertySet> xPropSet(xDataSeries, UNO_QUERY_THROW);
+ if( GetProperty( xPropSet, "AttachedAxisIndex") )
+ {
+ sal_Int32 nLocalAttachedAxis = 0;
+ mAny >>= nLocalAttachedAxis;
+ rPrimaryAxes = isPrimaryAxes(nLocalAttachedAxis);
+ }
+
+ // export shape properties
+ Reference< XPropertySet > xOldPropSet = SchXMLSeriesHelper::createOldAPISeriesPropertySet(
+ rSeries, getModel() );
+ if( xOldPropSet.is() )
+ {
+ exportShapeProps( xOldPropSet );
+ }
+
+ switch( eChartType )
+ {
+ case chart::TYPEID_BUBBLE:
+ case chart::TYPEID_HORBAR:
+ case chart::TYPEID_BAR:
+ {
+ pFS->singleElement(FSNS(XML_c, XML_invertIfNegative), XML_val, "0");
+ }
+ break;
+ case chart::TYPEID_LINE:
+ {
+ exportMarker(xOldPropSet);
+ break;
+ }
+ case chart::TYPEID_PIE:
+ case chart::TYPEID_DOUGHNUT:
+ {
+ if( xOldPropSet.is() && GetProperty( xOldPropSet, "SegmentOffset") )
+ {
+ sal_Int32 nOffset = 0;
+ mAny >>= nOffset;
+ pFS->singleElement( FSNS( XML_c, XML_explosion ),
+ XML_val, OString::number( nOffset ) );
+ }
+ break;
+ }
+ case chart::TYPEID_SCATTER:
+ {
+ exportMarker(xOldPropSet);
+ break;
+ }
+ case chart::TYPEID_RADARLINE:
+ {
+ exportMarker(xOldPropSet);
+ break;
+ }
+ }
+
+ // export data points
+ exportDataPoints( uno::Reference< beans::XPropertySet >( rSeries, uno::UNO_QUERY ), nSeriesLength, eChartType );
+
+ DataLabelsRange aDLblsRange;
+ // export data labels
+ exportDataLabels(rSeries, nSeriesLength, eChartType, aDLblsRange);
+
+ exportTrendlines( rSeries );
+
+ if( eChartType != chart::TYPEID_PIE &&
+ eChartType != chart::TYPEID_RADARLINE )
+ {
+ //export error bars here
+ Reference< XPropertySet > xSeriesPropSet( xSource, uno::UNO_QUERY );
+ Reference< XPropertySet > xErrorBarYProps;
+ xSeriesPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
+ if(xErrorBarYProps.is())
+ exportErrorBar(xErrorBarYProps, true);
+ if (eChartType != chart::TYPEID_BAR &&
+ eChartType != chart::TYPEID_HORBAR)
+ {
+ Reference< XPropertySet > xErrorBarXProps;
+ xSeriesPropSet->getPropertyValue("ErrorBarX") >>= xErrorBarXProps;
+ if(xErrorBarXProps.is())
+ exportErrorBar(xErrorBarXProps, false);
+ }
+ }
+
+ // export categories
+ if( eChartType != chart::TYPEID_SCATTER && eChartType != chart::TYPEID_BUBBLE && mxCategoriesValues.is() )
+ exportSeriesCategory( mxCategoriesValues );
+
+ if( (eChartType == chart::TYPEID_SCATTER)
+ || (eChartType == chart::TYPEID_BUBBLE) )
+ {
+ // export xVal
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-x" ) );
+ if( xSequence.is() )
+ {
+ Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
+ if( xValues.is() )
+ exportSeriesValues( xValues, XML_xVal );
+ }
+ else if( mxCategoriesValues.is() )
+ exportSeriesCategory( mxCategoriesValues, XML_xVal );
+ }
+
+ if( eChartType == chart::TYPEID_BUBBLE )
+ {
+ // export yVal
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-y" ) );
+ if( xSequence.is() )
+ {
+ Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
+ if( xValues.is() )
+ exportSeriesValues( xValues, XML_yVal );
+ }
+ }
+
+ // export values
+ if( xValuesSeq.is() )
+ {
+ sal_Int32 nYValueType = XML_val;
+ if( eChartType == chart::TYPEID_SCATTER )
+ nYValueType = XML_yVal;
+ else if( eChartType == chart::TYPEID_BUBBLE )
+ nYValueType = XML_bubbleSize;
+ exportSeriesValues( xValuesSeq, nYValueType );
+ }
+
+ if( eChartType == chart::TYPEID_SCATTER
+ || eChartType == chart::TYPEID_LINE )
+ exportSmooth();
+
+ // tdf103988: "corrupted" files with Bubble chart opening in MSO
+ if( eChartType == chart::TYPEID_BUBBLE )
+ pFS->singleElement(FSNS(XML_c, XML_bubble3D), XML_val, "0");
+
+ if (!aDLblsRange.empty())
+ writeDataLabelsRange(pFS, GetFB(), aDLblsRange);
+
+ pFS->endElement( FSNS( XML_c, XML_ser ) );
+ }
+ }
+ }
+ }
+}
+
+void ChartExport::exportCandleStickSeries(
+ const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq,
+ bool& rPrimaryAxes)
+{
+ for( const Reference< chart2::XDataSeries >& xSeries : aSeriesSeq )
+ {
+ rPrimaryAxes = lcl_isSeriesAttachedToFirstAxis(xSeries);
+
+ Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
+ if( xSource.is())
+ {
+ // export series in correct order (as we don't store roles)
+ // with japanese candlesticks: open, low, high, close
+ // otherwise: low, high, close
+ Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt(
+ xSource->getDataSequences());
+
+ const char* sSeries[] = {"values-first","values-max","values-min","values-last",nullptr};
+
+ for( sal_Int32 idx = 0; sSeries[idx] != nullptr ; idx++ )
+ {
+ Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii(sSeries[idx]) ) );
+ if( xLabeledSeq.is())
+ {
+ Reference< chart2::data::XDataSequence > xLabelSeq( xLabeledSeq->getLabel());
+ Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues());
+ {
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_ser));
+
+ // TODO: idx and order
+ // idx attribute should start from 1 and not from 0.
+ pFS->singleElement( FSNS( XML_c, XML_idx ),
+ XML_val, OString::number(idx+1) );
+ pFS->singleElement( FSNS( XML_c, XML_order ),
+ XML_val, OString::number(idx+1) );
+
+ // export label
+ if( xLabelSeq.is() )
+ exportSeriesText( xLabelSeq );
+
+ // TODO:export shape properties
+
+ // export categories
+ if( mxCategoriesValues.is() )
+ exportSeriesCategory( mxCategoriesValues );
+
+ // export values
+ if( xValueSeq.is() )
+ exportSeriesValues( xValueSeq );
+
+ pFS->endElement( FSNS( XML_c, XML_ser ) );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence > & xValueSeq )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_tx));
+
+ OUString aCellRange = xValueSeq->getSourceRangeRepresentation();
+ aCellRange = parseFormula( aCellRange );
+ pFS->startElement(FSNS(XML_c, XML_strRef));
+
+ pFS->startElement(FSNS(XML_c, XML_f));
+ pFS->writeEscaped( aCellRange );
+ pFS->endElement( FSNS( XML_c, XML_f ) );
+
+ OUString aLabelString = lcl_flattenStringSequence(lcl_getLabelSequence(xValueSeq));
+ pFS->startElement(FSNS(XML_c, XML_strCache));
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, "1");
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, "0");
+ pFS->startElement(FSNS(XML_c, XML_v));
+ pFS->writeEscaped( aLabelString );
+ pFS->endElement( FSNS( XML_c, XML_v ) );
+ pFS->endElement( FSNS( XML_c, XML_pt ) );
+ pFS->endElement( FSNS( XML_c, XML_strCache ) );
+ pFS->endElement( FSNS( XML_c, XML_strRef ) );
+ pFS->endElement( FSNS( XML_c, XML_tx ) );
+}
+
+void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequence > & xValueSeq, sal_Int32 nValueType )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, nValueType));
+
+ OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString();
+ const Sequence< Sequence< OUString >> aFinalSplitSource = (nValueType == XML_cat) ? getSplitCategoriesList(aCellRange) : Sequence< Sequence< OUString>>(0);
+ aCellRange = parseFormula( aCellRange );
+
+ if(aFinalSplitSource.getLength() > 1)
+ {
+ // export multi level category axis labels
+ pFS->startElement(FSNS(XML_c, XML_multiLvlStrRef));
+
+ pFS->startElement(FSNS(XML_c, XML_f));
+ pFS->writeEscaped(aCellRange);
+ pFS->endElement(FSNS(XML_c, XML_f));
+
+ pFS->startElement(FSNS(XML_c, XML_multiLvlStrCache));
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(aFinalSplitSource[0].getLength()));
+ for(const auto& rSeq : aFinalSplitSource)
+ {
+ pFS->startElement(FSNS(XML_c, XML_lvl));
+ for(sal_Int32 j = 0; j < rSeq.getLength(); j++)
+ {
+ if(!rSeq[j].isEmpty())
+ {
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(j));
+ pFS->startElement(FSNS(XML_c, XML_v));
+ pFS->writeEscaped(rSeq[j]);
+ pFS->endElement(FSNS(XML_c, XML_v));
+ pFS->endElement(FSNS(XML_c, XML_pt));
+ }
+ }
+ pFS->endElement(FSNS(XML_c, XML_lvl));
+ }
+
+ pFS->endElement(FSNS(XML_c, XML_multiLvlStrCache));
+ pFS->endElement(FSNS(XML_c, XML_multiLvlStrRef));
+ }
+ else
+ {
+ // export single category axis labels
+ bool bWriteDateCategories = mbHasDateCategories && (nValueType == XML_cat);
+ OUString aNumberFormatString;
+ if (bWriteDateCategories)
+ {
+ Reference< css::chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisXSupp.is())
+ {
+ Reference< XPropertySet > xAxisProp = xAxisXSupp->getXAxis();
+ if (GetProperty(xAxisProp, "NumberFormat"))
+ {
+ sal_Int32 nKey = 0;
+ mAny >>= nKey;
+ aNumberFormatString = getNumberFormatCode(nKey);
+ }
+ }
+ if (aNumberFormatString.isEmpty())
+ bWriteDateCategories = false;
+ }
+
+ pFS->startElement(FSNS(XML_c, bWriteDateCategories ? XML_numRef : XML_strRef));
+
+ pFS->startElement(FSNS(XML_c, XML_f));
+ pFS->writeEscaped(aCellRange);
+ pFS->endElement(FSNS(XML_c, XML_f));
+
+ ::std::vector< OUString > aCategories;
+ lcl_fillCategoriesIntoStringVector(xValueSeq, aCategories);
+ sal_Int32 ptCount = aCategories.size();
+ pFS->startElement(FSNS(XML_c, bWriteDateCategories ? XML_numCache : XML_strCache));
+ if (bWriteDateCategories)
+ {
+ pFS->startElement(FSNS(XML_c, XML_formatCode));
+ pFS->writeEscaped(aNumberFormatString);
+ pFS->endElement(FSNS(XML_c, XML_formatCode));
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(ptCount));
+ for (sal_Int32 i = 0; i < ptCount; i++)
+ {
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(i));
+ pFS->startElement(FSNS(XML_c, XML_v));
+ pFS->writeEscaped(aCategories[i]);
+ pFS->endElement(FSNS(XML_c, XML_v));
+ pFS->endElement(FSNS(XML_c, XML_pt));
+ }
+
+ pFS->endElement(FSNS(XML_c, bWriteDateCategories ? XML_numCache : XML_strCache));
+ pFS->endElement(FSNS(XML_c, bWriteDateCategories ? XML_numRef : XML_strRef));
+ }
+
+ pFS->endElement( FSNS( XML_c, nValueType ) );
+}
+
+void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequence > & xValueSeq, sal_Int32 nValueType )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, nValueType));
+
+ OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString();
+ aCellRange = parseFormula( aCellRange );
+ // TODO: need to handle XML_multiLvlStrRef according to aCellRange
+ pFS->startElement(FSNS(XML_c, XML_numRef));
+
+ pFS->startElement(FSNS(XML_c, XML_f));
+ pFS->writeEscaped( aCellRange );
+ pFS->endElement( FSNS( XML_c, XML_f ) );
+
+ ::std::vector< double > aValues = lcl_getAllValuesFromSequence( xValueSeq );
+ sal_Int32 ptCount = aValues.size();
+ pFS->startElement(FSNS(XML_c, XML_numCache));
+ pFS->startElement(FSNS(XML_c, XML_formatCode));
+ // TODO: what format code?
+ pFS->writeEscaped( "General" );
+ pFS->endElement( FSNS( XML_c, XML_formatCode ) );
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(ptCount));
+
+ for( sal_Int32 i = 0; i < ptCount; i++ )
+ {
+ if (!std::isnan(aValues[i]))
+ {
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(i));
+ pFS->startElement(FSNS(XML_c, XML_v));
+ pFS->write(aValues[i]);
+ pFS->endElement(FSNS(XML_c, XML_v));
+ pFS->endElement(FSNS(XML_c, XML_pt));
+ }
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_numCache ) );
+ pFS->endElement( FSNS( XML_c, XML_numRef ) );
+ pFS->endElement( FSNS( XML_c, nValueType ) );
+}
+
+void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_spPr));
+
+ exportFill( xPropSet );
+ WriteOutline( xPropSet, getModel() );
+
+ pFS->endElement( FSNS( XML_c, XML_spPr ) );
+}
+
+void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_txPr));
+
+ sal_Int32 nRotation = 0;
+ const char* textWordWrap = nullptr;
+
+ if (auto xServiceInfo = uno::Reference<lang::XServiceInfo>(xPropSet, uno::UNO_QUERY))
+ {
+ double fMultiplier = 0.0;
+ // We have at least two possible units of returned value: degrees (e.g., for data labels),
+ // and 100ths of degree (e.g., for axes labels). The latter is returned as an Any wrapping
+ // a sal_Int32 value (see WrappedTextRotationProperty::convertInnerToOuterValue), while
+ // the former is double. So we could test the contained type to decide which multiplier to
+ // use. But testing the service info should be more robust.
+ if (xServiceInfo->supportsService("com.sun.star.chart.ChartAxis"))
+ fMultiplier = -600.0;
+ else if (xServiceInfo->supportsService("com.sun.star.chart2.DataSeries") || xServiceInfo->supportsService("com.sun.star.chart2.DataPointProperties"))
+ {
+ fMultiplier = -60000.0;
+ bool bTextWordWrap = false;
+ if ((xPropSet->getPropertyValue("TextWordWrap") >>= bTextWordWrap) && bTextWordWrap)
+ textWordWrap = "square";
+ else
+ textWordWrap = "none";
+ }
+
+ if (fMultiplier)
+ {
+ double fTextRotation = 0.0;
+ uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ if (aAny.hasValue() && (aAny >>= fTextRotation))
+ {
+ fTextRotation *= fMultiplier;
+ // The MS Office UI allows values only in range of [-90,90].
+ if (fTextRotation < -5400000.0 && fTextRotation > -16200000.0)
+ {
+ // Reflect the angle if the value is between 90° and 270°
+ fTextRotation += 10800000.0;
+ }
+ else if (fTextRotation <= -16200000.0)
+ {
+ fTextRotation += 21600000.0;
+ }
+ nRotation = std::round(fTextRotation);
+ }
+ }
+ }
+
+ if (nRotation)
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr), XML_rot, OString::number(nRotation), XML_wrap, textWordWrap);
+ else
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr), XML_wrap, textWordWrap);
+
+ pFS->singleElement(FSNS(XML_a, XML_lstStyle));
+
+ pFS->startElement(FSNS(XML_a, XML_p));
+ pFS->startElement(FSNS(XML_a, XML_pPr));
+
+ WriteRunProperties(xPropSet, false, XML_defRPr, true, o3tl::temporary(false),
+ o3tl::temporary(sal_Int32()));
+
+ pFS->endElement(FSNS(XML_a, XML_pPr));
+ pFS->endElement(FSNS(XML_a, XML_p));
+ pFS->endElement(FSNS(XML_c, XML_txPr));
+}
+
+void ChartExport::InitPlotArea( )
+{
+ Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY);
+
+ // Check for supported services and then the properties provided by this service.
+ Reference<lang::XServiceInfo> xServiceInfo (mxDiagram, uno::UNO_QUERY);
+ if (xServiceInfo.is())
+ {
+ if (xServiceInfo->supportsService("com.sun.star.chart.ChartAxisZSupplier"))
+ {
+ xDiagramProperties->getPropertyValue("HasZAxis") >>= mbHasZAxis;
+ }
+ }
+
+ xDiagramProperties->getPropertyValue("Dim3D") >>= mbIs3DChart;
+
+ if( mbHasCategoryLabels && mxNewDiagram.is())
+ {
+ Reference< chart2::data::XLabeledDataSequence > xCategories( lcl_getCategories( mxNewDiagram, mbHasDateCategories ) );
+ if( xCategories.is() )
+ {
+ mxCategoriesValues.set( xCategories->getValues() );
+ }
+ }
+}
+
+void ChartExport::exportAxes( )
+{
+ sal_Int32 nSize = maAxes.size();
+ // let's export the axis types in the right order
+ for ( sal_Int32 nSortIdx = AXIS_PRIMARY_X; nSortIdx <= AXIS_SECONDARY_Y; nSortIdx++ )
+ {
+ for ( sal_Int32 nIdx = 0; nIdx < nSize; nIdx++ )
+ {
+ if (nSortIdx == maAxes[nIdx].nAxisType)
+ exportAxis( maAxes[nIdx] );
+ }
+ }
+}
+
+namespace {
+
+sal_Int32 getXAxisTypeByChartType(sal_Int32 eChartType)
+{
+ if( (eChartType == chart::TYPEID_SCATTER)
+ || (eChartType == chart::TYPEID_BUBBLE) )
+ return XML_valAx;
+ else if( eChartType == chart::TYPEID_STOCK )
+ return XML_dateAx;
+
+ return XML_catAx;
+}
+
+sal_Int32 getRealXAxisType(sal_Int32 nAxisType)
+{
+ if( nAxisType == chart2::AxisType::CATEGORY )
+ return XML_catAx;
+ else if( nAxisType == chart2::AxisType::DATE )
+ return XML_dateAx;
+ else if( nAxisType == chart2::AxisType::SERIES )
+ return XML_serAx;
+
+ return XML_valAx;
+}
+
+}
+
+void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
+{
+ // get some properties from document first
+ bool bHasXAxisTitle = false,
+ bHasYAxisTitle = false,
+ bHasZAxisTitle = false,
+ bHasSecondaryXAxisTitle = false,
+ bHasSecondaryYAxisTitle = false;
+ bool bHasXAxisMajorGrid = false,
+ bHasXAxisMinorGrid = false,
+ bHasYAxisMajorGrid = false,
+ bHasYAxisMinorGrid = false,
+ bHasZAxisMajorGrid = false,
+ bHasZAxisMinorGrid = false;
+
+ Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY);
+
+ xDiagramProperties->getPropertyValue("HasXAxisTitle") >>= bHasXAxisTitle;
+ xDiagramProperties->getPropertyValue("HasYAxisTitle") >>= bHasYAxisTitle;
+ xDiagramProperties->getPropertyValue("HasZAxisTitle") >>= bHasZAxisTitle;
+ xDiagramProperties->getPropertyValue("HasSecondaryXAxisTitle") >>= bHasSecondaryXAxisTitle;
+ xDiagramProperties->getPropertyValue("HasSecondaryYAxisTitle") >>= bHasSecondaryYAxisTitle;
+
+ xDiagramProperties->getPropertyValue("HasXAxisGrid") >>= bHasXAxisMajorGrid;
+ xDiagramProperties->getPropertyValue("HasYAxisGrid") >>= bHasYAxisMajorGrid;
+ xDiagramProperties->getPropertyValue("HasZAxisGrid") >>= bHasZAxisMajorGrid;
+
+ xDiagramProperties->getPropertyValue("HasXAxisHelpGrid") >>= bHasXAxisMinorGrid;
+ xDiagramProperties->getPropertyValue("HasYAxisHelpGrid") >>= bHasYAxisMinorGrid;
+ xDiagramProperties->getPropertyValue("HasZAxisHelpGrid") >>= bHasZAxisMinorGrid;
+
+ Reference< XPropertySet > xAxisProp;
+ Reference< drawing::XShape > xAxisTitle;
+ Reference< beans::XPropertySet > xMajorGrid;
+ Reference< beans::XPropertySet > xMinorGrid;
+ sal_Int32 nAxisType = XML_catAx;
+ const char* sAxPos = nullptr;
+
+ switch( rAxisIdPair.nAxisType )
+ {
+ case AXIS_PRIMARY_X:
+ {
+ Reference< css::chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisXSupp.is())
+ xAxisProp = xAxisXSupp->getXAxis();
+ if( bHasXAxisTitle )
+ xAxisTitle = xAxisXSupp->getXAxisTitle();
+ if( bHasXAxisMajorGrid )
+ xMajorGrid = xAxisXSupp->getXMainGrid();
+ if( bHasXAxisMinorGrid )
+ xMinorGrid = xAxisXSupp->getXHelpGrid();
+
+ nAxisType = lcl_getCategoryAxisType(mxNewDiagram, 0, 0);
+ if( nAxisType != -1 )
+ nAxisType = getRealXAxisType(nAxisType);
+ else
+ nAxisType = getXAxisTypeByChartType( getChartType() );
+ // FIXME: axPos, need to check axis direction
+ sAxPos = "b";
+ break;
+ }
+ case AXIS_PRIMARY_Y:
+ {
+ Reference< css::chart::XAxisYSupplier > xAxisYSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisYSupp.is())
+ xAxisProp = xAxisYSupp->getYAxis();
+ if( bHasYAxisTitle )
+ xAxisTitle = xAxisYSupp->getYAxisTitle();
+ if( bHasYAxisMajorGrid )
+ xMajorGrid = xAxisYSupp->getYMainGrid();
+ if( bHasYAxisMinorGrid )
+ xMinorGrid = xAxisYSupp->getYHelpGrid();
+
+ nAxisType = XML_valAx;
+ // FIXME: axPos, need to check axis direction
+ sAxPos = "l";
+ break;
+ }
+ case AXIS_PRIMARY_Z:
+ {
+ Reference< css::chart::XAxisZSupplier > xAxisZSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisZSupp.is())
+ xAxisProp = xAxisZSupp->getZAxis();
+ if( bHasZAxisTitle )
+ xAxisTitle = xAxisZSupp->getZAxisTitle();
+ if( bHasZAxisMajorGrid )
+ xMajorGrid = xAxisZSupp->getZMainGrid();
+ if( bHasZAxisMinorGrid )
+ xMinorGrid = xAxisZSupp->getZHelpGrid();
+
+ sal_Int32 eChartType = getChartType( );
+ if( (eChartType == chart::TYPEID_SCATTER)
+ || (eChartType == chart::TYPEID_BUBBLE) )
+ nAxisType = XML_valAx;
+ else if( eChartType == chart::TYPEID_STOCK )
+ nAxisType = XML_dateAx;
+ else if( eChartType == chart::TYPEID_BAR || eChartType == chart::TYPEID_AREA )
+ nAxisType = XML_serAx;
+ // FIXME: axPos, need to check axis direction
+ sAxPos = "b";
+ break;
+ }
+ case AXIS_SECONDARY_X:
+ {
+ Reference< css::chart::XTwoAxisXSupplier > xAxisTwoXSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisTwoXSupp.is())
+ xAxisProp = xAxisTwoXSupp->getSecondaryXAxis();
+ if( bHasSecondaryXAxisTitle )
+ {
+ Reference< css::chart::XSecondAxisTitleSupplier > xAxisSupp( mxDiagram, uno::UNO_QUERY );
+ xAxisTitle = xAxisSupp->getSecondXAxisTitle();
+ }
+
+ nAxisType = lcl_getCategoryAxisType(mxNewDiagram, 0, 1);
+ if( nAxisType != -1 )
+ nAxisType = getRealXAxisType(nAxisType);
+ else
+ nAxisType = getXAxisTypeByChartType( getChartType() );
+ // FIXME: axPos, need to check axis direction
+ sAxPos = "t";
+ break;
+ }
+ case AXIS_SECONDARY_Y:
+ {
+ Reference< css::chart::XTwoAxisYSupplier > xAxisTwoYSupp( mxDiagram, uno::UNO_QUERY );
+ if( xAxisTwoYSupp.is())
+ xAxisProp = xAxisTwoYSupp->getSecondaryYAxis();
+ if( bHasSecondaryYAxisTitle )
+ {
+ Reference< css::chart::XSecondAxisTitleSupplier > xAxisSupp( mxDiagram, uno::UNO_QUERY );
+ xAxisTitle = xAxisSupp->getSecondYAxisTitle();
+ }
+
+ nAxisType = XML_valAx;
+ // FIXME: axPos, need to check axis direction
+ sAxPos = "r";
+ break;
+ }
+ }
+
+ _exportAxis(xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, rAxisIdPair);
+}
+
+void ChartExport::_exportAxis(
+ const Reference< XPropertySet >& xAxisProp,
+ const Reference< drawing::XShape >& xAxisTitle,
+ const Reference< XPropertySet >& xMajorGrid,
+ const Reference< XPropertySet >& xMinorGrid,
+ sal_Int32 nAxisType,
+ const char* sAxisPos,
+ const AxisIdPair& rAxisIdPair )
+{
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, nAxisType));
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(rAxisIdPair.nAxisId));
+
+ pFS->startElement(FSNS(XML_c, XML_scaling));
+
+ // logBase, min, max
+ if(GetProperty( xAxisProp, "Logarithmic" ) )
+ {
+ bool bLogarithmic = false;
+ mAny >>= bLogarithmic;
+ if( bLogarithmic )
+ {
+ // default value is 10?
+ pFS->singleElement(FSNS(XML_c, XML_logBase), XML_val, OString::number(10));
+ }
+ }
+
+ // orientation: minMax, maxMin
+ bool bReverseDirection = false;
+ if(GetProperty( xAxisProp, "ReverseDirection" ) )
+ mAny >>= bReverseDirection;
+
+ const char* orientation = bReverseDirection ? "maxMin":"minMax";
+ pFS->singleElement(FSNS(XML_c, XML_orientation), XML_val, orientation);
+
+ bool bAutoMax = false;
+ if(GetProperty( xAxisProp, "AutoMax" ) )
+ mAny >>= bAutoMax;
+
+ if( !bAutoMax && (GetProperty( xAxisProp, "Max" ) ) )
+ {
+ double dMax = 0;
+ mAny >>= dMax;
+ pFS->singleElement(FSNS(XML_c, XML_max), XML_val, OString::number(dMax));
+ }
+
+ bool bAutoMin = false;
+ if(GetProperty( xAxisProp, "AutoMin" ) )
+ mAny >>= bAutoMin;
+
+ if( !bAutoMin && (GetProperty( xAxisProp, "Min" ) ) )
+ {
+ double dMin = 0;
+ mAny >>= dMin;
+ pFS->singleElement(FSNS(XML_c, XML_min), XML_val, OString::number(dMin));
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_scaling ) );
+
+ bool bVisible = true;
+ if( xAxisProp.is() )
+ {
+ xAxisProp->getPropertyValue("Visible") >>= bVisible;
+ }
+
+ // only export each axis only once non-deleted
+ bool bDeleted = maExportedAxis.find(rAxisIdPair.nAxisType) != maExportedAxis.end();
+
+ if (!bDeleted)
+ maExportedAxis.insert(rAxisIdPair.nAxisType);
+
+ pFS->singleElement(FSNS(XML_c, XML_delete), XML_val, !bDeleted && bVisible ? "0" : "1");
+
+ // FIXME: axPos, need to check the property "ReverseDirection"
+ pFS->singleElement(FSNS(XML_c, XML_axPos), XML_val, sAxisPos);
+ // major grid line
+ if( xMajorGrid.is())
+ {
+ pFS->startElement(FSNS(XML_c, XML_majorGridlines));
+ exportShapeProps( xMajorGrid );
+ pFS->endElement( FSNS( XML_c, XML_majorGridlines ) );
+ }
+
+ // minor grid line
+ if( xMinorGrid.is())
+ {
+ pFS->startElement(FSNS(XML_c, XML_minorGridlines));
+ exportShapeProps( xMinorGrid );
+ pFS->endElement( FSNS( XML_c, XML_minorGridlines ) );
+ }
+
+ // title
+ if( xAxisTitle.is() )
+ exportTitle( xAxisTitle );
+
+ bool bLinkedNumFmt = true;
+ if (GetProperty(xAxisProp, "LinkNumberFormatToSource"))
+ mAny >>= bLinkedNumFmt;
+
+ OUString aNumberFormatString("General");
+ if (GetProperty(xAxisProp, "NumberFormat"))
+ {
+ sal_Int32 nKey = 0;
+ mAny >>= nKey;
+ aNumberFormatString = getNumberFormatCode(nKey);
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_numFmt),
+ XML_formatCode, aNumberFormatString,
+ XML_sourceLinked, bLinkedNumFmt ? "1" : "0");
+
+ // majorTickMark
+ sal_Int32 nValue = 0;
+ if(GetProperty( xAxisProp, "Marks" ) )
+ {
+ mAny >>= nValue;
+ bool bInner = nValue & css::chart::ChartAxisMarks::INNER;
+ bool bOuter = nValue & css::chart::ChartAxisMarks::OUTER;
+ const char* majorTickMark = nullptr;
+ if( bInner && bOuter )
+ majorTickMark = "cross";
+ else if( bInner )
+ majorTickMark = "in";
+ else if( bOuter )
+ majorTickMark = "out";
+ else
+ majorTickMark = "none";
+ pFS->singleElement(FSNS(XML_c, XML_majorTickMark), XML_val, majorTickMark);
+ }
+ // minorTickMark
+ if(GetProperty( xAxisProp, "HelpMarks" ) )
+ {
+ mAny >>= nValue;
+ bool bInner = nValue & css::chart::ChartAxisMarks::INNER;
+ bool bOuter = nValue & css::chart::ChartAxisMarks::OUTER;
+ const char* minorTickMark = nullptr;
+ if( bInner && bOuter )
+ minorTickMark = "cross";
+ else if( bInner )
+ minorTickMark = "in";
+ else if( bOuter )
+ minorTickMark = "out";
+ else
+ minorTickMark = "none";
+ pFS->singleElement(FSNS(XML_c, XML_minorTickMark), XML_val, minorTickMark);
+ }
+ // tickLblPos
+ const char* sTickLblPos = nullptr;
+ bool bDisplayLabel = true;
+ if(GetProperty( xAxisProp, "DisplayLabels" ) )
+ mAny >>= bDisplayLabel;
+ if( bDisplayLabel && (GetProperty( xAxisProp, "LabelPosition" ) ) )
+ {
+ css::chart::ChartAxisLabelPosition eLabelPosition = css::chart::ChartAxisLabelPosition_NEAR_AXIS;
+ mAny >>= eLabelPosition;
+ switch( eLabelPosition )
+ {
+ case css::chart::ChartAxisLabelPosition_NEAR_AXIS:
+ case css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE:
+ sTickLblPos = "nextTo";
+ break;
+ case css::chart::ChartAxisLabelPosition_OUTSIDE_START:
+ sTickLblPos = "low";
+ break;
+ case css::chart::ChartAxisLabelPosition_OUTSIDE_END:
+ sTickLblPos = "high";
+ break;
+ default:
+ sTickLblPos = "nextTo";
+ break;
+ }
+ }
+ else
+ {
+ sTickLblPos = "none";
+ }
+ pFS->singleElement(FSNS(XML_c, XML_tickLblPos), XML_val, sTickLblPos);
+
+ // shape properties
+ exportShapeProps( xAxisProp );
+
+ exportTextProps(xAxisProp);
+
+ pFS->singleElement(FSNS(XML_c, XML_crossAx), XML_val, OString::number(rAxisIdPair.nCrossAx));
+
+ // crosses & crossesAt
+ bool bCrossesValue = false;
+ const char* sCrosses = nullptr;
+ // do not export the CrossoverPosition/CrossoverValue, if the axis is deleted and not visible
+ if( GetProperty( xAxisProp, "CrossoverPosition" ) && !bDeleted && bVisible )
+ {
+ css::chart::ChartAxisPosition ePosition( css::chart::ChartAxisPosition_ZERO );
+ mAny >>= ePosition;
+ switch( ePosition )
+ {
+ case css::chart::ChartAxisPosition_START:
+ sCrosses = "min";
+ break;
+ case css::chart::ChartAxisPosition_END:
+ sCrosses = "max";
+ break;
+ case css::chart::ChartAxisPosition_ZERO:
+ sCrosses = "autoZero";
+ break;
+ default:
+ bCrossesValue = true;
+ break;
+ }
+ }
+
+ if( bCrossesValue && GetProperty( xAxisProp, "CrossoverValue" ) )
+ {
+ double dValue = 0;
+ mAny >>= dValue;
+ pFS->singleElement(FSNS(XML_c, XML_crossesAt), XML_val, OString::number(dValue));
+ }
+ else
+ {
+ if(sCrosses)
+ {
+ pFS->singleElement(FSNS(XML_c, XML_crosses), XML_val, sCrosses);
+ }
+ }
+
+ if( ( nAxisType == XML_catAx )
+ || ( nAxisType == XML_dateAx ) )
+ {
+ // FIXME: seems not support? use default value,
+ const char* const isAuto = "1";
+ pFS->singleElement(FSNS(XML_c, XML_auto), XML_val, isAuto);
+
+ if( nAxisType == XML_catAx )
+ {
+ // FIXME: seems not support? lblAlgn
+ const char* const sLblAlgn = "ctr";
+ pFS->singleElement(FSNS(XML_c, XML_lblAlgn), XML_val, sLblAlgn);
+ }
+
+ // FIXME: seems not support? lblOffset
+ pFS->singleElement(FSNS(XML_c, XML_lblOffset), XML_val, OString::number(100));
+
+ // export baseTimeUnit, majorTimeUnit, minorTimeUnit of Date axis
+ if( nAxisType == XML_dateAx )
+ {
+ sal_Int32 nAxisIndex = -1;
+ if( rAxisIdPair.nAxisType == AXIS_PRIMARY_X )
+ nAxisIndex = 0;
+ else if( rAxisIdPair.nAxisType == AXIS_SECONDARY_X )
+ nAxisIndex = 1;
+
+ cssc::TimeIncrement aTimeIncrement = lcl_getDateTimeIncrement( mxNewDiagram, nAxisIndex );
+ sal_Int32 nTimeResolution = css::chart::TimeUnit::DAY;
+ if( aTimeIncrement.TimeResolution >>= nTimeResolution )
+ pFS->singleElement(FSNS(XML_c, XML_baseTimeUnit), XML_val, lclGetTimeUnitToken(nTimeResolution));
+
+ cssc::TimeInterval aInterval;
+ if( aTimeIncrement.MajorTimeInterval >>= aInterval )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_majorUnit), XML_val, OString::number(aInterval.Number));
+ pFS->singleElement(FSNS(XML_c, XML_majorTimeUnit), XML_val, lclGetTimeUnitToken(aInterval.TimeUnit));
+ }
+ if( aTimeIncrement.MinorTimeInterval >>= aInterval )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_minorUnit), XML_val, OString::number(aInterval.Number));
+ pFS->singleElement(FSNS(XML_c, XML_minorTimeUnit), XML_val, lclGetTimeUnitToken(aInterval.TimeUnit));
+ }
+ }
+
+ // FIXME: seems not support? noMultiLvlLbl
+ pFS->singleElement(FSNS(XML_c, XML_noMultiLvlLbl), XML_val, OString::number(0));
+ }
+
+ // crossBetween
+ if( nAxisType == XML_valAx )
+ {
+ if( lcl_isCategoryAxisShifted( mxNewDiagram ))
+ pFS->singleElement(FSNS(XML_c, XML_crossBetween), XML_val, "between");
+ else
+ pFS->singleElement(FSNS(XML_c, XML_crossBetween), XML_val, "midCat");
+ }
+
+ // majorUnit
+ bool bAutoStepMain = false;
+ if(GetProperty( xAxisProp, "AutoStepMain" ) )
+ mAny >>= bAutoStepMain;
+
+ if( !bAutoStepMain && (GetProperty( xAxisProp, "StepMain" ) ) )
+ {
+ double dMajorUnit = 0;
+ mAny >>= dMajorUnit;
+ pFS->singleElement(FSNS(XML_c, XML_majorUnit), XML_val, OString::number(dMajorUnit));
+ }
+ // minorUnit
+ bool bAutoStepHelp = false;
+ if(GetProperty( xAxisProp, "AutoStepHelp" ) )
+ mAny >>= bAutoStepHelp;
+
+ if( !bAutoStepHelp && (GetProperty( xAxisProp, "StepHelp" ) ) )
+ {
+ double dMinorUnit = 0;
+ mAny >>= dMinorUnit;
+ if( GetProperty( xAxisProp, "StepHelpCount" ) )
+ {
+ sal_Int32 dMinorUnitCount = 0;
+ mAny >>= dMinorUnitCount;
+ // tdf#114168 Don't save minor unit if number of step help count is 5 (which is default for MS Excel),
+ // to allow proper .xlsx import. If minorUnit is set and majorUnit not, then it is impossible
+ // to calculate StepHelpCount.
+ if( dMinorUnitCount != 5 )
+ {
+ pFS->singleElement( FSNS( XML_c, XML_minorUnit ),
+ XML_val, OString::number( dMinorUnit ) );
+ }
+ }
+ }
+
+ if( nAxisType == XML_valAx && GetProperty( xAxisProp, "DisplayUnits" ) )
+ {
+ bool bDisplayUnits = false;
+ mAny >>= bDisplayUnits;
+ if(bDisplayUnits)
+ {
+ if(GetProperty( xAxisProp, "BuiltInUnit" ))
+ {
+ OUString aVal;
+ mAny >>= aVal;
+ if(!aVal.isEmpty())
+ {
+ pFS->startElement(FSNS(XML_c, XML_dispUnits));
+
+ pFS->singleElement(FSNS(XML_c, XML_builtInUnit), XML_val, aVal);
+
+ pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ));
+ pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
+ }
+ }
+ }
+ }
+
+ pFS->endElement( FSNS( XML_c, nAxisType ) );
+}
+
+namespace {
+
+struct LabelPlacementParam
+{
+ bool mbExport;
+ sal_Int32 meDefault;
+
+ std::unordered_set<sal_Int32> maAllowedValues;
+
+ LabelPlacementParam(bool bExport, sal_Int32 nDefault) :
+ mbExport(bExport),
+ meDefault(nDefault),
+ maAllowedValues(
+ {
+ css::chart::DataLabelPlacement::OUTSIDE,
+ css::chart::DataLabelPlacement::INSIDE,
+ css::chart::DataLabelPlacement::CENTER,
+ css::chart::DataLabelPlacement::NEAR_ORIGIN,
+ css::chart::DataLabelPlacement::TOP,
+ css::chart::DataLabelPlacement::BOTTOM,
+ css::chart::DataLabelPlacement::LEFT,
+ css::chart::DataLabelPlacement::RIGHT,
+ css::chart::DataLabelPlacement::AVOID_OVERLAP
+ }
+ )
+ {}
+};
+
+const char* toOOXMLPlacement( sal_Int32 nPlacement )
+{
+ switch (nPlacement)
+ {
+ case css::chart::DataLabelPlacement::OUTSIDE: return "outEnd";
+ case css::chart::DataLabelPlacement::INSIDE: return "inEnd";
+ case css::chart::DataLabelPlacement::CENTER: return "ctr";
+ case css::chart::DataLabelPlacement::NEAR_ORIGIN: return "inBase";
+ case css::chart::DataLabelPlacement::TOP: return "t";
+ case css::chart::DataLabelPlacement::BOTTOM: return "b";
+ case css::chart::DataLabelPlacement::LEFT: return "l";
+ case css::chart::DataLabelPlacement::RIGHT: return "r";
+ case css::chart::DataLabelPlacement::CUSTOM:
+ case css::chart::DataLabelPlacement::AVOID_OVERLAP: return "bestFit";
+ default:
+ ;
+ }
+
+ return "outEnd";
+}
+
+OUString getFieldTypeString( const chart2::DataPointCustomLabelFieldType aType )
+{
+ switch (aType)
+ {
+ case chart2::DataPointCustomLabelFieldType_CATEGORYNAME:
+ return "CATEGORYNAME";
+
+ case chart2::DataPointCustomLabelFieldType_SERIESNAME:
+ return "SERIESNAME";
+
+ case chart2::DataPointCustomLabelFieldType_VALUE:
+ return "VALUE";
+
+ case chart2::DataPointCustomLabelFieldType_CELLREF:
+ return "CELLREF";
+
+ case chart2::DataPointCustomLabelFieldType_CELLRANGE:
+ return "CELLRANGE";
+
+ default:
+ break;
+ }
+ return OUString();
+}
+
+void writeRunProperties( ChartExport* pChartExport, Reference<XPropertySet> const & xPropertySet )
+{
+ bool bDummy = false;
+ sal_Int32 nDummy;
+ pChartExport->WriteRunProperties(xPropertySet, false, XML_rPr, true, bDummy, nDummy);
+}
+
+void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
+ const Sequence<Reference<chart2::XDataPointCustomLabelField>>& rCustomLabelFields,
+ sal_Int32 nLabelIndex, DataLabelsRange& rDLblsRange )
+{
+ pFS->startElement(FSNS(XML_c, XML_tx));
+ pFS->startElement(FSNS(XML_c, XML_rich));
+
+ // TODO: body properties?
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr));
+
+ OUString sFieldType;
+ OUString sContent;
+ pFS->startElement(FSNS(XML_a, XML_p));
+
+ for (auto& rField : rCustomLabelFields)
+ {
+ Reference<XPropertySet> xPropertySet(rField, UNO_QUERY);
+ chart2::DataPointCustomLabelFieldType aType = rField->getFieldType();
+ sFieldType.clear();
+ sContent.clear();
+ bool bNewParagraph = false;
+
+ if (aType == chart2::DataPointCustomLabelFieldType_CELLRANGE &&
+ rField->getDataLabelsRange())
+ {
+ if (rDLblsRange.getRange().isEmpty())
+ rDLblsRange.setRange(rField->getCellRange());
+
+ if (!rDLblsRange.hasLabel(nLabelIndex))
+ rDLblsRange.setLabel(nLabelIndex, rField->getString());
+
+ sContent = "[CELLRANGE]";
+ }
+ else
+ {
+ sContent = rField->getString();
+ }
+
+ if (aType == chart2::DataPointCustomLabelFieldType_NEWLINE)
+ bNewParagraph = true;
+ else if (aType != chart2::DataPointCustomLabelFieldType_TEXT)
+ sFieldType = getFieldTypeString(aType);
+
+ if (bNewParagraph)
+ {
+ pFS->endElement(FSNS(XML_a, XML_p));
+ pFS->startElement(FSNS(XML_a, XML_p));
+ continue;
+ }
+
+ if (sFieldType.isEmpty())
+ {
+ // Normal text run
+ pFS->startElement(FSNS(XML_a, XML_r));
+ writeRunProperties(pChartExport, xPropertySet);
+
+ pFS->startElement(FSNS(XML_a, XML_t));
+ pFS->writeEscaped(sContent);
+ pFS->endElement(FSNS(XML_a, XML_t));
+
+ pFS->endElement(FSNS(XML_a, XML_r));
+ }
+ else
+ {
+ // Field
+ pFS->startElement(FSNS(XML_a, XML_fld), XML_id, rField->getGuid(), XML_type,
+ sFieldType);
+ writeRunProperties(pChartExport, xPropertySet);
+
+ pFS->startElement(FSNS(XML_a, XML_t));
+ pFS->writeEscaped(sContent);
+ pFS->endElement(FSNS(XML_a, XML_t));
+
+ pFS->endElement(FSNS(XML_a, XML_fld));
+ }
+ }
+
+ pFS->endElement(FSNS(XML_a, XML_p));
+ pFS->endElement(FSNS(XML_c, XML_rich));
+ pFS->endElement(FSNS(XML_c, XML_tx));
+}
+
+void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
+ const uno::Reference<beans::XPropertySet>& xPropSet, const LabelPlacementParam& rLabelParam,
+ sal_Int32 nLabelIndex, DataLabelsRange& rDLblsRange )
+{
+ if (!xPropSet.is())
+ return;
+
+ chart2::DataPointLabel aLabel;
+ Sequence<Reference<chart2::XDataPointCustomLabelField>> aCustomLabelFields;
+ sal_Int32 nLabelBorderWidth = 0;
+ sal_Int32 nLabelBorderColor = 0x00FFFFFF;
+ sal_Int32 nLabelFillColor = -1;
+
+ xPropSet->getPropertyValue("Label") >>= aLabel;
+ xPropSet->getPropertyValue("CustomLabelFields") >>= aCustomLabelFields;
+ xPropSet->getPropertyValue("LabelBorderWidth") >>= nLabelBorderWidth;
+ xPropSet->getPropertyValue("LabelBorderColor") >>= nLabelBorderColor;
+ xPropSet->getPropertyValue("LabelFillColor") >>= nLabelFillColor;
+
+ if (nLabelBorderWidth > 0 || nLabelFillColor != -1)
+ {
+ pFS->startElement(FSNS(XML_c, XML_spPr));
+
+ if (nLabelFillColor != -1)
+ {
+ pFS->startElement(FSNS(XML_a, XML_solidFill));
+
+ OString aStr = OString::number(nLabelFillColor, 16).toAsciiUpperCase();
+ pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr);
+
+ pFS->endElement(FSNS(XML_a, XML_solidFill));
+ }
+
+ if (nLabelBorderWidth > 0)
+ {
+ pFS->startElement(FSNS(XML_a, XML_ln), XML_w,
+ OString::number(convertHmmToEmu(nLabelBorderWidth)));
+
+ if (nLabelBorderColor != -1)
+ {
+ pFS->startElement(FSNS(XML_a, XML_solidFill));
+
+ OString aStr = OString::number(nLabelBorderColor, 16).toAsciiUpperCase();
+ pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr);
+
+ pFS->endElement(FSNS(XML_a, XML_solidFill));
+ }
+
+ pFS->endElement(FSNS(XML_a, XML_ln));
+ }
+
+ pFS->endElement(FSNS(XML_c, XML_spPr));
+ }
+
+ pChartExport->exportTextProps(xPropSet);
+
+ if (aCustomLabelFields.hasElements())
+ writeCustomLabel(pFS, pChartExport, aCustomLabelFields, nLabelIndex, rDLblsRange);
+
+ if (rLabelParam.mbExport)
+ {
+ sal_Int32 nLabelPlacement = rLabelParam.meDefault;
+ if (xPropSet->getPropertyValue("LabelPlacement") >>= nLabelPlacement)
+ {
+ if (!rLabelParam.maAllowedValues.count(nLabelPlacement))
+ nLabelPlacement = rLabelParam.meDefault;
+ pFS->singleElement(FSNS(XML_c, XML_dLblPos), XML_val, toOOXMLPlacement(nLabelPlacement));
+ }
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_showLegendKey), XML_val, ToPsz10(aLabel.ShowLegendSymbol));
+ pFS->singleElement(FSNS(XML_c, XML_showVal), XML_val, ToPsz10(aLabel.ShowNumber));
+ pFS->singleElement(FSNS(XML_c, XML_showCatName), XML_val, ToPsz10(aLabel.ShowCategoryName));
+ pFS->singleElement(FSNS(XML_c, XML_showSerName), XML_val, ToPsz10(aLabel.ShowSeriesName));
+ pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, ToPsz10(aLabel.ShowNumberInPercent));
+
+ // Export the text "separator" if exists
+ uno::Any aAny = xPropSet->getPropertyValue("LabelSeparator");
+ if( aAny.hasValue() )
+ {
+ OUString nLabelSeparator;
+ aAny >>= nLabelSeparator;
+ pFS->startElement(FSNS(XML_c, XML_separator));
+ pFS->writeEscaped( nLabelSeparator );
+ pFS->endElement( FSNS( XML_c, XML_separator ) );
+ }
+
+ if (rDLblsRange.hasLabel(nLabelIndex))
+ {
+ pFS->startElement(FSNS(XML_c, XML_extLst));
+ pFS->startElement(FSNS(XML_c, XML_ext), XML_uri,
+ "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}", FSNS(XML_xmlns, XML_c15),
+ pChartExport->GetFB()->getNamespaceURL(OOX_NS(c15)));
+
+ pFS->singleElement(FSNS(XML_c15, XML_showDataLabelsRange), XML_val, "1");
+
+ pFS->endElement(FSNS(XML_c, XML_ext));
+ pFS->endElement(FSNS(XML_c, XML_extLst));
+ }
+}
+
+}
+
+void ChartExport::exportDataLabels(
+ const uno::Reference<chart2::XDataSeries> & xSeries, sal_Int32 nSeriesLength, sal_Int32 eChartType,
+ DataLabelsRange& rDLblsRange)
+{
+ if (!xSeries.is() || nSeriesLength <= 0)
+ return;
+
+ uno::Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY);
+ if (!xPropSet.is())
+ return;
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_dLbls));
+
+ bool bLinkedNumFmt = true;
+ if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
+ mAny >>= bLinkedNumFmt;
+
+ chart2::DataPointLabel aLabel;
+ bool bLabelIsNumberFormat = true;
+ if( xPropSet->getPropertyValue("Label") >>= aLabel )
+ bLabelIsNumberFormat = aLabel.ShowNumber;
+
+ if (GetProperty(xPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
+ {
+ sal_Int32 nKey = 0;
+ mAny >>= nKey;
+
+ OUString aNumberFormatString = getNumberFormatCode(nKey);
+
+ pFS->singleElement(FSNS(XML_c, XML_numFmt),
+ XML_formatCode, aNumberFormatString,
+ XML_sourceLinked, ToPsz10(bLinkedNumFmt));
+ }
+
+ uno::Sequence<sal_Int32> aAttrLabelIndices;
+ xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices;
+
+ // We must not export label placement property when the chart type doesn't
+ // support this option in MS Office, else MS Office would think the file
+ // is corrupt & refuse to open it.
+
+ const chart::TypeGroupInfo& rInfo = chart::GetTypeGroupInfo(static_cast<chart::TypeId>(eChartType));
+ LabelPlacementParam aParam(!mbIs3DChart, rInfo.mnDefLabelPos);
+ switch (eChartType) // diagram chart type
+ {
+ case chart::TYPEID_PIE:
+ if(getChartType() == chart::TYPEID_DOUGHNUT)
+ aParam.mbExport = false;
+ else
+ // All pie charts support label placement.
+ aParam.mbExport = true;
+ break;
+ case chart::TYPEID_AREA:
+ case chart::TYPEID_RADARLINE:
+ case chart::TYPEID_RADARAREA:
+ // These chart types don't support label placement.
+ aParam.mbExport = false;
+ break;
+ case chart::TYPEID_BAR:
+ if (mbStacked || mbPercent)
+ {
+ aParam.maAllowedValues.clear();
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::CENTER);
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::INSIDE);
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::NEAR_ORIGIN);
+ aParam.meDefault = css::chart::DataLabelPlacement::CENTER;
+ }
+ else // Clustered bar chart
+ {
+ aParam.maAllowedValues.clear();
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::CENTER);
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::INSIDE);
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::OUTSIDE);
+ aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::NEAR_ORIGIN);
+ aParam.meDefault = css::chart::DataLabelPlacement::OUTSIDE;
+ }
+ break;
+ default:
+ ;
+ }
+
+ for (const sal_Int32 nIdx : std::as_const(aAttrLabelIndices))
+ {
+ uno::Reference<beans::XPropertySet> xLabelPropSet = xSeries->getDataPointByIndex(nIdx);
+
+ if (!xLabelPropSet.is())
+ continue;
+
+ pFS->startElement(FSNS(XML_c, XML_dLbl));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nIdx));
+
+ // export custom position of data label
+ if( eChartType != chart::TYPEID_PIE )
+ {
+ chart2::RelativePosition aCustomLabelPosition;
+ if( xLabelPropSet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition )
+ {
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
+
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(aCustomLabelPosition.Primary));
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(aCustomLabelPosition.Secondary));
+
+ SAL_WARN_IF(aCustomLabelPosition.Anchor != css::drawing::Alignment_TOP_LEFT, "oox", "unsupported anchor position");
+
+ pFS->endElement(FSNS(XML_c, XML_manualLayout));
+ pFS->endElement(FSNS(XML_c, XML_layout));
+ }
+ }
+
+ if( GetProperty(xLabelPropSet, "LinkNumberFormatToSource") )
+ mAny >>= bLinkedNumFmt;
+
+ if( xLabelPropSet->getPropertyValue("Label") >>= aLabel )
+ bLabelIsNumberFormat = aLabel.ShowNumber;
+ else
+ bLabelIsNumberFormat = true;
+
+ if (GetProperty(xLabelPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
+ {
+ sal_Int32 nKey = 0;
+ mAny >>= nKey;
+
+ OUString aNumberFormatString = getNumberFormatCode(nKey);
+
+ pFS->singleElement(FSNS(XML_c, XML_numFmt), XML_formatCode, aNumberFormatString,
+ XML_sourceLinked, ToPsz10(bLinkedNumFmt));
+ }
+
+ // Individual label property that overwrites the baseline.
+ writeLabelProperties(pFS, this, xLabelPropSet, aParam, nIdx, rDLblsRange);
+ pFS->endElement(FSNS(XML_c, XML_dLbl));
+ }
+
+ // Baseline label properties for all labels.
+ writeLabelProperties(pFS, this, xPropSet, aParam, -1, rDLblsRange);
+
+ bool bShowLeaderLines = false;
+ xPropSet->getPropertyValue("ShowCustomLeaderLines") >>= bShowLeaderLines;
+ pFS->singleElement(FSNS(XML_c, XML_showLeaderLines), XML_val, ToPsz10(bShowLeaderLines));
+
+ // Export leader line
+ if( eChartType != chart::TYPEID_PIE )
+ {
+ pFS->startElement(FSNS(XML_c, XML_extLst));
+ pFS->startElement(FSNS(XML_c, XML_ext), XML_uri, "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}", FSNS(XML_xmlns, XML_c15), GetFB()->getNamespaceURL(OOX_NS(c15)));
+ pFS->singleElement(FSNS(XML_c15, XML_showLeaderLines), XML_val, ToPsz10(bShowLeaderLines));
+ pFS->endElement(FSNS(XML_c, XML_ext));
+ pFS->endElement(FSNS(XML_c, XML_extLst));
+ }
+ pFS->endElement(FSNS(XML_c, XML_dLbls));
+}
+
+void ChartExport::exportDataPoints(
+ const uno::Reference< beans::XPropertySet > & xSeriesProperties,
+ sal_Int32 nSeriesLength, sal_Int32 eChartType )
+{
+ uno::Reference< chart2::XDataSeries > xSeries( xSeriesProperties, uno::UNO_QUERY );
+ bool bVaryColorsByPoint = false;
+ Sequence< sal_Int32 > aDataPointSeq;
+ if( xSeriesProperties.is())
+ {
+ Any aAny = xSeriesProperties->getPropertyValue( "AttributedDataPoints" );
+ aAny >>= aDataPointSeq;
+ xSeriesProperties->getPropertyValue( "VaryColorsByPoint" ) >>= bVaryColorsByPoint;
+ }
+
+ const sal_Int32 * pPoints = aDataPointSeq.getConstArray();
+ sal_Int32 nElement;
+ Reference< chart2::XColorScheme > xColorScheme;
+ if( mxNewDiagram.is())
+ xColorScheme.set( mxNewDiagram->getDefaultColorScheme());
+
+ if( bVaryColorsByPoint && xColorScheme.is() )
+ {
+ o3tl::sorted_vector< sal_Int32 > aAttrPointSet;
+ aAttrPointSet.reserve(aDataPointSeq.getLength());
+ for (auto p = pPoints; p < pPoints + aDataPointSeq.getLength(); ++p)
+ aAttrPointSet.insert(*p);
+ const auto aEndIt = aAttrPointSet.end();
+ for( nElement = 0; nElement < nSeriesLength; ++nElement )
+ {
+ uno::Reference< beans::XPropertySet > xPropSet;
+ if( aAttrPointSet.find( nElement ) != aEndIt )
+ {
+ try
+ {
+ xPropSet = SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
+ xSeries, nElement, getModel() );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION( "oox", "Exception caught during Export of data point" );
+ }
+ }
+ else
+ {
+ // property set only containing the color
+ xPropSet.set( new ColorPropertySet( ColorTransparency, xColorScheme->getColorByIndex( nElement )));
+ }
+
+ if( xPropSet.is() )
+ {
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_dPt));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nElement));
+
+ switch (eChartType)
+ {
+ case chart::TYPEID_PIE:
+ case chart::TYPEID_DOUGHNUT:
+ {
+ if( xPropSet.is() && GetProperty( xPropSet, "SegmentOffset") )
+ {
+ sal_Int32 nOffset = 0;
+ mAny >>= nOffset;
+ if (nOffset)
+ pFS->singleElement( FSNS( XML_c, XML_explosion ),
+ XML_val, OString::number( nOffset ) );
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ exportShapeProps( xPropSet );
+
+ pFS->endElement( FSNS( XML_c, XML_dPt ) );
+ }
+ }
+ }
+
+ // Export Data Point Property in Charts even if the VaryColors is false
+ if( bVaryColorsByPoint )
+ return;
+
+ o3tl::sorted_vector< sal_Int32 > aAttrPointSet;
+ aAttrPointSet.reserve(aDataPointSeq.getLength());
+ for (auto p = pPoints; p < pPoints + aDataPointSeq.getLength(); ++p)
+ aAttrPointSet.insert(*p);
+ const auto aEndIt = aAttrPointSet.end();
+ for( nElement = 0; nElement < nSeriesLength; ++nElement )
+ {
+ uno::Reference< beans::XPropertySet > xPropSet;
+ if( aAttrPointSet.find( nElement ) != aEndIt )
+ {
+ try
+ {
+ xPropSet = SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
+ xSeries, nElement, getModel() );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION( "oox", "Exception caught during Export of data point" );
+ }
+ }
+
+ if( xPropSet.is() )
+ {
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_dPt));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nElement));
+
+ switch( eChartType )
+ {
+ case chart::TYPEID_BUBBLE:
+ case chart::TYPEID_HORBAR:
+ case chart::TYPEID_BAR:
+ pFS->singleElement(FSNS(XML_c, XML_invertIfNegative), XML_val, "0");
+ exportShapeProps(xPropSet);
+ break;
+
+ case chart::TYPEID_LINE:
+ case chart::TYPEID_SCATTER:
+ case chart::TYPEID_RADARLINE:
+ exportMarker(xPropSet);
+ break;
+
+ default:
+ exportShapeProps(xPropSet);
+ break;
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_dPt ) );
+ }
+ }
+}
+
+void ChartExport::exportAxesId(bool bPrimaryAxes, bool bCheckCombinedAxes)
+{
+ sal_Int32 nAxisIdx, nAxisIdy;
+ bool bPrimaryAxisExists = false;
+ bool bSecondaryAxisExists = false;
+ // let's check which axis already exists and which axis is attached to the actual dataseries
+ if (maAxes.size() >= 2)
+ {
+ bPrimaryAxisExists = bPrimaryAxes && maAxes[1].nAxisType == AXIS_PRIMARY_Y;
+ bSecondaryAxisExists = !bPrimaryAxes && maAxes[1].nAxisType == AXIS_SECONDARY_Y;
+ }
+ // tdf#114181 keep axes of combined charts
+ if ( bCheckCombinedAxes && ( bPrimaryAxisExists || bSecondaryAxisExists ) )
+ {
+ nAxisIdx = maAxes[0].nAxisId;
+ nAxisIdy = maAxes[1].nAxisId;
+ }
+ else
+ {
+ nAxisIdx = lcl_generateRandomValue();
+ nAxisIdy = lcl_generateRandomValue();
+ AxesType eXAxis = bPrimaryAxes ? AXIS_PRIMARY_X : AXIS_SECONDARY_X;
+ AxesType eYAxis = bPrimaryAxes ? AXIS_PRIMARY_Y : AXIS_SECONDARY_Y;
+ maAxes.emplace_back( eXAxis, nAxisIdx, nAxisIdy );
+ maAxes.emplace_back( eYAxis, nAxisIdy, nAxisIdx );
+ }
+ FSHelperPtr pFS = GetFS();
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdx));
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdy));
+ if (mbHasZAxis)
+ {
+ sal_Int32 nAxisIdz = 0;
+ if( isDeep3dChart() )
+ {
+ nAxisIdz = lcl_generateRandomValue();
+ maAxes.emplace_back( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy );
+ }
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdz));
+ }
+}
+
+void ChartExport::exportGrouping( bool isBar )
+{
+ FSHelperPtr pFS = GetFS();
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ // grouping
+ if( GetProperty( xPropSet, "Stacked" ) )
+ mAny >>= mbStacked;
+ if( GetProperty( xPropSet, "Percent" ) )
+ mAny >>= mbPercent;
+
+ const char* grouping = nullptr;
+ if (mbStacked)
+ grouping = "stacked";
+ else if (mbPercent)
+ grouping = "percentStacked";
+ else
+ {
+ if( isBar && !isDeep3dChart() )
+ {
+ grouping = "clustered";
+ }
+ else
+ grouping = "standard";
+ }
+ pFS->singleElement(FSNS(XML_c, XML_grouping), XML_val, grouping);
+}
+
+void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSeries )
+{
+ FSHelperPtr pFS = GetFS();
+ Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeries, UNO_QUERY );
+ if( !xRegressionCurveContainer.is() )
+ return;
+
+ const Sequence< Reference< chart2::XRegressionCurve > > aRegCurveSeq = xRegressionCurveContainer->getRegressionCurves();
+ for( const Reference< chart2::XRegressionCurve >& xRegCurve : aRegCurveSeq )
+ {
+ if (!xRegCurve.is())
+ continue;
+
+ Reference< XPropertySet > xProperties( xRegCurve , uno::UNO_QUERY );
+
+ OUString aService;
+ Reference< lang::XServiceName > xServiceName( xProperties, UNO_QUERY );
+ if( !xServiceName.is() )
+ continue;
+
+ aService = xServiceName->getServiceName();
+
+ if(aService != "com.sun.star.chart2.LinearRegressionCurve" &&
+ aService != "com.sun.star.chart2.ExponentialRegressionCurve" &&
+ aService != "com.sun.star.chart2.LogarithmicRegressionCurve" &&
+ aService != "com.sun.star.chart2.PotentialRegressionCurve" &&
+ aService != "com.sun.star.chart2.PolynomialRegressionCurve" &&
+ aService != "com.sun.star.chart2.MovingAverageRegressionCurve")
+ continue;
+
+ pFS->startElement(FSNS(XML_c, XML_trendline));
+
+ OUString aName;
+ xProperties->getPropertyValue("CurveName") >>= aName;
+ if(!aName.isEmpty())
+ {
+ pFS->startElement(FSNS(XML_c, XML_name));
+ pFS->writeEscaped(aName);
+ pFS->endElement( FSNS( XML_c, XML_name) );
+ }
+
+ exportShapeProps( xProperties );
+
+ if( aService == "com.sun.star.chart2.LinearRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "linear");
+ }
+ else if( aService == "com.sun.star.chart2.ExponentialRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "exp");
+ }
+ else if( aService == "com.sun.star.chart2.LogarithmicRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "log");
+ }
+ else if( aService == "com.sun.star.chart2.PotentialRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "power");
+ }
+ else if( aService == "com.sun.star.chart2.PolynomialRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "poly");
+
+ sal_Int32 aDegree = 2;
+ xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
+ pFS->singleElement(FSNS(XML_c, XML_order), XML_val, OString::number(aDegree));
+ }
+ else if( aService == "com.sun.star.chart2.MovingAverageRegressionCurve" )
+ {
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "movingAvg");
+
+ sal_Int32 aPeriod = 2;
+ xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
+
+ pFS->singleElement(FSNS(XML_c, XML_period), XML_val, OString::number(aPeriod));
+ }
+ else
+ {
+ // should never happen
+ // This would produce invalid OOXML files so we check earlier for the type
+ assert(false);
+ }
+
+ double fExtrapolateForward = 0.0;
+ double fExtrapolateBackward = 0.0;
+
+ xProperties->getPropertyValue("ExtrapolateForward") >>= fExtrapolateForward;
+ xProperties->getPropertyValue("ExtrapolateBackward") >>= fExtrapolateBackward;
+
+ pFS->singleElement( FSNS( XML_c, XML_forward ),
+ XML_val, OString::number(fExtrapolateForward) );
+
+ pFS->singleElement( FSNS( XML_c, XML_backward ),
+ XML_val, OString::number(fExtrapolateBackward) );
+
+ bool bForceIntercept = false;
+ xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept;
+
+ if (bForceIntercept)
+ {
+ double fInterceptValue = 0.0;
+ xProperties->getPropertyValue("InterceptValue") >>= fInterceptValue;
+
+ pFS->singleElement( FSNS( XML_c, XML_intercept ),
+ XML_val, OString::number(fInterceptValue) );
+ }
+
+ // Equation properties
+ Reference< XPropertySet > xEquationProperties( xRegCurve->getEquationProperties() );
+
+ // Show Equation
+ bool bShowEquation = false;
+ xEquationProperties->getPropertyValue("ShowEquation") >>= bShowEquation;
+
+ // Show R^2
+ bool bShowCorrelationCoefficient = false;
+ xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient;
+
+ pFS->singleElement( FSNS( XML_c, XML_dispRSqr ),
+ XML_val, ToPsz10(bShowCorrelationCoefficient) );
+
+ pFS->singleElement(FSNS(XML_c, XML_dispEq), XML_val, ToPsz10(bShowEquation));
+
+ pFS->endElement( FSNS( XML_c, XML_trendline ) );
+ }
+}
+
+void ChartExport::exportMarker(const Reference< XPropertySet >& xPropSet)
+{
+ chart2::Symbol aSymbol;
+ if( GetProperty( xPropSet, "Symbol" ) )
+ mAny >>= aSymbol;
+
+ if(aSymbol.Style != chart2::SymbolStyle_STANDARD && aSymbol.Style != chart2::SymbolStyle_NONE)
+ return;
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_marker));
+
+ sal_Int32 nSymbol = aSymbol.StandardSymbol;
+ // TODO: more properties support for marker
+ const char* pSymbolType; // no initialization here, to let compiler warn if we have a code path
+ // where it stays uninitialized
+ switch( nSymbol )
+ {
+ case 0:
+ pSymbolType = "square";
+ break;
+ case 1:
+ pSymbolType = "diamond";
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ pSymbolType = "triangle";
+ break;
+ case 8:
+ pSymbolType = "circle";
+ break;
+ case 9:
+ pSymbolType = "star";
+ break;
+ case 10:
+ pSymbolType = "x"; // in MS office 2010 built in symbol marker 'X' is represented as 'x'
+ break;
+ case 11:
+ pSymbolType = "plus";
+ break;
+ case 13:
+ pSymbolType = "dash";
+ break;
+ default:
+ pSymbolType = "square";
+ break;
+ }
+
+ bool bSkipFormatting = false;
+ if (aSymbol.Style == chart2::SymbolStyle_NONE)
+ {
+ bSkipFormatting = true;
+ pSymbolType = "none";
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_symbol), XML_val, pSymbolType);
+
+ if (!bSkipFormatting)
+ {
+ awt::Size aSymbolSize = aSymbol.Size;
+ sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height );
+
+ nSize = nSize/250.0*7.0 + 1; // just guessed based on some test cases,
+ //the value is always 1 less than the actual value.
+ nSize = std::clamp( int(nSize), 2, 72 );
+ pFS->singleElement(FSNS(XML_c, XML_size), XML_val, OString::number(nSize));
+
+ pFS->startElement(FSNS(XML_c, XML_spPr));
+
+ util::Color aColor = aSymbol.FillColor;
+ if (GetProperty(xPropSet, "Color"))
+ mAny >>= aColor;
+
+ if (aColor == -1)
+ {
+ pFS->singleElement(FSNS(XML_a, XML_noFill));
+ }
+ else
+ WriteSolidFill(::Color(ColorTransparency, aColor));
+
+ pFS->endElement( FSNS( XML_c, XML_spPr ) );
+ }
+
+ pFS->endElement( FSNS( XML_c, XML_marker ) );
+}
+
+void ChartExport::exportSmooth()
+{
+ FSHelperPtr pFS = GetFS();
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY );
+ sal_Int32 nSplineType = 0;
+ if( GetProperty( xPropSet, "SplineType" ) )
+ mAny >>= nSplineType;
+ const char* pVal = nSplineType != 0 ? "1" : "0";
+ pFS->singleElement(FSNS(XML_c, XML_smooth), XML_val, pVal);
+}
+
+void ChartExport::exportFirstSliceAng( )
+{
+ FSHelperPtr pFS = GetFS();
+ sal_Int32 nStartingAngle = 0;
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ if( GetProperty( xPropSet, "StartingAngle" ) )
+ mAny >>= nStartingAngle;
+
+ // convert to ooxml angle
+ nStartingAngle = (450 - nStartingAngle ) % 360;
+ pFS->singleElement(FSNS(XML_c, XML_firstSliceAng), XML_val, OString::number(nStartingAngle));
+}
+
+namespace {
+
+const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
+{
+ switch(nErrorBarStyle)
+ {
+ case cssc::ErrorBarStyle::NONE:
+ return nullptr;
+ case cssc::ErrorBarStyle::VARIANCE:
+ break;
+ case cssc::ErrorBarStyle::STANDARD_DEVIATION:
+ return "stdDev";
+ case cssc::ErrorBarStyle::ABSOLUTE:
+ return "fixedVal";
+ case cssc::ErrorBarStyle::RELATIVE:
+ return "percentage";
+ case cssc::ErrorBarStyle::ERROR_MARGIN:
+ break;
+ case cssc::ErrorBarStyle::STANDARD_ERROR:
+ return "stdErr";
+ case cssc::ErrorBarStyle::FROM_DATA:
+ return "cust";
+ default:
+ assert(false && "can't happen");
+ }
+ return nullptr;
+}
+
+Reference< chart2::data::XDataSequence> getLabeledSequence(
+ const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences,
+ bool bPositive )
+{
+ OUString aDirection;
+ if(bPositive)
+ aDirection = "positive";
+ else
+ aDirection = "negative";
+
+ for( const auto& rSequence : aSequences )
+ {
+ if( rSequence.is())
+ {
+ uno::Reference< chart2::data::XDataSequence > xSequence( rSequence->getValues());
+ uno::Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
+ OUString aRole;
+ if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
+ aRole.match( "error-bars" ) && aRole.indexOf(aDirection) >= 0 )
+ {
+ return xSequence;
+ }
+ }
+ }
+
+ return Reference< chart2::data::XDataSequence > ();
+}
+
+}
+
+void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps, bool bYError)
+{
+ sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
+ xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
+ const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
+ if(!pErrorBarStyle)
+ return;
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_errBars));
+ pFS->singleElement(FSNS(XML_c, XML_errDir), XML_val, bYError ? "y" : "x");
+ bool bPositive = false, bNegative = false;
+ xErrorBarProps->getPropertyValue("ShowPositiveError") >>= bPositive;
+ xErrorBarProps->getPropertyValue("ShowNegativeError") >>= bNegative;
+ const char* pErrBarType;
+ if(bPositive && bNegative)
+ pErrBarType = "both";
+ else if(bPositive)
+ pErrBarType = "plus";
+ else if(bNegative)
+ pErrBarType = "minus";
+ else
+ {
+ // what the hell should we do now?
+ // at least this makes the file valid
+ pErrBarType = "both";
+ }
+ pFS->singleElement(FSNS(XML_c, XML_errBarType), XML_val, pErrBarType);
+ pFS->singleElement(FSNS(XML_c, XML_errValType), XML_val, pErrorBarStyle);
+ pFS->singleElement(FSNS(XML_c, XML_noEndCap), XML_val, "0");
+ if(nErrorBarStyle == cssc::ErrorBarStyle::FROM_DATA)
+ {
+ uno::Reference< chart2::data::XDataSource > xDataSource(xErrorBarProps, uno::UNO_QUERY);
+ Sequence< Reference < chart2::data::XLabeledDataSequence > > aSequences =
+ xDataSource->getDataSequences();
+
+ if(bPositive)
+ {
+ exportSeriesValues(getLabeledSequence(aSequences, true), XML_plus);
+ }
+
+ if(bNegative)
+ {
+ exportSeriesValues(getLabeledSequence(aSequences, false), XML_minus);
+ }
+ }
+ else
+ {
+ double nVal = 0.0;
+ if(nErrorBarStyle == cssc::ErrorBarStyle::STANDARD_DEVIATION)
+ {
+ xErrorBarProps->getPropertyValue("Weight") >>= nVal;
+ }
+ else
+ {
+ if(bPositive)
+ xErrorBarProps->getPropertyValue("PositiveError") >>= nVal;
+ else
+ xErrorBarProps->getPropertyValue("NegativeError") >>= nVal;
+ }
+
+ pFS->singleElement(FSNS(XML_c, XML_val), XML_val, OString::number(nVal));
+ }
+
+ exportShapeProps( xErrorBarProps );
+
+ pFS->endElement( FSNS( XML_c, XML_errBars) );
+}
+
+void ChartExport::exportView3D()
+{
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ if( !xPropSet.is() )
+ return;
+ FSHelperPtr pFS = GetFS();
+ pFS->startElement(FSNS(XML_c, XML_view3D));
+ sal_Int32 eChartType = getChartType( );
+ // rotX
+ if( GetProperty( xPropSet, "RotationHorizontal" ) )
+ {
+ sal_Int32 nRotationX = 0;
+ mAny >>= nRotationX;
+ if( nRotationX < 0 )
+ {
+ if(eChartType == chart::TYPEID_PIE)
+ {
+ /* In OOXML we get value in 0..90 range for pie chart X rotation , whereas we expect it to be in -90..90 range,
+ so we convert that during import. It is modified in View3DConverter::convertFromModel()
+ here we convert it back to 0..90 as we received in import */
+ nRotationX += 90; // X rotation (map Chart2 [-179,180] to OOXML [0..90])
+ }
+ else
+ nRotationX += 360; // X rotation (map Chart2 [-179,180] to OOXML [-90..90])
+ }
+ pFS->singleElement(FSNS(XML_c, XML_rotX), XML_val, OString::number(nRotationX));
+ }
+ // rotY
+ if( GetProperty( xPropSet, "RotationVertical" ) )
+ {
+ // Y rotation (map Chart2 [-179,180] to OOXML [0..359])
+ if( eChartType == chart::TYPEID_PIE && GetProperty( xPropSet, "StartingAngle" ) )
+ {
+ // Y rotation used as 'first pie slice angle' in 3D pie charts
+ sal_Int32 nStartingAngle=0;
+ mAny >>= nStartingAngle;
+ // convert to ooxml angle
+ nStartingAngle = (450 - nStartingAngle ) % 360;
+ pFS->singleElement(FSNS(XML_c, XML_rotY), XML_val, OString::number(nStartingAngle));
+ }
+ else
+ {
+ sal_Int32 nRotationY = 0;
+ mAny >>= nRotationY;
+ // Y rotation (map Chart2 [-179,180] to OOXML [0..359])
+ if( nRotationY < 0 )
+ nRotationY += 360;
+ pFS->singleElement(FSNS(XML_c, XML_rotY), XML_val, OString::number(nRotationY));
+ }
+ }
+ // rAngAx
+ if( GetProperty( xPropSet, "RightAngledAxes" ) )
+ {
+ bool bRightAngled = false;
+ mAny >>= bRightAngled;
+ const char* sRightAngled = bRightAngled ? "1":"0";
+ pFS->singleElement(FSNS(XML_c, XML_rAngAx), XML_val, sRightAngled);
+ }
+ // perspective
+ if( GetProperty( xPropSet, "Perspective" ) )
+ {
+ sal_Int32 nPerspective = 0;
+ mAny >>= nPerspective;
+ // map Chart2 [0,100] to OOXML [0..200]
+ nPerspective *= 2;
+ pFS->singleElement(FSNS(XML_c, XML_perspective), XML_val, OString::number(nPerspective));
+ }
+ pFS->endElement( FSNS( XML_c, XML_view3D ) );
+}
+
+bool ChartExport::isDeep3dChart()
+{
+ bool isDeep = false;
+ if( mbIs3DChart )
+ {
+ Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+ if( GetProperty( xPropSet, "Deep" ) )
+ mAny >>= isDeep;
+ }
+ return isDeep;
+}
+
+OUString ChartExport::getNumberFormatCode(sal_Int32 nKey) const
+{
+ /* XXX if this was called more than one or two times per export the two
+ * SvNumberFormatter instances and NfKeywordTable should be member
+ * variables and initialized only once. */
+
+ OUString aCode("General"); // init with fallback
+ uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxChartModel, uno::UNO_QUERY_THROW);
+ SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xNumberFormatsSupplier);
+ if (!pSupplierObj)
+ return aCode;
+
+ SvNumberFormatter* pNumberFormatter = pSupplierObj->GetNumberFormatter();
+ if (!pNumberFormatter)
+ return aCode;
+
+ SvNumberFormatter aTempFormatter( comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US);
+ NfKeywordTable aKeywords;
+ aTempFormatter.FillKeywordTableForExcel( aKeywords);
+ aCode = pNumberFormatter->GetFormatStringForExcel( nKey, aKeywords, aTempFormatter);
+
+ return aCode;
+}
+
+}// oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
new file mode 100644
index 000000000..85207b7c7
--- /dev/null
+++ b/oox/source/export/drawingml.cxx
@@ -0,0 +1,6125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_features.h>
+
+#include <config_folders.h>
+#include <rtl/bootstrap.hxx>
+#include <sal/log.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/export/drawingml.hxx>
+#include <oox/export/utils.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/relationship.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <svtools/unitconv.hxx>
+#include <sax/fastattribs.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/processfactory.hxx>
+#include <i18nlangtag/languagetag.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/range/b2drange.hxx>
+
+#include <numeric>
+#include <string_view>
+
+#include <com/sun/star/awt/CharSet.hpp>
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/xml/dom/XNodeList.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
+#include <com/sun/star/xml/sax/XSAXSerializable.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/drawing/RectanglePoint.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/random.hxx>
+#include <comphelper/seqstream.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <comphelper/xmltools.hxx>
+#include <o3tl/any.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
+#include <tools/stream.hxx>
+#include <tools/UnitConversion.hxx>
+#include <unotools/fontdefs.hxx>
+#include <vcl/cvtgrf.hxx>
+#include <vcl/svapp.hxx>
+#include <rtl/strbuf.hxx>
+#include <filter/msfilter/escherex.hxx>
+#include <filter/msfilter/util.hxx>
+#include <editeng/outlobj.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/unonames.hxx>
+#include <editeng/unoprnms.hxx>
+#include <editeng/flditem.hxx>
+#include <editeng/escapementitem.hxx>
+#include <editeng/unonrule.hxx>
+#include <svx/svdoashp.hxx>
+#include <svx/svdomedia.hxx>
+#include <svx/unoshape.hxx>
+#include <svx/EnhancedCustomShape2d.hxx>
+#include <drawingml/presetgeometrynames.hxx>
+
+using namespace ::css;
+using namespace ::css::beans;
+using namespace ::css::drawing;
+using namespace ::css::i18n;
+using namespace ::css::style;
+using namespace ::css::text;
+using namespace ::css::uno;
+using namespace ::css::container;
+using namespace ::com::sun::star::drawing::EnhancedCustomShapeSegmentCommand;
+
+using ::css::io::XOutputStream;
+using ::sax_fastparser::FSHelperPtr;
+using ::sax_fastparser::FastSerializerHelper;
+
+namespace
+{
+/// Extracts start or end alpha information from a transparency gradient.
+sal_Int32 GetAlphaFromTransparenceGradient(const awt::Gradient& rGradient, bool bStart)
+{
+ // Our alpha is a gray color value.
+ sal_uInt8 nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
+ // drawingML alpha is a percentage on a 0..100000 scale.
+ return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
+}
+
+const char* g_aPredefinedClrNames[] = {
+ "dk1",
+ "lt1",
+ "dk2",
+ "lt2",
+ "accent1",
+ "accent2",
+ "accent3",
+ "accent4",
+ "accent5",
+ "accent6",
+ "hlink",
+ "folHlink",
+};
+}
+
+namespace oox::drawingml {
+
+URLTransformer::~URLTransformer()
+{
+}
+
+OUString URLTransformer::getTransformedString(const OUString& rString) const
+{
+ return rString;
+}
+
+bool URLTransformer::isExternalURL(const OUString& rURL) const
+{
+ bool bExternal = true;
+ if (rURL.startsWith("#"))
+ bExternal = false;
+ return bExternal;
+}
+
+static css::uno::Any getLineDash( const css::uno::Reference<css::frame::XModel>& xModel, const OUString& rDashName )
+ {
+ css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY);
+ css::uno::Reference<css::container::XNameAccess> xNameAccess(
+ xFact->createInstance("com.sun.star.drawing.DashTable"),
+ css::uno::UNO_QUERY );
+ if(xNameAccess.is())
+ {
+ if (!xNameAccess->hasByName(rDashName))
+ return css::uno::Any();
+
+ return xNameAccess->getByName(rDashName);
+ }
+
+ return css::uno::Any();
+ }
+
+namespace
+{
+void WriteGradientPath(const awt::Gradient& rGradient, const FSHelperPtr& pFS, const bool bCircle)
+{
+ pFS->startElementNS(XML_a, XML_path, XML_path, bCircle ? "circle" : "rect");
+
+ // Write the focus rectangle. Work with the focus point, and assume
+ // that it extends 50% in all directions. The below
+ // left/top/right/bottom values are percentages, where 0 means the
+ // edge of the tile rectangle and 100% means the center of it.
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttributeList(
+ sax_fastparser::FastSerializerHelper::createAttrList());
+ sal_Int32 nLeftPercent = rGradient.XOffset;
+ pAttributeList->add(XML_l, OString::number(nLeftPercent * PER_PERCENT));
+ sal_Int32 nTopPercent = rGradient.YOffset;
+ pAttributeList->add(XML_t, OString::number(nTopPercent * PER_PERCENT));
+ sal_Int32 nRightPercent = 100 - rGradient.XOffset;
+ pAttributeList->add(XML_r, OString::number(nRightPercent * PER_PERCENT));
+ sal_Int32 nBottomPercent = 100 - rGradient.YOffset;
+ pAttributeList->add(XML_b, OString::number(nBottomPercent * PER_PERCENT));
+ pFS->singleElementNS(XML_a, XML_fillToRect, pAttributeList);
+
+ pFS->endElementNS(XML_a, XML_path);
+}
+}
+
+// not thread safe
+std::stack<sal_Int32> DrawingML::mnImageCounter;
+std::stack<sal_Int32> DrawingML::mnWdpImageCounter;
+std::stack<std::map<OUString, OUString>> DrawingML::maWdpCache;
+sal_Int32 DrawingML::mnDrawingMLCount = 0;
+sal_Int32 DrawingML::mnVmlCount = 0;
+std::stack<std::unordered_map<BitmapChecksum, OUString>> DrawingML::maExportGraphics;
+
+sal_Int16 DrawingML::GetScriptType(const OUString& rStr)
+{
+ if (rStr.getLength() > 0)
+ {
+ static Reference<css::i18n::XBreakIterator> xBreakIterator =
+ css::i18n::BreakIterator::create(comphelper::getProcessComponentContext());
+
+ sal_Int16 nScriptType = xBreakIterator->getScriptType(rStr, 0);
+
+ if (nScriptType == css::i18n::ScriptType::WEAK)
+ {
+ sal_Int32 nPos = xBreakIterator->nextScript(rStr, 0, nScriptType);
+ if (nPos < rStr.getLength())
+ nScriptType = xBreakIterator->getScriptType(rStr, nPos);
+
+ }
+
+ if (nScriptType != css::i18n::ScriptType::WEAK)
+ return nScriptType;
+ }
+
+ return css::i18n::ScriptType::LATIN;
+}
+
+void DrawingML::ResetMlCounters()
+{
+ mnDrawingMLCount = 0;
+ mnVmlCount = 0;
+}
+
+void DrawingML::PushExportGraphics()
+{
+ mnImageCounter.push(1);
+ maExportGraphics.emplace();
+
+ mnWdpImageCounter.push(1);
+ maWdpCache.emplace();
+}
+
+void DrawingML::PopExportGraphics()
+{
+ mnImageCounter.pop();
+ maExportGraphics.pop();
+
+ mnWdpImageCounter.pop();
+ maWdpCache.pop();
+}
+
+bool DrawingML::GetProperty( const Reference< XPropertySet >& rXPropertySet, const OUString& aName )
+{
+ try
+ {
+ mAny = rXPropertySet->getPropertyValue(aName);
+ if (mAny.hasValue())
+ return true;
+ }
+ catch( const Exception& )
+ {
+ /* printf ("exception when trying to get value of property: %s\n", aName.toUtf8()); */
+ }
+ return false;
+}
+
+bool DrawingML::GetPropertyAndState( const Reference< XPropertySet >& rXPropertySet, const Reference< XPropertyState >& rXPropertyState, const OUString& aName, PropertyState& eState )
+{
+ try
+ {
+ mAny = rXPropertySet->getPropertyValue(aName);
+ if (mAny.hasValue())
+ {
+ eState = rXPropertyState->getPropertyState(aName);
+ return true;
+ }
+ }
+ catch( const Exception& )
+ {
+ /* printf ("exception when trying to get value of property: %s\n", aName.toUtf8()); */
+ }
+ return false;
+}
+
+namespace
+{
+/// Gets hexa value of color on string format.
+OString getColorStr(const ::Color nColor)
+{
+ // Transparency is a separate element.
+ OString sColor = OString::number(sal_uInt32(nColor) & 0x00FFFFFF, 16);
+ if (sColor.getLength() < 6)
+ {
+ OStringBuffer sBuf("0");
+ int remains = 5 - sColor.getLength();
+
+ while (remains > 0)
+ {
+ sBuf.append("0");
+ remains--;
+ }
+
+ sBuf.append(sColor);
+
+ sColor = sBuf.getStr();
+ }
+ return sColor;
+}
+}
+
+void DrawingML::WriteColor( ::Color nColor, sal_Int32 nAlpha )
+{
+ const auto sColor = getColorStr(nColor);
+ if( nAlpha < MAX_PERCENT )
+ {
+ mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha));
+ mpFS->endElementNS( XML_a, XML_srgbClr );
+
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ }
+}
+
+void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
+{
+ // prevent writing a tag with empty val attribute
+ if( sColorSchemeName.isEmpty() )
+ return;
+
+ if( aTransformations.hasElements() )
+ {
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
+ WriteColorTransformations( aTransformations, nAlpha );
+ mpFS->endElementNS( XML_a, XML_schemeClr );
+ }
+ else if(nAlpha < MAX_PERCENT)
+ {
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
+ mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha));
+ mpFS->endElementNS( XML_a, XML_schemeClr );
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
+ }
+}
+
+void DrawingML::WriteColor( const ::Color nColor, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
+{
+ const auto sColor = getColorStr(nColor);
+ if( aTransformations.hasElements() )
+ {
+ mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ WriteColorTransformations(aTransformations, nAlpha);
+ mpFS->endElementNS(XML_a, XML_srgbClr);
+ }
+ else if(nAlpha < MAX_PERCENT)
+ {
+ mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha));
+ mpFS->endElementNS(XML_a, XML_srgbClr);
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ }
+}
+
+void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
+{
+ for( const auto& rTransformation : aTransformations )
+ {
+ sal_Int32 nToken = Color::getColorTransformationToken( rTransformation.Name );
+ if( nToken != XML_TOKEN_INVALID && rTransformation.Value.hasValue() )
+ {
+ if(nToken == XML_alpha && nAlpha < MAX_PERCENT)
+ {
+ mpFS->singleElementNS(XML_a, nToken, XML_val, OString::number(nAlpha));
+ }
+ else
+ {
+ sal_Int32 nValue = rTransformation.Value.get<sal_Int32>();
+ mpFS->singleElementNS(XML_a, nToken, XML_val, OString::number(nValue));
+ }
+ }
+ }
+}
+
+bool DrawingML::WriteCharColor(const css::uno::Reference<css::beans::XPropertySet>& xPropertySet)
+{
+ if (!xPropertySet->getPropertySetInfo()->hasPropertyByName("CharColorTheme"))
+ {
+ return false;
+ }
+
+ sal_Int32 nCharColorTheme = -1;
+ xPropertySet->getPropertyValue("CharColorTheme") >>= nCharColorTheme;
+ if (nCharColorTheme < 0 || nCharColorTheme > 11)
+ {
+ return false;
+ }
+
+ const char* pColorName = g_aPredefinedClrNames[nCharColorTheme];
+
+ sal_Int32 nCharColorTintOrShade{};
+ xPropertySet->getPropertyValue("CharColorTintOrShade") >>= nCharColorTintOrShade;
+ if (nCharColorTintOrShade != 0)
+ {
+ return false;
+ }
+
+ mpFS->startElementNS(XML_a, XML_solidFill);
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, pColorName);
+
+ sal_Int32 nCharColorLumMod{};
+ xPropertySet->getPropertyValue("CharColorLumMod") >>= nCharColorLumMod;
+ if (nCharColorLumMod != 10000)
+ {
+ mpFS->singleElementNS(XML_a, XML_lumMod, XML_val, OString::number(nCharColorLumMod * 10));
+ }
+
+ sal_Int32 nCharColorLumOff{};
+ xPropertySet->getPropertyValue("CharColorLumOff") >>= nCharColorLumOff;
+ if (nCharColorLumOff != 0)
+ {
+ mpFS->singleElementNS(XML_a, XML_lumOff, XML_val, OString::number(nCharColorLumOff * 10));
+ }
+
+ mpFS->endElementNS(XML_a, XML_schemeClr);
+ mpFS->endElementNS(XML_a, XML_solidFill);
+
+ return true;
+}
+
+void DrawingML::WriteSolidFill( ::Color nColor, sal_Int32 nAlpha )
+{
+ mpFS->startElementNS(XML_a, XML_solidFill);
+ WriteColor( nColor, nAlpha );
+ mpFS->endElementNS( XML_a, XML_solidFill );
+}
+
+void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
+{
+ mpFS->startElementNS(XML_a, XML_solidFill);
+ WriteColor( sSchemeName, aTransformations, nAlpha );
+ mpFS->endElementNS( XML_a, XML_solidFill );
+}
+
+void DrawingML::WriteSolidFill( const ::Color nColor, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
+{
+ mpFS->startElementNS(XML_a, XML_solidFill);
+ WriteColor(nColor, aTransformations, nAlpha);
+ mpFS->endElementNS(XML_a, XML_solidFill);
+}
+
+void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
+{
+ // get fill color
+ if ( !GetProperty( rXPropSet, "FillColor" ) )
+ return;
+ sal_uInt32 nFillColor = mAny.get<sal_uInt32>();
+
+ // get InteropGrabBag and search the relevant attributes
+ OUString sColorFillScheme;
+ sal_uInt32 nOriginalColor = 0;
+ Sequence< PropertyValue > aStyleProperties, aTransformations;
+ if ( GetProperty( rXPropSet, "InteropGrabBag" ) )
+ {
+ Sequence< PropertyValue > aGrabBag;
+ mAny >>= aGrabBag;
+ for( const auto& rProp : std::as_const(aGrabBag) )
+ {
+ if( rProp.Name == "SpPrSolidFillSchemeClr" )
+ rProp.Value >>= sColorFillScheme;
+ else if( rProp.Name == "OriginalSolidFillClr" )
+ rProp.Value >>= nOriginalColor;
+ else if( rProp.Name == "StyleFillRef" )
+ rProp.Value >>= aStyleProperties;
+ else if( rProp.Name == "SpPrSolidFillSchemeClrTransformations" )
+ rProp.Value >>= aTransformations;
+ }
+ }
+
+ sal_Int32 nAlpha = MAX_PERCENT;
+ if( GetProperty( rXPropSet, "FillTransparence" ) )
+ {
+ sal_Int32 nTransparency = 0;
+ mAny >>= nTransparency;
+ // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
+ nAlpha = (MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
+ }
+
+ // OOXML has no separate transparence gradient but uses transparency in the gradient stops.
+ // So we merge transparency and color and use gradient fill in such case.
+ awt::Gradient aTransparenceGradient;
+ bool bNeedGradientFill(false);
+ if (GetProperty(rXPropSet, "FillTransparenceGradient"))
+ {
+ mAny >>= aTransparenceGradient;
+ if (aTransparenceGradient.StartColor != aTransparenceGradient.EndColor)
+ bNeedGradientFill = true;
+ else if (aTransparenceGradient.StartColor != 0)
+ nAlpha = GetAlphaFromTransparenceGradient(aTransparenceGradient, true);
+ }
+
+ // write XML
+ if (bNeedGradientFill)
+ {
+ awt::Gradient aPseudoColorGradient;
+ aPseudoColorGradient.XOffset = aTransparenceGradient.XOffset;
+ aPseudoColorGradient.YOffset = aTransparenceGradient.YOffset;
+ aPseudoColorGradient.StartIntensity = 100;
+ aPseudoColorGradient.EndIntensity = 100;
+ aPseudoColorGradient.Angle = aTransparenceGradient.Angle;
+ aPseudoColorGradient.Border = aTransparenceGradient.Border;
+ aPseudoColorGradient.Style = aTransparenceGradient.Style;
+ aPseudoColorGradient.StartColor = nFillColor;
+ aPseudoColorGradient.EndColor = nFillColor;
+ aPseudoColorGradient.StepCount = aTransparenceGradient.StepCount;
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
+ WriteGradientFill(aPseudoColorGradient, aTransparenceGradient);
+ mpFS->endElementNS( XML_a, XML_gradFill );
+ }
+ else if ( nFillColor != nOriginalColor )
+ {
+ // the user has set a different color for the shape
+ if (!WriteFillColor(rXPropSet))
+ {
+ WriteSolidFill(::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha);
+ }
+ }
+ else if ( !sColorFillScheme.isEmpty() )
+ {
+ // the shape had a scheme color and the user didn't change it
+ WriteSolidFill( sColorFillScheme, aTransformations, nAlpha );
+ }
+ else
+ {
+ // the shape had a custom color and the user didn't change it
+ // tdf#124013
+ WriteSolidFill( ::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha );
+ }
+}
+
+bool DrawingML::WriteFillColor(const uno::Reference<beans::XPropertySet>& xPropertySet)
+{
+ if (!xPropertySet->getPropertySetInfo()->hasPropertyByName("FillColorTheme"))
+ {
+ return false;
+ }
+
+ sal_Int32 nFillColorTheme = -1;
+ xPropertySet->getPropertyValue("FillColorTheme") >>= nFillColorTheme;
+ if (nFillColorTheme < 0 || nFillColorTheme > 11)
+ {
+ return false;
+ }
+
+ const char* pColorName = g_aPredefinedClrNames[nFillColorTheme];
+
+ mpFS->startElementNS(XML_a, XML_solidFill);
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, pColorName);
+
+ sal_Int32 nFillColorLumMod{};
+ xPropertySet->getPropertyValue("FillColorLumMod") >>= nFillColorLumMod;
+ if (nFillColorLumMod != 10000)
+ {
+ mpFS->singleElementNS(XML_a, XML_lumMod, XML_val, OString::number(nFillColorLumMod * 10));
+ }
+
+ sal_Int32 nFillColorLumOff{};
+ xPropertySet->getPropertyValue("FillColorLumOff") >>= nFillColorLumOff;
+ if (nFillColorLumOff != 0)
+ {
+ mpFS->singleElementNS(XML_a, XML_lumOff, XML_val, OString::number(nFillColorLumOff * 10));
+ }
+
+ mpFS->endElementNS(XML_a, XML_schemeClr);
+ mpFS->endElementNS(XML_a, XML_solidFill);
+
+ return true;
+}
+
+void DrawingML::WriteGradientStop(sal_uInt16 nStop, ::Color nColor, sal_Int32 nAlpha)
+{
+ mpFS->startElementNS(XML_a, XML_gs, XML_pos, OString::number(nStop * 1000));
+ WriteColor(nColor, nAlpha);
+ mpFS->endElementNS( XML_a, XML_gs );
+}
+
+::Color DrawingML::ColorWithIntensity( sal_uInt32 nColor, sal_uInt32 nIntensity )
+{
+ return ::Color(ColorTransparency, ( ( ( nColor & 0xff ) * nIntensity ) / 100 )
+ | ( ( ( ( ( nColor & 0xff00 ) >> 8 ) * nIntensity ) / 100 ) << 8 )
+ | ( ( ( ( ( nColor & 0xff0000 ) >> 8 ) * nIntensity ) / 100 ) << 8 ));
+}
+
+bool DrawingML::EqualGradients( awt::Gradient aGradient1, awt::Gradient aGradient2 )
+{
+ return aGradient1.Style == aGradient2.Style &&
+ aGradient1.StartColor == aGradient2.StartColor &&
+ aGradient1.EndColor == aGradient2.EndColor &&
+ aGradient1.Angle == aGradient2.Angle &&
+ aGradient1.Border == aGradient2.Border &&
+ aGradient1.XOffset == aGradient2.XOffset &&
+ aGradient1.YOffset == aGradient2.YOffset &&
+ aGradient1.StartIntensity == aGradient2.StartIntensity &&
+ aGradient1.EndIntensity == aGradient2.EndIntensity &&
+ aGradient1.StepCount == aGradient2.StepCount;
+}
+
+void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
+{
+ awt::Gradient aGradient;
+ if (!GetProperty(rXPropSet, "FillGradient"))
+ return;
+
+ aGradient = *o3tl::doAccess<awt::Gradient>(mAny);
+
+ // get InteropGrabBag and search the relevant attributes
+ awt::Gradient aOriginalGradient;
+ Sequence< PropertyValue > aGradientStops;
+ if ( GetProperty( rXPropSet, "InteropGrabBag" ) )
+ {
+ Sequence< PropertyValue > aGrabBag;
+ mAny >>= aGrabBag;
+ for( const auto& rProp : std::as_const(aGrabBag) )
+ if( rProp.Name == "GradFillDefinition" )
+ rProp.Value >>= aGradientStops;
+ else if( rProp.Name == "OriginalGradFill" )
+ rProp.Value >>= aOriginalGradient;
+ }
+
+ // check if an ooxml gradient had been imported and if the user has modified it
+ // Gradient grab-bag depends on theme grab-bag, which is implemented
+ // only for DOCX.
+ if( EqualGradients( aOriginalGradient, aGradient ) && GetDocumentType() == DOCUMENT_DOCX)
+ {
+ // If we have no gradient stops that means original gradient were defined by a theme.
+ if( aGradientStops.hasElements() )
+ {
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
+ WriteGrabBagGradientFill(aGradientStops, aGradient);
+ mpFS->endElementNS( XML_a, XML_gradFill );
+ }
+ }
+ else
+ {
+ awt::Gradient aTransparenceGradient;
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
+ OUString sFillTransparenceGradientName;
+ if (GetProperty(rXPropSet, "FillTransparenceGradientName")
+ && (mAny >>= sFillTransparenceGradientName)
+ && !sFillTransparenceGradientName.isEmpty())
+ {
+ if (GetProperty(rXPropSet, "FillTransparenceGradient"))
+ aTransparenceGradient = *o3tl::doAccess<awt::Gradient>(mAny);
+ }
+ else if (GetProperty(rXPropSet, "FillTransparence"))
+ {
+ // currently only StartColor and EndColor are evaluated in WriteGradientFill()
+ sal_Int32 nTransparency = 0;
+ mAny >>= nTransparency;
+ // convert percent to gray color
+ nTransparency = nTransparency * 255/100;
+ const sal_Int32 aGrayColor = static_cast<sal_Int32>( nTransparency | nTransparency << 8 | nTransparency << 16 );
+ aTransparenceGradient.StartColor = aGrayColor;
+ aTransparenceGradient.EndColor = aGrayColor;
+ }
+ WriteGradientFill(aGradient, aTransparenceGradient);
+ mpFS->endElementNS(XML_a, XML_gradFill);
+ }
+}
+
+void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGradientStops, awt::Gradient rGradient )
+{
+ // write back the original gradient
+ mpFS->startElementNS(XML_a, XML_gsLst);
+
+ // get original stops and write them
+ for( const auto& rGradientStop : aGradientStops )
+ {
+ Sequence< PropertyValue > aGradientStop;
+ rGradientStop.Value >>= aGradientStop;
+
+ // get values
+ OUString sSchemeClr;
+ double nPos = 0;
+ sal_Int16 nTransparency = 0;
+ ::Color nRgbClr;
+ Sequence< PropertyValue > aTransformations;
+ for( const auto& rProp : std::as_const(aGradientStop) )
+ {
+ if( rProp.Name == "SchemeClr" )
+ rProp.Value >>= sSchemeClr;
+ else if( rProp.Name == "RgbClr" )
+ rProp.Value >>= nRgbClr;
+ else if( rProp.Name == "Pos" )
+ rProp.Value >>= nPos;
+ else if( rProp.Name == "Transparency" )
+ rProp.Value >>= nTransparency;
+ else if( rProp.Name == "Transformations" )
+ rProp.Value >>= aTransformations;
+ }
+ // write stop
+ mpFS->startElementNS(XML_a, XML_gs, XML_pos, OString::number(nPos * 100000.0).getStr());
+ if( sSchemeClr.isEmpty() )
+ {
+ // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
+ sal_Int32 nAlpha = MAX_PERCENT - ( PER_PERCENT * nTransparency );
+ WriteColor( nRgbClr, nAlpha );
+ }
+ else
+ {
+ WriteColor( sSchemeClr, aTransformations );
+ }
+ mpFS->endElementNS( XML_a, XML_gs );
+ }
+ mpFS->endElementNS( XML_a, XML_gsLst );
+
+ switch (rGradient.Style)
+ {
+ default:
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number(((3600 - rGradient.Angle + 900) * 6000) % 21600000));
+ break;
+ case awt::GradientStyle_RADIAL:
+ WriteGradientPath(rGradient, mpFS, true);
+ break;
+ }
+}
+
+void DrawingML::WriteGradientFill(awt::Gradient rGradient, awt::Gradient rTransparenceGradient,
+ const uno::Reference<beans::XPropertySet>& rXPropSet)
+{
+ sal_Int32 nStartAlpha;
+ sal_Int32 nEndAlpha;
+ if( rXPropSet.is() && GetProperty(rXPropSet, "FillTransparence") )
+ {
+ sal_Int32 nTransparency = 0;
+ mAny >>= nTransparency;
+ nStartAlpha = nEndAlpha = (MAX_PERCENT - (PER_PERCENT * nTransparency));
+ }
+ else
+ {
+ nStartAlpha = GetAlphaFromTransparenceGradient(rTransparenceGradient, true);
+ nEndAlpha = GetAlphaFromTransparenceGradient(rTransparenceGradient, false);
+ }
+ switch( rGradient.Style )
+ {
+ default:
+ case awt::GradientStyle_LINEAR:
+ {
+ mpFS->startElementNS(XML_a, XML_gsLst);
+ WriteGradientStop(rGradient.Border, ColorWithIntensity(rGradient.StartColor, rGradient.StartIntensity),
+ nStartAlpha);
+ WriteGradientStop(100, ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ mpFS->endElementNS( XML_a, XML_gsLst );
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number(((3600 - rGradient.Angle + 900) * 6000) % 21600000));
+ break;
+ }
+
+ case awt::GradientStyle_AXIAL:
+ {
+ mpFS->startElementNS(XML_a, XML_gsLst);
+ WriteGradientStop(0, ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ if (rGradient.Border > 0 && rGradient.Border < 100)
+ {
+ WriteGradientStop(rGradient.Border/2,
+ ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ }
+ WriteGradientStop(50, ColorWithIntensity(rGradient.StartColor, rGradient.StartIntensity),
+ nStartAlpha);
+ if (rGradient.Border > 0 && rGradient.Border < 100)
+ {
+ WriteGradientStop(100 - rGradient.Border/2,
+ ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ }
+ WriteGradientStop(100, ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ mpFS->endElementNS(XML_a, XML_gsLst);
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number(((3600 - rGradient.Angle + 900) * 6000) % 21600000));
+ break;
+ }
+
+ case awt::GradientStyle_RADIAL:
+ case awt::GradientStyle_ELLIPTICAL:
+ case awt::GradientStyle_RECT:
+ case awt::GradientStyle_SQUARE:
+ {
+ mpFS->startElementNS(XML_a, XML_gsLst);
+ WriteGradientStop(0, ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity),
+ nEndAlpha);
+ if (rGradient.Border > 0 && rGradient.Border < 100)
+ {
+ // Map border to an additional gradient stop, which has the
+ // same color as the final stop.
+ WriteGradientStop(100 - rGradient.Border,
+ ColorWithIntensity(rGradient.StartColor, rGradient.StartIntensity),
+ nStartAlpha);
+ }
+ WriteGradientStop(100,
+ ColorWithIntensity(rGradient.StartColor, rGradient.StartIntensity),
+ nStartAlpha);
+ mpFS->endElementNS(XML_a, XML_gsLst);
+
+ WriteGradientPath(rGradient, mpFS, rGradient.Style == awt::GradientStyle_RADIAL || rGradient.Style == awt::GradientStyle_ELLIPTICAL);
+ break;
+ }
+ }
+}
+
+void DrawingML::WriteLineArrow( const Reference< XPropertySet >& rXPropSet, bool bLineStart )
+{
+ ESCHER_LineEnd eLineEnd;
+ sal_Int32 nArrowLength;
+ sal_Int32 nArrowWidth;
+
+ if ( !EscherPropertyContainer::GetLineArrow( bLineStart, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) )
+ return;
+
+ const char* len;
+ const char* type;
+ const char* width;
+
+ switch( nArrowLength )
+ {
+ case ESCHER_LineShortArrow:
+ len = "sm";
+ break;
+ default:
+ case ESCHER_LineMediumLenArrow:
+ len = "med";
+ break;
+ case ESCHER_LineLongArrow:
+ len = "lg";
+ break;
+ }
+
+ switch( eLineEnd )
+ {
+ default:
+ case ESCHER_LineNoEnd:
+ type = "none";
+ break;
+ case ESCHER_LineArrowEnd:
+ type = "triangle";
+ break;
+ case ESCHER_LineArrowStealthEnd:
+ type = "stealth";
+ break;
+ case ESCHER_LineArrowDiamondEnd:
+ type = "diamond";
+ break;
+ case ESCHER_LineArrowOvalEnd:
+ type = "oval";
+ break;
+ case ESCHER_LineArrowOpenEnd:
+ type = "arrow";
+ break;
+ }
+
+ switch( nArrowWidth )
+ {
+ case ESCHER_LineNarrowArrow:
+ width = "sm";
+ break;
+ default:
+ case ESCHER_LineMediumWidthArrow:
+ width = "med";
+ break;
+ case ESCHER_LineWideArrow:
+ width = "lg";
+ break;
+ }
+
+ mpFS->singleElementNS( XML_a, bLineStart ? XML_headEnd : XML_tailEnd,
+ XML_len, len,
+ XML_type, type,
+ XML_w, width );
+}
+
+void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Reference< frame::XModel > const & xModel )
+{
+ drawing::LineStyle aLineStyle( drawing::LineStyle_NONE );
+ if (GetProperty(rXPropSet, "LineStyle"))
+ mAny >>= aLineStyle;
+
+ const LineCap aLineCap = GetProperty(rXPropSet, "LineCap") ? mAny.get<drawing::LineCap>() : LineCap_BUTT;
+
+ sal_uInt32 nLineWidth = 0;
+ sal_uInt32 nEmuLineWidth = 0;
+ ::Color nColor;
+ sal_Int32 nColorAlpha = MAX_PERCENT;
+ bool bColorSet = false;
+ const char* cap = nullptr;
+ drawing::LineDash aLineDash;
+ bool bDashSet = false;
+ bool bNoFill = false;
+
+
+ // get InteropGrabBag and search the relevant attributes
+ OUString sColorFillScheme;
+ ::Color aResolvedColorFillScheme;
+
+ ::Color nOriginalColor;
+ ::Color nStyleColor;
+ sal_uInt32 nStyleLineWidth = 0;
+
+ Sequence<PropertyValue> aStyleProperties;
+ Sequence<PropertyValue> aTransformations;
+
+ drawing::LineStyle aStyleLineStyle(drawing::LineStyle_NONE);
+ drawing::LineJoint aStyleLineJoint(drawing::LineJoint_NONE);
+
+ if (GetProperty(rXPropSet, "InteropGrabBag"))
+ {
+ Sequence<PropertyValue> aGrabBag;
+ mAny >>= aGrabBag;
+
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ if( rProp.Name == "SpPrLnSolidFillSchemeClr" )
+ rProp.Value >>= sColorFillScheme;
+ if( rProp.Name == "SpPrLnSolidFillResolvedSchemeClr" )
+ rProp.Value >>= aResolvedColorFillScheme;
+ else if( rProp.Name == "OriginalLnSolidFillClr" )
+ rProp.Value >>= nOriginalColor;
+ else if( rProp.Name == "StyleLnRef" )
+ rProp.Value >>= aStyleProperties;
+ else if( rProp.Name == "SpPrLnSolidFillSchemeClrTransformations" )
+ rProp.Value >>= aTransformations;
+ else if( rProp.Name == "EmuLineWidth" )
+ rProp.Value >>= nEmuLineWidth;
+ }
+ for (const auto& rStyleProp : std::as_const(aStyleProperties))
+ {
+ if( rStyleProp.Name == "Color" )
+ rStyleProp.Value >>= nStyleColor;
+ else if( rStyleProp.Name == "LineStyle" )
+ rStyleProp.Value >>= aStyleLineStyle;
+ else if( rStyleProp.Name == "LineJoint" )
+ rStyleProp.Value >>= aStyleLineJoint;
+ else if( rStyleProp.Name == "LineWidth" )
+ rStyleProp.Value >>= nStyleLineWidth;
+ }
+ }
+
+ if (GetProperty(rXPropSet, "LineWidth"))
+ mAny >>= nLineWidth;
+
+ switch (aLineStyle)
+ {
+ case drawing::LineStyle_NONE:
+ bNoFill = true;
+ break;
+ case drawing::LineStyle_DASH:
+ if (GetProperty(rXPropSet, "LineDash"))
+ {
+ aLineDash = mAny.get<drawing::LineDash>();
+ //this query is good for shapes, but in the case of charts it returns 0 values
+ if (aLineDash.Dots == 0 && aLineDash.DotLen == 0 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 0) {
+ OUString aLineDashName;
+ if (GetProperty(rXPropSet, "LineDashName"))
+ mAny >>= aLineDashName;
+ if (!aLineDashName.isEmpty() && xModel) {
+ css::uno::Any aAny = getLineDash(xModel, aLineDashName);
+ aAny >>= aLineDash;
+ }
+ }
+ }
+ else
+ {
+ //export the linestyle of chart wall (plot area) and chart page
+ OUString aLineDashName;
+ if (GetProperty(rXPropSet, "LineDashName"))
+ mAny >>= aLineDashName;
+ if (!aLineDashName.isEmpty() && xModel) {
+ css::uno::Any aAny = getLineDash(xModel, aLineDashName);
+ aAny >>= aLineDash;
+ }
+ }
+ bDashSet = true;
+ if (aLineDash.Style == DashStyle_ROUND || aLineDash.Style == DashStyle_ROUNDRELATIVE)
+ {
+ cap = "rnd";
+ }
+
+ SAL_INFO("oox.shape", "dash dots: " << aLineDash.Dots << " dashes: " << aLineDash.Dashes
+ << " dotlen: " << aLineDash.DotLen << " dashlen: " << aLineDash.DashLen << " distance: " << aLineDash.Distance);
+
+ [[fallthrough]];
+ case drawing::LineStyle_SOLID:
+ default:
+ if (GetProperty(rXPropSet, "LineColor"))
+ {
+ nColor = ::Color(ColorTransparency, mAny.get<sal_uInt32>() & 0xffffff);
+ bColorSet = true;
+ }
+ if (GetProperty(rXPropSet, "LineTransparence"))
+ {
+ nColorAlpha = MAX_PERCENT - (mAny.get<sal_Int16>() * PER_PERCENT);
+ }
+ if (aLineCap == LineCap_ROUND)
+ cap = "rnd";
+ else if (aLineCap == LineCap_SQUARE)
+ cap = "sq";
+ break;
+ }
+
+ // if the line-width was not modified after importing then the original EMU value will be exported to avoid unexpected conversion (rounding) error
+ if (nEmuLineWidth == 0 || static_cast<sal_uInt32>(oox::drawingml::convertEmuToHmm(nEmuLineWidth)) != nLineWidth)
+ nEmuLineWidth = oox::drawingml::convertHmmToEmu(nLineWidth);
+ mpFS->startElementNS( XML_a, XML_ln,
+ XML_cap, cap,
+ XML_w, sax_fastparser::UseIf(OString::number(nEmuLineWidth),
+ nLineWidth == 0 || (nLineWidth > 1 && nStyleLineWidth != nLineWidth)) );
+
+ if( bColorSet )
+ {
+ if( nColor != nOriginalColor )
+ {
+ // the user has set a different color for the line
+ WriteSolidFill( nColor, nColorAlpha );
+ }
+ else if( !sColorFillScheme.isEmpty() )
+ {
+ // the line had a scheme color and the user didn't change it
+ WriteSolidFill( aResolvedColorFillScheme, aTransformations );
+ }
+ else
+ {
+ WriteSolidFill( nColor, nColorAlpha );
+ }
+ }
+
+ if( bDashSet && aStyleLineStyle != drawing::LineStyle_DASH )
+ {
+ // Try to detect if it might come from ms preset line style import.
+ // MS Office styles are always relative, both binary and OOXML.
+ // "dot" is always the first dash and "dash" the second one. All OOXML presets linestyles
+ // start with the longer one. Definitions are in OOXML part 1, 20.1.10.49
+ // The tests are strict, for to not catch styles from standard.sod (as of Aug 2019).
+ bool bIsConverted = false;
+
+ bool bIsRelative(aLineDash.Style == DashStyle_RECTRELATIVE || aLineDash.Style == DashStyle_ROUNDRELATIVE);
+ if ( bIsRelative && aLineDash.Dots == 1)
+ { // The length were tweaked on import in case of prstDash. Revert it here.
+ sal_uInt32 nDotLen = aLineDash.DotLen;
+ sal_uInt32 nDashLen = aLineDash.DashLen;
+ sal_uInt32 nDistance = aLineDash.Distance;
+ if (aLineCap != LineCap_BUTT && nDistance >= 99)
+ {
+ nDistance -= 99;
+ nDotLen += 99;
+ if (nDashLen > 0)
+ nDashLen += 99;
+ }
+ // LO uses length 0 for 100%, if the attribute is missing in ODF.
+ // Other applications might write 100%. Make is unique for the conditions.
+ if (nDotLen == 0)
+ nDotLen = 100;
+ if (nDashLen == 0 && aLineDash.Dashes > 0)
+ nDashLen = 100;
+ bIsConverted = true;
+ if (nDotLen == 100 && aLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot");
+ }
+ else if (nDotLen == 400 && aLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash");
+ }
+ else if (nDotLen == 400 && aLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dashDot");
+ }
+ else if (nDotLen == 800 && aLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDash");
+ }
+ else if (nDotLen == 800 && aLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDot");
+ }
+ else if (nDotLen == 800 && aLineDash.Dashes == 2 && nDashLen == 100 && nDistance == 300)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDotDot");
+ }
+ else if (nDotLen == 100 && aLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 100)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot");
+ }
+ else if (nDotLen == 300 && aLineDash.Dashes == 0 && nDashLen == 0 && nDistance == 100)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash");
+ }
+ else if (nDotLen == 300 && aLineDash.Dashes == 1 && nDashLen == 100 && nDistance == 100)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDot");
+ }
+ else if (nDotLen == 300 && aLineDash.Dashes == 2 && nDashLen == 100 && nDistance == 100)
+ {
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDotDot");
+ }
+ else
+ bIsConverted = false;
+ }
+ // Do not map our own line styles to OOXML prstDash values, because custDash gives better results.
+ if (!bIsConverted)
+ {
+ mpFS->startElementNS(XML_a, XML_custDash);
+ // In case of hairline we would need the current pixel size. Instead use a reasonable
+ // ersatz for it. The value is the same as SMALLEST_DASH_WIDTH in xattr.cxx.
+ // (And it makes sure fLineWidth is not zero in below division.)
+ double fLineWidth = nLineWidth > 0 ? nLineWidth : 26.95;
+ int i;
+ double fSp = bIsRelative ? aLineDash.Distance : aLineDash.Distance * 100.0 / fLineWidth;
+ // LO uses line width, in case Distance is zero. MS Office would use a space of zero length.
+ // So set 100% explicitly.
+ if (aLineDash.Distance <= 0)
+ fSp = 100.0;
+ // In case of custDash, round caps are included in dash length in MS Office. Square caps are added
+ // to dash length, same as in ODF. Change the length values accordingly.
+ if (aLineCap == LineCap_ROUND && fSp > 99.0)
+ fSp -= 99.0;
+
+ if (aLineDash.Dots > 0)
+ {
+ double fD = bIsRelative ? aLineDash.DotLen : aLineDash.DotLen * 100.0 / fLineWidth;
+ // LO sets length to 0, if attribute is missing in ODF. Then a relative length of 100% is intended.
+ if (aLineDash.DotLen == 0)
+ fD = 100.0;
+ // Tweak dash length, see above.
+ if (aLineCap == LineCap_ROUND && fSp > 99.0)
+ fD += 99.0;
+
+ for( i = 0; i < aLineDash.Dots; i ++ )
+ {
+ mpFS->singleElementNS( XML_a, XML_ds,
+ XML_d , write1000thOfAPercent(fD),
+ XML_sp, write1000thOfAPercent(fSp) );
+ }
+ }
+ if ( aLineDash.Dashes > 0 )
+ {
+ double fD = bIsRelative ? aLineDash.DashLen : aLineDash.DashLen * 100.0 / fLineWidth;
+ // LO sets length to 0, if attribute is missing in ODF. Then a relative length of 100% is intended.
+ if (aLineDash.DashLen == 0)
+ fD = 100.0;
+ // Tweak dash length, see above.
+ if (aLineCap == LineCap_ROUND && fSp > 99.0)
+ fD += 99.0;
+
+ for( i = 0; i < aLineDash.Dashes; i ++ )
+ {
+ mpFS->singleElementNS( XML_a , XML_ds,
+ XML_d , write1000thOfAPercent(fD),
+ XML_sp, write1000thOfAPercent(fSp) );
+ }
+ }
+
+ SAL_WARN_IF(nLineWidth <= 0,
+ "oox.shape", "while writing outline - custom dash - line width was < 0 : " << nLineWidth);
+ SAL_WARN_IF(aLineDash.Dashes < 0,
+ "oox.shape", "while writing outline - custom dash - number of dashes was < 0 : " << aLineDash.Dashes);
+ SAL_WARN_IF(aLineDash.Dashes > 0 && aLineDash.DashLen <= 0,
+ "oox.shape", "while writing outline - custom dash - dash length was < 0 : " << aLineDash.DashLen);
+ SAL_WARN_IF(aLineDash.Dots < 0,
+ "oox.shape", "while writing outline - custom dash - number of dots was < 0 : " << aLineDash.Dots);
+ SAL_WARN_IF(aLineDash.Dots > 0 && aLineDash.DotLen <= 0,
+ "oox.shape", "while writing outline - custom dash - dot length was < 0 : " << aLineDash.DotLen);
+ SAL_WARN_IF(aLineDash.Distance <= 0,
+ "oox.shape", "while writing outline - custom dash - distance was < 0 : " << aLineDash.Distance);
+
+ mpFS->endElementNS( XML_a, XML_custDash );
+ }
+ }
+
+ if (!bNoFill && nLineWidth > 1 && GetProperty(rXPropSet, "LineJoint"))
+ {
+ LineJoint eLineJoint = mAny.get<LineJoint>();
+
+ if( aStyleLineJoint == LineJoint_NONE || aStyleLineJoint != eLineJoint )
+ {
+ // style-defined line joint does not exist, or is different from the shape's joint
+ switch( eLineJoint )
+ {
+ case LineJoint_NONE:
+ case LineJoint_BEVEL:
+ mpFS->singleElementNS(XML_a, XML_bevel);
+ break;
+ default:
+ case LineJoint_MIDDLE:
+ case LineJoint_MITER:
+ mpFS->singleElementNS(XML_a, XML_miter);
+ break;
+ case LineJoint_ROUND:
+ mpFS->singleElementNS(XML_a, XML_round);
+ break;
+ }
+ }
+ }
+
+ if( !bNoFill )
+ {
+ WriteLineArrow( rXPropSet, true );
+ WriteLineArrow( rXPropSet, false );
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_noFill);
+ }
+
+ mpFS->endElementNS( XML_a, XML_ln );
+}
+
+const char* DrawingML::GetComponentDir() const
+{
+ switch ( meDocumentType )
+ {
+ case DOCUMENT_DOCX: return "word";
+ case DOCUMENT_PPTX: return "ppt";
+ case DOCUMENT_XLSX: return "xl";
+ }
+
+ return "unknown";
+}
+
+const char* DrawingML::GetRelationCompPrefix() const
+{
+ switch ( meDocumentType )
+ {
+ case DOCUMENT_DOCX: return "";
+ case DOCUMENT_PPTX:
+ case DOCUMENT_XLSX: return "../";
+ }
+
+ return "unknown";
+}
+
+OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
+{
+ GfxLink aLink = rGraphic.GetGfxLink ();
+ BitmapChecksum aChecksum = rGraphic.GetChecksum();
+ OUString sMediaType;
+ const char* pExtension = "";
+ OUString sRelId;
+ OUString sPath;
+
+ // tdf#74670 tdf#91286 Save image only once
+ if (!maExportGraphics.empty())
+ {
+ auto aIterator = maExportGraphics.top().find(aChecksum);
+ if (aIterator != maExportGraphics.top().end())
+ sPath = aIterator->second;
+ }
+
+ if (sPath.isEmpty())
+ {
+ SvMemoryStream aStream;
+ const void* aData = aLink.GetData();
+ std::size_t nDataSize = aLink.GetDataSize();
+
+ switch (aLink.GetType())
+ {
+ case GfxLinkType::NativeGif:
+ sMediaType = "image/gif";
+ pExtension = ".gif";
+ break;
+
+ // #i15508# added BMP type for better exports
+ // export not yet active, so adding for reference (not checked)
+ case GfxLinkType::NativeBmp:
+ sMediaType = "image/bmp";
+ pExtension = ".bmp";
+ break;
+
+ case GfxLinkType::NativeJpg:
+ sMediaType = "image/jpeg";
+ pExtension = ".jpeg";
+ break;
+ case GfxLinkType::NativePng:
+ sMediaType = "image/png";
+ pExtension = ".png";
+ break;
+ case GfxLinkType::NativeTif:
+ sMediaType = "image/tiff";
+ pExtension = ".tif";
+ break;
+ case GfxLinkType::NativeWmf:
+ sMediaType = "image/x-wmf";
+ pExtension = ".wmf";
+ break;
+ case GfxLinkType::NativeMet:
+ sMediaType = "image/x-met";
+ pExtension = ".met";
+ break;
+ case GfxLinkType::NativePct:
+ sMediaType = "image/x-pict";
+ pExtension = ".pct";
+ break;
+ case GfxLinkType::NativeMov:
+ sMediaType = "application/movie";
+ pExtension = ".MOV";
+ break;
+ default:
+ {
+ GraphicType aType = rGraphic.GetType();
+ if (aType == GraphicType::Bitmap || aType == GraphicType::GdiMetafile)
+ {
+ if (aType == GraphicType::Bitmap)
+ {
+ (void)GraphicConverter::Export(aStream, rGraphic, ConvertDataFormat::PNG);
+ sMediaType = "image/png";
+ pExtension = ".png";
+ }
+ else
+ {
+ (void)GraphicConverter::Export(aStream, rGraphic, ConvertDataFormat::EMF);
+ sMediaType = "image/x-emf";
+ pExtension = ".emf";
+ }
+ }
+ else
+ {
+ SAL_WARN("oox.shape", "unhandled graphic type " << static_cast<int>(aType));
+ /*Earlier, even in case of unhandled graphic types we were
+ proceeding to write the image, which would eventually
+ write an empty image with a zero size, and return a valid
+ relationID, which is incorrect.
+ */
+ return sRelId;
+ }
+
+ aData = aStream.GetData();
+ nDataSize = aStream.GetEndOfData();
+ break;
+ }
+ }
+
+ Reference<XOutputStream> xOutStream = mpFB->openFragmentStream(
+ OUStringBuffer()
+ .appendAscii(GetComponentDir())
+ .append("/media/image" + OUString::number(mnImageCounter.top()))
+ .appendAscii(pExtension)
+ .makeStringAndClear(),
+ sMediaType);
+ xOutStream->writeBytes(Sequence<sal_Int8>(static_cast<const sal_Int8*>(aData), nDataSize));
+ xOutStream->closeOutput();
+
+ const OString sRelPathToMedia = "media/image";
+ OString sRelationCompPrefix;
+ if (bRelPathToMedia)
+ sRelationCompPrefix = "../";
+ else
+ sRelationCompPrefix = GetRelationCompPrefix();
+ sPath = OUStringBuffer()
+ .appendAscii(sRelationCompPrefix.getStr())
+ .appendAscii(sRelPathToMedia.getStr())
+ .append(static_cast<sal_Int32>(mnImageCounter.top()++))
+ .appendAscii(pExtension)
+ .makeStringAndClear();
+
+ if (!maExportGraphics.empty())
+ maExportGraphics.top()[aChecksum] = sPath;
+ }
+
+ sRelId = mpFB->addRelation( mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::IMAGE),
+ sPath );
+
+ return sRelId;
+}
+
+void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape)
+{
+ SdrMediaObj* pMediaObj = dynamic_cast<SdrMediaObj*>(SdrObject::getSdrObjectFromXShape(xShape));
+ if (!pMediaObj)
+ return;
+
+ // extension
+ OUString aExtension;
+ const OUString& rURL(pMediaObj->getURL());
+ int nLastDot = rURL.lastIndexOf('.');
+ if (nLastDot >= 0)
+ aExtension = rURL.copy(nLastDot);
+
+ bool bEmbed = rURL.startsWith("vnd.sun.star.Package:");
+ Relationship eMediaType = Relationship::VIDEO;
+
+ // mime type
+#if HAVE_FEATURE_AVMEDIA
+ OUString aMimeType(pMediaObj->getMediaProperties().getMimeType());
+#else
+ OUString aMimeType("none");
+#endif
+ if (aMimeType == "application/vnd.sun.star.media")
+ {
+ // try to set something better
+ // TODO fix the importer to actually set the mimetype on import
+ if (aExtension.equalsIgnoreAsciiCase(".avi"))
+ aMimeType = "video/x-msvideo";
+ else if (aExtension.equalsIgnoreAsciiCase(".flv"))
+ aMimeType = "video/x-flv";
+ else if (aExtension.equalsIgnoreAsciiCase(".mp4"))
+ aMimeType = "video/mp4";
+ else if (aExtension.equalsIgnoreAsciiCase(".mov"))
+ aMimeType = "video/quicktime";
+ else if (aExtension.equalsIgnoreAsciiCase(".ogv"))
+ aMimeType = "video/ogg";
+ else if (aExtension.equalsIgnoreAsciiCase(".wmv"))
+ aMimeType = "video/x-ms-wmv";
+ else if (aExtension.equalsIgnoreAsciiCase(".wav"))
+ {
+ aMimeType = "audio/x-wav";
+ eMediaType = Relationship::AUDIO;
+ }
+ else if (aExtension.equalsIgnoreAsciiCase(".m4a"))
+ {
+ aMimeType = "audio/mp4";
+ eMediaType = Relationship::AUDIO;
+ }
+ else if (aExtension.equalsIgnoreAsciiCase(".mp3"))
+ {
+ aMimeType = "audio/mp3";
+ eMediaType = Relationship::AUDIO;
+ }
+ }
+
+ OUString aVideoFileRelId;
+ OUString aMediaRelId;
+
+ if (bEmbed)
+ {
+ // copy the video stream
+ Reference<XOutputStream> xOutStream = mpFB->openFragmentStream(OUStringBuffer()
+ .appendAscii(GetComponentDir())
+ .append("/media/media" +
+ OUString::number(mnImageCounter.top()) +
+ aExtension)
+ .makeStringAndClear(),
+ aMimeType);
+
+ uno::Reference<io::XInputStream> xInputStream(pMediaObj->GetInputStream());
+ comphelper::OStorageHelper::CopyInputToOutput(xInputStream, xOutStream);
+
+ xOutStream->closeOutput();
+
+ // create the relation
+ OUString aPath = OUStringBuffer().appendAscii(GetRelationCompPrefix())
+ .append("media/media" + OUString::number(mnImageCounter.top()++) + aExtension)
+ .makeStringAndClear();
+ aVideoFileRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(eMediaType), aPath);
+ aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(Relationship::MEDIA), aPath);
+ }
+ else
+ {
+ aVideoFileRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(eMediaType), rURL, true);
+ aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(Relationship::MEDIA), rURL, true);
+ }
+
+ GetFS()->startElementNS(XML_p, XML_nvPr);
+
+ GetFS()->singleElementNS(XML_a, eMediaType == Relationship::VIDEO ? XML_videoFile : XML_audioFile,
+ FSNS(XML_r, XML_link), aVideoFileRelId);
+
+ GetFS()->startElementNS(XML_p, XML_extLst);
+ // media extensions; google this ID for details
+ GetFS()->startElementNS(XML_p, XML_ext, XML_uri, "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
+
+ GetFS()->singleElementNS(XML_p14, XML_media,
+ bEmbed? FSNS(XML_r, XML_embed): FSNS(XML_r, XML_link), aMediaRelId);
+
+ GetFS()->endElementNS(XML_p, XML_ext);
+ GetFS()->endElementNS(XML_p, XML_extLst);
+
+ GetFS()->endElementNS(XML_p, XML_nvPr);
+}
+
+void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference<beans::XPropertySet> const & rXPropSet)
+{
+ sal_Int16 nBright = 0;
+ sal_Int32 nContrast = 0;
+ sal_Int32 nTransparence = 0;
+
+ if (GetProperty(rXPropSet, "AdjustLuminance"))
+ nBright = mAny.get<sal_Int16>();
+ if (GetProperty(rXPropSet, "AdjustContrast"))
+ nContrast = mAny.get<sal_Int32>();
+ // Used for shapes with picture fill
+ if (GetProperty(rXPropSet, "FillTransparence"))
+ nTransparence = mAny.get<sal_Int32>();
+ // Used for pictures
+ if (nTransparence == 0 && GetProperty(rXPropSet, "Transparency"))
+ nTransparence = static_cast<sal_Int32>(mAny.get<sal_Int16>());
+
+ if (GetProperty(rXPropSet, "GraphicColorMode"))
+ {
+ drawing::ColorMode aColorMode;
+ mAny >>= aColorMode;
+ if (aColorMode == drawing::ColorMode_GREYS)
+ mpFS->singleElementNS(XML_a, XML_grayscl);
+ else if (aColorMode == drawing::ColorMode_MONO)
+ //black/white has a 0,5 threshold in LibreOffice
+ mpFS->singleElementNS(XML_a, XML_biLevel, XML_thresh, OString::number(50000));
+ else if (aColorMode == drawing::ColorMode_WATERMARK)
+ {
+ //map watermark with mso washout
+ nBright = 70;
+ nContrast = -70;
+ }
+ }
+
+
+ if (nBright || nContrast)
+ {
+ mpFS->singleElementNS(XML_a, XML_lum,
+ XML_bright, sax_fastparser::UseIf(OString::number(nBright * 1000), nBright != 0),
+ XML_contrast, sax_fastparser::UseIf(OString::number(nContrast * 1000), nContrast != 0));
+ }
+
+ if (nTransparence)
+ {
+ sal_Int32 nAlphaMod = (100 - nTransparence ) * PER_PERCENT;
+ mpFS->singleElementNS(XML_a, XML_alphaModFix, XML_amt, OString::number(nAlphaMod));
+ }
+}
+
+OUString DrawingML::WriteXGraphicBlip(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ uno::Reference<graphic::XGraphic> const & rxGraphic,
+ bool bRelPathToMedia)
+{
+ OUString sRelId;
+
+ if (!rxGraphic.is())
+ return sRelId;
+
+ Graphic aGraphic(rxGraphic);
+ sRelId = WriteImage(aGraphic, bRelPathToMedia);
+
+ mpFS->startElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelId);
+
+ WriteImageBrightnessContrastTransparence(rXPropSet);
+
+ WriteArtisticEffect(rXPropSet);
+
+ mpFS->endElementNS(XML_a, XML_blip);
+
+ return sRelId;
+}
+
+void DrawingML::WriteXGraphicBlipMode(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ uno::Reference<graphic::XGraphic> const & rxGraphic)
+{
+ BitmapMode eBitmapMode(BitmapMode_NO_REPEAT);
+ if (GetProperty(rXPropSet, "FillBitmapMode"))
+ mAny >>= eBitmapMode;
+
+ SAL_INFO("oox.shape", "fill bitmap mode: " << int(eBitmapMode));
+
+ switch (eBitmapMode)
+ {
+ case BitmapMode_REPEAT:
+ WriteXGraphicTile(rXPropSet, rxGraphic);
+ break;
+ case BitmapMode_STRETCH:
+ WriteXGraphicStretch(rXPropSet, rxGraphic);
+ break;
+ default:
+ break;
+ }
+}
+
+void DrawingML::WriteBlipOrNormalFill( const Reference< XPropertySet >& xPropSet, const OUString& rURLPropName )
+{
+ // check for blip and otherwise fall back to normal fill
+ // we always store normal fill properties but OOXML
+ // uses a choice between our fill props and BlipFill
+ if (GetProperty ( xPropSet, rURLPropName ))
+ WriteBlipFill( xPropSet, rURLPropName );
+ else
+ WriteFill(xPropSet);
+}
+
+void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const OUString& sURLPropName )
+{
+ WriteBlipFill( rXPropSet, sURLPropName, XML_a );
+}
+
+void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const OUString& sURLPropName, sal_Int32 nXmlNamespace )
+{
+ if ( !GetProperty( rXPropSet, sURLPropName ) )
+ return;
+
+ uno::Reference<graphic::XGraphic> xGraphic;
+ if (mAny.has<uno::Reference<awt::XBitmap>>())
+ {
+ uno::Reference<awt::XBitmap> xBitmap = mAny.get<uno::Reference<awt::XBitmap>>();
+ if (xBitmap.is())
+ xGraphic.set(xBitmap, uno::UNO_QUERY);
+ }
+ else if (mAny.has<uno::Reference<graphic::XGraphic>>())
+ {
+ xGraphic = mAny.get<uno::Reference<graphic::XGraphic>>();
+ }
+
+ if (xGraphic.is())
+ {
+ bool bWriteMode = false;
+ if (sURLPropName == "FillBitmap" || sURLPropName == "BackGraphic")
+ bWriteMode = true;
+ WriteXGraphicBlipFill(rXPropSet, xGraphic, nXmlNamespace, bWriteMode);
+ }
+}
+
+void DrawingML::WriteXGraphicBlipFill(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ uno::Reference<graphic::XGraphic> const & rxGraphic,
+ sal_Int32 nXmlNamespace, bool bWriteMode, bool bRelPathToMedia)
+{
+ if (!rxGraphic.is() )
+ return;
+
+ mpFS->startElementNS(nXmlNamespace , XML_blipFill, XML_rotWithShape, "0");
+
+ WriteXGraphicBlip(rXPropSet, rxGraphic, bRelPathToMedia);
+
+ if (GetDocumentType() != DOCUMENT_DOCX)
+ {
+ // Write the crop rectangle of Impress as a source rectangle.
+ WriteSrcRectXGraphic(rXPropSet, rxGraphic);
+ }
+
+ if (bWriteMode)
+ {
+ WriteXGraphicBlipMode(rXPropSet, rxGraphic);
+ }
+ else if(GetProperty(rXPropSet, "FillBitmapStretch"))
+ {
+ bool bStretch = mAny.get<bool>();
+
+ if (bStretch)
+ {
+ WriteXGraphicStretch(rXPropSet, rxGraphic);
+ }
+ }
+ mpFS->endElementNS(nXmlNamespace, XML_blipFill);
+}
+
+void DrawingML::WritePattFill( const Reference< XPropertySet >& rXPropSet )
+{
+ if ( GetProperty( rXPropSet, "FillHatch" ) )
+ {
+ drawing::Hatch aHatch;
+ mAny >>= aHatch;
+ WritePattFill(rXPropSet, aHatch);
+ }
+}
+
+void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const css::drawing::Hatch& rHatch)
+{
+ mpFS->startElementNS(XML_a, XML_pattFill, XML_prst, GetHatchPattern(rHatch));
+
+ sal_Int32 nAlpha = MAX_PERCENT;
+ if (GetProperty(rXPropSet, "FillTransparence"))
+ {
+ sal_Int32 nTransparency = 0;
+ mAny >>= nTransparency;
+ nAlpha = (MAX_PERCENT - (PER_PERCENT * nTransparency));
+ }
+
+ mpFS->startElementNS(XML_a, XML_fgClr);
+ WriteColor(::Color(ColorTransparency, rHatch.Color), nAlpha);
+ mpFS->endElementNS( XML_a , XML_fgClr );
+
+ ::Color nColor = COL_WHITE;
+
+ if ( GetProperty( rXPropSet, "FillBackground" ) )
+ {
+ bool isBackgroundFilled = false;
+ mAny >>= isBackgroundFilled;
+ if( isBackgroundFilled )
+ {
+ if( GetProperty( rXPropSet, "FillColor" ) )
+ {
+ mAny >>= nColor;
+ }
+ }
+ else
+ nAlpha = 0;
+ }
+
+ mpFS->startElementNS(XML_a, XML_bgClr);
+ WriteColor(nColor, nAlpha);
+ mpFS->endElementNS( XML_a , XML_bgClr );
+
+ mpFS->endElementNS( XML_a , XML_pattFill );
+}
+
+void DrawingML::WriteGraphicCropProperties(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ Size const & rOriginalSize,
+ MapMode const & rMapMode)
+{
+ if (!GetProperty(rXPropSet, "GraphicCrop"))
+ return;
+
+ css::text::GraphicCrop aGraphicCropStruct;
+ mAny >>= aGraphicCropStruct;
+
+ if(GetProperty(rXPropSet, "CustomShapeGeometry"))
+ {
+ // tdf#134210 GraphicCrop property is handled in import filter because of LibreOffice has not core
+ // feature. We cropped the bitmap physically and MSO shouldn't crop bitmap one more time. When we
+ // have core feature for graphic cropping in custom shapes, we should uncomment the code anymore.
+
+ mpFS->singleElementNS( XML_a, XML_srcRect);
+ }
+ else
+ {
+ Size aOriginalSize(rOriginalSize);
+
+ // GraphicCrop is in mm100, so in case the original size is in pixels, convert it over.
+ if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+ aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, MapMode(MapUnit::Map100thMM));
+
+ if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
+ {
+ mpFS->singleElementNS( XML_a, XML_srcRect,
+ XML_l, OString::number(rtl::math::round(aGraphicCropStruct.Left * 100000.0 / aOriginalSize.Width())),
+ XML_t, OString::number(rtl::math::round(aGraphicCropStruct.Top * 100000.0 / aOriginalSize.Height())),
+ XML_r, OString::number(rtl::math::round(aGraphicCropStruct.Right * 100000.0 / aOriginalSize.Width())),
+ XML_b, OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 100000.0 / aOriginalSize.Height())) );
+ }
+ }
+}
+
+void DrawingML::WriteSrcRectXGraphic(uno::Reference<beans::XPropertySet> const & rxPropertySet,
+ uno::Reference<graphic::XGraphic> const & rxGraphic)
+{
+ Graphic aGraphic(rxGraphic);
+ Size aOriginalSize = aGraphic.GetPrefSize();
+ const MapMode& rMapMode = aGraphic.GetPrefMapMode();
+ WriteGraphicCropProperties(rxPropertySet, aOriginalSize, rMapMode);
+}
+
+void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ uno::Reference<graphic::XGraphic> const & rxGraphic)
+{
+ if (GetDocumentType() != DOCUMENT_DOCX)
+ {
+ // Limiting the area used for stretching is not supported in Impress.
+ mpFS->singleElementNS(XML_a, XML_stretch);
+ return;
+ }
+
+ mpFS->startElementNS(XML_a, XML_stretch);
+
+ bool bCrop = false;
+ if (GetProperty(rXPropSet, "GraphicCrop"))
+ {
+ css::text::GraphicCrop aGraphicCropStruct;
+ mAny >>= aGraphicCropStruct;
+
+ if ((0 != aGraphicCropStruct.Left)
+ || (0 != aGraphicCropStruct.Top)
+ || (0 != aGraphicCropStruct.Right)
+ || (0 != aGraphicCropStruct.Bottom))
+ {
+ Graphic aGraphic(rxGraphic);
+ Size aOriginalSize(aGraphic.GetPrefSize());
+ mpFS->singleElementNS(XML_a, XML_fillRect,
+ XML_l, OString::number(((aGraphicCropStruct.Left) * 100000) / aOriginalSize.Width()),
+ XML_t, OString::number(((aGraphicCropStruct.Top) * 100000) / aOriginalSize.Height()),
+ XML_r, OString::number(((aGraphicCropStruct.Right) * 100000) / aOriginalSize.Width()),
+ XML_b, OString::number(((aGraphicCropStruct.Bottom) * 100000) / aOriginalSize.Height()));
+ bCrop = true;
+ }
+ }
+
+ if (!bCrop)
+ {
+ mpFS->singleElementNS(XML_a, XML_fillRect);
+ }
+
+ mpFS->endElementNS(XML_a, XML_stretch);
+}
+
+static OUString lclConvertRectanglePointToToken(RectanglePoint eRectanglePoint)
+{
+ OUString sAlignment;
+ switch (eRectanglePoint)
+ {
+ case RectanglePoint_LEFT_TOP:
+ sAlignment = "tl";
+ break;
+ case RectanglePoint_MIDDLE_TOP:
+ sAlignment = "t";
+ break;
+ case RectanglePoint_RIGHT_TOP:
+ sAlignment = "tr";
+ break;
+ case RectanglePoint_LEFT_MIDDLE:
+ sAlignment = "l";
+ break;
+ case RectanglePoint_MIDDLE_MIDDLE:
+ sAlignment = "ctr";
+ break;
+ case RectanglePoint_RIGHT_MIDDLE:
+ sAlignment = "r";
+ break;
+ case RectanglePoint_LEFT_BOTTOM:
+ sAlignment = "bl";
+ break;
+ case RectanglePoint_MIDDLE_BOTTOM:
+ sAlignment = "b";
+ break;
+ case RectanglePoint_RIGHT_BOTTOM:
+ sAlignment = "br";
+ break;
+ default:
+ break;
+ }
+ return sAlignment;
+}
+
+void DrawingML::WriteXGraphicTile(uno::Reference<beans::XPropertySet> const& rXPropSet,
+ uno::Reference<graphic::XGraphic> const& rxGraphic)
+{
+ Graphic aGraphic(rxGraphic);
+ Size aOriginalSize(aGraphic.GetPrefSize());
+ const MapMode& rMapMode = aGraphic.GetPrefMapMode();
+ // if the original size is in pixel, convert it to mm100
+ if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+ aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize,
+ MapMode(MapUnit::Map100thMM));
+ sal_Int32 nOffsetX = 0;
+ if (GetProperty(rXPropSet, "FillBitmapPositionOffsetX"))
+ nOffsetX = (*o3tl::doAccess<sal_Int32>(mAny)) * aOriginalSize.Width() * 3.6;
+
+ sal_Int32 nOffsetY = 0;
+ if (GetProperty(rXPropSet, "FillBitmapPositionOffsetY"))
+ nOffsetY = (*o3tl::doAccess<sal_Int32>(mAny)) * aOriginalSize.Height() * 3.6;
+
+ // convert the X size of bitmap to a percentage
+ sal_Int32 nSizeX = 0;
+ if (GetProperty(rXPropSet, "FillBitmapSizeX"))
+ {
+ mAny >>= nSizeX;
+ if (nSizeX > 0)
+ nSizeX = double(nSizeX) / aOriginalSize.Width() * 100000;
+ else if (nSizeX < 0)
+ nSizeX *= 1000;
+ else
+ nSizeX = 100000;
+ }
+
+ // convert the Y size of bitmap to a percentage
+ sal_Int32 nSizeY = 0;
+ if (GetProperty(rXPropSet, "FillBitmapSizeY"))
+ {
+ mAny >>= nSizeY;
+ if (nSizeY > 0)
+ nSizeY = double(nSizeY) / aOriginalSize.Height() * 100000;
+ else if (nSizeY < 0)
+ nSizeY *= 1000;
+ else
+ nSizeY = 100000;
+ }
+
+ // if the "Scale" setting is checked in the images settings dialog.
+ if (nSizeX < 0 && nSizeY < 0)
+ {
+ Reference<drawing::XDrawPagesSupplier> xDPS(GetFB()->getModel(), UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), UNO_SET_THROW);
+ // in this case, the size of the first slide is enough, because all slides are the same size
+ Reference<XDrawPage> xDrawPage(xDrawPages->getByIndex(0), UNO_QUERY);
+ css::uno::Reference<css::beans::XPropertySet> xPagePropSet(xDrawPage, UNO_QUERY);
+ if (xPagePropSet)
+ {
+ double nPageWidth, nPageHeight;
+ xPagePropSet->getPropertyValue("Width") >>= nPageWidth;
+ xPagePropSet->getPropertyValue("Height") >>= nPageHeight;
+ nSizeX = nPageWidth / aOriginalSize.Width() * std::abs(nSizeX);
+ nSizeY = nPageHeight / aOriginalSize.Height() * std::abs(nSizeY);
+ }
+ }
+
+ OUString sRectanglePoint;
+ if (GetProperty(rXPropSet, "FillBitmapRectanglePoint"))
+ sRectanglePoint = lclConvertRectanglePointToToken(*o3tl::doAccess<RectanglePoint>(mAny));
+
+ mpFS->singleElementNS(XML_a, XML_tile, XML_tx, OUString::number(nOffsetX), XML_ty,
+ OUString::number(nOffsetY), XML_sx, OUString::number(nSizeX), XML_sy,
+ OUString::number(nSizeY), XML_algn, sRectanglePoint);
+}
+
+namespace
+{
+bool IsTopGroupObj(const uno::Reference<drawing::XShape>& xShape)
+{
+ SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xShape);
+ if (!pObject)
+ return false;
+
+ if (pObject->getParentSdrObjectFromSdrObject())
+ return false;
+
+ return pObject->IsGroupObject();
+}
+}
+
+void DrawingML::WriteTransformation(const Reference< XShape >& xShape, const tools::Rectangle& rRect,
+ sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, sal_Int32 nRotation, bool bIsGroupShape)
+{
+
+ mpFS->startElementNS( nXmlNamespace, XML_xfrm,
+ XML_flipH, sax_fastparser::UseIf("1", bFlipH),
+ XML_flipV, sax_fastparser::UseIf("1", bFlipV),
+ XML_rot, sax_fastparser::UseIf(OString::number(nRotation), nRotation % 21600000 != 0));
+
+ sal_Int32 nLeft = rRect.Left();
+ sal_Int32 nTop = rRect.Top();
+ if (GetDocumentType() == DOCUMENT_DOCX && !m_xParent.is())
+ {
+ nLeft = 0;
+ nTop = 0;
+ }
+ sal_Int32 nChildLeft = nLeft;
+ sal_Int32 nChildTop = nTop;
+
+ mpFS->singleElementNS(XML_a, XML_off,
+ XML_x, OString::number(oox::drawingml::convertHmmToEmu(nLeft)),
+ XML_y, OString::number(oox::drawingml::convertHmmToEmu(nTop)));
+ mpFS->singleElementNS(XML_a, XML_ext,
+ XML_cx, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
+ XML_cy, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight())));
+
+ if (bIsGroupShape && (GetDocumentType() != DOCUMENT_DOCX || IsTopGroupObj(xShape)))
+ {
+ mpFS->singleElementNS(XML_a, XML_chOff,
+ XML_x, OString::number(oox::drawingml::convertHmmToEmu(nChildLeft)),
+ XML_y, OString::number(oox::drawingml::convertHmmToEmu(nChildTop)));
+ mpFS->singleElementNS(XML_a, XML_chExt,
+ XML_cx, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
+ XML_cy, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight())));
+ }
+
+ mpFS->endElementNS( nXmlNamespace, XML_xfrm );
+}
+
+void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation, bool bSuppressFlipping, bool bFlippedBeforeRotation )
+{
+ SAL_INFO("oox.shape", "write shape transformation");
+
+ Degree100 nRotation;
+ Degree100 nCameraRotation;
+ awt::Point aPos = rXShape->getPosition();
+ awt::Size aSize = rXShape->getSize();
+
+ bool bFlipHWrite = bFlipH && !bSuppressFlipping;
+ bool bFlipVWrite = bFlipV && !bSuppressFlipping;
+ bFlipH = bFlipH && !bFlippedBeforeRotation;
+ bFlipV = bFlipV && !bFlippedBeforeRotation;
+
+ if (GetDocumentType() == DOCUMENT_DOCX && m_xParent.is())
+ {
+ awt::Point aParentPos = m_xParent->getPosition();
+ aPos.X -= aParentPos.X;
+ aPos.Y -= aParentPos.Y;
+ }
+
+ if ( aSize.Width < 0 )
+ aSize.Width = 1000;
+ if ( aSize.Height < 0 )
+ aSize.Height = 1000;
+ if (!bSuppressRotation)
+ {
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rXShape);
+ nRotation = pShape ? pShape->GetRotateAngle() : 0_deg100;
+ if ( GetDocumentType() != DOCUMENT_DOCX )
+ {
+ int faccos=bFlipV ? -1 : 1;
+ int facsin=bFlipH ? -1 : 1;
+ aPos.X-=(1-faccos*cos(toRadians(nRotation)))*aSize.Width/2-facsin*sin(toRadians(nRotation))*aSize.Height/2;
+ aPos.Y-=(1-faccos*cos(toRadians(nRotation)))*aSize.Height/2+facsin*sin(toRadians(nRotation))*aSize.Width/2;
+ }
+ else if (m_xParent.is() && nRotation != 0_deg100)
+ {
+ // Position for rotated shapes inside group is not set by DocxSdrExport.
+ basegfx::B2DRange aRect(-aSize.Width / 2.0, -aSize.Height / 2.0, aSize.Width / 2.0,
+ aSize.Height / 2.0);
+ basegfx::B2DHomMatrix aRotateMatrix =
+ basegfx::utils::createRotateB2DHomMatrix(toRadians(nRotation));
+ aRect.transform(aRotateMatrix);
+ aPos.X += -aSize.Width / 2.0 - aRect.getMinX();
+ aPos.Y += -aSize.Height / 2.0 - aRect.getMinY();
+ }
+
+ // The RotateAngle property's value is independent from any flipping, and that's exactly what we need here.
+ uno::Reference<beans::XPropertySet> xPropertySet(rXShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ if (xPropertySetInfo->hasPropertyByName("RotateAngle"))
+ {
+ sal_Int32 nTmp;
+ if (xPropertySet->getPropertyValue("RotateAngle") >>= nTmp)
+ nRotation = Degree100(nTmp);
+ }
+ // tdf#133037: restore original rotate angle before output
+ if (nRotation && xPropertySetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG))
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBagProps;
+ xPropertySet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= aGrabBagProps;
+ auto p3DEffectProps = std::find_if(std::cbegin(aGrabBagProps), std::cend(aGrabBagProps),
+ [](const PropertyValue& rProp) { return rProp.Name == "3DEffectProperties"; });
+ if (p3DEffectProps != std::cend(aGrabBagProps))
+ {
+ uno::Sequence<beans::PropertyValue> a3DEffectProps;
+ p3DEffectProps->Value >>= a3DEffectProps;
+ auto pCameraProps = std::find_if(std::cbegin(a3DEffectProps), std::cend(a3DEffectProps),
+ [](const PropertyValue& rProp) { return rProp.Name == "Camera"; });
+ if (pCameraProps != std::cend(a3DEffectProps))
+ {
+ uno::Sequence<beans::PropertyValue> aCameraProps;
+ pCameraProps->Value >>= aCameraProps;
+ auto pZRotationProp = std::find_if(std::cbegin(aCameraProps), std::cend(aCameraProps),
+ [](const PropertyValue& rProp) { return rProp.Name == "rotRev"; });
+ if (pZRotationProp != std::cend(aCameraProps))
+ {
+ sal_Int32 nTmp = 0;
+ pZRotationProp->Value >>= nTmp;
+ nCameraRotation = NormAngle36000(Degree100(nTmp / -600));
+ }
+ }
+ }
+ }
+ }
+
+ // OOXML flips shapes before rotating them.
+ if(bFlipH != bFlipV)
+ nRotation = 36000_deg100 - nRotation;
+
+ WriteTransformation(rXShape, tools::Rectangle(Point(aPos.X, aPos.Y), Size(aSize.Width, aSize.Height)), nXmlNamespace,
+ bFlipHWrite, bFlipVWrite, ExportRotateClockwisify(nRotation + nCameraRotation), IsGroupShape( rXShape ));
+}
+
+static OUString lcl_GetTarget(const css::uno::Reference<css::frame::XModel>& xModel, OUString& rURL)
+{
+ Reference<drawing::XDrawPagesSupplier> xDPS(xModel, uno::UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW);
+ sal_uInt32 nPageCount = xDrawPages->getCount();
+ OUString sTarget;
+
+ for (sal_uInt32 i = 0; i < nPageCount; ++i)
+ {
+ Reference<XDrawPage> xDrawPage;
+ xDrawPages->getByIndex(i) >>= xDrawPage;
+ Reference<container::XNamed> xNamed(xDrawPage, UNO_QUERY);
+ if (!xNamed)
+ continue;
+ OUString sSlideName = "#" + xNamed->getName();
+ if (rURL == sSlideName)
+ {
+ sTarget = "slide" + OUString::number(i + 1) + ".xml";
+ break;
+ }
+ }
+ if (sTarget.isEmpty())
+ {
+ sal_Int32 nSplit = rURL.lastIndexOf(' ');
+ if (nSplit > -1)
+ sTarget = OUString::Concat("slide") + rURL.subView(nSplit + 1) + ".xml";
+ }
+
+ return sTarget;
+}
+
+void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool bIsField, sal_Int32 nElement,
+ bool bCheckDirect,bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ sal_Int16 nScriptType, const Reference< XPropertySet >& rXShapePropSet)
+{
+ Reference< XPropertySet > rXPropSet = rRun;
+ Reference< XPropertyState > rXPropState( rRun, UNO_QUERY );
+ OUString usLanguage;
+ PropertyState eState;
+ bool bComplex = ( nScriptType == css::i18n::ScriptType::COMPLEX );
+ const char* bold = "0";
+ const char* italic = nullptr;
+ const char* underline = nullptr;
+ const char* strikeout = nullptr;
+ const char* cap = nullptr;
+ sal_Int32 nSize = 1800;
+ sal_Int32 nCharEscapement = 0;
+ sal_Int32 nCharKerning = 0;
+ sal_Int32 nCharEscapementHeight = 0;
+
+ if ( nElement == XML_endParaRPr && rbOverridingCharHeight )
+ {
+ nSize = rnCharHeight;
+ }
+ else if (GetProperty(rXPropSet, "CharHeight"))
+ {
+ nSize = static_cast<sal_Int32>(100*(*o3tl::doAccess<float>(mAny)));
+ if ( nElement == XML_rPr || nElement == XML_defRPr )
+ {
+ rbOverridingCharHeight = true;
+ rnCharHeight = nSize;
+ }
+ }
+
+ if (GetProperty(rXPropSet, "CharKerning"))
+ nCharKerning = static_cast<sal_Int32>(*o3tl::doAccess<sal_Int16>(mAny));
+ /** While setting values in propertymap,
+ * CharKerning converted using GetTextSpacingPoint
+ * i.e set @ https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textcharacterproperties.cxx#129
+ * therefore to get original value CharKerning need to be convert.
+ * https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/drawingmltypes.cxx#95
+ **/
+ nCharKerning = ((nCharKerning * 720)-360) / 254;
+
+ if ((bComplex && GetProperty(rXPropSet, "CharWeightComplex"))
+ || GetProperty(rXPropSet, "CharWeight"))
+ {
+ if ( *o3tl::doAccess<float>(mAny) >= awt::FontWeight::SEMIBOLD )
+ bold = "1";
+ }
+
+ if ((bComplex && GetProperty(rXPropSet, "CharPostureComplex"))
+ || GetProperty(rXPropSet, "CharPosture"))
+ switch ( *o3tl::doAccess<awt::FontSlant>(mAny) )
+ {
+ case awt::FontSlant_OBLIQUE :
+ case awt::FontSlant_ITALIC :
+ italic = "1";
+ break;
+ default:
+ break;
+ }
+
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharUnderline", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ || GetProperty(rXPropSet, "CharUnderline"))
+ {
+ switch ( *o3tl::doAccess<sal_Int16>(mAny) )
+ {
+ case awt::FontUnderline::SINGLE :
+ underline = "sng";
+ break;
+ case awt::FontUnderline::DOUBLE :
+ underline = "dbl";
+ break;
+ case awt::FontUnderline::DOTTED :
+ underline = "dotted";
+ break;
+ case awt::FontUnderline::DASH :
+ underline = "dash";
+ break;
+ case awt::FontUnderline::LONGDASH :
+ underline = "dashLong";
+ break;
+ case awt::FontUnderline::DASHDOT :
+ underline = "dotDash";
+ break;
+ case awt::FontUnderline::DASHDOTDOT :
+ underline = "dotDotDash";
+ break;
+ case awt::FontUnderline::WAVE :
+ underline = "wavy";
+ break;
+ case awt::FontUnderline::DOUBLEWAVE :
+ underline = "wavyDbl";
+ break;
+ case awt::FontUnderline::BOLD :
+ underline = "heavy";
+ break;
+ case awt::FontUnderline::BOLDDOTTED :
+ underline = "dottedHeavy";
+ break;
+ case awt::FontUnderline::BOLDDASH :
+ underline = "dashHeavy";
+ break;
+ case awt::FontUnderline::BOLDLONGDASH :
+ underline = "dashLongHeavy";
+ break;
+ case awt::FontUnderline::BOLDDASHDOT :
+ underline = "dotDashHeavy";
+ break;
+ case awt::FontUnderline::BOLDDASHDOTDOT :
+ underline = "dotDotDashHeavy";
+ break;
+ case awt::FontUnderline::BOLDWAVE :
+ underline = "wavyHeavy";
+ break;
+ }
+ }
+
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharStrikeout", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ || GetProperty(rXPropSet, "CharStrikeout"))
+ {
+ switch ( *o3tl::doAccess<sal_Int16>(mAny) )
+ {
+ case awt::FontStrikeout::NONE :
+ strikeout = "noStrike";
+ break;
+ case awt::FontStrikeout::SINGLE :
+ // LibO supports further values of character
+ // strikeout, OOXML standard (20.1.10.78,
+ // ST_TextStrikeType) however specifies only
+ // 3 - single, double and none. Approximate
+ // the remaining ones by single strike (better
+ // some strike than none at all).
+ // TODO: figure out how to do this better
+ case awt::FontStrikeout::BOLD :
+ case awt::FontStrikeout::SLASH :
+ case awt::FontStrikeout::X :
+ strikeout = "sngStrike";
+ break;
+ case awt::FontStrikeout::DOUBLE :
+ strikeout = "dblStrike";
+ break;
+ }
+ }
+
+ bool bLang = false;
+ switch(nScriptType)
+ {
+ case css::i18n::ScriptType::ASIAN:
+ bLang = GetProperty(rXPropSet, "CharLocaleAsian"); break;
+ case css::i18n::ScriptType::COMPLEX:
+ bLang = GetProperty(rXPropSet, "CharLocaleComplex"); break;
+ default:
+ bLang = GetProperty(rXPropSet, "CharLocale"); break;
+ }
+
+ if (bLang)
+ {
+ css::lang::Locale aLocale;
+ mAny >>= aLocale;
+ LanguageTag aLanguageTag( aLocale);
+ if (!aLanguageTag.isSystemLocale())
+ usLanguage = aLanguageTag.getBcp47MS();
+ }
+
+ if (GetPropertyAndState(rXPropSet, rXPropState, "CharEscapement", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ mAny >>= nCharEscapement;
+
+ if (GetPropertyAndState(rXPropSet, rXPropState, "CharEscapementHeight", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ mAny >>= nCharEscapementHeight;
+
+ if (DFLT_ESC_AUTO_SUPER == nCharEscapement)
+ {
+ // Raised by the differences between the ascenders (ascent = baseline to top of highest letter).
+ // The ascent is generally about 80% of the total font height.
+ // That is why DFLT_ESC_PROP (58) leads to 33% (DFLT_ESC_SUPER)
+ nCharEscapement = .8 * (100 - nCharEscapementHeight);
+ }
+ else if (DFLT_ESC_AUTO_SUB == nCharEscapement)
+ {
+ // Lowered by the differences between the descenders (descent = baseline to bottom of lowest letter).
+ // The descent is generally about 20% of the total font height.
+ // That is why DFLT_ESC_PROP (58) leads to 8% (DFLT_ESC_SUB)
+ nCharEscapement = .2 * -(100 - nCharEscapementHeight);
+ }
+
+ if (nCharEscapement && nCharEscapementHeight)
+ {
+ nSize = (nSize * nCharEscapementHeight) / 100;
+ // MSO uses default ~58% size
+ nSize = (nSize / 0.58);
+ }
+
+ if (GetProperty(rXPropSet, "CharCaseMap"))
+ {
+ switch ( *o3tl::doAccess<sal_Int16>(mAny) )
+ {
+ case CaseMap::UPPERCASE :
+ cap = "all";
+ break;
+ case CaseMap::SMALLCAPS :
+ cap = "small";
+ break;
+ }
+ }
+
+ mpFS->startElementNS( XML_a, nElement,
+ XML_b, bold,
+ XML_i, italic,
+ XML_lang, sax_fastparser::UseIf(usLanguage, !usLanguage.isEmpty()),
+ XML_sz, OString::number(nSize),
+ // For Condensed character spacing spc value is negative.
+ XML_spc, sax_fastparser::UseIf(OString::number(nCharKerning), nCharKerning != 0),
+ XML_strike, strikeout,
+ XML_u, underline,
+ XML_baseline, sax_fastparser::UseIf(OString::number(nCharEscapement*1000), nCharEscapement != 0),
+ XML_cap, cap );
+
+ // Fontwork-shapes in LO have text outline and fill from shape stroke and shape fill
+ // PowerPoint has this as run properties
+ if (IsFontworkShape(rXShapePropSet))
+ {
+ WriteOutline(rXShapePropSet);
+ WriteBlipOrNormalFill(rXShapePropSet, "Graphic");
+ WriteShapeEffects(rXShapePropSet);
+ }
+ else
+ {
+ // mso doesn't like text color to be placed after typeface
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharColor", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ || GetProperty(rXPropSet, "CharColor"))
+ {
+ ::Color color( ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny) );
+ SAL_INFO("oox.shape", "run color: " << sal_uInt32(color) << " auto: " << sal_uInt32(COL_AUTO));
+
+ // WriteSolidFill() handles MAX_PERCENT as "no transparency".
+ sal_Int32 nTransparency = MAX_PERCENT;
+ if (rXPropSet->getPropertySetInfo()->hasPropertyByName("CharTransparence"))
+ {
+ rXPropSet->getPropertyValue("CharTransparence") >>= nTransparency;
+ // UNO scale is 0..100, OOXML scale is 0..100000; also UNO tracks transparency, OOXML
+ // tracks opacity.
+ nTransparency = MAX_PERCENT - (nTransparency * PER_PERCENT);
+ }
+
+ bool bContoured = false;
+ if (GetProperty(rXPropSet, "CharContoured"))
+ bContoured = *o3tl::doAccess<bool>(mAny);
+
+ // tdf#127696 If the CharContoured is true, then the text color is white and the outline color is the CharColor.
+ if (bContoured)
+ {
+ mpFS->startElementNS(XML_a, XML_ln);
+ if (color == COL_AUTO)
+ {
+ mbIsBackgroundDark ? WriteSolidFill(COL_WHITE) : WriteSolidFill(COL_BLACK);
+ }
+ else
+ {
+ color.SetAlpha(255);
+ if (!WriteCharColor(rXPropSet))
+ WriteSolidFill(color, nTransparency);
+ }
+ mpFS->endElementNS(XML_a, XML_ln);
+
+ WriteSolidFill(COL_WHITE);
+ }
+ // tdf#104219 In LibreOffice and MS Office, there are two types of colors:
+ // Automatic and Fixed. OOXML is setting automatic color, by not providing color.
+ else if( color != COL_AUTO )
+ {
+ color.SetAlpha(255);
+ // TODO: special handle embossed/engraved
+ if (!WriteCharColor(rXPropSet))
+ {
+ WriteSolidFill(color, nTransparency);
+ }
+ }
+ else if (GetDocumentType() == DOCUMENT_PPTX)
+ {
+ // Resolve COL_AUTO for PPTX since MS Powerpoint doesn't have automatic colors.
+ bool bIsTextBackgroundDark = mbIsBackgroundDark;
+ if (rXShapePropSet.is() && GetProperty(rXShapePropSet, "FillStyle")
+ && mAny.get<FillStyle>() != FillStyle_NONE
+ && GetProperty(rXShapePropSet, "FillColor"))
+ {
+ ::Color aShapeFillColor(ColorTransparency, mAny.get<sal_uInt32>());
+ bIsTextBackgroundDark = aShapeFillColor.IsDark();
+ }
+
+ if (bIsTextBackgroundDark)
+ WriteSolidFill(COL_WHITE);
+ else
+ WriteSolidFill(COL_BLACK);
+ }
+ }
+ }
+
+ // tdf#128096, exporting XML_highlight to docx already works fine,
+ // so make sure this code is only run when exporting to pptx, just in case
+ if (GetDocumentType() == DOCUMENT_PPTX)
+ {
+ if (GetProperty(rXPropSet, "CharBackColor"))
+ {
+ ::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
+ if( color != COL_AUTO )
+ {
+ mpFS->startElementNS(XML_a, XML_highlight);
+ WriteColor( color );
+ mpFS->endElementNS( XML_a, XML_highlight );
+ }
+ }
+ }
+
+ if (underline
+ && ((bCheckDirect
+ && GetPropertyAndState(rXPropSet, rXPropState, "CharUnderlineColor", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)
+ || GetProperty(rXPropSet, "CharUnderlineColor")))
+ {
+ ::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
+ // if color is automatic, then we shouldn't write information about color but to take color from character
+ if( color != COL_AUTO )
+ {
+ mpFS->startElementNS(XML_a, XML_uFill);
+ WriteSolidFill( color );
+ mpFS->endElementNS( XML_a, XML_uFill );
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_uFillTx);
+ }
+ }
+
+ if (GetProperty(rXPropSet, "CharFontName"))
+ {
+ const char* const pitch = nullptr;
+ const char* const charset = nullptr;
+ OUString usTypeface;
+
+ mAny >>= usTypeface;
+ OUString aSubstName( GetSubsFontName( usTypeface, SubsFontFlags::ONLYONE | SubsFontFlags::MS ) );
+ if (!aSubstName.isEmpty())
+ usTypeface = aSubstName;
+
+ mpFS->singleElementNS( XML_a, XML_latin,
+ XML_typeface, usTypeface,
+ XML_pitchFamily, pitch,
+ XML_charset, charset );
+ }
+
+ if ((bComplex
+ && (GetPropertyAndState(rXPropSet, rXPropState, "CharFontNameComplex", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE))
+ || (!bComplex
+ && (GetPropertyAndState(rXPropSet, rXPropState, "CharFontNameAsian", eState)
+ && eState == beans::PropertyState_DIRECT_VALUE)))
+ {
+ const char* const pitch = nullptr;
+ const char* const charset = nullptr;
+ OUString usTypeface;
+
+ mAny >>= usTypeface;
+ OUString aSubstName( GetSubsFontName( usTypeface, SubsFontFlags::ONLYONE | SubsFontFlags::MS ) );
+ if (!aSubstName.isEmpty())
+ usTypeface = aSubstName;
+
+ mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea,
+ XML_typeface, usTypeface,
+ XML_pitchFamily, pitch,
+ XML_charset, charset );
+ }
+
+ if( bIsField )
+ {
+ Reference< XTextField > rXTextField;
+ if (GetProperty(rXPropSet, "TextField"))
+ mAny >>= rXTextField;
+ if( rXTextField.is() )
+ rXPropSet.set( rXTextField, UNO_QUERY );
+ }
+
+ // field properties starts here
+ if (GetProperty(rXPropSet, "URL"))
+ {
+ OUString sURL;
+
+ mAny >>= sURL;
+ if (!sURL.isEmpty())
+ {
+ if (!sURL.match("#action?jump="))
+ {
+ bool bExtURL = URLTransformer().isExternalURL(sURL);
+ sURL = bExtURL ? sURL : lcl_GetTarget(GetFB()->getModel(), sURL);
+
+ OUString sRelId
+ = mpFB->addRelation(mpFS->getOutputStream(),
+ bExtURL ? oox::getRelationship(Relationship::HYPERLINK)
+ : oox::getRelationship(Relationship::SLIDE),
+ sURL, bExtURL);
+
+ if (bExtURL)
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ else
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId,
+ XML_action, "ppaction://hlinksldjump");
+ }
+ else
+ {
+ sal_Int32 nIndex = sURL.indexOf('=');
+ std::u16string_view aDestination(sURL.subView(nIndex + 1));
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), "", XML_action,
+ OUString::Concat("ppaction://hlinkshowjump?jump=") + aDestination);
+ }
+ }
+ }
+ mpFS->endElementNS( XML_a, nElement );
+}
+
+OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField )
+{
+ Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
+ OUString aFieldType, aFieldValue;
+
+ if (GetProperty(rXPropSet, "TextPortionType"))
+ {
+ aFieldType = *o3tl::doAccess<OUString>(mAny);
+ SAL_INFO("oox.shape", "field type: " << aFieldType);
+ }
+
+ if( aFieldType == "TextField" )
+ {
+ Reference< XTextField > rXTextField;
+ if (GetProperty(rXPropSet, "TextField"))
+ mAny >>= rXTextField;
+ if( rXTextField.is() )
+ {
+ rXPropSet.set( rXTextField, UNO_QUERY );
+ if( rXPropSet.is() )
+ {
+ OUString aFieldKind( rXTextField->getPresentation( true ) );
+ SAL_INFO("oox.shape", "field kind: " << aFieldKind);
+ if( aFieldKind == "Page" )
+ {
+ aFieldValue = "slidenum";
+ }
+ else if( aFieldKind == "Pages" )
+ {
+ aFieldValue = "slidecount";
+ }
+ else if( aFieldKind == "PageName" )
+ {
+ aFieldValue = "slidename";
+ }
+ else if( aFieldKind == "URL" )
+ {
+ bIsURLField = true;
+ if (GetProperty(rXPropSet, "Representation"))
+ mAny >>= aFieldValue;
+
+ }
+ else if(aFieldKind == "Date")
+ {
+ sal_Int32 nNumFmt = -1;
+ rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
+ aFieldValue = GetDatetimeTypeFromDate(static_cast<SvxDateFormat>(nNumFmt));
+ }
+ else if(aFieldKind == "ExtTime")
+ {
+ sal_Int32 nNumFmt = -1;
+ rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
+ aFieldValue = GetDatetimeTypeFromTime(static_cast<SvxTimeFormat>(nNumFmt));
+ }
+ else if(aFieldKind == "ExtFile")
+ {
+ sal_Int32 nNumFmt = -1;
+ rXPropSet->getPropertyValue(UNO_TC_PROP_FILE_FORMAT) >>= nNumFmt;
+ switch(nNumFmt)
+ {
+ case 0: aFieldValue = "file"; // Path/File name
+ break;
+ case 1: aFieldValue = "file1"; // Path
+ break;
+ case 2: aFieldValue = "file2"; // File name without extension
+ break;
+ case 3: aFieldValue = "file3"; // File name with extension
+ }
+ }
+ else if(aFieldKind == "Author")
+ {
+ aFieldValue = "author";
+ }
+ }
+ }
+ }
+ return aFieldValue;
+}
+
+OUString DrawingML::GetDatetimeTypeFromDate(SvxDateFormat eDate)
+{
+ return GetDatetimeTypeFromDateTime(eDate, SvxTimeFormat::AppDefault);
+}
+
+OUString DrawingML::GetDatetimeTypeFromTime(SvxTimeFormat eTime)
+{
+ return GetDatetimeTypeFromDateTime(SvxDateFormat::AppDefault, eTime);
+}
+
+OUString DrawingML::GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeFormat eTime)
+{
+ OUString aDateField;
+ switch (eDate)
+ {
+ case SvxDateFormat::StdSmall:
+ case SvxDateFormat::A:
+ aDateField = "datetime";
+ break;
+ case SvxDateFormat::B:
+ aDateField = "datetime1"; // 13/02/1996
+ break;
+ case SvxDateFormat::C:
+ aDateField = "datetime5";
+ break;
+ case SvxDateFormat::D:
+ aDateField = "datetime3"; // 13 February 1996
+ break;
+ case SvxDateFormat::StdBig:
+ case SvxDateFormat::E:
+ case SvxDateFormat::F:
+ aDateField = "datetime2";
+ break;
+ default:
+ break;
+ }
+
+ OUString aTimeField;
+ switch (eTime)
+ {
+ case SvxTimeFormat::Standard:
+ case SvxTimeFormat::HH24_MM_SS:
+ case SvxTimeFormat::HH24_MM_SS_00:
+ aTimeField = "datetime11"; // 13:49:38
+ break;
+ case SvxTimeFormat::HH24_MM:
+ aTimeField = "datetime10"; // 13:49
+ break;
+ case SvxTimeFormat::HH12_MM:
+ case SvxTimeFormat::HH12_MM_AMPM:
+ aTimeField = "datetime12"; // 01:49 PM
+ break;
+ case SvxTimeFormat::HH12_MM_SS:
+ case SvxTimeFormat::HH12_MM_SS_AMPM:
+ case SvxTimeFormat::HH12_MM_SS_00:
+ case SvxTimeFormat::HH12_MM_SS_00_AMPM:
+ aTimeField = "datetime13"; // 01:49:38 PM
+ break;
+ default:
+ break;
+ }
+
+ if (!aDateField.isEmpty() && aTimeField.isEmpty())
+ return aDateField;
+ else if (!aTimeField.isEmpty() && aDateField.isEmpty())
+ return aTimeField;
+ else if (!aDateField.isEmpty() && !aTimeField.isEmpty())
+ {
+ if (aTimeField == "datetime11" || aTimeField == "datetime13")
+ // only datetime format that has Date and HH:MM:SS
+ return "datetime9"; // dd/mm/yyyy H:MM:SS
+ else
+ // only datetime format that has Date and HH:MM
+ return "datetime8"; // dd/mm/yyyy H:MM
+ }
+ else
+ return "";
+}
+
+void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet)
+{
+ Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
+ sal_Int16 nLevel = -1;
+ if (GetProperty(rXPropSet, "NumberingLevel"))
+ mAny >>= nLevel;
+
+ bool bNumberingIsNumber = true;
+ if (GetProperty(rXPropSet, "NumberingIsNumber"))
+ mAny >>= bNumberingIsNumber;
+
+ float nFontSize = -1;
+ if (GetProperty(rXPropSet, "CharHeight"))
+ mAny >>= nFontSize;
+
+ bool bIsURLField = false;
+ OUString sFieldValue = GetFieldValue( rRun, bIsURLField );
+ bool bWriteField = !( sFieldValue.isEmpty() || bIsURLField );
+
+ OUString sText = rRun->getString();
+
+ //if there is no text following the bullet, add a space after the bullet
+ if (nLevel !=-1 && bNumberingIsNumber && sText.isEmpty() )
+ sText=" ";
+
+ if ( bIsURLField )
+ sText = sFieldValue;
+
+ if( sText.isEmpty())
+ {
+ Reference< XPropertySet > xPropSet( rRun, UNO_QUERY );
+
+ try
+ {
+ if( !xPropSet.is() || !( xPropSet->getPropertyValue( "PlaceholderText" ) >>= sText ) )
+ return;
+ if( sText.isEmpty() )
+ return;
+ }
+ catch (const Exception &)
+ {
+ return;
+ }
+ }
+
+ if (sText == "\n")
+ {
+ // Empty run? Do not forget to write the font size in case of pptx:
+ if ((GetDocumentType() == DOCUMENT_PPTX) && (nFontSize != -1))
+ {
+ mpFS->startElementNS(XML_a, XML_br);
+ mpFS->singleElementNS(XML_a, XML_rPr, XML_sz,
+ OString::number(nFontSize * 100).getStr());
+ mpFS->endElementNS(XML_a, XML_br);
+ }
+ else
+ mpFS->singleElementNS(XML_a, XML_br);
+ }
+ else
+ {
+ if( bWriteField )
+ {
+ OString sUUID(comphelper::xml::generateGUIDString());
+ mpFS->startElementNS( XML_a, XML_fld,
+ XML_id, sUUID.getStr(),
+ XML_type, sFieldValue );
+ }
+ else
+ {
+ mpFS->startElementNS(XML_a, XML_r);
+ }
+
+ Reference< XPropertySet > xPropSet( rRun, uno::UNO_QUERY );
+
+ WriteRunProperties( xPropSet, bIsURLField, XML_rPr, true, rbOverridingCharHeight, rnCharHeight, GetScriptType(sText), rXShapePropSet);
+ mpFS->startElementNS(XML_a, XML_t);
+ mpFS->writeEscaped( sText );
+ mpFS->endElementNS( XML_a, XML_t );
+
+ if( bWriteField )
+ mpFS->endElementNS( XML_a, XML_fld );
+ else
+ mpFS->endElementNS( XML_a, XML_r );
+ }
+}
+
+static OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBehind, bool bPBoth)
+{
+ OUString sPrefixSuffix;
+
+ if (bPBoth)
+ sPrefixSuffix = "ParenBoth";
+ else if (bPBehind)
+ sPrefixSuffix = "ParenR";
+ else if (bSDot)
+ sPrefixSuffix = "Period";
+
+ switch( nNumberingType )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER_N :
+ case SVX_NUM_CHARS_UPPER_LETTER :
+ return "alphaUc" + sPrefixSuffix;
+
+ case SVX_NUM_CHARS_LOWER_LETTER_N :
+ case SVX_NUM_CHARS_LOWER_LETTER :
+ return "alphaLc" + sPrefixSuffix;
+
+ case SVX_NUM_ROMAN_UPPER :
+ return "romanUc" + sPrefixSuffix;
+
+ case SVX_NUM_ROMAN_LOWER :
+ return "romanLc" + sPrefixSuffix;
+
+ case SVX_NUM_ARABIC :
+ {
+ if (sPrefixSuffix.isEmpty())
+ return "arabicPlain";
+ else
+ return "arabic" + sPrefixSuffix;
+ }
+ default:
+ break;
+ }
+
+ return OUString();
+}
+
+void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropSet, float fFirstCharHeight, sal_Int16 nLevel )
+{
+ if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules"))
+ return;
+
+ Reference< XIndexAccess > rXIndexAccess;
+
+ if (!(mAny >>= rXIndexAccess) || nLevel >= rXIndexAccess->getCount())
+ return;
+
+ SAL_INFO("oox.shape", "numbering rules");
+
+ Sequence<PropertyValue> aPropertySequence;
+ rXIndexAccess->getByIndex(nLevel) >>= aPropertySequence;
+
+ if (!aPropertySequence.hasElements())
+ return;
+
+ SvxNumType nNumberingType = SVX_NUM_NUMBER_NONE;
+ bool bSDot = false;
+ bool bPBehind = false;
+ bool bPBoth = false;
+ sal_Unicode aBulletChar = 0x2022; // a bullet
+ awt::FontDescriptor aFontDesc;
+ bool bHasFontDesc = false;
+ uno::Reference<graphic::XGraphic> xGraphic;
+ sal_Int16 nBulletRelSize = 0;
+ sal_Int16 nStartWith = 1;
+ ::Color nBulletColor;
+ bool bHasBulletColor = false;
+ awt::Size aGraphicSize;
+
+ for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) )
+ {
+ OUString aPropName( rPropValue.Name );
+ SAL_INFO("oox.shape", "pro name: " << aPropName);
+ if ( aPropName == "NumberingType" )
+ {
+ nNumberingType = static_cast<SvxNumType>(*o3tl::doAccess<sal_Int16>(rPropValue.Value));
+ }
+ else if ( aPropName == "Prefix" )
+ {
+ if( *o3tl::doAccess<OUString>(rPropValue.Value) == ")")
+ bPBoth = true;
+ }
+ else if ( aPropName == "Suffix" )
+ {
+ auto s = o3tl::doAccess<OUString>(rPropValue.Value);
+ if( *s == ".")
+ bSDot = true;
+ else if( *s == ")")
+ bPBehind = true;
+ }
+ else if(aPropName == "BulletColor")
+ {
+ nBulletColor = ::Color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(rPropValue.Value));
+ bHasBulletColor = true;
+ }
+ else if ( aPropName == "BulletChar" )
+ {
+ aBulletChar = (*o3tl::doAccess<OUString>(rPropValue.Value))[ 0 ];
+ }
+ else if ( aPropName == "BulletFont" )
+ {
+ aFontDesc = *o3tl::doAccess<awt::FontDescriptor>(rPropValue.Value);
+ bHasFontDesc = true;
+
+ // Our numbullet dialog has set the wrong textencoding for our "StarSymbol" font,
+ // instead of a Unicode encoding the encoding RTL_TEXTENCODING_SYMBOL was used.
+ // Because there might exist a lot of damaged documents I added this two lines
+ // which fixes the bullet problem for the export.
+ if ( aFontDesc.Name.equalsIgnoreAsciiCase("StarSymbol") )
+ aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252;
+
+ }
+ else if ( aPropName == "BulletRelSize" )
+ {
+ nBulletRelSize = *o3tl::doAccess<sal_Int16>(rPropValue.Value);
+ }
+ else if ( aPropName == "StartWith" )
+ {
+ nStartWith = *o3tl::doAccess<sal_Int16>(rPropValue.Value);
+ }
+ else if (aPropName == "GraphicBitmap")
+ {
+ auto xBitmap = rPropValue.Value.get<uno::Reference<awt::XBitmap>>();
+ xGraphic.set(xBitmap, uno::UNO_QUERY);
+ }
+ else if ( aPropName == "GraphicSize" )
+ {
+ aGraphicSize = *o3tl::doAccess<awt::Size>(rPropValue.Value);
+ SAL_INFO("oox.shape", "graphic size: " << aGraphicSize.Width << "x" << aGraphicSize.Height);
+ }
+ }
+
+ if (nNumberingType == SVX_NUM_NUMBER_NONE)
+ return;
+
+ Graphic aGraphic(xGraphic);
+ if (xGraphic.is() && aGraphic.GetType() != GraphicType::NONE)
+ {
+ tools::Long nFirstCharHeightMm = TransformMetric(fFirstCharHeight * 100.f, FieldUnit::POINT, FieldUnit::MM);
+ float fBulletSizeRel = aGraphicSize.Height / static_cast<float>(nFirstCharHeightMm) / OOX_BULLET_LIST_SCALE_FACTOR;
+
+ OUString sRelationId;
+
+ if (fBulletSizeRel < 1.0f)
+ {
+ // Add padding to get the bullet point centered in PPT
+ Size aDestSize(64, 64);
+ float fBulletSizeRelX = fBulletSizeRel / aGraphicSize.Height * aGraphicSize.Width;
+ tools::Long nPaddingX = std::max<tools::Long>(0, std::lround((aDestSize.Width() - fBulletSizeRelX * aDestSize.Width()) / 2.f));
+ tools::Long nPaddingY = std::lround((aDestSize.Height() - fBulletSizeRel * aDestSize.Height()) / 2.f);
+ tools::Rectangle aDestRect(nPaddingX, nPaddingY, aDestSize.Width() - nPaddingX, aDestSize.Height() - nPaddingY);
+
+ AlphaMask aMask(aDestSize);
+ aMask.Erase(255);
+ BitmapEx aSourceBitmap(aGraphic.GetBitmapEx());
+ aSourceBitmap.Scale(aDestRect.GetSize());
+ tools::Rectangle aSourceRect(Point(0, 0), aDestRect.GetSize());
+ BitmapEx aDestBitmap(Bitmap(aDestSize, vcl::PixelFormat::N24_BPP), aMask);
+ aDestBitmap.CopyPixel(aDestRect, aSourceRect, &aSourceBitmap);
+ Graphic aDestGraphic(aDestBitmap);
+ sRelationId = WriteImage(aDestGraphic);
+ fBulletSizeRel = 1.0f;
+ }
+ else
+ {
+ sRelationId = WriteImage(aGraphic);
+ }
+
+ mpFS->singleElementNS( XML_a, XML_buSzPct,
+ XML_val, OString::number(std::min<sal_Int32>(std::lround(100000.f * fBulletSizeRel), 400000)));
+ mpFS->startElementNS(XML_a, XML_buBlip);
+ mpFS->singleElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelationId);
+ mpFS->endElementNS( XML_a, XML_buBlip );
+ }
+ else
+ {
+ if(bHasBulletColor)
+ {
+ if (nBulletColor == COL_AUTO )
+ {
+ nBulletColor = ::Color(ColorTransparency, mbIsBackgroundDark ? 0xffffff : 0x000000);
+ }
+ mpFS->startElementNS(XML_a, XML_buClr);
+ WriteColor( nBulletColor );
+ mpFS->endElementNS( XML_a, XML_buClr );
+ }
+
+ if( nBulletRelSize && nBulletRelSize != 100 )
+ mpFS->singleElementNS( XML_a, XML_buSzPct,
+ XML_val, OString::number(std::clamp<sal_Int32>(1000*nBulletRelSize, 25000, 400000)));
+ if( bHasFontDesc )
+ {
+ if ( SVX_NUM_CHAR_SPECIAL == nNumberingType )
+ aBulletChar = SubstituteBullet( aBulletChar, aFontDesc );
+ mpFS->singleElementNS( XML_a, XML_buFont,
+ XML_typeface, aFontDesc.Name,
+ XML_charset, sax_fastparser::UseIf("2", aFontDesc.CharSet == awt::CharSet::SYMBOL));
+ }
+
+ OUString aAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth );
+
+ if (!aAutoNumType.isEmpty())
+ {
+ mpFS->singleElementNS(XML_a, XML_buAutoNum,
+ XML_type, aAutoNumType,
+ XML_startAt, sax_fastparser::UseIf(OString::number(nStartWith), nStartWith > 1));
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_buChar, XML_char, OUString(aBulletChar));
+ }
+ }
+}
+
+void DrawingML::WriteParagraphTabStops(const Reference<XPropertySet>& rXPropSet)
+{
+ css::uno::Sequence<css::style::TabStop> aTabStops;
+ if (GetProperty(rXPropSet, "ParaTabStops"))
+ aTabStops = *o3tl::doAccess<css::uno::Sequence<css::style::TabStop>>(mAny);
+
+ if (aTabStops.getLength() > 0)
+ mpFS->startElementNS(XML_a, XML_tabLst);
+
+ for (const css::style::TabStop& rTabStop : std::as_const(aTabStops))
+ {
+ OString sPosition = OString::number(GetPointFromCoordinate(rTabStop.Position));
+ OString sAlignment;
+ switch (rTabStop.Alignment)
+ {
+ case css::style::TabAlign_DECIMAL:
+ sAlignment = "dec";
+ break;
+ case css::style::TabAlign_RIGHT:
+ sAlignment = "r";
+ break;
+ case css::style::TabAlign_CENTER:
+ sAlignment = "ctr";
+ break;
+ case css::style::TabAlign_LEFT:
+ default:
+ sAlignment = "l";
+ }
+ mpFS->singleElementNS(XML_a, XML_tab, XML_algn, sAlignment, XML_pos, sPosition);
+ }
+ if (aTabStops.getLength() > 0)
+ mpFS->endElementNS(XML_a, XML_tabLst);
+}
+
+bool DrawingML::IsGroupShape( const Reference< XShape >& rXShape )
+{
+ bool bRet = false;
+ if ( rXShape.is() )
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(rXShape, uno::UNO_QUERY_THROW);
+ bRet = xServiceInfo->supportsService("com.sun.star.drawing.GroupShape");
+ }
+ return bRet;
+}
+
+sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName)
+{
+ if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules"))
+ return 0;
+
+ Reference< XIndexAccess > rXIndexAccess;
+
+ if (!(mAny >>= rXIndexAccess) || nLevel >= rXIndexAccess->getCount())
+ return 0;
+
+ SAL_INFO("oox.shape", "numbering rules");
+
+ Sequence<PropertyValue> aPropertySequence;
+ rXIndexAccess->getByIndex(nLevel) >>= aPropertySequence;
+
+ if (!aPropertySequence.hasElements())
+ return 0;
+
+ for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) )
+ {
+ OUString aPropName( rPropValue.Name );
+ SAL_INFO("oox.shape", "pro name: " << aPropName);
+ if ( aPropName == propName )
+ return *o3tl::doAccess<sal_Int32>(rPropValue.Value);
+ }
+
+ return 0;
+}
+
+const char* DrawingML::GetAlignment( style::ParagraphAdjust nAlignment )
+{
+ const char* sAlignment = nullptr;
+
+ switch( nAlignment )
+ {
+ case style::ParagraphAdjust_CENTER:
+ sAlignment = "ctr";
+ break;
+ case style::ParagraphAdjust_RIGHT:
+ sAlignment = "r";
+ break;
+ case style::ParagraphAdjust_BLOCK:
+ sAlignment = "just";
+ break;
+ default:
+ ;
+ }
+
+ return sAlignment;
+}
+
+void DrawingML::WriteLinespacing(const LineSpacing& rSpacing, float fFirstCharHeight)
+{
+ if( rSpacing.Mode == LineSpacingMode::PROP )
+ {
+ mpFS->singleElementNS( XML_a, XML_spcPct,
+ XML_val, OString::number(static_cast<sal_Int32>(rSpacing.Height)*1000));
+ }
+ else if (rSpacing.Mode == LineSpacingMode::MINIMUM
+ && fFirstCharHeight > static_cast<float>(rSpacing.Height) * 0.001 * 72.0 / 2.54)
+ {
+ // 100% proportional line spacing = single line spacing
+ mpFS->singleElementNS(XML_a, XML_spcPct, XML_val,
+ OString::number(static_cast<sal_Int32>(100000)));
+ }
+ else
+ {
+ mpFS->singleElementNS( XML_a, XML_spcPts,
+ XML_val, OString::number(std::lround(rSpacing.Height / 25.4 * 72)));
+ }
+}
+
+bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagraph, const Reference<XPropertySet>& rXShapePropSet, float fFirstCharHeight, sal_Int32 nElement)
+{
+ Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
+ Reference< XPropertyState > rXPropState( rParagraph, UNO_QUERY );
+ PropertyState eState;
+
+ if( !rXPropSet.is() || !rXPropState.is() )
+ return false;
+
+ sal_Int16 nLevel = -1;
+ if (GetProperty(rXPropSet, "NumberingLevel"))
+ mAny >>= nLevel;
+
+ bool bWriteNumbering = true;
+ bool bForceZeroIndent = false;
+ if (mbPlaceholder)
+ {
+ Reference< text::XTextRange > xParaText(rParagraph, UNO_QUERY);
+ if (xParaText)
+ {
+ bool bNumberingOnThisLevel = false;
+ if (nLevel > -1)
+ {
+ Reference< XIndexAccess > xNumberingRules(rXPropSet->getPropertyValue("NumberingRules"), UNO_QUERY);
+ const PropertyValues& rNumRuleOfLevel = xNumberingRules->getByIndex(nLevel).get<PropertyValues>();
+ for (const PropertyValue& rRule : rNumRuleOfLevel)
+ if (rRule.Name == "NumberingType" && rRule.Value.hasValue())
+ bNumberingOnThisLevel = rRule.Value.get<sal_uInt16>() != style::NumberingType::NUMBER_NONE;
+ }
+
+ const bool bIsNumberingVisible = rXPropSet->getPropertyValue("NumberingIsNumber").get<bool>();
+ const bool bIsLineEmpty = !xParaText->getString().getLength();
+
+ bWriteNumbering = !bIsLineEmpty && bIsNumberingVisible && (nLevel != -1);
+ bForceZeroIndent = (!bIsNumberingVisible || bIsLineEmpty || !bNumberingOnThisLevel);
+ }
+
+ }
+
+ sal_Int16 nTmp = sal_Int16(style::ParagraphAdjust_LEFT);
+ if (GetProperty(rXPropSet, "ParaAdjust"))
+ mAny >>= nTmp;
+ style::ParagraphAdjust nAlignment = static_cast<style::ParagraphAdjust>(nTmp);
+
+ bool bHasLinespacing = false;
+ LineSpacing aLineSpacing;
+ if (GetPropertyAndState(rXPropSet, rXPropState, "ParaLineSpacing", eState)
+ && (mAny >>= aLineSpacing)
+ && (eState == beans::PropertyState_DIRECT_VALUE ||
+ // only export if it differs from the default 100% line spacing
+ aLineSpacing.Mode != LineSpacingMode::PROP || aLineSpacing.Height != 100))
+ bHasLinespacing = true;
+
+ bool bRtl = false;
+ if (GetProperty(rXPropSet, "WritingMode"))
+ {
+ sal_Int16 nWritingMode;
+ if( ( mAny >>= nWritingMode ) && nWritingMode == text::WritingMode2::RL_TB )
+ {
+ bRtl = true;
+ }
+ }
+
+ sal_Int32 nParaLeftMargin = 0;
+ sal_Int32 nParaFirstLineIndent = 0;
+
+ if (GetProperty(rXPropSet, "ParaLeftMargin"))
+ mAny >>= nParaLeftMargin;
+ if (GetProperty(rXPropSet, "ParaFirstLineIndent"))
+ mAny >>= nParaFirstLineIndent;
+
+ sal_Int32 nParaTopMargin = 0;
+ sal_Int32 nParaBottomMargin = 0;
+
+ if (GetProperty(rXPropSet, "ParaTopMargin"))
+ mAny >>= nParaTopMargin;
+ if (GetProperty(rXPropSet, "ParaBottomMargin"))
+ mAny >>= nParaBottomMargin;
+
+ sal_Int32 nLeftMargin = getBulletMarginIndentation ( rXPropSet, nLevel,u"LeftMargin");
+ sal_Int32 nLineIndentation = getBulletMarginIndentation ( rXPropSet, nLevel,u"FirstLineOffset");
+
+ if (bWriteNumbering && !bForceZeroIndent)
+ {
+ if (!(nLevel != -1
+ || nAlignment != style::ParagraphAdjust_LEFT
+ || bHasLinespacing))
+ return false;
+ }
+
+ // for autofitted textboxes, scale the indents
+ if (GetProperty(rXShapePropSet, "TextFitToSize") && mAny.get<TextFitToSizeType>() == TextFitToSizeType_AUTOFIT)
+ {
+ SvxShapeText* pTextShape = dynamic_cast<SvxShapeText*>(rXShapePropSet.get());
+ if (pTextShape)
+ {
+ SdrTextObj* pTextObject = dynamic_cast<SdrTextObj*>(pTextShape->GetSdrObject());
+ if (pTextObject)
+ {
+ const auto nFontScaleY = pTextObject->GetFontScaleY();
+ nLeftMargin = nLeftMargin * nFontScaleY / 100;
+ nLineIndentation = nLineIndentation * nFontScaleY / 100;
+ nParaLeftMargin = nParaLeftMargin * nFontScaleY / 100;
+ nParaFirstLineIndent = nParaFirstLineIndent * nFontScaleY / 100;
+ }
+ }
+ }
+
+ if (nParaLeftMargin) // For Paragraph
+ mpFS->startElementNS( XML_a, nElement,
+ XML_lvl, sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0),
+ XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)), nParaLeftMargin > 0),
+ XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nParaFirstLineIndent) : 0), (bForceZeroIndent || (nParaFirstLineIndent != 0))),
+ XML_algn, GetAlignment( nAlignment ),
+ XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl));
+ else
+ mpFS->startElementNS( XML_a, nElement,
+ XML_lvl, sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0),
+ XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)), nLeftMargin > 0),
+ XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nLineIndentation) : 0), (bForceZeroIndent || ( nLineIndentation != 0))),
+ XML_algn, GetAlignment( nAlignment ),
+ XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl));
+
+
+ if( bHasLinespacing )
+ {
+ mpFS->startElementNS(XML_a, XML_lnSpc);
+ WriteLinespacing(aLineSpacing, fFirstCharHeight);
+ mpFS->endElementNS( XML_a, XML_lnSpc );
+ }
+
+ if( nParaTopMargin != 0 )
+ {
+ mpFS->startElementNS(XML_a, XML_spcBef);
+ {
+ mpFS->singleElementNS( XML_a, XML_spcPts,
+ XML_val, OString::number(std::lround(nParaTopMargin / 25.4 * 72)));
+ }
+ mpFS->endElementNS( XML_a, XML_spcBef );
+ }
+
+ if( nParaBottomMargin != 0 )
+ {
+ mpFS->startElementNS(XML_a, XML_spcAft);
+ {
+ mpFS->singleElementNS( XML_a, XML_spcPts,
+ XML_val, OString::number(std::lround(nParaBottomMargin / 25.4 * 72)));
+ }
+ mpFS->endElementNS( XML_a, XML_spcAft );
+ }
+
+ if (!bWriteNumbering)
+ mpFS->singleElementNS(XML_a, XML_buNone);
+ else
+ WriteParagraphNumbering( rXPropSet, fFirstCharHeight, nLevel );
+
+ WriteParagraphTabStops( rXPropSet );
+
+ // do not end element for lstStyles since, defRPr should be stacked inside it
+ if( nElement != XML_lvl1pPr )
+ mpFS->endElementNS( XML_a, nElement );
+
+ return true;
+}
+
+void DrawingML::WriteLstStyles(const css::uno::Reference<css::text::XTextContent>& rParagraph,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ const css::uno::Reference<css::beans::XPropertySet>& rXShapePropSet)
+{
+ Reference<XEnumerationAccess> xAccess(rParagraph, UNO_QUERY);
+ if (!xAccess.is())
+ return;
+
+ Reference<XEnumeration> xEnumeration(xAccess->createEnumeration());
+ if (!xEnumeration.is())
+ return;
+
+
+ Reference<XTextRange> rRun;
+
+ if (!xEnumeration->hasMoreElements())
+ return;
+
+ Any aAny(xEnumeration->nextElement());
+ if (aAny >>= rRun)
+ {
+ float fFirstCharHeight = rnCharHeight / 1000.;
+ Reference<XPropertySet> xFirstRunPropSet(rRun, UNO_QUERY);
+ Reference<XPropertySetInfo> xFirstRunPropSetInfo
+ = xFirstRunPropSet->getPropertySetInfo();
+
+ if (xFirstRunPropSetInfo->hasPropertyByName("CharHeight"))
+ fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+
+ mpFS->startElementNS(XML_a, XML_lstStyle);
+ if( !WriteParagraphProperties(rParagraph, rXShapePropSet, fFirstCharHeight, XML_lvl1pPr) )
+ mpFS->startElementNS(XML_a, XML_lvl1pPr);
+ WriteRunProperties(xFirstRunPropSet, false, XML_defRPr, true, rbOverridingCharHeight,
+ rnCharHeight, GetScriptType(rRun->getString()), rXShapePropSet);
+ mpFS->endElementNS(XML_a, XML_lvl1pPr);
+ mpFS->endElementNS(XML_a, XML_lstStyle);
+ }
+}
+
+void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet)
+{
+ Reference< XEnumerationAccess > access( rParagraph, UNO_QUERY );
+ if( !access.is() )
+ return;
+
+ Reference< XEnumeration > enumeration( access->createEnumeration() );
+ if( !enumeration.is() )
+ return;
+
+ mpFS->startElementNS(XML_a, XML_p);
+
+ bool bPropertiesWritten = false;
+ while( enumeration->hasMoreElements() )
+ {
+ Reference< XTextRange > run;
+ Any any ( enumeration->nextElement() );
+
+ if (any >>= run)
+ {
+ if( !bPropertiesWritten )
+ {
+ float fFirstCharHeight = rnCharHeight / 1000.;
+ Reference< XPropertySet > xFirstRunPropSet (run, UNO_QUERY);
+ Reference< XPropertySetInfo > xFirstRunPropSetInfo = xFirstRunPropSet->getPropertySetInfo();
+ if( xFirstRunPropSetInfo->hasPropertyByName("CharHeight") )
+ {
+ fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+ rnCharHeight = 100 * fFirstCharHeight;
+ rbOverridingCharHeight = true;
+ }
+ WriteParagraphProperties(rParagraph, rXShapePropSet, fFirstCharHeight, XML_pPr);
+ bPropertiesWritten = true;
+ }
+ WriteRun( run, rbOverridingCharHeight, rnCharHeight, rXShapePropSet);
+ }
+ }
+ Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
+ sal_Int16 nDummy = -1;
+ WriteRunProperties(rXPropSet, false, XML_endParaRPr, false, rbOverridingCharHeight,
+ rnCharHeight, nDummy, rXShapePropSet);
+
+ mpFS->endElementNS( XML_a, XML_p );
+}
+
+bool DrawingML::IsFontworkShape(const css::uno::Reference<css::beans::XPropertySet>& rXShapePropSet)
+{
+ bool bResult(false);
+ if (rXShapePropSet.is())
+ {
+ Sequence<PropertyValue> aCustomShapeGeometryProps;
+ if (GetProperty(rXShapePropSet, "CustomShapeGeometry"))
+ {
+ mAny >>= aCustomShapeGeometryProps;
+ uno::Sequence<beans::PropertyValue> aTextPathSeq;
+ for (const auto& rProp : std::as_const(aCustomShapeGeometryProps))
+ {
+ if (rProp.Name == "TextPath")
+ {
+ rProp.Value >>= aTextPathSeq;
+ for (const auto& rTextPathItem : std::as_const(aTextPathSeq))
+ {
+ if (rTextPathItem.Name == "TextPath")
+ {
+ rTextPathItem.Value >>= bResult;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ return bResult;
+}
+
+void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bool bText,
+ sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles)
+{
+ // ToDo: Fontwork in DOCX
+ uno::Reference<XText> xXText(rXIface, UNO_QUERY);
+ if( !xXText.is() )
+ return;
+
+ uno::Reference<drawing::XShape> xShape(rXIface, UNO_QUERY);
+ uno::Reference<XPropertySet> rXPropSet(rXIface, UNO_QUERY);
+
+ sal_Int32 nTextPreRotateAngle = 0;
+ double nTextRotateAngle = 0;
+
+ constexpr const sal_Int32 constDefaultLeftRightInset = 254;
+ constexpr const sal_Int32 constDefaultTopBottomInset = 127;
+ sal_Int32 nLeft = constDefaultLeftRightInset;
+ sal_Int32 nRight = constDefaultLeftRightInset;
+ sal_Int32 nTop = constDefaultTopBottomInset;
+ sal_Int32 nBottom = constDefaultTopBottomInset;
+
+ // top inset looks a bit different compared to ppt export
+ // check if something related doesn't work as expected
+ if (GetProperty(rXPropSet, "TextLeftDistance"))
+ mAny >>= nLeft;
+ if (GetProperty(rXPropSet, "TextRightDistance"))
+ mAny >>= nRight;
+ if (GetProperty(rXPropSet, "TextUpperDistance"))
+ mAny >>= nTop;
+ if (GetProperty(rXPropSet, "TextLowerDistance"))
+ mAny >>= nBottom;
+
+ // Transform the text distance values so they are compatible with OOXML insets
+ if (xShape.is())
+ {
+ sal_Int32 nTextHeight = xShape->getSize().Height; // Hmm, default
+
+ // CustomShape can have text area different from shape rectangle
+ auto* pCustomShape
+ = dynamic_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape));
+ if (pCustomShape)
+ {
+ const EnhancedCustomShape2d aCustomShape2d(*pCustomShape);
+ nTextHeight = aCustomShape2d.GetTextRect().getHeight();
+ if (DOCUMENT_DOCX == meDocumentType)
+ nTextHeight = convertTwipToMm100(nTextHeight);
+ }
+
+ if (nTop + nBottom >= nTextHeight)
+ {
+ // Effective bottom would be above effective top of text area. LO normalizes the
+ // effective text area in such case implicitely for rendering. MS needs indents so that
+ // the result is the normalized effective text area.
+ std::swap(nTop, nBottom);
+ nTop = nTextHeight - nTop;
+ nBottom = nTextHeight - nBottom;
+ }
+ }
+
+ TextVerticalAdjust eVerticalAlignment( TextVerticalAdjust_TOP );
+ const char* sVerticalAlignment = nullptr;
+ if (GetProperty(rXPropSet, "TextVerticalAdjust"))
+ mAny >>= eVerticalAlignment;
+ sVerticalAlignment = GetTextVerticalAdjust(eVerticalAlignment);
+
+ const char* sWritingMode = nullptr;
+ bool bVertical = false;
+ if (GetProperty(rXPropSet, "TextWritingMode"))
+ {
+ WritingMode eMode;
+
+ if( ( mAny >>= eMode ) && eMode == WritingMode_TB_RL )
+ {
+ sWritingMode = "eaVert";
+ bVertical = true;
+ }
+ }
+
+ bool bIsFontworkShape(IsFontworkShape(rXPropSet));
+ Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq;
+ uno::Sequence<beans::PropertyValue> aTextPathSeq;
+ bool bScaleX(false);
+ OUString sShapeType("non-primitive");
+ // ToDo move to InteropGrabBag
+ OUString sMSWordPresetTextWarp;
+
+ if (GetProperty(rXPropSet, "CustomShapeGeometry"))
+ {
+ Sequence< PropertyValue > aProps;
+ if ( mAny >>= aProps )
+ {
+ for ( const auto& rProp : std::as_const(aProps) )
+ {
+ if ( rProp.Name == "TextPreRotateAngle" && ( rProp.Value >>= nTextPreRotateAngle ) )
+ {
+ if ( nTextPreRotateAngle == -90 )
+ {
+ sWritingMode = "vert";
+ bVertical = true;
+ }
+ else if ( nTextPreRotateAngle == -270 )
+ {
+ sWritingMode = "vert270";
+ bVertical = true;
+ }
+ }
+ else if (rProp.Name == "AdjustmentValues")
+ rProp.Value >>= aAdjustmentSeq;
+ else if( rProp.Name == "TextRotateAngle" )
+ rProp.Value >>= nTextRotateAngle;
+ else if (rProp.Name == "Type")
+ rProp.Value >>= sShapeType;
+ else if (rProp.Name == "TextPath")
+ {
+ rProp.Value >>= aTextPathSeq;
+ for (const auto& rTextPathItem : std::as_const(aTextPathSeq))
+ {
+ if (rTextPathItem.Name == "ScaleX")
+ rTextPathItem.Value >>= bScaleX;
+ }
+ }
+ else if (rProp.Name == "PresetTextWarp")
+ rProp.Value >>= sMSWordPresetTextWarp;
+ }
+ }
+ }
+ else
+ {
+ if (mpTextExport)
+ {
+ if (xShape)
+ {
+ auto xTextFrame = mpTextExport->GetUnoTextFrame(xShape);
+ if (xTextFrame)
+ {
+ uno::Reference<beans::XPropertySet> xPropSet(xTextFrame, uno::UNO_QUERY);
+ auto aAny = xPropSet->getPropertyValue("WritingMode");
+ sal_Int16 nWritingMode;
+ if (aAny >>= nWritingMode)
+ {
+ switch (nWritingMode)
+ {
+ case WritingMode2::TB_RL:
+ sWritingMode = "vert";
+ bVertical = true;
+ break;
+ case WritingMode2::BT_LR:
+ sWritingMode = "vert270";
+ bVertical = true;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ OUString sPresetWarp(PresetGeometryTypeNames::GetMsoName(sShapeType));
+ // ODF may have user defined TextPath, use "textPlain" as ersatz.
+ if (sPresetWarp.isEmpty())
+ sPresetWarp = bIsFontworkShape ? std::u16string_view(u"textPlain") : std::u16string_view(u"textNoShape");
+
+ bool bFromWordArt = !bScaleX
+ && ( sPresetWarp == "textArchDown" || sPresetWarp == "textArchUp"
+ || sPresetWarp == "textButton" || sPresetWarp == "textCircle");
+
+ TextHorizontalAdjust eHorizontalAlignment( TextHorizontalAdjust_CENTER );
+ bool bHorizontalCenter = false;
+ if (GetProperty(rXPropSet, "TextHorizontalAdjust"))
+ mAny >>= eHorizontalAlignment;
+ if( eHorizontalAlignment == TextHorizontalAdjust_CENTER )
+ bHorizontalCenter = true;
+ else if( bVertical && eHorizontalAlignment == TextHorizontalAdjust_LEFT )
+ sVerticalAlignment = "b";
+
+ bool bHasWrap = false;
+ bool bWrap = false;
+ // Only custom shapes obey the TextWordWrap option, normal text always wraps.
+ if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, "TextWordWrap"))
+ {
+ mAny >>= bWrap;
+ bHasWrap = true;
+ }
+
+ if (bBodyPr)
+ {
+ const char* pWrap = (bHasWrap && !bWrap) || bIsFontworkShape ? "none" : nullptr;
+ if (GetDocumentType() == DOCUMENT_DOCX)
+ {
+ // In case of DOCX, if we want to have the same effect as
+ // TextShape's automatic word wrapping, then we need to set
+ // wrapping to square.
+ uno::Reference<lang::XServiceInfo> xServiceInfo(rXIface, uno::UNO_QUERY);
+ if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.drawing.TextShape"))
+ pWrap = "square";
+ }
+
+ std::optional<OUString> sHorzOverflow;
+ std::optional<OUString> sVertOverflow;
+ sal_Int32 nShapeRotateAngle = rXPropSet->getPropertyValue("RotateAngle").get<sal_Int32>() / 300;
+ sal_Int16 nCols = 0;
+ sal_Int32 nColSpacing = -1;
+ if (GetProperty(rXPropSet, "TextColumns"))
+ {
+ if (css::uno::Reference<css::text::XTextColumns> xCols{ mAny, css::uno::UNO_QUERY })
+ {
+ nCols = xCols->getColumnCount();
+ if (css::uno::Reference<css::beans::XPropertySet> xProps{ mAny,
+ css::uno::UNO_QUERY })
+ {
+ if (GetProperty(xProps, "AutomaticDistance"))
+ mAny >>= nColSpacing;
+ }
+ }
+ }
+
+ std::optional<OString> isUpright;
+ if (GetProperty(rXPropSet, "InteropGrabBag"))
+ {
+ if (rXPropSet->getPropertySetInfo()->hasPropertyByName("InteropGrabBag"))
+ {
+ bool bUpright = false;
+ sal_Int32 nOldShapeRotation = 0;
+ sal_Int32 nOldTextRotation = 0;
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ rXPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ for (const auto& aProp : std::as_const(aGrabBag))
+ {
+ if (aProp.Name == "Upright")
+ {
+ aProp.Value >>= bUpright;
+ isUpright = OString(bUpright ? "1" : "0");
+ }
+ else if (aProp.Name == "horzOverflow")
+ {
+ OUString sValue;
+ aProp.Value >>= sValue;
+ sHorzOverflow = sValue;
+ }
+ else if (aProp.Name == "vertOverflow")
+ {
+ OUString sValue;
+ aProp.Value >>= sValue;
+ sVertOverflow = sValue;
+ }
+ }
+ if (bUpright)
+ {
+ for (const auto& aProp : std::as_const(aGrabBag))
+ {
+ if (aProp.Name == "nShapeRotationAtImport")
+ aProp.Value >>= nOldShapeRotation;
+ else if (aProp.Name == "nTextRotationAtImport")
+ aProp.Value >>= nOldTextRotation;
+ }
+ // So our shape with the textbox in it was not rotated.
+ // Keep upright and make the preRotateAngle 0, it is an attribute
+ // of textBodyPr and must be 0 when upright is true, otherwise
+ // bad rotation happens in MSO.
+ if (nShapeRotateAngle == nOldShapeRotation && nShapeRotateAngle == nOldTextRotation)
+ nTextPreRotateAngle = 0;
+ // So we rotated the shape, in this case lose upright and do
+ // as LO normally does.
+ else
+ isUpright.reset();
+ }
+ }
+ }
+
+ mpFS->startElementNS( (nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr,
+ XML_numCol, sax_fastparser::UseIf(OString::number(nCols), nCols > 0),
+ XML_spcCol, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nColSpacing)), nCols > 0 && nColSpacing >= 0),
+ XML_wrap, pWrap,
+ XML_horzOverflow, sHorzOverflow,
+ XML_vertOverflow, sVertOverflow,
+ XML_fromWordArt, sax_fastparser::UseIf("1", bFromWordArt),
+ XML_lIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeft)), nLeft != constDefaultLeftRightInset),
+ XML_rIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRight)), nRight != constDefaultLeftRightInset),
+ XML_tIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nTop)), nTop != constDefaultTopBottomInset),
+ XML_bIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nBottom)), nBottom != constDefaultTopBottomInset),
+ XML_anchor, sVerticalAlignment,
+ XML_anchorCtr, sax_fastparser::UseIf("1", bHorizontalCenter),
+ XML_vert, sWritingMode,
+ XML_upright, isUpright,
+ XML_rot, sax_fastparser::UseIf(oox::drawingml::calcRotationValue((nTextPreRotateAngle + nTextRotateAngle) * 100), (nTextPreRotateAngle + nTextRotateAngle) != 0));
+ if (bIsFontworkShape)
+ {
+ if (aAdjustmentSeq.hasElements())
+ {
+ mpFS->startElementNS(XML_a, XML_prstTxWarp, XML_prst, sPresetWarp);
+ mpFS->startElementNS(XML_a, XML_avLst);
+ bool bHasTwoHandles(
+ sPresetWarp == "textArchDownPour" || sPresetWarp == "textArchUpPour"
+ || sPresetWarp == "textButtonPour" || sPresetWarp == "textCirclePour"
+ || sPresetWarp == "textDoubleWave1" || sPresetWarp == "textWave1"
+ || sPresetWarp == "textWave2" || sPresetWarp == "textWave4");
+ for (sal_Int32 i = 0, nElems = aAdjustmentSeq.getLength(); i < nElems; ++i )
+ {
+ OString sName = "adj" + (bHasTwoHandles ? OString::number(i + 1) : OString());
+ double fValue(0.0);
+ if (aAdjustmentSeq[i].Value.getValueTypeClass() == TypeClass_DOUBLE)
+ aAdjustmentSeq[i].Value >>= fValue;
+ else
+ {
+ sal_Int32 nNumber(0);
+ aAdjustmentSeq[i].Value >>= nNumber;
+ fValue = static_cast<double>(nNumber);
+ }
+ // Convert from binary coordinate system with viewBox "0 0 21600 21600" and simple degree
+ // to DrawingML with coordinate range 0..100000 and angle in 1/60000 degree.
+ // Reverse to conversion in lcl_createPresetShape in drawingml/shape.cxx on import.
+ if (sPresetWarp == "textArchDown" || sPresetWarp == "textArchUp"
+ || sPresetWarp == "textButton" || sPresetWarp == "textCircle"
+ || ((i == 0)
+ && (sPresetWarp == "textArchDownPour" || sPresetWarp == "textArchUpPour"
+ || sPresetWarp == "textButtonPour" || sPresetWarp == "textCirclePour")))
+ {
+ fValue *= 60000.0;
+ if (fValue < 0)
+ fValue += 21600000;
+ }
+ else if ((i == 1)
+ && (sPresetWarp == "textDoubleWave1" || sPresetWarp == "textWave1"
+ || sPresetWarp == "textWave2" || sPresetWarp == "textWave4"))
+ {
+ fValue = fValue / 0.216 - 50000.0;
+ }
+ else if ((i == 1)
+ && (sPresetWarp == "textArchDownPour"
+ || sPresetWarp == "textArchUpPour"
+ || sPresetWarp == "textButtonPour"
+ || sPresetWarp == "textCirclePour"))
+ {
+ fValue /= 0.108;
+ }
+ else
+ {
+ fValue /= 0.216;
+ }
+ OString sFmla = "val " + OString::number(std::lround(fValue));
+ mpFS->singleElementNS(XML_a, XML_gd, XML_name, sName, XML_fmla, sFmla);
+ // There exists faulty Favorite shapes with one handle but two adjustment values.
+ if (!bHasTwoHandles)
+ break;
+ }
+ mpFS->endElementNS(XML_a, XML_avLst);
+ mpFS->endElementNS(XML_a, XML_prstTxWarp);
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, sPresetWarp);
+ }
+ }
+ else if (GetDocumentType() == DOCUMENT_DOCX)
+ {
+ // interim solution for fdo#80897, roundtrip DOCX > LO > DOCX
+ if (!sMSWordPresetTextWarp.isEmpty())
+ mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, sMSWordPresetTextWarp);
+ }
+
+ if (GetDocumentType() == DOCUMENT_DOCX || GetDocumentType() == DOCUMENT_XLSX)
+ {
+ // tdf#112312: only custom shapes obey the TextAutoGrowHeight option
+ bool bTextAutoGrowHeight = false;
+ auto pSdrObjCustomShape = xShape.is() ? dynamic_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape)) : nullptr;
+ if (pSdrObjCustomShape && GetProperty(rXPropSet, "TextAutoGrowHeight"))
+ {
+ mAny >>= bTextAutoGrowHeight;
+ }
+ mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
+ }
+ if (GetDocumentType() == DOCUMENT_PPTX)
+ {
+ TextFitToSizeType eFit = TextFitToSizeType_NONE;
+ if (GetProperty(rXPropSet, "TextFitToSize"))
+ mAny >>= eFit;
+
+ if (eFit == TextFitToSizeType_AUTOFIT)
+ {
+ const sal_Int32 MAX_SCALE_VAL = 100000;
+ sal_Int32 nFontScale = MAX_SCALE_VAL;
+ SvxShapeText* pTextShape = dynamic_cast<SvxShapeText*>(rXIface.get());
+ if (pTextShape)
+ {
+ SdrTextObj* pTextObject = dynamic_cast<SdrTextObj*>(pTextShape->GetSdrObject());
+ if (pTextObject)
+ nFontScale = pTextObject->GetFontScaleY() * 1000;
+ }
+
+ mpFS->singleElementNS(XML_a, XML_normAutofit, XML_fontScale,
+ sax_fastparser::UseIf(OString::number(nFontScale), nFontScale < MAX_SCALE_VAL && nFontScale > 0));
+ }
+ else
+ {
+ // tdf#127030: Only custom shapes obey the TextAutoGrowHeight option.
+ bool bTextAutoGrowHeight = false;
+ if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, "TextAutoGrowHeight"))
+ mAny >>= bTextAutoGrowHeight;
+ mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
+ }
+ }
+
+ Write3DEffects( rXPropSet, /*bIsText=*/true );
+
+ mpFS->endElementNS((nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr);
+ }
+
+ Reference< XEnumerationAccess > access( xXText, UNO_QUERY );
+ if( !access.is() || !bText )
+ return;
+
+ Reference< XEnumeration > enumeration( access->createEnumeration() );
+ if( !enumeration.is() )
+ return;
+
+ SdrObject* pSdrObject = xShape.is() ? SdrObject::getSdrObjectFromXShape(xShape) : nullptr;
+ const SdrTextObj* pTxtObj = dynamic_cast<SdrTextObj*>( pSdrObject );
+ if (pTxtObj && mpTextExport)
+ {
+ std::optional<OutlinerParaObject> pParaObj;
+
+ /*
+ #i13885#
+ When the object is actively being edited, that text is not set into
+ the objects normal text object, but lives in a separate object.
+ */
+ if (pTxtObj->IsTextEditActive())
+ {
+ pParaObj = pTxtObj->CreateEditOutlinerParaObject();
+ }
+ else if (pTxtObj->GetOutlinerParaObject())
+ pParaObj = *pTxtObj->GetOutlinerParaObject();
+
+ if (pParaObj)
+ {
+ // this is reached only in case some text is attached to the shape
+ mpTextExport->WriteOutliner(*pParaObj);
+ }
+ return;
+ }
+
+ bool bOverridingCharHeight = false;
+ sal_Int32 nCharHeight = -1;
+ bool bFirstParagraph = true;
+
+ // tdf#144092 For shapes without text: Export run properties (into
+ // endParaRPr) from the shape's propset instead of the paragraph's.
+ if(xXText->getString().isEmpty() && enumeration->hasMoreElements())
+ {
+ Any aAny (enumeration->nextElement());
+ Reference<XTextContent> xParagraph;
+ if( aAny >>= xParagraph )
+ {
+ mpFS->startElementNS(XML_a, XML_p);
+ WriteParagraphProperties(xParagraph, rXPropSet, nCharHeight, XML_pPr);
+ sal_Int16 nDummy = -1;
+ WriteRunProperties(rXPropSet, false, XML_endParaRPr, false,
+ bOverridingCharHeight, nCharHeight, nDummy, rXPropSet);
+ mpFS->endElementNS(XML_a, XML_p);
+ }
+ return;
+ }
+
+ while( enumeration->hasMoreElements() )
+ {
+ Reference< XTextContent > paragraph;
+ Any any ( enumeration->nextElement() );
+
+ if( any >>= paragraph)
+ {
+ if (bFirstParagraph && bWritePropertiesAsLstStyles)
+ WriteLstStyles(paragraph, bOverridingCharHeight, nCharHeight, rXPropSet);
+
+ WriteParagraph(paragraph, bOverridingCharHeight, nCharHeight, rXPropSet);
+ bFirstParagraph = false;
+ }
+ }
+}
+
+void DrawingML::WritePresetShape( const OString& pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList )
+{
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ if ( !rAvList.empty() )
+ {
+
+ mpFS->startElementNS(XML_a, XML_avLst);
+ for (auto const& elem : rAvList)
+ {
+ OString sName = "adj" + ( ( elem.first > 0 ) ? OString::number(elem.first) : OString() );
+ OString sFmla = "val " + OString::number( elem.second );
+
+ mpFS->singleElementNS(XML_a, XML_gd, XML_name, sName, XML_fmla, sFmla);
+ }
+ mpFS->endElementNS( XML_a, XML_avLst );
+ }
+ else
+ mpFS->singleElementNS(XML_a, XML_avLst);
+
+ mpFS->endElementNS( XML_a, XML_prstGeom );
+}
+
+void DrawingML::WritePresetShape( const OString& pShape )
+{
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ mpFS->endElementNS( XML_a, XML_prstGeom );
+}
+
+static std::map< OString, std::vector<OString> > lcl_getAdjNames()
+{
+ std::map< OString, std::vector<OString> > aRet;
+
+ OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-adj-names");
+ rtl::Bootstrap::expandMacros(aPath);
+ SvFileStream aStream(aPath, StreamMode::READ);
+ if (aStream.GetError() != ERRCODE_NONE)
+ SAL_WARN("oox.shape", "failed to open oox-drawingml-adj-names");
+ OStringBuffer aLine;
+ bool bNotDone = aStream.ReadLine(aLine);
+ while (bNotDone)
+ {
+ sal_Int32 nIndex = 0;
+ // Each line is in a "key\tvalue" format: read the key, the rest is the value.
+ OString aKey( o3tl::getToken(aLine, 0, '\t', nIndex) );
+ OString aValue( std::string_view(aLine).substr(nIndex) );
+ aRet[aKey].push_back(aValue);
+ bNotDone = aStream.ReadLine(aLine);
+ }
+ return aRet;
+}
+
+void DrawingML::WritePresetShape( const OString& pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const PropertyValue& rProp )
+{
+ static std::map< OString, std::vector<OString> > aAdjMap = lcl_getAdjNames();
+ // If there are predefined adj names for this shape type, look them up now.
+ std::vector<OString> aAdjustments;
+ if (aAdjMap.find(pShape) != aAdjMap.end())
+ aAdjustments = aAdjMap[pShape];
+
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ mpFS->startElementNS(XML_a, XML_avLst);
+
+ Sequence< drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
+ if ( ( rProp.Value >>= aAdjustmentSeq )
+ && eShapeType != mso_sptActionButtonForwardNext // we have adjustments values for these type of shape, but MSO doesn't like them
+ && eShapeType != mso_sptActionButtonBackPrevious // so they are now disabled
+ && pShape != "rect" //some shape types are commented out in pCustomShapeTypeTranslationTable[] & are being defaulted to rect & rect does not have adjustment values/name.
+ )
+ {
+ SAL_INFO("oox.shape", "adj seq len: " << aAdjustmentSeq.getLength());
+ sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0;
+ if ( bPredefinedHandlesUsed )
+ EscherPropertyContainer::LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted );
+
+ sal_Int32 nValue, nLength = aAdjustmentSeq.getLength();
+ // aAdjustments will give info about the number of adj values for a particular geometry. For example for hexagon aAdjustments.size() will be 2 and for circular arrow it will be 5 as per lcl_getAdjNames.
+ // Sometimes there are more values than needed, so we ignore the excessive ones.
+ if (aAdjustments.size() <= o3tl::make_unsigned(nLength))
+ {
+ for (sal_Int32 i = 0; i < static_cast<sal_Int32>(aAdjustments.size()); i++)
+ {
+ if( EscherPropertyContainer::GetAdjustmentValue( aAdjustmentSeq[ i ], i, nAdjustmentsWhichNeedsToBeConverted, nValue ) )
+ {
+ // If the document model doesn't have an adjustment name (e.g. shape was created from VML), then take it from the predefined list.
+ OString aAdjName = aAdjustmentSeq[i].Name.isEmpty()
+ ? aAdjustments[i]
+ : aAdjustmentSeq[i].Name.toUtf8();
+
+ mpFS->singleElementNS( XML_a, XML_gd,
+ XML_name, aAdjName,
+ XML_fmla, "val " + OString::number(nValue));
+ }
+ }
+ }
+ }
+
+ mpFS->endElementNS( XML_a, XML_avLst );
+ mpFS->endElementNS( XML_a, XML_prstGeom );
+}
+
+namespace // helpers for DrawingML::WriteCustomGeometry
+{
+sal_Int32
+FindNextCommandEndSubpath(const sal_Int32 nStart,
+ const uno::Sequence<drawing::EnhancedCustomShapeSegment>& rSegments)
+{
+ sal_Int32 i = nStart < 0 ? 0 : nStart;
+ while (i < rSegments.getLength() && rSegments[i].Command != ENDSUBPATH)
+ i++;
+ return i;
+}
+
+bool HasCommandInSubPath(const sal_Int16 nCommand, const sal_Int32 nFirst, const sal_Int32 nLast,
+ const uno::Sequence<drawing::EnhancedCustomShapeSegment>& rSegments)
+{
+ for (sal_Int32 i = nFirst < 0 ? 0 : nFirst; i <= nLast && i < rSegments.getLength(); i++)
+ {
+ if (rSegments[i].Command == nCommand)
+ return true;
+ }
+ return false;
+}
+
+// Ellipse is given by radii fwR and fhR and center (fCx|fCy). The ray from center through point RayP
+// intersects the ellipse in point S and this point S has angle fAngleDeg in degrees.
+void getEllipsePointAndAngleFromRayPoint(double& rfAngleDeg, double& rfSx, double& rfSy,
+ const double fWR, const double fHR, const double fCx,
+ const double fCy, const double fRayPx, const double fRayPy)
+{
+ if (basegfx::fTools::equalZero(fWR) || basegfx::fTools::equalZero(fHR))
+ {
+ rfSx = fCx; // needed for getting new 'current point'
+ rfSy = fCy;
+ }
+ else
+ {
+ // center ellipse at origin, stretch in y-direction to circle, flip to Math orientation
+ // and get angle
+ double fCircleMathAngle = atan2(-fWR / fHR * (fRayPy - fCy), fRayPx - fCx);
+ // use angle for intersection point on circle and stretch back to ellipse
+ double fPointMathEllipse_x = fWR * cos(fCircleMathAngle);
+ double fPointMathEllipse_y = fHR * sin(fCircleMathAngle);
+ // get angle of intersection point on ellipse
+ double fEllipseMathAngle = atan2(fPointMathEllipse_y, fPointMathEllipse_x);
+ // convert from Math to View orientation and shift ellipse back from origin
+ rfAngleDeg = -basegfx::rad2deg(fEllipseMathAngle);
+ rfSx = fPointMathEllipse_x + fCx;
+ rfSy = -fPointMathEllipse_y + fCy;
+ }
+}
+
+void getEllipsePointFromViewAngle(double& rfSx, double& rfSy, const double fWR, const double fHR,
+ const double fCx, const double fCy, const double fViewAngleDeg)
+{
+ if (basegfx::fTools::equalZero(fWR) || basegfx::fTools::equalZero(fHR))
+ {
+ rfSx = fCx; // needed for getting new 'current point'
+ rfSy = fCy;
+ }
+ else
+ {
+ double fX = cos(basegfx::deg2rad(fViewAngleDeg)) / fWR;
+ double fY = sin(basegfx::deg2rad(fViewAngleDeg)) / fHR;
+ double fRadius = 1.0 / std::hypot(fX, fY);
+ rfSx = fCx + fRadius * cos(basegfx::deg2rad(fViewAngleDeg));
+ rfSy = fCy + fRadius * sin(basegfx::deg2rad(fViewAngleDeg));
+ }
+}
+
+sal_Int32 GetCustomGeometryPointValue(const css::drawing::EnhancedCustomShapeParameter& rParam,
+ const EnhancedCustomShape2d& rCustomShape2d,
+ const bool bReplaceGeoWidth, const bool bReplaceGeoHeight)
+{
+ double fValue = 0.0;
+ rCustomShape2d.GetParameter(fValue, rParam, bReplaceGeoWidth, bReplaceGeoHeight);
+ sal_Int32 nValue(std::lround(fValue));
+
+ return nValue;
+}
+
+struct TextAreaRect
+{
+ OString left;
+ OString top;
+ OString right;
+ OString bottom;
+};
+
+struct Guide
+{
+ OString sName;
+ OString sFormula;
+};
+
+void prepareTextArea(const EnhancedCustomShape2d& rEnhancedCustomShape2d,
+ std::vector<Guide>& rGuideList, TextAreaRect& rTextAreaRect)
+{
+ tools::Rectangle aTextAreaLO(rEnhancedCustomShape2d.GetTextRect());
+ tools::Rectangle aLogicRectLO(rEnhancedCustomShape2d.GetLogicRect());
+ if (aTextAreaLO == aLogicRectLO)
+ {
+ rTextAreaRect.left = "l";
+ rTextAreaRect.top = "t";
+ rTextAreaRect.right = "r";
+ rTextAreaRect.bottom = "b";
+ return;
+ }
+ // Flip aTextAreaLO if shape is flipped
+ if (rEnhancedCustomShape2d.IsFlipHorz())
+ aTextAreaLO.Move((aLogicRectLO.Center().X() - aTextAreaLO.Center().X()) * 2, 0);
+ if (rEnhancedCustomShape2d.IsFlipVert())
+ aTextAreaLO.Move(0, (aLogicRectLO.Center().Y() - aTextAreaLO.Center().Y()) * 2);
+
+ Guide aGuide;
+ // horizontal
+ const sal_Int32 nWidth = aLogicRectLO.Right() - aLogicRectLO.Left();
+ const OString sWidth = OString::number(oox::drawingml::convertHmmToEmu(nWidth));
+
+ // left
+ aGuide.sName = "textAreaLeft";
+ sal_Int32 nHelp = aTextAreaLO.Left() - aLogicRectLO.Left();
+ const OString sLeft = OString::number(oox::drawingml::convertHmmToEmu(nHelp));
+ aGuide.sFormula = "*/ " + sLeft + " w " + sWidth;
+ rTextAreaRect.left = aGuide.sName;
+ rGuideList.push_back(aGuide);
+
+ // right
+ aGuide.sName = "textAreaRight";
+ nHelp = aTextAreaLO.Right() - aLogicRectLO.Left();
+ const OString sRight = OString::number(oox::drawingml::convertHmmToEmu(nHelp));
+ aGuide.sFormula = "*/ " + sRight + " w " + sWidth;
+ rTextAreaRect.right = aGuide.sName;
+ rGuideList.push_back(aGuide);
+
+ // vertical
+ const sal_Int32 nHeight = aLogicRectLO.Bottom() - aLogicRectLO.Top();
+ const OString sHeight = OString::number(oox::drawingml::convertHmmToEmu(nHeight));
+
+ // top
+ aGuide.sName = "textAreaTop";
+ nHelp = aTextAreaLO.Top() - aLogicRectLO.Top();
+ const OString sTop = OString::number(oox::drawingml::convertHmmToEmu(nHelp));
+ aGuide.sFormula = "*/ " + sTop + " h " + sHeight;
+ rTextAreaRect.top = aGuide.sName;
+ rGuideList.push_back(aGuide);
+
+ // bottom
+ aGuide.sName = "textAreaBottom";
+ nHelp = aTextAreaLO.Bottom() - aLogicRectLO.Top();
+ const OString sBottom = OString::number(oox::drawingml::convertHmmToEmu(nHelp));
+ aGuide.sFormula = "*/ " + sBottom + " h " + sHeight;
+ rTextAreaRect.bottom = aGuide.sName;
+ rGuideList.push_back(aGuide);
+
+ return;
+}
+}
+
+bool DrawingML::WriteCustomGeometry(
+ const Reference< XShape >& rXShape,
+ const SdrObjCustomShape& rSdrObjCustomShape)
+{
+ uno::Reference< beans::XPropertySet > aXPropSet;
+ uno::Any aAny( rXShape->queryInterface(cppu::UnoType<beans::XPropertySet>::get()));
+
+ if ( ! (aAny >>= aXPropSet) )
+ return false;
+
+ try
+ {
+ aAny = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
+ if ( !aAny.hasValue() )
+ return false;
+ }
+ catch( const ::uno::Exception& )
+ {
+ return false;
+ }
+
+ auto pGeometrySeq = o3tl::tryAccess<uno::Sequence<beans::PropertyValue>>(aAny);
+ if (!pGeometrySeq)
+ return false;
+
+ auto pPathProp = std::find_if(std::cbegin(*pGeometrySeq), std::cend(*pGeometrySeq),
+ [](const PropertyValue& rProp) { return rProp.Name == "Path"; });
+ if (pPathProp == std::cend(*pGeometrySeq))
+ return false;
+
+ uno::Sequence<beans::PropertyValue> aPathProp;
+ pPathProp->Value >>= aPathProp;
+
+ uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs;
+ uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments;
+ uno::Sequence<awt::Size> aPathSize;
+ bool bReplaceGeoWidth = false;
+ bool bReplaceGeoHeight = false;
+ for (const beans::PropertyValue& rPathProp : std::as_const(aPathProp))
+ {
+ if (rPathProp.Name == "Coordinates")
+ rPathProp.Value >>= aPairs;
+ else if (rPathProp.Name == "Segments")
+ rPathProp.Value >>= aSegments;
+ else if (rPathProp.Name == "SubViewSize")
+ rPathProp.Value >>= aPathSize;
+ else if (rPathProp.Name == "StretchX")
+ bReplaceGeoWidth = true;
+ else if (rPathProp.Name == "StretchY")
+ bReplaceGeoHeight = true;
+ }
+
+ if ( !aPairs.hasElements() )
+ return false;
+
+ if ( !aSegments.hasElements() )
+ {
+ aSegments = uno::Sequence<drawing::EnhancedCustomShapeSegment>
+ {
+ { MOVETO, 1 },
+ { LINETO,
+ static_cast<sal_Int16>(std::min( aPairs.getLength() - 1, sal_Int32(32767) )) },
+ { CLOSESUBPATH, 0 },
+ { ENDSUBPATH, 0 }
+ };
+ };
+
+ int nExpectedPairCount = std::accumulate(std::cbegin(aSegments), std::cend(aSegments), 0,
+ [](const int nSum, const drawing::EnhancedCustomShapeSegment& rSegment) { return nSum + rSegment.Count; });
+
+ if ( nExpectedPairCount > aPairs.getLength() )
+ {
+ SAL_WARN("oox.shape", "Segments need " << nExpectedPairCount << " coordinates, but Coordinates have only " << aPairs.getLength() << " pairs.");
+ return false;
+ }
+
+ // A EnhancedCustomShape2d caches the equation results. Therefore we use only one of it for the
+ // entire method.
+ const EnhancedCustomShape2d aCustomShape2d(const_cast<SdrObjCustomShape&>(rSdrObjCustomShape));
+
+ TextAreaRect aTextAreaRect;
+ std::vector<Guide> aGuideList; // for now only for <a:rect>
+ prepareTextArea(aCustomShape2d, aGuideList, aTextAreaRect);
+ mpFS->startElementNS(XML_a, XML_custGeom);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ if (aGuideList.empty())
+ {
+ mpFS->singleElementNS(XML_a, XML_gdLst);
+ }
+ else
+ {
+ mpFS->startElementNS(XML_a, XML_gdLst);
+ for (auto const& elem : aGuideList)
+ {
+ mpFS->singleElementNS(XML_a, XML_gd, XML_name, elem.sName, XML_fmla, elem.sFormula);
+ }
+ mpFS->endElementNS(XML_a, XML_gdLst);
+ }
+ mpFS->singleElementNS(XML_a, XML_ahLst);
+ mpFS->singleElementNS(XML_a, XML_rect, XML_l, aTextAreaRect.left, XML_t, aTextAreaRect.top,
+ XML_r, aTextAreaRect.right, XML_b, aTextAreaRect.bottom);
+ mpFS->startElementNS(XML_a, XML_pathLst);
+
+ // Prepare width and height for <a:path>
+ bool bUseGlobalViewBox(false);
+
+ // nViewBoxWidth must be integer otherwise ReplaceGeoWidth in aCustomShape2d.GetParameter() is not
+ // triggered; same for height.
+ sal_Int32 nViewBoxWidth(0);
+ sal_Int32 nViewBoxHeight(0);
+ if (!aPathSize.hasElements())
+ {
+ bUseGlobalViewBox = true;
+ // If draw:viewBox is missing in draw:enhancedGeometry, then import sets
+ // viewBox="0 0 21600 21600". Missing ViewBox can only occur, if user has manipulated
+ // current file via macro. Author of macro has to fix it.
+ auto pProp = std::find_if(
+ std::cbegin(*pGeometrySeq), std::cend(*pGeometrySeq),
+ [](const beans::PropertyValue& rGeomProp) { return rGeomProp.Name == "ViewBox"; });
+ if (pProp != std::cend(*pGeometrySeq))
+ {
+ css::awt::Rectangle aViewBox;
+ if (pProp->Value >>= aViewBox)
+ {
+ nViewBoxWidth = aViewBox.Width;
+ nViewBoxHeight = aViewBox.Height;
+ css::drawing::EnhancedCustomShapeParameter aECSP;
+ aECSP.Type = css::drawing::EnhancedCustomShapeParameterType::NORMAL;
+ aECSP.Value <<= nViewBoxWidth;
+ double fRetValue;
+ aCustomShape2d.GetParameter(fRetValue, aECSP, true, false);
+ nViewBoxWidth = basegfx::fround(fRetValue);
+ aECSP.Value <<= nViewBoxHeight;
+ aCustomShape2d.GetParameter(fRetValue, aECSP, false, true);
+ nViewBoxHeight = basegfx::fround(fRetValue);
+ }
+ }
+ // Import from oox or documents, which are imported from oox and saved to strict ODF, might
+ // have no subViewSize but viewBox="0 0 0 0". We need to generate width and height in those
+ // cases. Even if that is fixed, we need the substitute for old documents.
+ if ((nViewBoxWidth == 0 && nViewBoxHeight == 0) || pProp == std::cend(*pGeometrySeq))
+ {
+ // Generate a substitute based on point coordinates
+ sal_Int32 nXMin(0);
+ aPairs[0].First.Value >>= nXMin;
+ sal_Int32 nXMax = nXMin;
+ sal_Int32 nYMin(0);
+ aPairs[0].Second.Value >>= nYMin;
+ sal_Int32 nYMax = nYMin;
+
+ for (const auto& rPair : std::as_const(aPairs))
+ {
+ sal_Int32 nX = GetCustomGeometryPointValue(rPair.First, aCustomShape2d,
+ bReplaceGeoWidth, false);
+ sal_Int32 nY = GetCustomGeometryPointValue(rPair.Second, aCustomShape2d, false,
+ bReplaceGeoHeight);
+ if (nX < nXMin)
+ nXMin = nX;
+ if (nY < nYMin)
+ nYMin = nY;
+ if (nX > nXMax)
+ nXMax = nX;
+ if (nY > nYMax)
+ nYMax = nY;
+ }
+ nViewBoxWidth = std::max(nXMax, nXMax - nXMin);
+ nViewBoxHeight = std::max(nYMax, nYMax - nYMin);
+ }
+ // ToDo: Other values of left,top than 0,0 are not considered yet. Such would require a
+ // shift of the resulting path coordinates.
+ }
+
+ // Iterate over subpaths
+ sal_Int32 nPairIndex = 0; // index over "Coordinates"
+ sal_Int32 nPathSizeIndex = 0; // index over "SubViewSize"
+ sal_Int32 nSubpathStartIndex(0); // index over "Segments"
+ sal_Int32 nSubPathIndex(0); // serial number of current subpath
+ do
+ {
+ bool bOK(true); // catch faulty paths were commands do not correspond to points
+ // get index of next command ENDSUBPATH; if such doesn't exist use index behind last segment
+ sal_Int32 nNextNcommandIndex = FindNextCommandEndSubpath(nSubpathStartIndex, aSegments);
+
+ // Prepare attributes for a:path start element
+ // NOFILL or one of the LIGHTEN commands
+ std::optional<OString> sFill;
+ if (HasCommandInSubPath(NOFILL, nSubpathStartIndex, nNextNcommandIndex - 1, aSegments))
+ sFill = "none";
+ else if (HasCommandInSubPath(DARKEN, nSubpathStartIndex, nNextNcommandIndex - 1, aSegments))
+ sFill = "darken";
+ else if (HasCommandInSubPath(DARKENLESS, nSubpathStartIndex, nNextNcommandIndex - 1,
+ aSegments))
+ sFill = "darkenLess";
+ else if (HasCommandInSubPath(LIGHTEN, nSubpathStartIndex, nNextNcommandIndex - 1,
+ aSegments))
+ sFill = "lighten";
+ else if (HasCommandInSubPath(LIGHTENLESS, nSubpathStartIndex, nNextNcommandIndex - 1,
+ aSegments))
+ sFill = "lightenLess";
+ else
+ {
+ // shading info might be in object type, e.g. "Octagon Bevel".
+ sal_Int32 nLuminanceChange(aCustomShape2d.GetLuminanceChange(nSubPathIndex));
+ if (nLuminanceChange <= -40)
+ sFill = "darken";
+ else if (nLuminanceChange <= -10)
+ sFill = "darkenLess";
+ else if (nLuminanceChange >= 40)
+ sFill = "lighten";
+ else if (nLuminanceChange >= 10)
+ sFill = "lightenLess";
+ }
+ // NOSTROKE
+ std::optional<OString> sStroke;
+ if (HasCommandInSubPath(NOSTROKE, nSubpathStartIndex, nNextNcommandIndex - 1, aSegments))
+ sStroke = "0";
+
+ // Write a:path start element
+ mpFS->startElementNS(
+ XML_a, XML_path, XML_fill, sFill, XML_stroke, sStroke, XML_w,
+ OString::number(bUseGlobalViewBox ? nViewBoxWidth : aPathSize[nPathSizeIndex].Width),
+ XML_h,
+ OString::number(bUseGlobalViewBox ? nViewBoxHeight : aPathSize[nPathSizeIndex].Height));
+
+ // Arcs drawn by commands ELLIPTICALQUADRANTX and ELLIPTICALQUADRANTY depend on the position
+ // of the target point in regard to the current point. Therefore we need to track the
+ // current point. A current point is not defined in the beginning.
+ double fCurrentX(0.0);
+ double fCurrentY(0.0);
+ bool bCurrentValid(false);
+ // Actually write the subpath
+ for (sal_Int32 nSegmentIndex = nSubpathStartIndex; nSegmentIndex < nNextNcommandIndex;
+ ++nSegmentIndex)
+ {
+ const auto& rSegment(aSegments[nSegmentIndex]);
+ if (rSegment.Command == CLOSESUBPATH)
+ {
+ mpFS->singleElementNS(XML_a, XML_close); // command Z has no parameter
+ // ODF 1.4 specifies, that the start of the subpath becomes the current point.
+ // But that is not implemented yet. Currently LO keeps the last current point.
+ }
+ for (sal_Int32 k = 0; k < rSegment.Count && bOK; ++k)
+ {
+ bOK = WriteCustomGeometrySegment(rSegment.Command, k, aPairs, nPairIndex, fCurrentX,
+ fCurrentY, bCurrentValid, aCustomShape2d,
+ bReplaceGeoWidth, bReplaceGeoHeight);
+ }
+ } // end loop over all commands of subpath
+ // finish this subpath in any case
+ mpFS->endElementNS(XML_a, XML_path);
+
+ if (!bOK)
+ break; // exit loop if not enough values in aPairs
+
+ // step forward to next subpath
+ nSubpathStartIndex = nNextNcommandIndex + 1;
+ nPathSizeIndex++;
+ nSubPathIndex++;
+ } while (nSubpathStartIndex < aSegments.getLength());
+
+ mpFS->endElementNS(XML_a, XML_pathLst);
+ mpFS->endElementNS(XML_a, XML_custGeom);
+ return true; // We have written custGeom even if path is poorly structured.
+}
+
+bool DrawingML::WriteCustomGeometrySegment(
+ const sal_Int16 eCommand, const sal_Int32 nCount,
+ const uno::Sequence<css::drawing::EnhancedCustomShapeParameterPair>& rPairs,
+ sal_Int32& rnPairIndex, double& rfCurrentX, double& rfCurrentY, bool& rbCurrentValid,
+ const EnhancedCustomShape2d& rCustomShape2d, const bool bReplaceGeoWidth,
+ const bool bReplaceGeoHeight)
+{
+ switch (eCommand)
+ {
+ case MOVETO:
+ {
+ if (rnPairIndex >= rPairs.getLength())
+ return false;
+
+ mpFS->startElementNS(XML_a, XML_moveTo);
+ WriteCustomGeometryPoint(rPairs[rnPairIndex], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ rCustomShape2d.GetParameter(rfCurrentX, rPairs[rnPairIndex].First, bReplaceGeoWidth,
+ false);
+ rCustomShape2d.GetParameter(rfCurrentY, rPairs[rnPairIndex].Second, false,
+ bReplaceGeoHeight);
+ rbCurrentValid = true;
+ rnPairIndex++;
+ break;
+ }
+ case LINETO:
+ {
+ if (rnPairIndex >= rPairs.getLength())
+ return false;
+ // LINETO without valid current point is a faulty path. LO is tolerant and makes a
+ // moveTo instead. Do the same on export. MS OFFICE requires a current point for lnTo,
+ // otherwise it shows nothing of the shape.
+ if (rbCurrentValid)
+ {
+ mpFS->startElementNS(XML_a, XML_lnTo);
+ WriteCustomGeometryPoint(rPairs[rnPairIndex], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ mpFS->endElementNS(XML_a, XML_lnTo);
+ }
+ else
+ {
+ mpFS->startElementNS(XML_a, XML_moveTo);
+ WriteCustomGeometryPoint(rPairs[rnPairIndex], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ }
+ rCustomShape2d.GetParameter(rfCurrentX, rPairs[rnPairIndex].First, bReplaceGeoWidth,
+ false);
+ rCustomShape2d.GetParameter(rfCurrentY, rPairs[rnPairIndex].Second, false,
+ bReplaceGeoHeight);
+ rbCurrentValid = true;
+ rnPairIndex++;
+ break;
+ }
+ case CURVETO:
+ {
+ if (rnPairIndex + 2 >= rPairs.getLength())
+ return false;
+
+ mpFS->startElementNS(XML_a, XML_cubicBezTo);
+ for (sal_uInt8 i = 0; i <= 2; ++i)
+ {
+ WriteCustomGeometryPoint(rPairs[rnPairIndex + i], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ }
+ mpFS->endElementNS(XML_a, XML_cubicBezTo);
+ rCustomShape2d.GetParameter(rfCurrentX, rPairs[rnPairIndex + 2].First, bReplaceGeoWidth,
+ false);
+ rCustomShape2d.GetParameter(rfCurrentY, rPairs[rnPairIndex + 2].Second, false,
+ bReplaceGeoHeight);
+ rbCurrentValid = true;
+ rnPairIndex += 3;
+ break;
+ }
+ case ANGLEELLIPSETO:
+ case ANGLEELLIPSE:
+ {
+ if (rnPairIndex + 2 >= rPairs.getLength())
+ return false;
+
+ // Read parameters
+ double fCx = 0.0;
+ rCustomShape2d.GetParameter(fCx, rPairs[rnPairIndex].First, bReplaceGeoWidth, false);
+ double fCy = 0.0;
+ rCustomShape2d.GetParameter(fCy, rPairs[rnPairIndex].Second, false, bReplaceGeoHeight);
+ double fWR = 0.0;
+ rCustomShape2d.GetParameter(fWR, rPairs[rnPairIndex + 1].First, false, false);
+ double fHR = 0.0;
+ rCustomShape2d.GetParameter(fHR, rPairs[rnPairIndex + 1].Second, false, false);
+ double fStartAngle = 0.0;
+ rCustomShape2d.GetParameter(fStartAngle, rPairs[rnPairIndex + 2].First, false, false);
+ double fEndAngle = 0.0;
+ rCustomShape2d.GetParameter(fEndAngle, rPairs[rnPairIndex + 2].Second, false, false);
+
+ // Prepare start and swing angle
+ sal_Int32 nStartAng(std::lround(fStartAngle * 60000));
+ sal_Int32 nSwingAng = 0;
+ if (basegfx::fTools::equalZero(fStartAngle)
+ && basegfx::fTools::equalZero(fEndAngle - 360.0))
+ nSwingAng = 360 * 60000; // special case full circle
+ else
+ {
+ nSwingAng = std::lround((fEndAngle - fStartAngle) * 60000);
+ if (nSwingAng < 0)
+ nSwingAng += 360 * 60000;
+ }
+
+ // calculate start point on ellipse
+ double fSx = 0.0;
+ double fSy = 0.0;
+ getEllipsePointFromViewAngle(fSx, fSy, fWR, fHR, fCx, fCy, fStartAngle);
+
+ // write markup for going to start point
+ // lnTo requires a valid current point
+ if (eCommand == ANGLEELLIPSETO && rbCurrentValid)
+ {
+ mpFS->startElementNS(XML_a, XML_lnTo);
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(std::lround(fSx)),
+ XML_y, OString::number(std::lround(fSy)));
+ mpFS->endElementNS(XML_a, XML_lnTo);
+ }
+ else
+ {
+ mpFS->startElementNS(XML_a, XML_moveTo);
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(std::lround(fSx)),
+ XML_y, OString::number(std::lround(fSy)));
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ }
+ // write markup for arcTo
+ if (!basegfx::fTools::equalZero(fWR) && !basegfx::fTools::equalZero(fHR))
+ mpFS->singleElement(
+ FSNS(XML_a, XML_arcTo), XML_wR, OString::number(std::lround(fWR)), XML_hR,
+ OString::number(std::lround(fHR)), XML_stAng, OString::number(nStartAng),
+ XML_swAng, OString::number(nSwingAng));
+
+ getEllipsePointFromViewAngle(rfCurrentX, rfCurrentY, fWR, fHR, fCx, fCy, fEndAngle);
+ rbCurrentValid = true;
+ rnPairIndex += 3;
+ break;
+ }
+ case ARCTO:
+ case ARC:
+ case CLOCKWISEARCTO:
+ case CLOCKWISEARC:
+ {
+ if (rnPairIndex + 3 >= rPairs.getLength())
+ return false;
+
+ // read parameters
+ double fX1 = 0.0;
+ rCustomShape2d.GetParameter(fX1, rPairs[rnPairIndex].First, bReplaceGeoWidth, false);
+ double fY1 = 0.0;
+ rCustomShape2d.GetParameter(fY1, rPairs[rnPairIndex].Second, false, bReplaceGeoHeight);
+ double fX2 = 0.0;
+ rCustomShape2d.GetParameter(fX2, rPairs[rnPairIndex + 1].First, bReplaceGeoWidth,
+ false);
+ double fY2 = 0.0;
+ rCustomShape2d.GetParameter(fY2, rPairs[rnPairIndex + 1].Second, false,
+ bReplaceGeoHeight);
+ double fX3 = 0.0;
+ rCustomShape2d.GetParameter(fX3, rPairs[rnPairIndex + 2].First, bReplaceGeoWidth,
+ false);
+ double fY3 = 0.0;
+ rCustomShape2d.GetParameter(fY3, rPairs[rnPairIndex + 2].Second, false,
+ bReplaceGeoHeight);
+ double fX4 = 0.0;
+ rCustomShape2d.GetParameter(fX4, rPairs[rnPairIndex + 3].First, bReplaceGeoWidth,
+ false);
+ double fY4 = 0.0;
+ rCustomShape2d.GetParameter(fY4, rPairs[rnPairIndex + 3].Second, false,
+ bReplaceGeoHeight);
+ // calculate ellipse parameter
+ const double fWR = (fX2 - fX1) / 2.0;
+ const double fHR = (fY2 - fY1) / 2.0;
+ const double fCx = (fX1 + fX2) / 2.0;
+ const double fCy = (fY1 + fY2) / 2.0;
+ // calculate start angle
+ double fStartAngle = 0.0;
+ double fPx = 0.0;
+ double fPy = 0.0;
+ getEllipsePointAndAngleFromRayPoint(fStartAngle, fPx, fPy, fWR, fHR, fCx, fCy, fX3,
+ fY3);
+ // markup for going to start point
+ // lnTo requires a valid current point.
+ if ((eCommand == ARCTO || eCommand == CLOCKWISEARCTO) && rbCurrentValid)
+ {
+ mpFS->startElementNS(XML_a, XML_lnTo);
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(std::lround(fPx)),
+ XML_y, OString::number(std::lround(fPy)));
+ mpFS->endElementNS(XML_a, XML_lnTo);
+ }
+ else
+ {
+ mpFS->startElementNS(XML_a, XML_moveTo);
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(std::lround(fPx)),
+ XML_y, OString::number(std::lround(fPy)));
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ }
+ // calculate swing angle
+ double fEndAngle = 0.0;
+ getEllipsePointAndAngleFromRayPoint(fEndAngle, fPx, fPy, fWR, fHR, fCx, fCy, fX4, fY4);
+ double fSwingAngle(fEndAngle - fStartAngle);
+ const bool bIsClockwise(eCommand == CLOCKWISEARCTO || eCommand == CLOCKWISEARC);
+ if (bIsClockwise && fSwingAngle < 0)
+ fSwingAngle += 360.0;
+ else if (!bIsClockwise && fSwingAngle > 0)
+ fSwingAngle -= 360.0;
+ // markup for arcTo
+ // ToDo: write markup for case zero width or height of ellipse
+ const sal_Int32 nStartAng(std::lround(fStartAngle * 60000));
+ const sal_Int32 nSwingAng(std::lround(fSwingAngle * 60000));
+ mpFS->singleElement(FSNS(XML_a, XML_arcTo), XML_wR, OString::number(std::lround(fWR)),
+ XML_hR, OString::number(std::lround(fHR)), XML_stAng,
+ OString::number(nStartAng), XML_swAng, OString::number(nSwingAng));
+ rfCurrentX = fPx;
+ rfCurrentY = fPy;
+ rbCurrentValid = true;
+ rnPairIndex += 4;
+ break;
+ }
+ case ELLIPTICALQUADRANTX:
+ case ELLIPTICALQUADRANTY:
+ {
+ if (rnPairIndex >= rPairs.getLength())
+ return false;
+
+ // read parameters
+ double fX = 0.0;
+ rCustomShape2d.GetParameter(fX, rPairs[rnPairIndex].First, bReplaceGeoWidth, false);
+ double fY = 0.0;
+ rCustomShape2d.GetParameter(fY, rPairs[rnPairIndex].Second, false, bReplaceGeoHeight);
+
+ // Prepare parameters for arcTo
+ if (rbCurrentValid)
+ {
+ double fWR = std::abs(rfCurrentX - fX);
+ double fHR = std::abs(rfCurrentY - fY);
+ double fStartAngle(0.0);
+ double fSwingAngle(0.0);
+ // The starting direction of the arc toggles between X and Y
+ if ((eCommand == ELLIPTICALQUADRANTX && !(nCount % 2))
+ || (eCommand == ELLIPTICALQUADRANTY && (nCount % 2)))
+ {
+ // arc starts horizontal
+ fStartAngle = fY < rfCurrentY ? 90.0 : 270.0;
+ const bool bClockwise = (fX < rfCurrentX && fY < rfCurrentY)
+ || (fX > rfCurrentX && fY > rfCurrentY);
+ fSwingAngle = bClockwise ? 90.0 : -90.0;
+ }
+ else
+ {
+ // arc starts vertical
+ fStartAngle = fX < rfCurrentX ? 0.0 : 180.0;
+ const bool bClockwise = (fX < rfCurrentX && fY > rfCurrentY)
+ || (fX > rfCurrentX && fY < rfCurrentY);
+ fSwingAngle = bClockwise ? 90.0 : -90.0;
+ }
+ sal_Int32 nStartAng(std::lround(fStartAngle * 60000));
+ sal_Int32 nSwingAng(std::lround(fSwingAngle * 60000));
+ mpFS->singleElement(
+ FSNS(XML_a, XML_arcTo), XML_wR, OString::number(std::lround(fWR)), XML_hR,
+ OString::number(std::lround(fHR)), XML_stAng, OString::number(nStartAng),
+ XML_swAng, OString::number(nSwingAng));
+ }
+ else
+ {
+ // faulty path, but we continue with the target point
+ mpFS->startElementNS(XML_a, XML_moveTo);
+ WriteCustomGeometryPoint(rPairs[rnPairIndex], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ }
+ rfCurrentX = fX;
+ rfCurrentY = fY;
+ rbCurrentValid = true;
+ rnPairIndex++;
+ break;
+ }
+ case QUADRATICCURVETO:
+ {
+ if (rnPairIndex + 1 >= rPairs.getLength())
+ return false;
+
+ mpFS->startElementNS(XML_a, XML_quadBezTo);
+ for (sal_uInt8 i = 0; i < 2; ++i)
+ {
+ WriteCustomGeometryPoint(rPairs[rnPairIndex + i], rCustomShape2d, bReplaceGeoWidth,
+ bReplaceGeoHeight);
+ }
+ mpFS->endElementNS(XML_a, XML_quadBezTo);
+ rCustomShape2d.GetParameter(rfCurrentX, rPairs[rnPairIndex + 1].First, bReplaceGeoWidth,
+ false);
+ rCustomShape2d.GetParameter(rfCurrentY, rPairs[rnPairIndex + 1].Second, false,
+ bReplaceGeoHeight);
+ rbCurrentValid = true;
+ rnPairIndex += 2;
+ break;
+ }
+ case ARCANGLETO:
+ {
+ if (rnPairIndex + 1 >= rPairs.getLength())
+ return false;
+
+ double fWR = 0.0;
+ rCustomShape2d.GetParameter(fWR, rPairs[rnPairIndex].First, false, false);
+ double fHR = 0.0;
+ rCustomShape2d.GetParameter(fHR, rPairs[rnPairIndex].Second, false, false);
+ double fStartAngle = 0.0;
+ rCustomShape2d.GetParameter(fStartAngle, rPairs[rnPairIndex + 1].First, false, false);
+ sal_Int32 nStartAng(std::lround(fStartAngle * 60000));
+ double fSwingAng = 0.0;
+ rCustomShape2d.GetParameter(fSwingAng, rPairs[rnPairIndex + 1].Second, false, false);
+ sal_Int32 nSwingAng(std::lround(fSwingAng * 60000));
+ mpFS->singleElement(FSNS(XML_a, XML_arcTo), XML_wR, OString::number(fWR), XML_hR,
+ OString::number(fHR), XML_stAng, OString::number(nStartAng),
+ XML_swAng, OString::number(nSwingAng));
+ double fPx = 0.0;
+ double fPy = 0.0;
+ getEllipsePointFromViewAngle(fPx, fPy, fWR, fHR, 0.0, 0.0, fStartAngle);
+ double fCx = rfCurrentX - fPx;
+ double fCy = rfCurrentY - fPy;
+ getEllipsePointFromViewAngle(rfCurrentX, rfCurrentY, fWR, fHR, fCx, fCy,
+ fStartAngle + fSwingAng);
+ rbCurrentValid = true;
+ rnPairIndex += 2;
+ break;
+ }
+ default:
+ // do nothing
+ break;
+ }
+ return true;
+}
+
+void DrawingML::WriteCustomGeometryPoint(
+ const drawing::EnhancedCustomShapeParameterPair& rParamPair,
+ const EnhancedCustomShape2d& rCustomShape2d, const bool bReplaceGeoWidth,
+ const bool bReplaceGeoHeight)
+{
+ sal_Int32 nX
+ = GetCustomGeometryPointValue(rParamPair.First, rCustomShape2d, bReplaceGeoWidth, false);
+ sal_Int32 nY
+ = GetCustomGeometryPointValue(rParamPair.Second, rCustomShape2d, false, bReplaceGeoHeight);
+
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(nX), XML_y, OString::number(nY));
+}
+
+void DrawingML::WriteEmptyCustomGeometry()
+{
+ // This method is used for export to docx in case WriteCustomGeometry fails.
+ mpFS->startElementNS(XML_a, XML_custGeom);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ mpFS->singleElementNS(XML_a, XML_gdLst);
+ mpFS->singleElementNS(XML_a, XML_ahLst);
+ mpFS->singleElementNS(XML_a, XML_rect, XML_l, "0", XML_t, "0", XML_r, "r", XML_b, "b");
+ mpFS->singleElementNS(XML_a, XML_pathLst);
+ mpFS->endElementNS(XML_a, XML_custGeom);
+}
+
+// version for SdrPathObj
+void DrawingML::WritePolyPolygon(const css::uno::Reference<css::drawing::XShape>& rXShape,
+ const bool bClosed)
+{
+ tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon(rXShape);
+ // In case of Writer, the parent element is <wps:spPr>, and there the
+ // <a:custGeom> element is not optional.
+ if (aPolyPolygon.Count() < 1 && GetDocumentType() != DOCUMENT_DOCX)
+ return;
+
+ mpFS->startElementNS(XML_a, XML_custGeom);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ mpFS->singleElementNS(XML_a, XML_gdLst);
+ mpFS->singleElementNS(XML_a, XML_ahLst);
+ mpFS->singleElementNS(XML_a, XML_rect, XML_l, "0", XML_t, "0", XML_r, "r", XML_b, "b");
+
+ mpFS->startElementNS(XML_a, XML_pathLst);
+
+ awt::Size aSize = rXShape->getSize();
+ awt::Point aPos = rXShape->getPosition();
+ Reference<XPropertySet> xPropertySet(rXShape, UNO_QUERY);
+ uno::Reference<XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ if (xPropertySetInfo->hasPropertyByName("AnchorPosition"))
+ {
+ awt::Point aAnchorPosition;
+ xPropertySet->getPropertyValue("AnchorPosition") >>= aAnchorPosition;
+ aPos.X += aAnchorPosition.X;
+ aPos.Y += aAnchorPosition.Y;
+ }
+
+ // Only closed SdrPathObj can be filled
+ std::optional<OString> sFill;
+ if (!bClosed)
+ sFill = "none"; // for possible values see ST_PathFillMode in OOXML standard
+
+ // Put all polygons of rPolyPolygon in the same path element
+ // to subtract the overlapped areas.
+ mpFS->startElementNS(XML_a, XML_path, XML_fill, sFill, XML_w, OString::number(aSize.Width),
+ XML_h, OString::number(aSize.Height));
+
+ for (sal_uInt16 i = 0; i < aPolyPolygon.Count(); i++)
+ {
+ const tools::Polygon& aPoly = aPolyPolygon[i];
+
+ if (aPoly.GetSize() > 0)
+ {
+ mpFS->startElementNS(XML_a, XML_moveTo);
+
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(aPoly[0].X() - aPos.X),
+ XML_y, OString::number(aPoly[0].Y() - aPos.Y));
+
+ mpFS->endElementNS(XML_a, XML_moveTo);
+ }
+
+ for (sal_uInt16 j = 1; j < aPoly.GetSize(); j++)
+ {
+ PolyFlags flags = aPoly.GetFlags(j);
+ if (flags == PolyFlags::Control)
+ {
+ // a:cubicBezTo can only contain 3 a:pt elements, so we need to make sure of this
+ if (j + 2 < aPoly.GetSize() && aPoly.GetFlags(j + 1) == PolyFlags::Control
+ && aPoly.GetFlags(j + 2) != PolyFlags::Control)
+ {
+ mpFS->startElementNS(XML_a, XML_cubicBezTo);
+ for (sal_uInt8 k = 0; k <= 2; ++k)
+ {
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x,
+ OString::number(aPoly[j + k].X() - aPos.X), XML_y,
+ OString::number(aPoly[j + k].Y() - aPos.Y));
+ }
+ mpFS->endElementNS(XML_a, XML_cubicBezTo);
+ j += 2;
+ }
+ }
+ else if (flags == PolyFlags::Normal)
+ {
+ mpFS->startElementNS(XML_a, XML_lnTo);
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(aPoly[j].X() - aPos.X),
+ XML_y, OString::number(aPoly[j].Y() - aPos.Y));
+ mpFS->endElementNS(XML_a, XML_lnTo);
+ }
+ }
+ }
+ if (bClosed)
+ mpFS->singleElementNS(XML_a, XML_close);
+ mpFS->endElementNS(XML_a, XML_path);
+
+ mpFS->endElementNS(XML_a, XML_pathLst);
+
+ mpFS->endElementNS(XML_a, XML_custGeom);
+}
+
+void DrawingML::WriteConnectorConnections( sal_uInt32 nStartGlueId, sal_Int32 nEndGlueId, sal_Int32 nStartID, sal_Int32 nEndID )
+{
+ if( nStartID != -1 )
+ {
+ mpFS->singleElementNS( XML_a, XML_stCxn,
+ XML_id, OString::number(nStartID),
+ XML_idx, OString::number(nStartGlueId) );
+ }
+ if( nEndID != -1 )
+ {
+ mpFS->singleElementNS( XML_a, XML_endCxn,
+ XML_id, OString::number(nEndID),
+ XML_idx, OString::number(nEndGlueId) );
+ }
+}
+
+sal_Unicode DrawingML::SubstituteBullet( sal_Unicode cBulletId, css::awt::FontDescriptor& rFontDesc )
+{
+ if ( IsStarSymbol(rFontDesc.Name) )
+ {
+ rtl_TextEncoding eCharSet = rFontDesc.CharSet;
+ cBulletId = msfilter::util::bestFitOpenSymbolToMSFont(cBulletId, eCharSet, rFontDesc.Name);
+ rFontDesc.CharSet = eCharSet;
+ }
+
+ return cBulletId;
+}
+
+sax_fastparser::FSHelperPtr DrawingML::CreateOutputStream (
+ const OUString& sFullStream,
+ std::u16string_view sRelativeStream,
+ const Reference< XOutputStream >& xParentRelation,
+ const char* sContentType,
+ const char* sRelationshipType,
+ OUString* pRelationshipId )
+{
+ OUString sRelationshipId;
+ if (xParentRelation.is())
+ sRelationshipId = GetFB()->addRelation( xParentRelation, OUString::createFromAscii( sRelationshipType), sRelativeStream );
+ else
+ sRelationshipId = GetFB()->addRelation( OUString::createFromAscii( sRelationshipType ), sRelativeStream );
+
+ if( pRelationshipId )
+ *pRelationshipId = sRelationshipId;
+
+ sax_fastparser::FSHelperPtr p = GetFB()->openFragmentStreamWithSerializer( sFullStream, OUString::createFromAscii( sContentType ) );
+
+ return p;
+}
+
+void DrawingML::WriteFill( const Reference< XPropertySet >& xPropSet )
+{
+ if ( !GetProperty( xPropSet, "FillStyle" ) )
+ return;
+ FillStyle aFillStyle( FillStyle_NONE );
+ xPropSet->getPropertyValue( "FillStyle" ) >>= aFillStyle;
+
+ // map full transparent background to no fill
+ if ( aFillStyle == FillStyle_SOLID && GetProperty( xPropSet, "FillTransparence" ) )
+ {
+ sal_Int16 nVal = 0;
+ xPropSet->getPropertyValue( "FillTransparence" ) >>= nVal;
+ if ( nVal == 100 )
+ aFillStyle = FillStyle_NONE;
+ }
+ if (aFillStyle == FillStyle_SOLID && GetProperty( xPropSet, "FillTransparenceGradient"))
+ {
+ awt::Gradient aTransparenceGradient;
+ mAny >>= aTransparenceGradient;
+ if (aTransparenceGradient.StartColor == 0xffffff && aTransparenceGradient.EndColor == 0xffffff)
+ aFillStyle = FillStyle_NONE;
+ }
+
+ bool bUseBackground(false);
+ if (GetProperty(xPropSet, "FillUseSlideBackground"))
+ xPropSet->getPropertyValue("FillUseSlideBackground") >>= bUseBackground;
+
+ switch( aFillStyle )
+ {
+ case FillStyle_SOLID :
+ WriteSolidFill( xPropSet );
+ break;
+ case FillStyle_GRADIENT :
+ WriteGradientFill( xPropSet );
+ break;
+ case FillStyle_BITMAP :
+ WriteBlipFill( xPropSet, "FillBitmap" );
+ break;
+ case FillStyle_HATCH :
+ WritePattFill( xPropSet );
+ break;
+ case FillStyle_NONE:
+ if (!bUseBackground) // attribute `useBgFill` will be written at parent p:sp shape
+ mpFS->singleElementNS(XML_a, XML_noFill);
+ break;
+ default:
+ ;
+ }
+}
+
+void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< PropertyValue >& aProperties )
+{
+ if( aProperties.hasElements() )
+ {
+ OUString sSchemeClr;
+ sal_uInt32 nIdx = 0;
+ Sequence< PropertyValue > aTransformations;
+ for( const auto& rProp : aProperties)
+ {
+ if( rProp.Name == "SchemeClr" )
+ rProp.Value >>= sSchemeClr;
+ else if( rProp.Name == "Idx" )
+ rProp.Value >>= nIdx;
+ else if( rProp.Name == "Transformations" )
+ rProp.Value >>= aTransformations;
+ }
+ mpFS->startElementNS(XML_a, nTokenId, XML_idx, OString::number(nIdx));
+ WriteColor(sSchemeClr, aTransformations);
+ mpFS->endElementNS( XML_a, nTokenId );
+ }
+ else
+ {
+ // write mock <a:*Ref> tag
+ mpFS->singleElementNS(XML_a, nTokenId, XML_idx, OString::number(0));
+ }
+}
+
+void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet )
+{
+ // check existence of the grab bag
+ if ( !GetProperty( xPropSet, "InteropGrabBag" ) )
+ return;
+
+ // extract the relevant properties from the grab bag
+ Sequence< PropertyValue > aGrabBag;
+ Sequence< PropertyValue > aFillRefProperties, aLnRefProperties, aEffectRefProperties;
+ mAny >>= aGrabBag;
+ for( const auto& rProp : std::as_const(aGrabBag))
+ {
+ if( rProp.Name == "StyleFillRef" )
+ rProp.Value >>= aFillRefProperties;
+ else if( rProp.Name == "StyleLnRef" )
+ rProp.Value >>= aLnRefProperties;
+ else if( rProp.Name == "StyleEffectRef" )
+ rProp.Value >>= aEffectRefProperties;
+ }
+
+ WriteStyleProperties( XML_lnRef, aLnRefProperties );
+ WriteStyleProperties( XML_fillRef, aFillRefProperties );
+ WriteStyleProperties( XML_effectRef, aEffectRefProperties );
+
+ // write mock <a:fontRef>
+ mpFS->singleElementNS(XML_a, XML_fontRef, XML_idx, "minor");
+}
+
+void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< PropertyValue >& aEffectProps )
+{
+ if( !aEffectProps.hasElements() )
+ return;
+
+ // assign the proper tag and enable bContainsColor if necessary
+ sal_Int32 nEffectToken = 0;
+ bool bContainsColor = false;
+ if( sName == u"outerShdw" )
+ {
+ nEffectToken = FSNS( XML_a, XML_outerShdw );
+ bContainsColor = true;
+ }
+ else if( sName == u"innerShdw" )
+ {
+ nEffectToken = FSNS( XML_a, XML_innerShdw );
+ bContainsColor = true;
+ }
+ else if( sName == u"glow" )
+ {
+ nEffectToken = FSNS( XML_a, XML_glow );
+ bContainsColor = true;
+ }
+ else if( sName == u"softEdge" )
+ nEffectToken = FSNS( XML_a, XML_softEdge );
+ else if( sName == u"reflection" )
+ nEffectToken = FSNS( XML_a, XML_reflection );
+ else if( sName == u"blur" )
+ nEffectToken = FSNS( XML_a, XML_blur );
+
+ OUString sSchemeClr;
+ ::Color nRgbClr;
+ sal_Int32 nAlpha = MAX_PERCENT;
+ Sequence< PropertyValue > aTransformations;
+ rtl::Reference<sax_fastparser::FastAttributeList> aOuterShdwAttrList = FastSerializerHelper::createAttrList();
+ for( const auto& rEffectProp : aEffectProps )
+ {
+ if( rEffectProp.Name == "Attribs" )
+ {
+ // read tag attributes
+ uno::Sequence< beans::PropertyValue > aOuterShdwProps;
+ rEffectProp.Value >>= aOuterShdwProps;
+ for( const auto& rOuterShdwProp : std::as_const(aOuterShdwProps) )
+ {
+ if( rOuterShdwProp.Name == "algn" )
+ {
+ OUString sVal;
+ rOuterShdwProp.Value >>= sVal;
+ aOuterShdwAttrList->add( XML_algn, sVal );
+ }
+ else if( rOuterShdwProp.Name == "blurRad" )
+ {
+ sal_Int64 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_blurRad, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "dir" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_dir, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "dist" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_dist, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "kx" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_kx, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "ky" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_ky, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "rotWithShape" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_rotWithShape, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "sx" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_sx, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "sy" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_sy, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "rad" )
+ {
+ sal_Int64 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_rad, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "endA" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_endA, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "endPos" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_endPos, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "fadeDir" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_fadeDir, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "stA" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_stA, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "stPos" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_stPos, OString::number( nVal ).getStr() );
+ }
+ else if( rOuterShdwProp.Name == "grow" )
+ {
+ sal_Int32 nVal = 0;
+ rOuterShdwProp.Value >>= nVal;
+ aOuterShdwAttrList->add( XML_grow, OString::number( nVal ).getStr() );
+ }
+ }
+ }
+ else if(rEffectProp.Name == "RgbClr")
+ {
+ rEffectProp.Value >>= nRgbClr;
+ }
+ else if(rEffectProp.Name == "RgbClrTransparency")
+ {
+ sal_Int32 nTransparency;
+ if (rEffectProp.Value >>= nTransparency)
+ // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
+ nAlpha = MAX_PERCENT - ( PER_PERCENT * nTransparency );
+ }
+ else if(rEffectProp.Name == "SchemeClr")
+ {
+ rEffectProp.Value >>= sSchemeClr;
+ }
+ else if(rEffectProp.Name == "SchemeClrTransformations")
+ {
+ rEffectProp.Value >>= aTransformations;
+ }
+ }
+
+ if( nEffectToken <= 0 )
+ return;
+
+ mpFS->startElement( nEffectToken, aOuterShdwAttrList );
+
+ if( bContainsColor )
+ {
+ if( sSchemeClr.isEmpty() )
+ WriteColor( nRgbClr, nAlpha );
+ else
+ WriteColor( sSchemeClr, aTransformations );
+ }
+
+ mpFS->endElement( nEffectToken );
+}
+
+static sal_Int32 lcl_CalculateDist(const double dX, const double dY)
+{
+ return static_cast< sal_Int32 >(sqrt(dX*dX + dY*dY) * 360);
+}
+
+static sal_Int32 lcl_CalculateDir(const double dX, const double dY)
+{
+ return (static_cast< sal_Int32 >(basegfx::rad2deg<60000>(atan2(dY,dX))) + 21600000) % 21600000;
+}
+
+void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
+{
+ Sequence< PropertyValue > aGrabBag, aEffects, aOuterShdwProps;
+ bool bHasInteropGrabBag = rXPropSet->getPropertySetInfo()->hasPropertyByName("InteropGrabBag");
+ if (bHasInteropGrabBag && GetProperty(rXPropSet, "InteropGrabBag"))
+ {
+ mAny >>= aGrabBag;
+ auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
+ [](const PropertyValue& rProp) { return rProp.Name == "EffectProperties"; });
+ if (pProp != std::cend(aGrabBag))
+ {
+ pProp->Value >>= aEffects;
+ auto pEffect = std::find_if(std::cbegin(aEffects), std::cend(aEffects),
+ [](const PropertyValue& rEffect) { return rEffect.Name == "outerShdw"; });
+ if (pEffect != std::cend(aEffects))
+ pEffect->Value >>= aOuterShdwProps;
+ }
+ }
+
+ // tdf#132201: the order of effects is important. Effects order (CT_EffectList in ECMA-376):
+ // blur -> fillOverlay -> glow -> innerShdw -> outerShdw -> prstShdw -> reflection -> softEdge
+
+ if( !aEffects.hasElements() )
+ {
+ bool bHasShadow = false;
+ if( GetProperty( rXPropSet, "Shadow" ) )
+ mAny >>= bHasShadow;
+ bool bHasEffects = bHasShadow;
+ if (!bHasEffects && GetProperty(rXPropSet, "GlowEffectRadius"))
+ {
+ sal_Int32 rad = 0;
+ mAny >>= rad;
+ bHasEffects = rad > 0;
+ }
+ if (!bHasEffects && GetProperty(rXPropSet, "SoftEdgeRadius"))
+ {
+ sal_Int32 rad = 0;
+ mAny >>= rad;
+ bHasEffects = rad > 0;
+ }
+
+ if (bHasEffects)
+ {
+ mpFS->startElementNS(XML_a, XML_effectLst);
+ WriteGlowEffect(rXPropSet);
+ if( bHasShadow )
+ {
+ double dX = +0.0, dY = +0.0;
+ sal_Int32 nBlur =0;
+ rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX;
+ rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY;
+ rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur;
+
+ Sequence< PropertyValue > aShadowAttribsGrabBag{
+ comphelper::makePropertyValue("dist", lcl_CalculateDist(dX, dY)),
+ comphelper::makePropertyValue("dir", lcl_CalculateDir(dX, dY)),
+ comphelper::makePropertyValue("blurRad", oox::drawingml::convertHmmToEmu(nBlur)),
+ comphelper::makePropertyValue("rotWithShape", false) //ooxml default is 'true', so must write it
+ };
+
+ Sequence< PropertyValue > aShadowGrabBag{
+ comphelper::makePropertyValue("Attribs", aShadowAttribsGrabBag),
+ comphelper::makePropertyValue("RgbClr", rXPropSet->getPropertyValue( "ShadowColor" )),
+ comphelper::makePropertyValue("RgbClrTransparency", rXPropSet->getPropertyValue( "ShadowTransparence" ))
+ };
+
+ WriteShapeEffect( u"outerShdw", aShadowGrabBag );
+ }
+ WriteSoftEdgeEffect(rXPropSet);
+ mpFS->endElementNS(XML_a, XML_effectLst);
+ }
+ }
+ else
+ {
+ for( auto& rOuterShdwProp : asNonConstRange(aOuterShdwProps) )
+ {
+ if( rOuterShdwProp.Name == "Attribs" )
+ {
+ Sequence< PropertyValue > aAttribsProps;
+ rOuterShdwProp.Value >>= aAttribsProps;
+
+ double dX = +0.0, dY = +0.0;
+ sal_Int32 nBlur =0;
+ rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX;
+ rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY;
+ rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur;
+
+
+ for( auto& rAttribsProp : asNonConstRange(aAttribsProps) )
+ {
+ if( rAttribsProp.Name == "dist" )
+ {
+ rAttribsProp.Value <<= lcl_CalculateDist(dX, dY);
+ }
+ else if( rAttribsProp.Name == "dir" )
+ {
+ rAttribsProp.Value <<= lcl_CalculateDir(dX, dY);
+ }
+ else if( rAttribsProp.Name == "blurRad" )
+ {
+ rAttribsProp.Value <<= oox::drawingml::convertHmmToEmu(nBlur);
+ }
+ }
+
+ rOuterShdwProp.Value <<= aAttribsProps;
+ }
+ else if( rOuterShdwProp.Name == "RgbClr" )
+ {
+ rOuterShdwProp.Value = rXPropSet->getPropertyValue( "ShadowColor" );
+ }
+ else if( rOuterShdwProp.Name == "RgbClrTransparency" )
+ {
+ rOuterShdwProp.Value = rXPropSet->getPropertyValue( "ShadowTransparence" );
+ }
+ }
+
+ mpFS->startElementNS(XML_a, XML_effectLst);
+ bool bGlowWritten = false;
+ for( const auto& rEffect : std::as_const(aEffects) )
+ {
+ if (!bGlowWritten
+ && (rEffect.Name == "innerShdw" || rEffect.Name == "outerShdw"
+ || rEffect.Name == "prstShdw" || rEffect.Name == "reflection"
+ || rEffect.Name == "softEdge"))
+ {
+ WriteGlowEffect(rXPropSet);
+ bGlowWritten = true;
+ }
+
+ if( rEffect.Name == "outerShdw" )
+ {
+ WriteShapeEffect( rEffect.Name, aOuterShdwProps );
+ }
+ else
+ {
+ Sequence< PropertyValue > aEffectProps;
+ rEffect.Value >>= aEffectProps;
+ WriteShapeEffect( rEffect.Name, aEffectProps );
+ }
+ }
+ if (!bGlowWritten)
+ WriteGlowEffect(rXPropSet);
+ WriteSoftEdgeEffect(rXPropSet); // the last
+
+ mpFS->endElementNS(XML_a, XML_effectLst);
+ }
+}
+
+void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet)
+{
+ if (!rXPropSet->getPropertySetInfo()->hasPropertyByName("GlowEffectRadius"))
+ {
+ return;
+ }
+
+ sal_Int32 nRad = 0;
+ rXPropSet->getPropertyValue("GlowEffectRadius") >>= nRad;
+ if (!nRad)
+ return;
+
+ Sequence< PropertyValue > aGlowAttribs{ comphelper::makePropertyValue(
+ "rad", oox::drawingml::convertHmmToEmu(nRad)) };
+ Sequence< PropertyValue > aGlowProps{
+ comphelper::makePropertyValue("Attribs", aGlowAttribs),
+ comphelper::makePropertyValue("RgbClr", rXPropSet->getPropertyValue("GlowEffectColor")),
+ comphelper::makePropertyValue("RgbClrTransparency", rXPropSet->getPropertyValue("GlowEffectTransparency"))
+ };
+ // TODO other stuff like saturation or luminance
+
+ WriteShapeEffect(u"glow", aGlowProps);
+}
+
+void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet)
+{
+ if (!rXPropSet->getPropertySetInfo()->hasPropertyByName("SoftEdgeRadius"))
+ {
+ return;
+ }
+
+ sal_Int32 nRad = 0;
+ rXPropSet->getPropertyValue("SoftEdgeRadius") >>= nRad;
+ if (!nRad)
+ return;
+
+ css::uno::Sequence<css::beans::PropertyValue> aAttribs{ comphelper::makePropertyValue(
+ "rad", oox::drawingml::convertHmmToEmu(nRad)) };
+ css::uno::Sequence<css::beans::PropertyValue> aProps{ comphelper::makePropertyValue("Attribs",
+ aAttribs) };
+
+ WriteShapeEffect(u"softEdge", aProps);
+}
+
+void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bIsText )
+{
+ // check existence of the grab bag
+ if( !GetProperty( xPropSet, "InteropGrabBag" ) )
+ return;
+
+ // extract the relevant properties from the grab bag
+ Sequence< PropertyValue > aGrabBag, aEffectProps, aLightRigProps, aShape3DProps;
+ mAny >>= aGrabBag;
+
+ auto pShapeProp = std::find_if( std::cbegin(aGrabBag), std::cend(aGrabBag),
+ [bIsText](const PropertyValue& rProp)
+ { return rProp.Name == (bIsText ? u"Text3DEffectProperties" : u"3DEffectProperties"); });
+ if (pShapeProp != std::cend(aGrabBag))
+ {
+ Sequence< PropertyValue > a3DEffectProps;
+ pShapeProp->Value >>= a3DEffectProps;
+ for( const auto& r3DEffectProp : std::as_const(a3DEffectProps) )
+ {
+ if( r3DEffectProp.Name == "Camera" )
+ r3DEffectProp.Value >>= aEffectProps;
+ else if( r3DEffectProp.Name == "LightRig" )
+ r3DEffectProp.Value >>= aLightRigProps;
+ else if( r3DEffectProp.Name == "Shape3D" )
+ r3DEffectProp.Value >>= aShape3DProps;
+ }
+ }
+
+ if( !aEffectProps.hasElements() && !aLightRigProps.hasElements() && !aShape3DProps.hasElements() )
+ return;
+
+ bool bCameraRotationPresent = false;
+ rtl::Reference<sax_fastparser::FastAttributeList> aCameraAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aCameraRotationAttrList = FastSerializerHelper::createAttrList();
+ for( const auto& rEffectProp : std::as_const(aEffectProps) )
+ {
+ if( rEffectProp.Name == "prst" )
+ {
+ OUString sVal;
+ rEffectProp.Value >>= sVal;
+ aCameraAttrList->add(XML_prst, sVal);
+ }
+ else if( rEffectProp.Name == "fov" )
+ {
+ float fVal = 0;
+ rEffectProp.Value >>= fVal;
+ aCameraAttrList->add( XML_fov, OString::number( fVal * 60000 ).getStr() );
+ }
+ else if( rEffectProp.Name == "zoom" )
+ {
+ float fVal = 1;
+ rEffectProp.Value >>= fVal;
+ aCameraAttrList->add( XML_zoom, OString::number( fVal * 100000 ).getStr() );
+ }
+ else if( rEffectProp.Name == "rotLat" ||
+ rEffectProp.Name == "rotLon" ||
+ rEffectProp.Name == "rotRev" )
+ {
+ sal_Int32 nVal = 0, nToken = XML_none;
+ rEffectProp.Value >>= nVal;
+ if( rEffectProp.Name == "rotLat" )
+ nToken = XML_lat;
+ else if( rEffectProp.Name == "rotLon" )
+ nToken = XML_lon;
+ else if( rEffectProp.Name == "rotRev" )
+ nToken = XML_rev;
+ aCameraRotationAttrList->add( nToken, OString::number( nVal ).getStr() );
+ bCameraRotationPresent = true;
+ }
+ }
+
+ bool bLightRigRotationPresent = false;
+ rtl::Reference<sax_fastparser::FastAttributeList> aLightRigAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aLightRigRotationAttrList = FastSerializerHelper::createAttrList();
+ for( const auto& rLightRigProp : std::as_const(aLightRigProps) )
+ {
+ if( rLightRigProp.Name == "rig" || rLightRigProp.Name == "dir" )
+ {
+ OUString sVal;
+ sal_Int32 nToken = XML_none;
+ rLightRigProp.Value >>= sVal;
+ if( rLightRigProp.Name == "rig" )
+ nToken = XML_rig;
+ else if( rLightRigProp.Name == "dir" )
+ nToken = XML_dir;
+ aLightRigAttrList->add(nToken, sVal);
+ }
+ else if( rLightRigProp.Name == "rotLat" ||
+ rLightRigProp.Name == "rotLon" ||
+ rLightRigProp.Name == "rotRev" )
+ {
+ sal_Int32 nVal = 0, nToken = XML_none;
+ rLightRigProp.Value >>= nVal;
+ if( rLightRigProp.Name == "rotLat" )
+ nToken = XML_lat;
+ else if( rLightRigProp.Name == "rotLon" )
+ nToken = XML_lon;
+ else if( rLightRigProp.Name == "rotRev" )
+ nToken = XML_rev;
+ aLightRigRotationAttrList->add( nToken, OString::number( nVal ).getStr() );
+ bLightRigRotationPresent = true;
+ }
+ }
+
+ mpFS->startElementNS(XML_a, XML_scene3d);
+
+ if( aEffectProps.hasElements() )
+ {
+ mpFS->startElementNS( XML_a, XML_camera, aCameraAttrList );
+ if( bCameraRotationPresent )
+ {
+ mpFS->singleElementNS( XML_a, XML_rot, aCameraRotationAttrList );
+ }
+ mpFS->endElementNS( XML_a, XML_camera );
+ }
+ else
+ {
+ // a:camera with Word default values - Word won't open the document if this is not present
+ mpFS->singleElementNS(XML_a, XML_camera, XML_prst, "orthographicFront");
+ }
+
+ if( aEffectProps.hasElements() )
+ {
+ mpFS->startElementNS( XML_a, XML_lightRig, aLightRigAttrList );
+ if( bLightRigRotationPresent )
+ {
+ mpFS->singleElementNS( XML_a, XML_rot, aLightRigRotationAttrList );
+ }
+ mpFS->endElementNS( XML_a, XML_lightRig );
+ }
+ else
+ {
+ // a:lightRig with Word default values - Word won't open the document if this is not present
+ mpFS->singleElementNS(XML_a, XML_lightRig, XML_rig, "threePt", XML_dir, "t");
+ }
+
+ mpFS->endElementNS( XML_a, XML_scene3d );
+
+ if( !aShape3DProps.hasElements() )
+ return;
+
+ bool bBevelTPresent = false, bBevelBPresent = false;
+ Sequence< PropertyValue > aExtrusionColorProps, aContourColorProps;
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelTAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelBAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aShape3DAttrList = FastSerializerHelper::createAttrList();
+ for( const auto& rShape3DProp : std::as_const(aShape3DProps) )
+ {
+ if( rShape3DProp.Name == "extrusionH" || rShape3DProp.Name == "contourW" || rShape3DProp.Name == "z" )
+ {
+ sal_Int32 nVal = 0, nToken = XML_none;
+ rShape3DProp.Value >>= nVal;
+ if( rShape3DProp.Name == "extrusionH" )
+ nToken = XML_extrusionH;
+ else if( rShape3DProp.Name == "contourW" )
+ nToken = XML_contourW;
+ else if( rShape3DProp.Name == "z" )
+ nToken = XML_z;
+ aShape3DAttrList->add( nToken, OString::number( nVal ).getStr() );
+ }
+ else if( rShape3DProp.Name == "prstMaterial" )
+ {
+ OUString sVal;
+ rShape3DProp.Value >>= sVal;
+ aShape3DAttrList->add(XML_prstMaterial, sVal);
+ }
+ else if( rShape3DProp.Name == "extrusionClr" )
+ {
+ rShape3DProp.Value >>= aExtrusionColorProps;
+ }
+ else if( rShape3DProp.Name == "contourClr" )
+ {
+ rShape3DProp.Value >>= aContourColorProps;
+ }
+ else if( rShape3DProp.Name == "bevelT" || rShape3DProp.Name == "bevelB" )
+ {
+ Sequence< PropertyValue > aBevelProps;
+ rShape3DProp.Value >>= aBevelProps;
+ if ( !aBevelProps.hasElements() )
+ continue;
+
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelAttrList;
+ if( rShape3DProp.Name == "bevelT" )
+ {
+ bBevelTPresent = true;
+ aBevelAttrList = aBevelTAttrList;
+ }
+ else
+ {
+ bBevelBPresent = true;
+ aBevelAttrList = aBevelBAttrList;
+ }
+ for( const auto& rBevelProp : std::as_const(aBevelProps) )
+ {
+ if( rBevelProp.Name == "w" || rBevelProp.Name == "h" )
+ {
+ sal_Int32 nVal = 0, nToken = XML_none;
+ rBevelProp.Value >>= nVal;
+ if( rBevelProp.Name == "w" )
+ nToken = XML_w;
+ else if( rBevelProp.Name == "h" )
+ nToken = XML_h;
+ aBevelAttrList->add( nToken, OString::number( nVal ).getStr() );
+ }
+ else if( rBevelProp.Name == "prst" )
+ {
+ OUString sVal;
+ rBevelProp.Value >>= sVal;
+ aBevelAttrList->add(XML_prst, sVal);
+ }
+ }
+
+ }
+ }
+
+ mpFS->startElementNS( XML_a, XML_sp3d, aShape3DAttrList );
+ if( bBevelTPresent )
+ {
+ mpFS->singleElementNS( XML_a, XML_bevelT, aBevelTAttrList );
+ }
+ if( bBevelBPresent )
+ {
+ mpFS->singleElementNS( XML_a, XML_bevelB, aBevelBAttrList );
+ }
+ if( aExtrusionColorProps.hasElements() )
+ {
+ OUString sSchemeClr;
+ ::Color nColor;
+ sal_Int32 nTransparency(0);
+ Sequence< PropertyValue > aColorTransformations;
+ for( const auto& rExtrusionColorProp : std::as_const(aExtrusionColorProps) )
+ {
+ if( rExtrusionColorProp.Name == "schemeClr" )
+ rExtrusionColorProp.Value >>= sSchemeClr;
+ else if( rExtrusionColorProp.Name == "schemeClrTransformations" )
+ rExtrusionColorProp.Value >>= aColorTransformations;
+ else if( rExtrusionColorProp.Name == "rgbClr" )
+ rExtrusionColorProp.Value >>= nColor;
+ else if( rExtrusionColorProp.Name == "rgbClrTransparency" )
+ rExtrusionColorProp.Value >>= nTransparency;
+ }
+ mpFS->startElementNS(XML_a, XML_extrusionClr);
+
+ if( sSchemeClr.isEmpty() )
+ WriteColor( nColor, MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
+ else
+ WriteColor( sSchemeClr, aColorTransformations );
+
+ mpFS->endElementNS( XML_a, XML_extrusionClr );
+ }
+ if( aContourColorProps.hasElements() )
+ {
+ OUString sSchemeClr;
+ ::Color nColor;
+ sal_Int32 nTransparency(0);
+ Sequence< PropertyValue > aColorTransformations;
+ for( const auto& rContourColorProp : std::as_const(aContourColorProps) )
+ {
+ if( rContourColorProp.Name == "schemeClr" )
+ rContourColorProp.Value >>= sSchemeClr;
+ else if( rContourColorProp.Name == "schemeClrTransformations" )
+ rContourColorProp.Value >>= aColorTransformations;
+ else if( rContourColorProp.Name == "rgbClr" )
+ rContourColorProp.Value >>= nColor;
+ else if( rContourColorProp.Name == "rgbClrTransparency" )
+ rContourColorProp.Value >>= nTransparency;
+ }
+ mpFS->startElementNS(XML_a, XML_contourClr);
+
+ if( sSchemeClr.isEmpty() )
+ WriteColor( nColor, MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
+ else
+ WriteColor( sSchemeClr, aContourColorProps );
+
+ mpFS->endElementNS( XML_a, XML_contourClr );
+ }
+ mpFS->endElementNS( XML_a, XML_sp3d );
+}
+
+void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet )
+{
+ if( !GetProperty( rXPropSet, "InteropGrabBag" ) )
+ return;
+
+ PropertyValue aEffect;
+ Sequence< PropertyValue > aGrabBag;
+ mAny >>= aGrabBag;
+ auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
+ [](const PropertyValue& rProp) { return rProp.Name == "ArtisticEffectProperties"; });
+ if (pProp != std::cend(aGrabBag))
+ pProp->Value >>= aEffect;
+ sal_Int32 nEffectToken = ArtisticEffectProperties::getEffectToken( aEffect.Name );
+ if( nEffectToken == XML_none )
+ return;
+
+ Sequence< PropertyValue > aAttrs;
+ aEffect.Value >>= aAttrs;
+ rtl::Reference<sax_fastparser::FastAttributeList> aAttrList = FastSerializerHelper::createAttrList();
+ OString sRelId;
+ for( const auto& rAttr : std::as_const(aAttrs) )
+ {
+ sal_Int32 nToken = ArtisticEffectProperties::getEffectToken( rAttr.Name );
+ if( nToken != XML_none )
+ {
+ sal_Int32 nVal = 0;
+ rAttr.Value >>= nVal;
+ aAttrList->add( nToken, OString::number( nVal ).getStr() );
+ }
+ else if( rAttr.Name == "OriginalGraphic" )
+ {
+ Sequence< PropertyValue > aGraphic;
+ rAttr.Value >>= aGraphic;
+ Sequence< sal_Int8 > aGraphicData;
+ OUString sGraphicId;
+ for( const auto& rProp : std::as_const(aGraphic) )
+ {
+ if( rProp.Name == "Id" )
+ rProp.Value >>= sGraphicId;
+ else if( rProp.Name == "Data" )
+ rProp.Value >>= aGraphicData;
+ }
+ sRelId = WriteWdpPicture( sGraphicId, aGraphicData );
+ }
+ }
+
+ mpFS->startElementNS(XML_a, XML_extLst);
+ mpFS->startElementNS(XML_a, XML_ext, XML_uri, "{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}");
+ mpFS->startElementNS( XML_a14, XML_imgProps,
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)) );
+ mpFS->startElementNS(XML_a14, XML_imgLayer, FSNS(XML_r, XML_embed), sRelId);
+ mpFS->startElementNS(XML_a14, XML_imgEffect);
+
+ mpFS->singleElementNS( XML_a14, nEffectToken, aAttrList );
+
+ mpFS->endElementNS( XML_a14, XML_imgEffect );
+ mpFS->endElementNS( XML_a14, XML_imgLayer );
+ mpFS->endElementNS( XML_a14, XML_imgProps );
+ mpFS->endElementNS( XML_a, XML_ext );
+ mpFS->endElementNS( XML_a, XML_extLst );
+}
+
+OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal_Int8 >& rPictureData )
+{
+ if (!maWdpCache.empty())
+ {
+ std::map<OUString, OUString>::iterator aCachedItem = maWdpCache.top().find(rFileId);
+ if (aCachedItem != maWdpCache.top().end())
+ return OUStringToOString(aCachedItem->second, RTL_TEXTENCODING_UTF8);
+ }
+
+ OUString sFileName = "media/hdphoto" + OUString::number( mnWdpImageCounter.top()++ ) + ".wdp";
+ Reference< XOutputStream > xOutStream = mpFB->openFragmentStream( OUStringBuffer()
+ .appendAscii( GetComponentDir() )
+ .append( "/" + sFileName )
+ .makeStringAndClear(),
+ "image/vnd.ms-photo" );
+ OUString sId;
+ xOutStream->writeBytes( rPictureData );
+ xOutStream->closeOutput();
+
+ sId = mpFB->addRelation( mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HDPHOTO),
+ OUStringBuffer()
+ .appendAscii( GetRelationCompPrefix() )
+ .append( sFileName )
+ .makeStringAndClear() );
+
+ if (!maWdpCache.empty())
+ maWdpCache.top()[rFileId] = sId;
+
+ return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
+}
+
+void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId)
+{
+ uno::Reference<beans::XPropertySet> xPropSet(rXShape, uno::UNO_QUERY);
+
+ uno::Reference<xml::dom::XDocument> dataDom;
+ uno::Reference<xml::dom::XDocument> layoutDom;
+ uno::Reference<xml::dom::XDocument> styleDom;
+ uno::Reference<xml::dom::XDocument> colorDom;
+ uno::Reference<xml::dom::XDocument> drawingDom;
+ uno::Sequence<uno::Sequence<uno::Any>> xDataRelSeq;
+ uno::Sequence<uno::Any> diagramDrawing;
+
+ // retrieve the doms from the GrabBag
+ uno::Sequence<beans::PropertyValue> propList;
+ xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList;
+ for (const auto& rProp : std::as_const(propList))
+ {
+ OUString propName = rProp.Name;
+ if (propName == "OOXData")
+ rProp.Value >>= dataDom;
+ else if (propName == "OOXLayout")
+ rProp.Value >>= layoutDom;
+ else if (propName == "OOXStyle")
+ rProp.Value >>= styleDom;
+ else if (propName == "OOXColor")
+ rProp.Value >>= colorDom;
+ else if (propName == "OOXDrawing")
+ {
+ rProp.Value >>= diagramDrawing;
+ diagramDrawing[0]
+ >>= drawingDom; // if there is OOXDrawing property then set drawingDom here only.
+ }
+ else if (propName == "OOXDiagramDataRels")
+ rProp.Value >>= xDataRelSeq;
+ }
+
+ // check that we have the 4 mandatory XDocuments
+ // if not, there was an error importing and we won't output anything
+ if (!dataDom.is() || !layoutDom.is() || !styleDom.is() || !colorDom.is())
+ return;
+
+ // generate a unique id
+ rtl::Reference<sax_fastparser::FastAttributeList> pDocPrAttrList
+ = sax_fastparser::FastSerializerHelper::createAttrList();
+ pDocPrAttrList->add(XML_id, OString::number(nDiagramId).getStr());
+ OString sName = "Diagram" + OString::number(nDiagramId);
+ pDocPrAttrList->add(XML_name, sName);
+
+ if (GetDocumentType() == DOCUMENT_DOCX)
+ {
+ mpFS->singleElementNS(XML_wp, XML_docPr, pDocPrAttrList);
+ mpFS->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
+
+ mpFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
+ mpFB->getNamespaceURL(OOX_NS(dml)));
+ }
+ else
+ {
+ mpFS->startElementNS(XML_p, XML_nvGraphicFramePr);
+
+ mpFS->singleElementNS(XML_p, XML_cNvPr, pDocPrAttrList);
+ mpFS->singleElementNS(XML_p, XML_cNvGraphicFramePr);
+
+ mpFS->startElementNS(XML_p, XML_nvPr);
+ mpFS->startElementNS(XML_p, XML_extLst);
+ // change tracking extension - required in PPTX
+ mpFS->startElementNS(XML_p, XML_ext, XML_uri, "{D42A27DB-BD31-4B8C-83A1-F6EECF244321}");
+ mpFS->singleElementNS(XML_p14, XML_modId,
+ FSNS(XML_xmlns, XML_p14), mpFB->getNamespaceURL(OOX_NS(p14)),
+ XML_val,
+ OString::number(comphelper::rng::uniform_uint_distribution(1, SAL_MAX_UINT32)));
+ mpFS->endElementNS(XML_p, XML_ext);
+ mpFS->endElementNS(XML_p, XML_extLst);
+ mpFS->endElementNS(XML_p, XML_nvPr);
+
+ mpFS->endElementNS(XML_p, XML_nvGraphicFramePr);
+
+ // store size and position of background shape instead of group shape
+ // as some shapes may be outside
+ css::uno::Reference<css::drawing::XShapes> xShapes(rXShape, uno::UNO_QUERY);
+ if (xShapes.is() && xShapes->hasElements())
+ {
+ css::uno::Reference<css::drawing::XShape> xShapeBg(xShapes->getByIndex(0),
+ uno::UNO_QUERY);
+ awt::Point aPos = xShapeBg->getPosition();
+ awt::Size aSize = xShapeBg->getSize();
+ WriteTransformation(
+ xShapeBg, tools::Rectangle(Point(aPos.X, aPos.Y), Size(aSize.Width, aSize.Height)),
+ XML_p, false, false, 0, false);
+ }
+
+ mpFS->startElementNS(XML_a, XML_graphic);
+ }
+
+ mpFS->startElementNS(XML_a, XML_graphicData, XML_uri,
+ "http://schemas.openxmlformats.org/drawingml/2006/diagram");
+
+ OUString sRelationCompPrefix = OUString::createFromAscii(GetRelationCompPrefix());
+
+ // add data relation
+ OUString dataFileName = "diagrams/data" + OUString::number(nDiagramId) + ".xml";
+ OUString dataRelId =
+ mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(Relationship::DIAGRAMDATA),
+ OUStringConcatenation(sRelationCompPrefix + dataFileName));
+
+ // add layout relation
+ OUString layoutFileName = "diagrams/layout" + OUString::number(nDiagramId) + ".xml";
+ OUString layoutRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::DIAGRAMLAYOUT),
+ OUStringConcatenation(sRelationCompPrefix + layoutFileName));
+
+ // add style relation
+ OUString styleFileName = "diagrams/quickStyle" + OUString::number(nDiagramId) + ".xml";
+ OUString styleRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::DIAGRAMQUICKSTYLE),
+ OUStringConcatenation(sRelationCompPrefix + styleFileName));
+
+ // add color relation
+ OUString colorFileName = "diagrams/colors" + OUString::number(nDiagramId) + ".xml";
+ OUString colorRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::DIAGRAMCOLORS),
+ OUStringConcatenation(sRelationCompPrefix + colorFileName));
+
+ OUString drawingFileName;
+ if (drawingDom.is())
+ {
+ // add drawing relation
+ drawingFileName = "diagrams/drawing" + OUString::number(nDiagramId) + ".xml";
+ OUString drawingRelId = mpFB->addRelation(
+ mpFS->getOutputStream(), oox::getRelationship(Relationship::DIAGRAMDRAWING),
+ OUStringConcatenation(sRelationCompPrefix + drawingFileName));
+
+ // the data dom contains a reference to the drawing relation. We need to update it with the new generated
+ // relation value before writing the dom to a file
+
+ // Get the dsp:damaModelExt node from the dom
+ uno::Reference<xml::dom::XNodeList> nodeList = dataDom->getElementsByTagNameNS(
+ "http://schemas.microsoft.com/office/drawing/2008/diagram", "dataModelExt");
+
+ // There must be one element only so get it
+ uno::Reference<xml::dom::XNode> node = nodeList->item(0);
+
+ // Get the list of attributes of the node
+ uno::Reference<xml::dom::XNamedNodeMap> nodeMap = node->getAttributes();
+
+ // Get the node with the relId attribute and set its new value
+ uno::Reference<xml::dom::XNode> relIdNode = nodeMap->getNamedItem("relId");
+ relIdNode->setNodeValue(drawingRelId);
+ }
+
+ mpFS->singleElementNS(XML_dgm, XML_relIds,
+ FSNS(XML_xmlns, XML_dgm), mpFB->getNamespaceURL(OOX_NS(dmlDiagram)),
+ FSNS(XML_xmlns, XML_r), mpFB->getNamespaceURL(OOX_NS(officeRel)),
+ FSNS(XML_r, XML_dm), dataRelId, FSNS(XML_r, XML_lo), layoutRelId,
+ FSNS(XML_r, XML_qs), styleRelId, FSNS(XML_r, XML_cs), colorRelId);
+
+ mpFS->endElementNS(XML_a, XML_graphicData);
+ mpFS->endElementNS(XML_a, XML_graphic);
+
+ uno::Reference<xml::sax::XSAXSerializable> serializer;
+ uno::Reference<xml::sax::XWriter> writer
+ = xml::sax::Writer::create(comphelper::getProcessComponentContext());
+
+ OUString sDir = OUString::createFromAscii(GetComponentDir());
+
+ // write data file
+ serializer.set(dataDom, uno::UNO_QUERY);
+ uno::Reference<io::XOutputStream> xDataOutputStream = mpFB->openFragmentStream(
+ sDir + "/" + dataFileName,
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml");
+ writer->setOutputStream(xDataOutputStream);
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // write the associated Images and rels for data file
+ writeDiagramRels(xDataRelSeq, xDataOutputStream, u"OOXDiagramDataRels", nDiagramId);
+
+ // write layout file
+ serializer.set(layoutDom, uno::UNO_QUERY);
+ writer->setOutputStream(mpFB->openFragmentStream(
+ sDir + "/" + layoutFileName,
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"));
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // write style file
+ serializer.set(styleDom, uno::UNO_QUERY);
+ writer->setOutputStream(mpFB->openFragmentStream(
+ sDir + "/" + styleFileName,
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"));
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // write color file
+ serializer.set(colorDom, uno::UNO_QUERY);
+ writer->setOutputStream(mpFB->openFragmentStream(
+ sDir + "/" + colorFileName,
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"));
+ serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // write drawing file
+ if (!drawingDom.is())
+ return;
+
+ serializer.set(drawingDom, uno::UNO_QUERY);
+ uno::Reference<io::XOutputStream> xDrawingOutputStream = mpFB->openFragmentStream(
+ sDir + "/" + drawingFileName, "application/vnd.ms-office.drawingml.diagramDrawing+xml");
+ writer->setOutputStream(xDrawingOutputStream);
+ serializer->serialize(
+ uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence<beans::StringPair>());
+
+ // write the associated Images and rels for drawing file
+ uno::Sequence<uno::Sequence<uno::Any>> xDrawingRelSeq;
+ diagramDrawing[1] >>= xDrawingRelSeq;
+ writeDiagramRels(xDrawingRelSeq, xDrawingOutputStream, u"OOXDiagramDrawingRels", nDiagramId);
+}
+
+void DrawingML::writeDiagramRels(const uno::Sequence<uno::Sequence<uno::Any>>& xRelSeq,
+ const uno::Reference<io::XOutputStream>& xOutStream,
+ std::u16string_view sGrabBagProperyName, int nDiagramId)
+{
+ // add image relationships of OOXData, OOXDiagram
+ OUString sType(oox::getRelationship(Relationship::IMAGE));
+ uno::Reference<xml::sax::XWriter> xWriter
+ = xml::sax::Writer::create(comphelper::getProcessComponentContext());
+ xWriter->setOutputStream(xOutStream);
+
+ // retrieve the relationships from Sequence
+ for (sal_Int32 j = 0; j < xRelSeq.getLength(); j++)
+ {
+ // diagramDataRelTuple[0] => RID,
+ // diagramDataRelTuple[1] => xInputStream
+ // diagramDataRelTuple[2] => extension
+ uno::Sequence<uno::Any> diagramDataRelTuple = xRelSeq[j];
+
+ OUString sRelId;
+ OUString sExtension;
+ diagramDataRelTuple[0] >>= sRelId;
+ diagramDataRelTuple[2] >>= sExtension;
+ OUString sContentType;
+ if (sExtension.equalsIgnoreAsciiCase(".WMF"))
+ sContentType = "image/x-wmf";
+ else
+ sContentType = OUString::Concat("image/") + sExtension.subView(1);
+ sRelId = sRelId.copy(3);
+
+ StreamDataSequence dataSeq;
+ diagramDataRelTuple[1] >>= dataSeq;
+ uno::Reference<io::XInputStream> dataImagebin(
+ new ::comphelper::SequenceInputStream(dataSeq));
+
+ //nDiagramId is used to make the name unique irrespective of the number of smart arts.
+ OUString sFragment = OUString::Concat("media/") + sGrabBagProperyName
+ + OUString::number(nDiagramId) + "_"
+ + OUString::number(j) + sExtension;
+
+ PropertySet aProps(xOutStream);
+ aProps.setAnyProperty(PROP_RelId, uno::Any(sRelId.toInt32()));
+
+ mpFB->addRelation(xOutStream, sType, OUStringConcatenation("../" + sFragment));
+
+ OUString sDir = OUString::createFromAscii(GetComponentDir());
+ uno::Reference<io::XOutputStream> xBinOutStream
+ = mpFB->openFragmentStream(sDir + "/" + sFragment, sContentType);
+
+ try
+ {
+ comphelper::OStorageHelper::CopyInputToOutput(dataImagebin, xBinOutStream);
+ }
+ catch (const uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.drawingml", "DrawingML::writeDiagramRels Failed to copy grabbaged Image");
+ }
+ dataImagebin->closeInput();
+ }
+}
+
+void DrawingML::WriteFromTo(const uno::Reference<css::drawing::XShape>& rXShape, const awt::Size& aPageSize,
+ const FSHelperPtr& pDrawing)
+{
+ awt::Point aTopLeft = rXShape->getPosition();
+ awt::Size aSize = rXShape->getSize();
+
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(rXShape);
+ if (pObj)
+ {
+ Degree100 nRotation = pObj->GetRotateAngle();
+ if (nRotation)
+ {
+ sal_Int16 nHalfWidth = aSize.Width / 2;
+ sal_Int16 nHalfHeight = aSize.Height / 2;
+ // aTopLeft needs correction for rotated customshapes
+ if (pObj->GetObjIdentifier() == SdrObjKind::CustomShape)
+ {
+ // Center of bounding box of the rotated shape
+ const auto aSnapRectCenter(pObj->GetSnapRect().Center());
+ aTopLeft.X = aSnapRectCenter.X() - nHalfWidth;
+ aTopLeft.Y = aSnapRectCenter.Y() - nHalfHeight;
+ }
+
+ // MSO changes the anchor positions at these angles and that does an extra 90 degrees
+ // rotation on our shapes, so we output it in such position that MSO
+ // can draw this shape correctly.
+ if ((nRotation >= 4500_deg100 && nRotation < 13500_deg100) || (nRotation >= 22500_deg100 && nRotation < 31500_deg100))
+ {
+ aTopLeft.X = aTopLeft.X - nHalfHeight + nHalfWidth;
+ aTopLeft.Y = aTopLeft.Y - nHalfWidth + nHalfHeight;
+
+ std::swap(aSize.Width, aSize.Height);
+ }
+ }
+ }
+
+ tools::Rectangle aLocation(aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height);
+ double nXpos = static_cast<double>(aLocation.TopLeft().getX()) / static_cast<double>(aPageSize.Width);
+ double nYpos = static_cast<double>(aLocation.TopLeft().getY()) / static_cast<double>(aPageSize.Height);
+
+ pDrawing->startElement(FSNS(XML_cdr, XML_from));
+ pDrawing->startElement(FSNS(XML_cdr, XML_x));
+ pDrawing->write(nXpos);
+ pDrawing->endElement(FSNS(XML_cdr, XML_x));
+ pDrawing->startElement(FSNS(XML_cdr, XML_y));
+ pDrawing->write(nYpos);
+ pDrawing->endElement(FSNS(XML_cdr, XML_y));
+ pDrawing->endElement(FSNS(XML_cdr, XML_from));
+
+ nXpos = static_cast<double>(aLocation.BottomRight().getX()) / static_cast<double>(aPageSize.Width);
+ nYpos = static_cast<double>(aLocation.BottomRight().getY()) / static_cast<double>(aPageSize.Height);
+
+ pDrawing->startElement(FSNS(XML_cdr, XML_to));
+ pDrawing->startElement(FSNS(XML_cdr, XML_x));
+ pDrawing->write(nXpos);
+ pDrawing->endElement(FSNS(XML_cdr, XML_x));
+ pDrawing->startElement(FSNS(XML_cdr, XML_y));
+ pDrawing->write(nYpos);
+ pDrawing->endElement(FSNS(XML_cdr, XML_y));
+ pDrawing->endElement(FSNS(XML_cdr, XML_to));
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/ooxml-export-notes.txt b/oox/source/export/ooxml-export-notes.txt
new file mode 100644
index 000000000..36c42fc53
--- /dev/null
+++ b/oox/source/export/ooxml-export-notes.txt
@@ -0,0 +1,235 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+OOXML generally
+---------------
+
+- http://www.ecma-international.org/publications/standards/Ecma-376.htm
+- http://www.asahi-net.or.jp/~eb2m-mrt/ooxml/dependencies.html
+
+Related modules
+---------------
+
+- oox
+ - .xlsx and .pptx import
+
+- writerfilter
+ - import of .docx, uses also oox for the graphics etc.
+
+- filter
+ - the configuration stuff (so that the filters appear in the filepicker)
+
+Old binary filters (export)
+---------------------------
+
+- doc export
+ - sw/source/filter/ww8/wrtww8*
+ - wrtww8.cxx:2191 [SwWW8Writer::StoreDoc()] is the entry point
+
+ - eg.
+ #0 SwWW8Writer::WriteText (this=0x2aaab3dfb7c0) at /local/ooxml/ooxml/sw/source/filter/ww8/wrtww8.cxx:1846
+ #1 0x00002aaaae75a545 in SwWW8Writer::WriteMainText (this=0x2aaab3d6a870)
+ at /local/ooxml/ooxml/sw/source/filter/ww8/wrtww8.cxx:1925
+ #2 0x00002aaaae75e357 in SwWW8Writer::StoreDoc1 (this=0x2aaab3d6a870)
+ at /local/ooxml/ooxml/sw/source/filter/ww8/wrtww8.cxx:2076
+ #3 0x00002aaaae7605ec in SwWW8Writer::StoreDoc (this=0x2aaab3d6a870)
+ at /local/ooxml/ooxml/sw/source/filter/ww8/wrtww8.cxx:2383
+ #4 0x00002aaaae760fd5 in SwWW8Writer::WriteStorage (this=0x2aaab3d6a870)
+ at /local/ooxml/ooxml/sw/source/filter/ww8/wrtww8.cxx:2547
+ #5 0x00002aaaae70b793 in StgWriter::Write (this=0x2aaab3d6a870, rPaM=@0x2b3802a2b640, rStg=@0x2aaab3d621c0,
+ pFName=0x7fffb1b285c0) at /local/ooxml/ooxml/sw/source/filter/writer/writer.cxx:653
+ #6 0x00002aaaae70b84d in Writer::Write (this=0x2aaab3d6a870, rPaM=@0x2b3802a2b640, rStrm=@0x2aaaad979d20,
+ pFName=0x7fffb1b285c0) at /local/ooxml/ooxml/sw/source/filter/writer/writer.cxx:358
+ #7 0x00002aaaae70b993 in Writer::Write (this=0x2aaab3d6a870, rPam=@0x2b3802a2b640, rMed=@0x2aaaad999f30,
+ pFileName=0x7fffb1b285c0) at /local/ooxml/ooxml/sw/source/filter/writer/writer.cxx:385
+ #8 0x00002aaaae6375d7 in SwWriter::Write (this=0x7fffb1b28410, rxWriter=@0x7fffb1b285d0,
+ pRealFileName=0x7fffb1b285c0) at /local/ooxml/ooxml/sw/source/filter/basflt/shellio.cxx:963
+ #9 0x00002aaaae87cc1e in SwDocShell::ConvertTo (this=0xcc27f0, rMedium=@0x2aaaad999f30)
+ at /local/ooxml/ooxml/sw/source/ui/app/docsh.cxx:924
+ #10 0x00002b37faae6b58 in SfxObjectShell::DoLoad ()
+ from /local/ooxml/inst/openoffice.org3.0/program/../basis-link/program//libsfxlx.so
+
+- xls export
+ - sc/source/filter/excel/xe*
+
+ - eg.
+ #0 XclExpRecord::Save (this=0x11ae4c0, rStrm=@0x7fff5e6335d0)
+ at /local/ooxml/ooxml/sc/source/filter/excel/xerecord.cxx:88
+ #1 0x00002aaaae562c4a in ExcRecord::Save (this=0x11ae4c0, rStrm=@0x7fff5e6335d0)
+ at /local/ooxml/ooxml/sc/source/filter/excel/excrecds.cxx:168
+ #2 0x00002aaaae54b0fa in XclExpRecordList<XclExpRecordBase>::Save (this=0x11c5d18, rStrm=@0x7fff5e6335d0)
+ at ../inc/xerecord.hxx:281
+ #3 0x00002aaaae547541 in ExcTable::Write (this=0x11c5cf8, rStr=@0x7fff5e6335d0)
+ at /local/ooxml/ooxml/sc/source/filter/excel/excdoc.cxx:455
+ #4 0x00002aaaae5475fb in ExcDocument::Write (this=0x11c5ce0, rSvStrm=@0x2aaab3dcd070)
+ at /local/ooxml/ooxml/sc/source/filter/excel/excdoc.cxx:525
+ #5 0x00002aaaae568add in ExportBiff5::Write (this=0x7fff5e6339c0)
+ at /local/ooxml/ooxml/sc/source/filter/excel/expop2.cxx:119
+ #6 0x00002aaaae54f4af in ScExportExcel5 (rMedium=@0x2aaab3d87410, pDocument=0xce6a00, bBiff8=1 '\001', eNach=1)
+ at /local/ooxml/ooxml/sc/source/filter/excel/excel.cxx:252
+ #7 0x00002aaaadf1b70a in ScDocShell::ConvertTo (this=0xce6990, rMed=@0x2aaab3d87410)
+ at /local/ooxml/ooxml/sc/source/ui/docshell/docsh.cxx:2080
+ #8 0x00002b354dfd8b58 in SfxObjectShell::DoLoad ()
+ from /local/ooxml/inst/openoffice.org3.0/program/../basis-link/program//libsfxlx.so
+
+ - Current approach is to add a XclExpRecordBase::SaveXml() method, which
+ would be used to write the XML content (while Save() would continue
+ writing the BIFF format).
+ - Q: How do we get to the Save()/SaveXml() methods (e.g. the SST export code)
+ #0 XclExpSstImpl::Save (this=0x1b170b0, rStrm=@0x7fffd4d5c4a0)
+ at /home/jon/Development/OpenOffice.org/ooxml/sc/source/filter/excel/xecontent.cxx:224
+ #1 0x00007f68b7e46ff7 in XclExpSst::Save (this=0x1abc300,
+ rStrm=@0x7fffd4d5c4a0)
+ at /home/jon/Development/OpenOffice.org/ooxml/sc/source/filter/excel/xecontent.cxx:351
+ #2 0x00007f68b7de5090 in XclExpRecordList<XclExpRecordBase>::Save (
+ this=0x1b2d168, rStrm=@0x7fffd4d5c4a0) at ../inc/xerecord.hxx:282
+ // as above, starting at frame 2
+
+ - Thus, to get to the SaveXml() method, we need to add a slew of WriteXml()
+ methods that will (eventually) invoke the SaveXml() methods.
+
+ - ZipStorage for XML handling and StorageRef (XStorage interface)
+ - To construct ZipStorage, need XMultiServiceFactory (!), and
+ XInputStream.
+ - Have an SvStream; need to wrap SvStream with XInputStream
+ - OInputStreamWrapper in <unotools/streamwrap.hxx>
+ - Where do I get XMultiServiceFactory?
+ - Lots of places -- just grep
+ - perhaps XmlFilterBase _does_ make sense here.
+ - Do it anyway.
+ - Looking into having XclExpXmlStream inherit from ZipFilterBase
+ - problem: exception during construction, because ZipStorage hates me:
+ #0 OStorageFactory::createInstanceWithArguments (this=0x10612a0,
+ aArguments=@0x7fffe2ef76d0)
+ at /home/jon/Development/OpenOffice.org/ooxml/package/source/xstor/xfactory.cxx:275
+ #1 0x00007f12d93f0d5c in comphelper::OStorageHelper::GetStorageOfFormatFromStream (aFormat=@0x7fffe2ef7780, xStream=@0x1a502d8, nStorageMode=15,
+ xFactory=@0x1a502c0)
+ at /home/jon/Development/OpenOffice.org/ooxml/comphelper/source/misc/storagehelper.cxx:342
+ #2 0x00007f12c33d1a6d in ZipStorage (this=0x1a92550, rxFactory=@0x1a502c0,
+ rxStream=@0x1a502d8)
+ at /home/jon/Development/OpenOffice.org/ooxml/oox/source/helper/zipstorage.cxx:87
+ #3 0x00007f12c33f089e in oox::core::XmlFilterBase::implCreateStorage (
+ this=0x7fffe2ef7930, rxInStream=@0x1a502d0, rxStream=@0x1a502d8)
+ at /home/jon/Development/OpenOffice.org/ooxml/oox/source/core/xmlfilterbase.cxx:298
+ #4 0x00007f12c33dd204 in oox::core::FilterBase::filter (this=0x7fffe2ef7930,
+ rDescriptor=@0x7fffe2ef78d0)
+ at /home/jon/Development/OpenOffice.org/ooxml/oox/source/core/filterbase.cxx:284
+ #5 0x00007f12c68097a2 in XclExpXmlStream (this=0x7fffe2ef7930,
+ rSMgr=@0x7fffe2ef79a0, rStrm=@0x18d6f90)
+ at /home/jon/Development/OpenOffice.org/ooxml/sc/source/filter/excel/xestream.cxx:659
+ #6 0x00007f12c674c8c1 in ExcDocument::WriteXml (this=0x15911f0,
+ rStrm=@0x18d6f90)
+ at /home/jon/Development/OpenOffice.org/ooxml/sc/source/filter/excel/excdoc.cxx:575
+ ...
+ - Actual problem: xfactory.cxx:274, the CheckPackageSignature_Impl() call.
+ - fails because the empty file has content (!), thus fails the "package
+ signature check" (which tries to ensure the file format is correct).
+ - Underlying file is an SvFileStream, created in
+ SfxMedium::GetOutStream().
+ - So why's CheckPackageSignature_Impl() fail? Because
+ lcl_ExportExcel2007Xml() had the code:
+
+ tools::SvRef<SotStorage> xRootStrg = new SotStorage( pMedStrm, FALSE );
+
+ That is, it was creating an OLE Structured Storage document over the
+ SvStream, and then (later) used the *same* SvStream and passed it to
+ ZipStorage. This caused ZipStorage to complain because OLESS data was
+ already present in the file, with a different file signature than what
+ ZipPackage was expecting (go figure).
+
+- ppt export
+ - sd/source/filter/eppt/*
+ - svx/source/msfilter
+ - for eg. Escher export
+ - Escher: http://chicago.sourceforge.net/devel/docs/escher/index.html
+
+ - eg.
+ #0 PPTWriter (this=0x15807d0, rSvStorage=@0x7fff894f5340, rXModel=@0x142a2e8, rXStatInd=@0x142a2f0, pVBA=0x0,
+ nCnvrtFlags=15) at /local/ooxml/ooxml/sd/source/filter/eppt/eppt.cxx:268
+ #1 0x00002aaab3895719 in ExportPPT (rSvStorage=@0x7fff894f5340, rXModel=@0x142a2e8, rXStatInd=@0x142a2f0,
+ pVBA=0x0, nCnvrtFlags=15) at /local/ooxml/ooxml/sd/source/filter/eppt/eppt.cxx:2503
+ #2 0x00002aaaadef85b7 in SdPage::onParagraphRemoving ()
+ from /local/ooxml/inst/openoffice.org3.0/program/../basis-link/program/libsdlx.so
+ #3 0x00002aaaade202e3 in sd::DrawDocShell::ConvertTo ()
+ from /local/ooxml/inst/openoffice.org3.0/program/../basis-link/program/libsdlx.so
+ #4 0x00002aec23119b58 in SfxObjectShell::DoLoad ()
+ from /local/ooxml/inst/openoffice.org3.0/program/../basis-link/program//libsfxlx.so
+
+- pptx export
+ - sd/source/filter/eppt/pptx-epptooxml.cxx,
+ oox::core::PowerPointExport::exportDocument()
+
+- odp export
+ #0 ZipPackage (this=0x1805e80, xNewFactory=@0x7fffe284e990) at /home/rodo/git/ooxml/package/source/zippackage/ZipPackage.cxx:279
+ #1 0x00002aaaadd3dc94 in ZipPackage_createInstance (xMgr=@0x7fffe284e990) at /home/rodo/git/ooxml/package/source/zippackage/ZipPackage.cxx:1546
+ #2 0x00002b0fca7ab6b3 in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #3 0x00002b0fca7a7fda in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #4 0x00002b0fca7a811e in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #5 0x00002b0fca7aa7cc in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #6 0x00002b0fca7aacbe in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #7 0x00002b0fca7aa035 in ?? () from /opt/libreoffice/program/../basis-link/program/../ure-link/lib/libuno_cppuhelpergcc3.so.3
+ #8 0x00002aaaaadae1b3 in ?? () from /opt/libreoffice/ure/lib/bootstrap.uno.so
+ #9 0x00002aaaaadaa84c in ?? () from /opt/libreoffice/ure/lib/bootstrap.uno.so
+ #10 0x00002aaab5c7a7e5 in OStorage_Impl::OpenOwnPackage (this=0x185cac0) at /home/rodo/git/ooxml/package/source/xstor/xstorage.cxx:549
+ #11 0x00002aaab5c7ab3e in OStorage_Impl::ReadContents (this=0x185cac0) at /home/rodo/git/ooxml/package/source/xstor/xstorage.cxx:649
+ #12 0x00002aaab5c7d32f in OStorage_Impl::FindElement (this=0x185cac0, rName=@0x7fffe284f280) at /home/rodo/git/ooxml/package/source/xstor/xstorage.cxx:1387
+ #13 0x00002aaab5c7dc45 in OStorage::hasByName (this=0x1808880, aName=@0x7fffe284f280) at /home/rodo/git/ooxml/package/source/xstor/xstorage.cxx:4045
+ #14 0x00002aaab1fde8c5 in XMLVersionListPersistence::load () from /opt/libreoffice/program/../basis-link/program/libxolx.so
+ #15 0x00002b0fcb058bb2 in SfxMedium::GetVersionList (this=0x1750050, _bNoReload=false) at /home/rodo/git/ooxml/sfx2/source/doc/docfile.cxx:3247
+ #16 0x00002b0fcb0571b5 in SfxMedium::GetStorage (this=0x1750050) at /home/rodo/git/ooxml/sfx2/source/doc/docfile.cxx:1328
+ #17 0x00002b0fcb05d0d7 in SfxMedium::GetOutputStorage (this=0x1750050) at /home/rodo/git/ooxml/sfx2/source/doc/docfile.cxx:1068
+ #18 0x00002b0fcb091227 in SfxObjectShell::SaveTo_Impl (this=0xf44d60, rMedium=@0x1750050, pSet=0x0) at /home/rodo/git/ooxml/sfx2/source/doc/objstor.cxx:1557
+ #19 0x00002b0fcb09443c in SfxObjectShell::PreDoSaveAs_Impl (this=0xf44d60, rFileName=@0x7fffe2850700, aFilterName=@0x7fffe28507f0, pParams=0xf10c10)
+ at /home/rodo/git/ooxml/sfx2/source/doc/objstor.cxx:2984
+ #20 0x00002b0fcb094ea5 in SfxObjectShell::CommonSaveAs_Impl (this=0xf44d60, aURL=@0x7fffe2850870, aFilterName=@0x7fffe28507f0, aParams=0x1740310)
+ at /home/rodo/git/ooxml/sfx2/source/doc/objstor.cxx:2855
+ #21 0x00002b0fcb0a1da2 in SfxObjectShell::APISaveAs_Impl (this=0xf44d60, aFileName=@0x7fffe2850b70, aParams=0x1740310)
+ at /home/rodo/git/ooxml/sfx2/source/doc/objserv.cxx:432
+ #22 0x00002b0fcb0e74c8 in SfxBaseModel::impl_store (this=0xf96a00, sURL=@0x7fffe28516b0, seqArguments=@0x7fffe2851ae0, bSaveTo=0 '\0')
+ at /home/rodo/git/ooxml/sfx2/source/doc/sfxbasemodel.cxx:2591
+ #23 0x00002b0fcb0f124b in SfxBaseModel::storeAsURL (this=0xf96a00, rURL=@0x7fffe28516b0, rArgs=@0x7fffe2851ae0)
+ at /home/rodo/git/ooxml/sfx2/source/doc/sfxbasemodel.cxx:1568
+ #24 0x00002b0fcb101d3d in SfxStoringHelper::GUIStoreModel (this=0x7fffe28519f0, xModel=@0xf18798, aSlotName=@0x7fffe2852200, aArgsSequence=@0x7fffe2851ae0,
+ bPreselectPassword=0 '\0') at /home/rodo/git/ooxml/sfx2/source/doc/guisaveas.cxx:1529
+ #25 0x00002b0fcb0a4051 in SfxObjectShell::ExecFile_Impl (this=0xf44d60, rReq=@0x1484f20) at /home/rodo/git/ooxml/sfx2/source/doc/objserv.cxx:744
+ #26 0x00002b0fcb0a5c73 in SfxStubSfxObjectShellExecFile_Impl (pShell=0xf44d60, rReq=@0x1484f20) at ../../unxlngx6.pro/inc/sfxslots.hxx:161
+ #27 0x00002b0fcb17f398 in SfxShell::CallExec (this=0xf44d60, pFunc=0x2b0fcb0a5c56 <SfxStubSfxObjectShellExecFile_Impl(SfxShell*, SfxRequest&)>, rReq=@0x1484f20)
+ at ../../inc/sfx2/shell.hxx:226
+ #28 0x00002b0fcb17cec3 in SfxDispatcher::Call_Impl (this=0x110fde0, rShell=@0xf44d60, rSlot=@0x2b0fcb576368, rReq=@0x1484f20, bRecord=1 '\001')
+ at /home/rodo/git/ooxml/sfx2/source/control/dispatch.cxx:338
+ #29 0x00002b0fcb17d3f2 in SfxDispatcher::PostMsgHandler (this=0x110fde0, pReq=0x1484f20) at /home/rodo/git/ooxml/sfx2/source/control/dispatch.cxx:1643
+ #30 0x00002b0fcb17d51d in SfxDispatcher::LinkStubPostMsgHandler (pThis=0x110fde0, pCaller=0x1484f20) at /home/rodo/git/ooxml/sfx2/source/control/dispatch.cxx:1610
+ #31 0x00002b0fcafb3e70 in Link::Call (this=0x11488f8, pCaller=0x1484f20) at /home/rodo/git/ooxml/solver/300/unxlngx6.pro/inc/tools/link.hxx:158
+ #32 0x00002b0fcb1a9952 in GenLink::Call (this=0x11488f8, pCaller=0x1484f20) at ../../inc/sfx2/genlink.hxx:63
+ #33 0x00002b0fcb1a9773 in SfxHintPoster::Event (this=0x11488e0, pPostedHint=0x1484f20) at /home/rodo/git/ooxml/sfx2/source/notify/hintpost.cxx:98
+ #34 0x00002b0fcb1a9984 in SfxHintPoster::DoEvent_Impl (this=0x11488e0, pPostedHint=0x1484f20) at /home/rodo/git/ooxml/sfx2/source/notify/hintpost.cxx:88
+ #35 0x00002b0fcb1a974f in SfxHintPoster::LinkStubDoEvent_Impl (pThis=0x11488e0, pCaller=0x1484f20) at /home/rodo/git/ooxml/sfx2/source/notify/hintpost.cxx:92
+ #36 0x00002b0fccef69f8 in ImplWindowFrameProc () from /opt/libreoffice/program/../basis-link/program/libvcllx.so
+ #37 0x00002b0fd3f91f8f in SalDisplay::DispatchInternalEvent () from /opt/libreoffice/basis3.0/program/libvclplug_genlx.so
+ #38 0x00002b0fd0fa4a84 in GtkXLib::userEventFn () from /opt/libreoffice/basis3.0/program/libvclplug_gtklx.so
+ #39 0x00002b0fd3cb0204 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
+ #40 0x00002b0fd3cb34fd in ?? () from /usr/lib64/libglib-2.0.so.0
+ #41 0x00002b0fd3cb39ce in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
+ #42 0x00002b0fd0fa4fd9 in GtkXLib::Yield () from /opt/libreoffice/basis3.0/program/libvclplug_gtklx.so
+ #43 0x00002b0fccd1859e in Application::Yield () from /opt/libreoffice/program/../basis-link/program/libvcllx.so
+ #44 0x00002b0fccd18677 in Application::Execute () from /opt/libreoffice/program/../basis-link/program/libvcllx.so
+ #45 0x00002b0fc86fd803 in ?? () from /opt/libreoffice/program/../basis-link/program/libsoffice.so
+ #46 0x00002b0fccd1da24 in ImplSVMain () from /opt/libreoffice/program/../basis-link/program/libvcllx.so
+ #47 0x00002b0fccd1db15 in SVMain () from /opt/libreoffice/program/../basis-link/program/libvcllx.so
+ #48 0x00002b0fc872fe6c in soffice_main () from /opt/libreoffice/program/../basis-link/program/libsoffice.so
+ #49 0x000000000040114b in main ()
diff --git a/oox/source/export/preset-definitions-to-shape-types.pl b/oox/source/export/preset-definitions-to-shape-types.pl
new file mode 100644
index 000000000..5760a8609
--- /dev/null
+++ b/oox/source/export/preset-definitions-to-shape-types.pl
@@ -0,0 +1,1237 @@
+#!/usr/bin/env perl -w
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+use strict;
+use warnings;
+
+sub usage() {
+ print STDERR <<EOF;
+Usage: preset-definitions-to-shape-types.pl [ --drawingml-adj-names-data | --vml-shape-types-data ] <shapes> <text>
+
+Converts presetShapeDefinitions.xml and presetTextWarpDefinitions.xml to a
+.cxx that contains VML with the definitions of the shapes. The result is
+written to stdout.
+
+<shapes> presetShapeDefinitions.xml (including the path to it)
+<text> presetTextWarpDefinitions.xml (including the path to it)
+EOF
+ exit 1;
+}
+
+sub show_call_stack
+{
+ my ( $path, $line, $subr );
+ my $max_depth = 30;
+ my $i = 1;
+ print STDERR "--- Begin stack trace ---\n";
+ while ( (my @call_details = (caller($i++))) && ($i<$max_depth) ) {
+ print STDERR "$call_details[1] line $call_details[2] in function $call_details[3]\n";
+ }
+ print STDERR "--- End stack trace ---\n";
+}
+
+my $drawingml_adj_names_data = 0;
+my $vml_shape_types_data = 0;
+my $src_shapes = shift;
+if ($src_shapes eq "--drawingml-adj-names-data") {
+ $drawingml_adj_names_data = 1;
+ $src_shapes = shift;
+} elsif ($src_shapes eq "--vml-shape-types-data") {
+ $vml_shape_types_data = 1;
+ $src_shapes = shift;
+}
+my $src_text = shift;
+
+usage() if ( !defined( $src_shapes ) || !defined( $src_text ) ||
+ $src_shapes eq "-h" || $src_shapes eq "--help" ||
+ !-f $src_shapes || !-f $src_text );
+
+# Global variables
+my @levels = ();
+my $shape_name = "";
+my $state = "";
+my $path = "";
+my $adjust = "";
+my %adj_names;
+my $max_adj_no = 0;
+my @formulas = ();
+my %variables = ();
+my $ignore_this_shape = 0;
+my $handles = "";
+my $textboxrect = "";
+my $last_pos_x = "";
+my $last_pos_y = "";
+my $no_stroke = 0;
+my $no_fill = 0;
+my $path_w = 1;
+my $path_h = 1;
+my @quadratic_bezier = ();
+
+my %result_shapes = ();
+
+my %shapes_ids = (
+ 0 => 'notPrimitive',
+ 1 => 'rectangle',
+ 2 => 'roundRectangle',
+ 3 => 'ellipse',
+ 4 => 'diamond',
+ 5 => 'triangle',
+ 6 => 'rtTriangle',
+ 7 => 'parallelogram',
+ 8 => 'trapezoid',
+ 9 => 'hexagon',
+ 10 => 'octagon',
+ 11 => 'plus',
+ 12 => 'star5',
+ 13 => 'rightArrow',
+ 14 => 'thickArrow', # should not be used
+ 15 => 'homePlate',
+ 16 => 'cube',
+ 17 => 'wedgeRoundRectCallout', # balloon
+ 18 => 'star16', # seal
+ 19 => 'arc',
+ 20 => 'line',
+ 21 => 'plaque',
+ 22 => 'can',
+ 23 => 'donut',
+ 24 => 'textPlain', # textSimple - FIXME MS Office 2007 converts these to textboxes with unstyled text, so is it actually correct to map it to a real style?
+ 25 => 'textStop', # textOctagon FIXME see 24
+ 26 => 'textTriangle', # textHexagon FIXMME see 24
+ 27 => 'textCanDown', # textCurve FIXMME see 24
+ 28 => 'textWave1', # textWave FIXMME see 24
+ 29 => 'textArchUpPour', # textRing FIXMME see 24
+ 30 => 'textCanDown', # textOnCurve FIXMME see 24
+ 31 => 'textArchUp', # textOnRing FIXMME see 24
+ 32 => 'straightConnector1',
+ 33 => 'bentConnector2',
+ 34 => 'bentConnector3',
+ 35 => 'bentConnector4',
+ 36 => 'bentConnector5',
+ 37 => 'curvedConnector2',
+ 38 => 'curvedConnector3',
+ 39 => 'curvedConnector4',
+ 40 => 'curvedConnector5',
+ 41 => 'callout1',
+ 42 => 'callout2',
+ 43 => 'callout3',
+ 44 => 'accentCallout1',
+ 45 => 'accentCallout2',
+ 46 => 'accentCallout3',
+ 47 => 'borderCallout1',
+ 48 => 'borderCallout2',
+ 49 => 'borderCallout3',
+ 50 => 'accentBorderCallout1',
+ 51 => 'accentBorderCallout2',
+ 52 => 'accentBorderCallout3',
+ 53 => 'ribbon',
+ 54 => 'ribbon2',
+ 55 => 'chevron',
+ 56 => 'pentagon',
+ 57 => 'noSmoking',
+ 58 => 'star8', # seal8
+ 59 => 'star16', # seal16
+ 60 => 'star32', # seal32
+ 61 => 'wedgeRectCallout',
+ 62 => 'wedgeRoundRectCallout', # wedgeRRectCallout
+ 63 => 'wedgeEllipseCallout',
+ 64 => 'wave',
+ 65 => 'foldedCorner',
+ 66 => 'leftArrow',
+ 67 => 'downArrow',
+ 68 => 'upArrow',
+ 69 => 'leftRightArrow',
+ 70 => 'upDownArrow',
+ 71 => 'irregularSeal1',
+ 72 => 'irregularSeal2',
+ 73 => 'lightningBolt',
+ 74 => 'heart',
+ 75 => 'pictureFrame',
+ 76 => 'quadArrow',
+ 77 => 'leftArrowCallout',
+ 78 => 'rightArrowCallout',
+ 79 => 'upArrowCallout',
+ 80 => 'downArrowCallout',
+ 81 => 'leftRightArrowCallout',
+ 82 => 'upDownArrowCallout',
+ 83 => 'quadArrowCallout',
+ 84 => 'bevel',
+ 85 => 'leftBracket',
+ 86 => 'rightBracket',
+ 87 => 'leftBrace',
+ 88 => 'rightBrace',
+ 89 => 'leftUpArrow',
+ 90 => 'bentUpArrow',
+ 91 => 'bentArrow',
+ 92 => 'star24', # seal24
+ 93 => 'stripedRightArrow',
+ 94 => 'notchedRightArrow',
+ 95 => 'blockArc',
+ 96 => 'smileyFace',
+ 97 => 'verticalScroll',
+ 98 => 'horizontalScroll',
+ 99 => 'circularArrow',
+ 100 => 'notchedCircularArrow', # should not be used
+ 101 => 'uturnArrow',
+ 102 => 'curvedRightArrow',
+ 103 => 'curvedLeftArrow',
+ 104 => 'curvedUpArrow',
+ 105 => 'curvedDownArrow',
+ 106 => 'cloudCallout',
+ 107 => 'ellipseRibbon',
+ 108 => 'ellipseRibbon2',
+ 109 => 'flowChartProcess',
+ 110 => 'flowChartDecision',
+ 111 => 'flowChartInputOutput',
+ 112 => 'flowChartPredefinedProcess',
+ 113 => 'flowChartInternalStorage',
+ 114 => 'flowChartDocument',
+ 115 => 'flowChartMultidocument',
+ 116 => 'flowChartTerminator',
+ 117 => 'flowChartPreparation',
+ 118 => 'flowChartManualInput',
+ 119 => 'flowChartManualOperation',
+ 120 => 'flowChartConnector',
+ 121 => 'flowChartPunchedCard',
+ 122 => 'flowChartPunchedTape',
+ 123 => 'flowChartSummingJunction',
+ 124 => 'flowChartOr',
+ 125 => 'flowChartCollate',
+ 126 => 'flowChartSort',
+ 127 => 'flowChartExtract',
+ 128 => 'flowChartMerge',
+ 129 => 'flowChartOfflineStorage',
+ 130 => 'flowChartOnlineStorage',
+ 131 => 'flowChartMagneticTape',
+ 132 => 'flowChartMagneticDisk',
+ 133 => 'flowChartMagneticDrum',
+ 134 => 'flowChartDisplay',
+ 135 => 'flowChartDelay',
+ 136 => 'textPlain', # textPlainText
+ 137 => 'textStop',
+ 138 => 'textTriangle',
+ 139 => 'textTriangleInverted',
+ 140 => 'textChevron',
+ 141 => 'textChevronInverted',
+ 142 => 'textRingInside',
+ 143 => 'textRingOutside',
+ 144 => 'textArchUp', # textArchUpCurve
+ 145 => 'textArchDown', # textArchDownCurve
+ 146 => 'textCircle', # textCircleCurve
+ 147 => 'textButton', # textButtonCurve
+ 148 => 'textArchUpPour',
+ 149 => 'textArchDownPour',
+ 150 => 'textCirclePour',
+ 151 => 'textButtonPour',
+ 152 => 'textCurveUp',
+ 153 => 'textCurveDown',
+ 154 => 'textCascadeUp',
+ 155 => 'textCascadeDown',
+ 156 => 'textWave1',
+ 157 => 'textWave2',
+ 158 => 'textWave3',
+ 159 => 'textWave4',
+ 160 => 'textInflate',
+ 161 => 'textDeflate',
+ 162 => 'textInflateBottom',
+ 163 => 'textDeflateBottom',
+ 164 => 'textInflateTop',
+ 165 => 'textDeflateTop',
+ 166 => 'textDeflateInflate',
+ 167 => 'textDeflateInflateDeflate',
+ 168 => 'textFadeRight',
+ 169 => 'textFadeLeft',
+ 170 => 'textFadeUp',
+ 171 => 'textFadeDown',
+ 172 => 'textSlantUp',
+ 173 => 'textSlantDown',
+ 174 => 'textCanUp',
+ 175 => 'textCanDown',
+ 176 => 'flowChartAlternateProcess',
+ 177 => 'flowChartOffpageConnector',
+ 178 => 'callout1', # callout90
+ 179 => 'accentCallout1', # accentCallout90
+ 180 => 'borderCallout1', # borderCallout90
+ 181 => 'accentBorderCallout1', # accentBorderCallout90
+ 182 => 'leftRightUpArrow',
+ 183 => 'sun',
+ 184 => 'moon',
+ 185 => 'bracketPair',
+ 186 => 'bracePair',
+ 187 => 'star4', # seal4
+ 188 => 'doubleWave',
+ 189 => 'actionButtonBlank',
+ 190 => 'actionButtonHome',
+ 191 => 'actionButtonHelp',
+ 192 => 'actionButtonInformation',
+ 193 => 'actionButtonForwardNext',
+ 194 => 'actionButtonBackPrevious',
+ 195 => 'actionButtonEnd',
+ 196 => 'actionButtonBeginning',
+ 197 => 'actionButtonReturn',
+ 198 => 'actionButtonDocument',
+ 199 => 'actionButtonSound',
+ 200 => 'actionButtonMovie',
+ 201 => 'hostControl',
+ 202 => 'textBox'
+);
+# An error occurred, we have to ignore this shape
+sub error( $ )
+{
+ my ( $msg ) = @_;
+
+ $ignore_this_shape = 1;
+ print STDERR "ERROR (in $shape_name ): $msg\n";
+}
+
+# Setup the %variables map with predefined values
+sub setup_variables()
+{
+ %variables = (
+ 'l' => 0,
+ 't' => 0,
+ 'r' => 21600,
+ 'b' => 21600,
+
+ 'w' => 21600,
+ 'h' => 21600,
+ 'ss' => 21600,
+ 'ls' => 21600,
+
+ 'ssd2' => 10800, # 1/2
+ 'ssd4' => 5400, # 1/4
+ 'ssd6' => 3600, # 1/6
+ 'ssd8' => 2700, # 1/8
+ 'ssd16' => 1350, # 1/16
+ 'ssd32' => 675, # 1/32
+
+ 'hc' => 10800, # horizontal center
+ 'vc' => 10800, # vertical center
+
+ 'wd2' => 10800, # 1/2
+ 'wd3' => 7200, # 1/3
+ 'wd4' => 5400, # 1/4
+ 'wd5' => 4320, # 1/5
+ 'wd6' => 3600, # 1/6
+ 'wd8' => 2700, # 1/8
+ 'wd10' => 2160, # 1/10
+ 'wd12' => 1800, # 1/12
+ 'wd32' => 675, # 1/32
+
+ 'hd2' => 10800, # 1/2
+ 'hd3' => 7200, # 1/3
+ 'hd4' => 5400, # 1/4
+ 'hd5' => 4320, # 1/5
+ 'hd6' => 3600, # 1/6
+ 'hd8' => 2700, # 1/8
+ 'hd10' => 2160, # 1/10
+ 'hd12' => 1800, # 1/12
+ 'hd32' => 675, # 1/32
+
+ '25000' => 5400,
+ '12500' => 2700,
+
+ 'cd4' => 90, # 1/4 of a circle
+ 'cd2' => 180, # 1/2 of a circle
+ '3cd4' => 270, # 3/4 of a circle
+
+ 'cd8' => 45, # 1/8 of a circle
+ '3cd8' => 135, # 3/8 of a circle
+ '5cd8' => 225, # 5/8 of a circle
+ '7cd8' => 315, # 7/8 of a circle
+
+ '-5400000' => -90,
+ '-10800000'=> -180,
+ '-16200000'=> -270,
+ '-21600000'=> -360,
+ '-21599999'=> -360,
+
+ '5400000' => 90,
+ '10800000' => 180,
+ '16200000' => 270,
+ '21600000' => 360,
+ '21599999' => 360
+#
+# '21600000' => 360, # angle conversions
+# '27000000' => 450,
+# '32400000' => 540,
+# '37800000' => 630
+ );
+}
+
+# Convert the (predefined) value to a number
+sub value( $ )
+{
+ my ( $val ) = @_;
+
+ my $result = $variables{$val};
+ return $result if ( defined( $result ) );
+
+ return $val if ( $val =~ /^[0-9-]+$/ );
+
+ error( "Unknown variable '$val'." );
+
+ show_call_stack();
+ return $val;
+}
+
+# Convert the DrawingML formula to a VML one
+my %command_variables = (
+ 'w' => 'width',
+ 'h' => 'height',
+ 'r' => 'width',
+ 'b' => 'height'
+);
+
+# The same as value(), but some of the hardcoded values can have a name
+sub command_value( $ )
+{
+ my ( $value ) = @_;
+
+ return "" if ( $value eq "" );
+
+ return $value if ( $value =~ /^@/ );
+
+ my $command_val = $command_variables{$value};
+ if ( defined( $command_val ) ) {
+ return $command_val;
+ }
+
+ return value( $value );
+}
+
+# Insert the new formula to the list of formulas
+# Creates the name if it's empty...
+sub insert_formula( $$ )
+{
+ my ( $name, $fmla ) = @_;
+
+ my $i = 0;
+ foreach my $f ( @formulas ) {
+ if ( $f eq $fmla ) {
+ if ( $name ne "" ) {
+ $variables{$name} = "@" . $i;
+ }
+ return "@" . $i;
+ }
+ ++$i;
+ }
+
+ if ( $name eq "" ) {
+ $name = "@" . ( $#formulas + 1 );
+ }
+
+ $variables{$name} = "@" . ( $#formulas + 1 );
+ push @formulas, $fmla;
+
+ if ( $#formulas > 127 ) {
+ error( "Reached the maximum amount of formulas, have to ignore the shape '$shape_name'" );
+ }
+
+ return $variables{$name};
+}
+
+# The same as insert_formula(), but converts the params
+sub insert_formula_params( $$$$$ )
+{
+ my ( $name, $command, $p1, $p2, $p3 ) = @_;
+
+ my $result = $command;
+ if ( $p1 ne "" ) {
+ $result .= " " . command_value( $p1 );
+ if ( $p2 ne "" ) {
+ $result .= " " . command_value( $p2 );
+ if ( $p3 ne "" ) {
+ $result .= " " . command_value( $p3 );
+ }
+ }
+ }
+
+ return insert_formula( $name, $result );
+}
+
+# Convert the formula from DrawingML to VML
+sub convert_formula( $$ )
+{
+ my ( $name, $fmla ) = @_;
+
+ if ( $fmla =~ /^([^ ]+)/ ) {
+ my $command = $1;
+
+ # parse the parameters
+ ( my $values = $fmla ) =~ s/^([^ ]+) *//;
+ my $p1 = "";
+ my $p2 = "";
+ my $p3 = "";
+ if ( $values =~ /^([^ ]+)/ ) {
+ $p1 = $1;
+ $values =~ s/^([^ ]+) *//;
+ if ( $values =~ /^([^ ]+)/ ) {
+ $p2 = $1;
+ $values =~ s/^([^ ]+) *//;
+ if ( $values =~ /^([^ ]+)/ ) {
+ $p3 = $1;
+ }
+ }
+ }
+
+ # now convert the formula
+ if ( $command eq "+-" ) {
+ if ( $p1 eq "100000" ) {
+ $p1 = value( 'w' );
+ }
+ insert_formula_params( $name, "sum", $p1, $p2, $p3 );
+ return;
+ }
+ elsif ( $command eq "*/" ) {
+ if ( ( $p2 =~ /^(w|h|ss|hd2|wd2|vc)$/ ) && defined( $variables{$p1} ) ) {
+ # switch it ;-) - presetTextWarpDefinitions.xml has it in other order
+ my $tmp = $p1;
+ $p1 = $p2;
+ $p2 = $tmp;
+ }
+
+ if ( ( $p1 =~ /^(w|h|ss|hd2|wd2|vc)$/ ) && defined( $variables{$p2} ) ) {
+ my $val3 = $p3;
+ if ( $val3 =~ /^[0-9-]+$/ ) {
+ $val3 *= ( value( 'w' ) / value( $p1 ) );
+
+ # Oh yes, I'm too lazy to implement the full GCD here ;-)
+ if ( ( $val3 % 100000 ) == 0 ) {
+ $p1 = 1;
+ $p3 = sprintf( "%.0f", ( $val3 / 100000 ) );
+ }
+ elsif ( $val3 < 100000 ) {
+ $p3 = 1;
+ while ( ( ( $p3 * 100000 ) % $val3 ) != 0 ) {
+ ++$p3
+ }
+ $p1 = ( $p3 * 100000 ) / $val3;
+ }
+ else {
+ error( "Need to count the greatest common divisor." );
+ }
+ }
+ }
+ elsif ( $p3 eq "100000" && $p2 =~ /^[0-9-]+$/ ) {
+ # prevent overflows in some shapes
+ $p2 = sprintf( "%.0f", ( $p2 / 10 ) );
+ $p3 /= 10;
+ }
+ elsif ( $p3 eq "32768" && $p2 =~ /^[0-9-]+$/ ) {
+ # prevent overflows in some shapes
+ $p2 = sprintf( "%.0f", ( $p2 / 8 ) );
+ $p3 /= 8;
+ }
+ elsif ( $p3 eq "50000" ) {
+ $p3 = 10800;
+ }
+ elsif ( $name =~ /^maxAdj/ ) {
+ my $val = value( $p1 );
+ if ( $val =~ /^[0-9-]+$/ ) {
+ $p1 = sprintf( "%.0f", ( value( 'w' ) * $val / 100000 ) );
+ }
+ }
+
+ if ( ( value( $p1 ) eq value( $p3 ) ) || ( value( $p2 ) eq value( $p3 ) ) ) {
+ my $val = value( ( value( $p1 ) eq value( $p3 ) )? $p2: $p1 );
+ if ( $val =~ /^@([0-9]+)$/ ) {
+ insert_formula( $name, $formulas[$1] );
+ }
+ else {
+ insert_formula( $name, "val $val" );
+ }
+ }
+ else {
+ insert_formula_params( $name, "prod", $p1, $p2, $p3 );
+ }
+ return;
+ }
+ elsif ( $command eq "+/" ) {
+ # we have to split this into 2 formulas - 'sum' and 'prod'
+ my $constructed = insert_formula_params( "", "sum", $p1, $p2, "0" );
+ insert_formula_params( $name, "prod", 1, $constructed, $p3); # references the 'sum' formula
+ return;
+ }
+ elsif ( $command eq "?:" ) {
+ insert_formula_params( $name, "if", $p1, $p2, $p3 );
+ return;
+ }
+ elsif ( $command eq "sin" || $command eq "cos" ) {
+ if ( $p2 =~ /^[0-9-]+$/ && ( ( $p2 % 60000 ) == 0 ) ) {
+ $p2 /= 60000;
+ }
+ else {
+ $p2 = insert_formula_params( "", "prod", "1", $p2, "60000" );
+ }
+ # we have to use 'sumangle' even for the case when $p2 is const
+ # and theoretically could be written as such; but Word does not
+ # accept it :-(
+ my $conv = insert_formula_params( "", "sumangle", "0", $p2, "0" );
+
+ $p2 = $conv;
+
+ insert_formula_params( $name, $command, $p1, $p2, "" );
+ return;
+ }
+ elsif ( $command eq "abs" ) {
+ insert_formula_params( $name, $command, $p1, "", "" );
+ return;
+ }
+ elsif ( $command eq "max" || $command eq "min" ) {
+ insert_formula_params( $name, $command, $p1, $p2, "" );
+ return;
+ }
+ elsif ( $command eq "at2" ) {
+ insert_formula_params( $name, "atan2", $p1, $p2, "" );
+ return;
+ }
+ elsif ( $command eq "cat2" ) {
+ insert_formula_params( $name, "cosatan2", $p1, $p2, $p3 );
+ return;
+ }
+ elsif ( $command eq "sat2" ) {
+ insert_formula_params( $name, "sinatan2", $p1, $p2, $p3 );
+ return;
+ }
+ elsif ( $command eq "sqrt" ) {
+ insert_formula_params( $name, "sqrt", $p1, "", "" );
+ return;
+ }
+ elsif ( $command eq "mod" ) {
+ insert_formula_params( $name, "mod", $p1, $p2, $p3 );
+ return;
+ }
+ elsif ( $command eq "val" ) {
+ insert_formula_params( $name, "val", value( $p1 ), "", "" );
+ return;
+ }
+ else {
+ error( "Unknown formula '$name', '$fmla'." );
+ }
+ }
+ else {
+ error( "Cannot convert formula's command '$name', '$fmla'." );
+ }
+}
+
+# There's no exact equivalent of 'arcTo' in VML, we have to do some special casing...
+my %convert_arcTo = (
+ '0' => {
+ '90' => {
+ 'path' => 'qy',
+ 'op' => [ 'sum 0 __last_x__ __wR__', 'sum __hR__ __last_y__ 0' ],
+ },
+ '-90' => {
+ 'path' => 'qy',
+ 'op' => [ 'sum 0 __last_x__ __wR__', 'sum 0 __last_y__ __hR__' ],
+ },
+ },
+ '90' => {
+ '90' => {
+ 'path' => 'qx',
+ 'op' => [ 'sum 0 __last_x__ __wR__', 'sum 0 __last_y__ __hR__' ],
+ },
+ '-90' => {
+ 'path' => 'qx',
+ 'op' => [ 'sum __wR__ __last_x__ 0', 'sum 0 __last_y__ __hR__' ],
+ },
+ },
+ '180' => {
+ '90' => {
+ 'path' => 'qy',
+ 'op' => [ 'sum __wR__ __last_x__ 0', 'sum 0 __last_y__ __hR__' ],
+ },
+ '-90' => {
+ 'path' => 'qy',
+ 'op' => [ 'sum __wR__ __last_x__ 0', 'sum __hR__ __last_y__ 0' ],
+ },
+ },
+ '270' => {
+ '90' => {
+ 'path' => 'qx',
+ 'op' => [ 'sum __wR__ __last_x__ 0', 'sum __hR__ __last_y__ 0' ],
+ },
+ '-90' => {
+ 'path' => 'qx',
+ 'op' => [ 'sum 0 __last_x__ __wR__', 'sum __hR__ __last_y__ 0' ],
+ },
+ },
+);
+
+# Elliptic quadrant
+# FIXME optimize so that we compute the const values when possible
+sub elliptic_quadrant( $$$$ )
+{
+ my ( $wR, $hR, $stAng, $swAng ) = @_;
+
+ if ( defined( $convert_arcTo{$stAng} ) && defined( $convert_arcTo{$stAng}{$swAng} ) ) {
+ my $conv_path = $convert_arcTo{$stAng}{$swAng}{'path'};
+ my $conv_op_ref = $convert_arcTo{$stAng}{$swAng}{'op'};
+
+ $path .= "$conv_path";
+
+ my $pos_x = $last_pos_x;
+ my $pos_y = $last_pos_y;
+ for ( my $i = 0; $i <= $#{$conv_op_ref}; ++$i ) {
+ my $op = $conv_op_ref->[$i];
+
+ $op =~ s/__last_x__/$last_pos_x/g;
+ $op =~ s/__last_y__/$last_pos_y/g;
+ $op =~ s/__wR__/$wR/g;
+ $op =~ s/__hR__/$hR/g;
+
+ my $fmla = insert_formula( "", $op );
+
+ $path .= $fmla;
+
+ # so far it's sufficient just to rotate the positions
+ # FIXME if not ;-)
+ $pos_x = $pos_y;
+ $pos_y = $fmla;
+ }
+ $last_pos_x = $pos_x;
+ $last_pos_y = $pos_y;
+ }
+ else {
+ error( "Unhandled elliptic_quadrant(), input is ($wR, $hR, $stAng, $swAng)." );
+ }
+}
+
+# Convert the quadratic bezier to cubic (exact)
+# No idea why, but the 'qb' did not work for me :-(
+sub quadratic_to_cubic_bezier( $ )
+{
+ my ( $axis ) = @_;
+
+ my $a0 = $quadratic_bezier[0]->{$axis};
+ my $a1 = $quadratic_bezier[1]->{$axis};
+ my $a2 = $quadratic_bezier[2]->{$axis};
+
+ my $b0 = $a0;
+
+ # $b1 = $a0 + 2/3 * ( $a1 - $a0 ), but in VML
+ # FIXME optimize for constants - compute directly
+ my $b1_1 = insert_formula_params( "", "sum", "0", $a1, $a0 );
+ my $b1_2 = insert_formula_params( "", "prod", "2", $b1_1, "3" );
+ my $b1 = insert_formula_params( "", "sum", $a0, $b1_2, "0" );
+
+ # $b2 = $b1 + 1/3 * ( $a2 - $a0 );
+ # FIXME optimize for constants - compute directly
+ my $b2_1 = insert_formula_params( "", "sum", "0", $a2, $a0 );
+ my $b2_2 = insert_formula_params( "", "prod", "1", $b2_1, "3" );
+ my $b2 = insert_formula_params( "", "sum", $b1, $b2_2, "0" );
+
+ my $b3 = $a2;
+
+ return ( $b0, $b1, $b2, $b3 );
+}
+
+# Extend $path by one more point
+sub add_point_to_path( $$ )
+{
+ my ( $x, $y ) = @_;
+
+ if ( $path =~ /[0-9]$/ && $x =~ /^[0-9-]/ ) {
+ $path .= ",";
+ }
+ $path .= $x;
+
+ if ( $path =~ /[0-9]$/ && $y =~ /^[0-9-]/ ) {
+ $path .= ",";
+ }
+ $path .= $y;
+}
+
+# Start of an element
+sub start_element( $% )
+{
+ my ( $element, %attr ) = @_;
+
+ push @levels, $element;
+
+ #print "element: $element\n";
+
+ if ( @levels > 1 && ( $levels[-2] eq "presetShapeDefinitons" ||
+ $levels[-2] eq "presetTextWarpDefinitions" ) ) {
+ $shape_name = $element;
+
+ $state = "";
+ $ignore_this_shape = 0;
+ $path = "";
+ $adjust = "";
+ $max_adj_no = 0;
+ @formulas = ();
+ $handles = "";
+ $textboxrect = "";
+ $last_pos_x = "";
+ $last_pos_y = "";
+ $no_stroke = 0;
+ $no_fill = 0;
+ @quadratic_bezier = ();
+
+ setup_variables();
+
+ if ( $shape_name eq "sun" ) {
+ # hack for this shape
+ $variables{'100000'} = "21600";
+ $variables{'50000'} = "10800";
+ $variables{'25000'} = "5400";
+ $variables{'12500'} = "2700";
+ $variables{'3662'} = "791";
+ }
+
+ my $found = 0;
+ foreach my $name ( values( %shapes_ids ) ) {
+ if ( $name eq $shape_name ) {
+ $found = 1;
+ last;
+ }
+ }
+ if ( !$found ) {
+ error( "Unknown shape '$shape_name'." );
+ }
+ }
+ elsif ( $element eq "pathLst" ) {
+ $state = "path";
+ }
+ elsif ( $element eq "avLst" ) {
+ $state = "adjust";
+ }
+ elsif ( $element eq "gdLst" ) {
+ $state = "formulas";
+ }
+ elsif ( $element eq "ahLst" ) {
+ $state = "handles";
+ }
+ elsif ( $element eq "rect" ) {
+ $textboxrect = value( $attr{'l'} ) . "," . value( $attr{'t'} ) . "," .
+ value( $attr{'r'} ) . "," . value( $attr{'b'} );
+ }
+ elsif ( $state eq "path" ) {
+ if ( $element eq "path" ) {
+ $no_stroke = ( defined( $attr{'stroke'} ) && $attr{'stroke'} eq 'false' );
+ $no_fill = ( defined( $attr{'fill'} ) && $attr{'fill'} eq 'none' );
+ $path_w = $attr{'w'};
+ $path_h = $attr{'h'};
+ }
+ elsif ( $element eq "moveTo" ) {
+ $path .= "m";
+ }
+ elsif ( $element eq "lnTo" ) {
+ $path .= "l";
+ }
+ elsif ( $element eq "cubicBezTo" ) {
+ $path .= "c";
+ }
+ elsif ( $element eq "quadBezTo" ) {
+ my %points = ( 'x' => $last_pos_x, 'y' => $last_pos_y );
+ @quadratic_bezier = ( \%points );
+ }
+ elsif ( $element eq "close" ) {
+ $path .= "x";
+ }
+ elsif ( $element eq "pt" ) {
+ # remember the last position for the arcTo
+ $last_pos_x = value( $attr{'x'} );
+ $last_pos_y = value( $attr{'y'} );
+
+ $last_pos_x *= ( value( 'w' ) / $path_w ) if ( defined( $path_w ) );
+ $last_pos_y *= ( value( 'h' ) / $path_h ) if ( defined( $path_h ) );
+
+ if ( $#quadratic_bezier >= 0 ) {
+ my %points = ( 'x' => $last_pos_x, 'y' => $last_pos_y );
+ push( @quadratic_bezier, \%points );
+ }
+ else {
+ add_point_to_path( $last_pos_x, $last_pos_y );
+ }
+ }
+ elsif ( ( $element eq "arcTo" ) && ( $last_pos_x ne "" ) && ( $last_pos_y ne "" ) ) {
+ # there's no exact equivalent of arcTo in VML, so we have to
+ # compute here a bit...
+ my $stAng = value( $attr{'stAng'} );
+ my $swAng = value( $attr{'swAng'} );
+ my $wR = value( $attr{'wR'} );
+ my $hR = value( $attr{'hR'} );
+
+ $wR *= ( value( 'w' ) / $path_w ) if ( defined( $path_w ) );
+ $hR *= ( value( 'h' ) / $path_h ) if ( defined( $path_h ) );
+
+ if ( ( $stAng =~ /^[0-9-]+$/ ) && ( $swAng =~ /^[0-9-]+$/ ) ) {
+ if ( ( ( $stAng % 90 ) == 0 ) && ( ( $swAng % 90 ) == 0 ) && ( $swAng != 0 ) ) {
+ my $end = $stAng + $swAng;
+ my $step = ( $swAng > 0 )? 90: -90;
+
+ for ( my $cur = $stAng; $cur != $end; $cur += $step ) {
+ elliptic_quadrant( $wR, $hR, ( $cur % 360 ), $step );
+ }
+ }
+ else {
+ error( "Unsupported numeric 'arcTo' ($attr{'wR'}, $attr{'hR'}, $stAng, $swAng)." );
+ }
+ }
+ else {
+ error( "Unsupported 'arcTo' conversion ($attr{'wR'}, $attr{'hR'}, $stAng, $swAng)." );
+ }
+ }
+ else {
+ error( "Unhandled path element '$element'." );
+ }
+ }
+ elsif ( $state eq "adjust" ) {
+ if ( $element eq "gd" ) {
+ my $adj_no = $attr{'name'};
+
+ # Save this adj number for this type for later use.
+ push(@{$adj_names{$shape_name}}, $adj_no);
+
+ my $is_const = 0;
+
+ $adj_no =~ s/^adj//;
+ if ( $adj_no eq "" ) {
+ $max_adj_no = 0;
+ }
+ elsif ( !( $adj_no =~ /^[0-9]*$/ ) ) {
+ ++$max_adj_no;
+ $is_const = 1;
+ }
+ elsif ( $adj_no != $max_adj_no + 1 ) {
+ error( "Wrong order of adj values." );
+ ++$max_adj_no;
+ }
+ else {
+ $max_adj_no = $adj_no;
+ }
+
+ if ( $attr{'fmla'} =~ /^val ([0-9-]*)$/ ) {
+ my $val = sprintf( "%.0f", ( 21600 * $1 ) / 100000 );
+ if ( $is_const ) {
+ $variables{$adj_no} = $val;
+ }
+ elsif ( $adjust eq "" ) {
+ $adjust = $val;
+ }
+ else {
+ $adjust = "$val,$adjust";
+ }
+ }
+ else {
+ error( "Wrong fmla '$attr{'fmla'}'." );
+ }
+ }
+ else {
+ error( "Unhandled adjust element '$element'." );
+ }
+ }
+ elsif ( $state eq "formulas" ) {
+ if ( $element eq "gd" ) {
+ if ( $attr{'fmla'} =~ /^\*\/ (h|w|ss) adj([0-9]+) 100000$/ ) {
+ insert_formula( $attr{'name'}, "val #" . ( $max_adj_no - $2 ) );
+ }
+ elsif ( $attr{'fmla'} =~ /^pin [^ ]+ ([^ ]+) / ) {
+ print STDERR "TODO Map 'pin' to VML as xrange for handles.\n";
+ my $pin_val = $1;
+ if ( $pin_val eq "adj" ) {
+ insert_formula( $attr{'name'}, "val #0" );
+ }
+ elsif ( $pin_val =~ /^adj([0-9]+)/ ) {
+ insert_formula( $attr{'name'}, "val #" . ( $max_adj_no - $1 ) );
+ }
+ else {
+ insert_formula( $attr{'name'}, "val " . value( $pin_val ) );
+ }
+ }
+ elsif ( $attr{'fmla'} =~ /adj/ ) {
+ error( "Non-standard usage of adj in '$attr{'fmla'}'." );
+ }
+ else {
+ convert_formula( $attr{'name'}, $attr{'fmla'} );
+ }
+ }
+ }
+ elsif ( $state eq "handles" ) {
+ if ( $element eq "pos" ) {
+ $handles .= "<v:h position=\"" . value( $attr{'x'} ) . "," . value( $attr{'y'} ) . "\"/>\n";
+ }
+ }
+}
+
+# End of an element
+sub end_element( $ )
+{
+ my ( $element ) = @_;
+
+ pop @levels;
+
+ if ( $element eq $shape_name ) {
+ if ( !$ignore_this_shape ) {
+ # we have all the info, generate the shape now
+ $state = "";
+
+ # shape path
+ my $out = "<v:shapetype id=\"_x0000_t__ID__\" coordsize=\"21600,21600\" o:spt=\"__ID__\" ";
+ if ( $adjust ne "" ) {
+ $out .= "adj=\"$adjust\" ";
+ }
+
+ # optimize it [yes, we need this twice ;-)]
+ $path =~ s/([^0-9-@])0([^0-9-@])/$1$2/g;
+ $path =~ s/([^0-9-@])0([^0-9-@])/$1$2/g;
+
+ $out .= "path=\"$path\">\n";
+
+ # stroke
+ $out .= "<v:stroke joinstyle=\"miter\"/>\n";
+
+ # formulas
+ if ( $#formulas >= 0 )
+ {
+ $out .= "<v:formulas>\n";
+ foreach my $fmla ( @formulas ) {
+ $out .= "<v:f eqn=\"$fmla\"/>\n"
+ }
+ $out .= "</v:formulas>\n";
+ }
+
+ # path
+ if ( $textboxrect ne "" ) { # TODO connectlocs, connectangles
+ $out .= "<v:path gradientshapeok=\"t\" o:connecttype=\"rect\" textboxrect=\"$textboxrect\"/>\n";
+ }
+
+ # handles
+ if ( $handles ne "" ) {
+ $out .= "<v:handles>\n$handles</v:handles>\n";
+ }
+
+ $out .="</v:shapetype>";
+
+ # hooray! :-)
+ $result_shapes{$shape_name} = $out;
+ }
+ else {
+ print STDERR "Shape '$shape_name' ignored; see the above error(s) for the reason.\n";
+ }
+ $shape_name = "";
+ }
+ elsif ( $state eq "path" ) {
+ if ( $element eq "path" ) {
+ $path .= "ns" if ( $no_stroke );
+ $path .= "nf" if ( $no_fill );
+ $path .= "e";
+ }
+ elsif ( $element eq "quadBezTo" ) {
+ # we have to convert the quadratic bezier to cubic
+ if ( $#quadratic_bezier == 2 ) {
+ my @points_x = quadratic_to_cubic_bezier( 'x' );
+ my @points_y = quadratic_to_cubic_bezier( 'y' );
+
+ $path .= "c";
+ # ignore the starting point
+ for ( my $i = 1; $i < 4; ++$i ) {
+ add_point_to_path( $points_x[$i], $points_y[$i] );
+ }
+ }
+ else {
+ error( "Wrong number of points of the quadratic bezier." );
+ }
+ @quadratic_bezier = ();
+ }
+ }
+ elsif ( $element eq "avLst" ) {
+ $state = "";
+ }
+ elsif ( $element eq "gdLst" ) {
+ $state = "";
+ }
+ elsif ( $element eq "ahLst" ) {
+ $state = "";
+ }
+}
+
+# Text inside an element
+sub characters( $ )
+{
+ #my ( $text ) = @_;
+}
+
+#################### A trivial XML parser ####################
+
+# Parse the attributes
+sub parse_start_element( $ )
+{
+ # split the string containing both the elements and attributes
+ my ( $element_tmp ) = @_;
+
+ $element_tmp =~ s/\s*$//;
+ $element_tmp =~ s/^\s*//;
+
+ ( my $element = $element_tmp ) =~ s/\s.*$//;
+ if ( $element_tmp =~ /\s/ ) {
+ $element_tmp =~ s/^[^\s]*\s//;
+ }
+ else {
+ $element_tmp = "";
+ }
+
+ # we have the element, now the attributes
+ my %attr;
+ my $is_key = 1;
+ my $key = "";
+ foreach my $tmp ( split( /"/, $element_tmp ) ) {
+ if ( $is_key ) {
+ $key = $tmp;
+ $key =~ s/^\s*//;
+ $key =~ s/\s*=\s*$//;
+ }
+ else {
+ $attr{$key} = $tmp;
+ }
+ $is_key = !$is_key;
+ }
+
+ if ( $element ne "" ) {
+ start_element( $element, %attr );
+ }
+}
+
+# Parse the file
+sub parse( $ )
+{
+ my ( $file ) = @_;
+
+ my $in_comment = 0;
+ my $line = "";
+ while (<$file>) {
+ # ignore comments
+ s/<\?[^>]*\?>//g;
+ s/<!--[^>]*-->//g;
+ if ( /<!--/ ) {
+ $in_comment = 1;
+ s/<!--.*//;
+ }
+ elsif ( /-->/ && $in_comment ) {
+ $in_comment = 0;
+ s/.*-->//;
+ }
+ elsif ( $in_comment ) {
+ next;
+ }
+ # ignore empty lines
+ chomp;
+ s/^\s*//;
+ s/\s*$//;
+ next if ( $_ eq "" );
+
+ # take care of lines where element continues
+ if ( $line ne "" ) {
+ $line .= " " . $_;
+ }
+ else {
+ $line = $_;
+ }
+ next if ( !/>$/ );
+
+ # the actual parsing
+ my @starts = split( /</, $line );
+ $line = "";
+ foreach my $start ( @starts ) {
+ next if ( $start eq "" );
+
+ my @ends = split( />/, $start );
+ my $element = $ends[0];
+ my $data = $ends[1];
+
+ # start or end element
+ if ( $element =~ /^\/(.*)/ ) {
+ end_element( $1 );
+ }
+ elsif ( $element =~ /^(.*)\/$/ ) {
+ parse_start_element( $1 );
+ ( my $end = $1 ) =~ s/\s.*$//;
+ end_element( $end );
+ }
+ else {
+ parse_start_element( $element );
+ }
+
+ # the data
+ characters( $data ) if ( defined( $data ) && $data ne "" );
+ }
+ }
+}
+
+# Do the real work
+my $file;
+open( $file, "<$src_shapes" ) || die "Cannot open $src_shapes: $!";
+parse( $file );
+close( $file );
+
+open( $file, "<$src_text" ) || die "Cannot open $src_text: $!";
+parse( $file );
+close( $file );
+
+if ( !defined( $result_shapes{'textBox'} ) ) {
+ # tdf#114842 shapetype id of the textbox, must be the same as defined
+ $result_shapes{'textBox'} =
+ "<v:shapetype id=\"_x0000_t__ID__\" coordsize=\"21600,21600\" " .
+ "o:spt=\"__ID__\" path=\"m,l,21600l21600,21600l21600,xe\">\n" .
+ "<v:stroke joinstyle=\"miter\"/>\n" .
+ "<v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n" .
+ "</v:shapetype>";
+}
+
+# Generate the data
+if ($drawingml_adj_names_data eq 1) {
+ foreach my $adj_name (sort(keys %adj_names))
+ {
+ foreach my $adj (@{$adj_names{$adj_name}})
+ {
+ print "$adj_name\t$adj\n";
+ }
+ }
+ exit 0;
+} elsif ($vml_shape_types_data eq 1) {
+ for ( my $i = 0; $i < 203; ++$i ) {
+ if ( $i < 4 ) {
+ print "/* $i - $shapes_ids{$i} - handled separately */\nNULL\n";
+ }
+ else {
+ print "/* $i - $shapes_ids{$i} */\n";
+ my $out = $result_shapes{$shapes_ids{$i}};
+ if ( defined( $out ) ) {
+ # set the id
+ $out =~ s/__ID__/$i/g;
+
+ # output as string
+ $out =~ s/\n//g;
+
+ print "$out\n";
+ }
+ else {
+ print "NULL\n";
+ }
+ }
+ }
+ exit 0;
+}
+
+# should not happen
+exit 1;
+
+# vim:set ft=perl shiftwidth=4 softtabstop=4 expandtab: #
diff --git a/oox/source/export/presetTextWarpDefinitions.xml b/oox/source/export/presetTextWarpDefinitions.xml
new file mode 100644
index 000000000..c701c8f82
--- /dev/null
+++ b/oox/source/export/presetTextWarpDefinitions.xml
@@ -0,0 +1,1885 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<presetTextWarpDefinitions>
+ <textArchDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 0"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj 21599999"/>
+ <gd name="v1" fmla="+- 10800000 0 adval"/>
+ <gd name="v2" fmla="+- 32400000 0 adval"/>
+ <gd name="nv1" fmla="+- 0 0 v1"/>
+ <gd name="stAng" fmla="?: nv1 v2 v1"/>
+ <gd name="w1" fmla="+- 5400000 0 adval"/>
+ <gd name="w2" fmla="+- 16200000 0 adval"/>
+ <gd name="d1" fmla="+- adval 0 stAng"/>
+ <gd name="d2" fmla="+- d1 0 21600000"/>
+ <gd name="v3" fmla="+- 0 0 10800000"/>
+ <gd name="c2" fmla="?: w2 d1 d2"/>
+ <gd name="c1" fmla="?: v1 d2 c2"/>
+ <gd name="c0" fmla="?: w1 d1 c1"/>
+ <gd name="swAng" fmla="?: stAng c0 v3"/>
+ <gd name="wt1" fmla="sin wd2 adj"/>
+ <gd name="ht1" fmla="cos hd2 adj"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="wt2" fmla="sin wd2 stAng"/>
+ <gd name="ht2" fmla="cos hd2 stAng"/>
+ <gd name="dx2" fmla="cat2 wd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 hd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y2"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textArchDown>
+ <textArchDownPour>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 0"/>
+ <gd name="adj2" fmla="val 25000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj1 21599999"/>
+ <gd name="v1" fmla="+- 10800000 0 adval"/>
+ <gd name="v2" fmla="+- 32400000 0 adval"/>
+ <gd name="nv1" fmla="+- 0 0 v1"/>
+ <gd name="stAng" fmla="?: nv1 v2 v1"/>
+ <gd name="w1" fmla="+- 5400000 0 adval"/>
+ <gd name="w2" fmla="+- 16200000 0 adval"/>
+ <gd name="d1" fmla="+- adval 0 stAng"/>
+ <gd name="d2" fmla="+- d1 0 21600000"/>
+ <gd name="v3" fmla="+- 0 0 10800000"/>
+ <gd name="c2" fmla="?: w2 d1 d2"/>
+ <gd name="c1" fmla="?: v1 d2 c2"/>
+ <gd name="c0" fmla="?: w1 d1 c1"/>
+ <gd name="swAng" fmla="?: stAng c0 v3"/>
+ <gd name="wt1" fmla="sin wd2 stAng"/>
+ <gd name="ht1" fmla="cos hd2 stAng"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="adval2" fmla="pin 0 adj2 99000"/>
+ <gd name="ratio" fmla="*/ adval2 1 100000"/>
+ <gd name="iwd2" fmla="*/ wd2 ratio 1"/>
+ <gd name="ihd2" fmla="*/ hd2 ratio 1"/>
+ <gd name="wt2" fmla="sin iwd2 adval"/>
+ <gd name="ht2" fmla="cos ihd2 adval"/>
+ <gd name="dx2" fmla="cat2 iwd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 ihd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ <gd name="wt3" fmla="sin iwd2 stAng"/>
+ <gd name="ht3" fmla="cos ihd2 stAng"/>
+ <gd name="dx3" fmla="cat2 iwd2 ht3 wt3"/>
+ <gd name="dy3" fmla="sat2 ihd2 ht3 wt3"/>
+ <gd name="x3" fmla="+- hc dx3 0"/>
+ <gd name="y3" fmla="+- vc dy3 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj2" minR="0" maxR="100000" gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x3" y="y3"/>
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="stAng" swAng="swAng"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stAng" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textArchDownPour>
+ <textArchUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val cd2"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj 21599999"/>
+ <gd name="v1" fmla="+- 10800000 0 adval"/>
+ <gd name="v2" fmla="+- 32400000 0 adval"/>
+ <gd name="end" fmla="?: v1 v1 v2"/>
+ <gd name="w1" fmla="+- 5400000 0 adval"/>
+ <gd name="w2" fmla="+- 16200000 0 adval"/>
+ <gd name="d1" fmla="+- end 0 adval"/>
+ <gd name="d2" fmla="+- 21600000 d1 0"/>
+ <gd name="c2" fmla="?: w2 d1 d2"/>
+ <gd name="c1" fmla="?: v1 d2 c2"/>
+ <gd name="swAng" fmla="?: w1 d1 c1"/>
+ <gd name="wt1" fmla="sin wd2 adj"/>
+ <gd name="ht1" fmla="cos hd2 adj"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="adval" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textArchUp>
+ <textArchUpPour>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val cd2"/>
+ <gd name="adj2" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj1 21599999"/>
+ <gd name="v1" fmla="+- 10800000 0 adval"/>
+ <gd name="v2" fmla="+- 32400000 0 adval"/>
+ <gd name="end" fmla="?: v1 v1 v2"/>
+ <gd name="w1" fmla="+- 5400000 0 adval"/>
+ <gd name="w2" fmla="+- 16200000 0 adval"/>
+ <gd name="d1" fmla="+- end 0 adval"/>
+ <gd name="d2" fmla="+- 21600000 d1 0"/>
+ <gd name="c2" fmla="?: w2 d1 d2"/>
+ <gd name="c1" fmla="?: v1 d2 c2"/>
+ <gd name="swAng" fmla="?: w1 d1 c1"/>
+ <gd name="wt1" fmla="sin wd2 adval"/>
+ <gd name="ht1" fmla="cos hd2 adval"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="adval2" fmla="pin 0 adj2 99000"/>
+ <gd name="ratio" fmla="*/ adval2 1 100000"/>
+ <gd name="iwd2" fmla="*/ wd2 ratio 1"/>
+ <gd name="ihd2" fmla="*/ hd2 ratio 1"/>
+ <gd name="wt2" fmla="sin iwd2 adval"/>
+ <gd name="ht2" fmla="cos ihd2 adval"/>
+ <gd name="dx2" fmla="cat2 iwd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 ihd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj2" minR="0" maxR="100000" gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="adval" swAng="swAng"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x2" y="y2"/>
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="adval" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textArchUpPour>
+ <textButton>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 10800000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj 21599999"/>
+ <gd name="bot" fmla="+- 5400000 0 adval"/>
+ <gd name="lef" fmla="+- 10800000 0 adval"/>
+ <gd name="top" fmla="+- 16200000 0 adval"/>
+ <gd name="rig" fmla="+- 21600000 0 adval"/>
+ <gd name="c3" fmla="?: top adval 0"/>
+ <gd name="c2" fmla="?: lef 10800000 c3"/>
+ <gd name="c1" fmla="?: bot rig c2"/>
+ <gd name="stAng" fmla="?: adval c1 0"/>
+ <gd name="w1" fmla="+- 21600000 0 stAng"/>
+ <gd name="stAngB" fmla="?: stAng w1 0"/>
+ <gd name="td1" fmla="*/ bot 2 1"/>
+ <gd name="td2" fmla="*/ top 2 1"/>
+ <gd name="ntd2" fmla="+- 0 0 td2"/>
+ <gd name="w2" fmla="+- 0 0 10800000"/>
+ <gd name="c6" fmla="?: top ntd2 w2"/>
+ <gd name="c5" fmla="?: lef 10800000 c6"/>
+ <gd name="c4" fmla="?: bot td1 c5"/>
+ <gd name="v1" fmla="?: adval c4 10800000"/>
+ <gd name="swAngT" fmla="+- 0 0 v1"/>
+ <gd name="stT" fmla="?: lef stAngB stAng"/>
+ <gd name="stB" fmla="?: lef stAng stAngB"/>
+ <gd name="swT" fmla="?: lef v1 swAngT"/>
+ <gd name="swB" fmla="?: lef swAngT v1"/>
+ <gd name="wt1" fmla="sin wd2 stT"/>
+ <gd name="ht1" fmla="cos hd2 stT"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="wt2" fmla="sin wd2 stB"/>
+ <gd name="ht2" fmla="cos hd2 stB"/>
+ <gd name="dx2" fmla="cat2 wd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 hd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ <gd name="wt3" fmla="sin wd2 adj"/>
+ <gd name="ht3" fmla="cos hd2 adj"/>
+ <gd name="dx3" fmla="cat2 wd2 ht3 wt3"/>
+ <gd name="dy3" fmla="sat2 hd2 ht3 wt3"/>
+ <gd name="x3" fmla="+- hc dx3 0"/>
+ <gd name="y3" fmla="+- vc dy3 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj" minAng="0" maxAng="21599999">
+ <pos x="x3" y="y3"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stT" swAng="swT"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="vc"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="vc"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x2" y="y2"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stB" swAng="swB"/>
+ </path>
+ </pathLst>
+ </textButton>
+ <textButtonPour>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val cd2"/>
+ <gd name="adj2" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj1 21599999"/>
+ <gd name="bot" fmla="+- 5400000 0 adval"/>
+ <gd name="lef" fmla="+- 10800000 0 adval"/>
+ <gd name="top" fmla="+- 16200000 0 adval"/>
+ <gd name="rig" fmla="+- 21600000 0 adval"/>
+ <gd name="c3" fmla="?: top adval 0"/>
+ <gd name="c2" fmla="?: lef 10800000 c3"/>
+ <gd name="c1" fmla="?: bot rig c2"/>
+ <gd name="stAng" fmla="?: adval c1 0"/>
+ <gd name="w1" fmla="+- 21600000 0 stAng"/>
+ <gd name="stAngB" fmla="?: stAng w1 0"/>
+ <gd name="td1" fmla="*/ bot 2 1"/>
+ <gd name="td2" fmla="*/ top 2 1"/>
+ <gd name="ntd2" fmla="+- 0 0 td2"/>
+ <gd name="w2" fmla="+- 0 0 10800000"/>
+ <gd name="c6" fmla="?: top ntd2 w2"/>
+ <gd name="c5" fmla="?: lef 10800000 c6"/>
+ <gd name="c4" fmla="?: bot td1 c5"/>
+ <gd name="v1" fmla="?: adval c4 10800000"/>
+ <gd name="swAngT" fmla="+- 0 0 v1"/>
+ <gd name="stT" fmla="?: lef stAngB stAng"/>
+ <gd name="stB" fmla="?: lef stAng stAngB"/>
+ <gd name="swT" fmla="?: lef v1 swAngT"/>
+ <gd name="swB" fmla="?: lef swAngT v1"/>
+ <gd name="wt1" fmla="sin wd2 stT"/>
+ <gd name="ht1" fmla="cos hd2 stT"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="wt6" fmla="sin wd2 stB"/>
+ <gd name="ht6" fmla="cos hd2 stB"/>
+ <gd name="dx6" fmla="cat2 wd2 ht6 wt6"/>
+ <gd name="dy6" fmla="sat2 hd2 ht6 wt6"/>
+ <gd name="x6" fmla="+- hc dx6 0"/>
+ <gd name="y6" fmla="+- vc dy6 0"/>
+ <gd name="adval2" fmla="pin 40000 adj2 99000"/>
+ <gd name="ratio" fmla="*/ adval2 1 100000"/>
+ <gd name="iwd2" fmla="*/ wd2 ratio 1"/>
+ <gd name="ihd2" fmla="*/ hd2 ratio 1"/>
+ <gd name="wt2" fmla="sin iwd2 stT"/>
+ <gd name="ht2" fmla="cos ihd2 stT"/>
+ <gd name="dx2" fmla="cat2 iwd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 ihd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ <gd name="wt5" fmla="sin iwd2 stB"/>
+ <gd name="ht5" fmla="cos ihd2 stB"/>
+ <gd name="dx5" fmla="cat2 iwd2 ht5 wt5"/>
+ <gd name="dy5" fmla="sat2 ihd2 ht5 wt5"/>
+ <gd name="x5" fmla="+- hc dx5 0"/>
+ <gd name="y5" fmla="+- vc dy5 0"/>
+ <gd name="d1" fmla="+- hd2 0 ihd2"/>
+ <gd name="d12" fmla="*/ d1 1 2"/>
+ <gd name="yu" fmla="+- vc 0 d12"/>
+ <gd name="yd" fmla="+- vc d12 0"/>
+ <gd name="v1" fmla="*/ d12 d12 1"/>
+ <gd name="v2" fmla="*/ ihd2 ihd2 1"/>
+ <gd name="v3" fmla="*/ v1 1 v2"/>
+ <gd name="v4" fmla="+- 1 0 v3"/>
+ <gd name="v5" fmla="*/ iwd2 iwd2 1"/>
+ <gd name="v6" fmla="*/ v4 v5 1"/>
+ <gd name="v7" fmla="sqrt v6"/>
+ <gd name="xl" fmla="+- hc 0 v7"/>
+ <gd name="xr" fmla="+- hc v7 0"/>
+ <gd name="wtadj" fmla="sin iwd2 adj1"/>
+ <gd name="htadj" fmla="cos ihd2 adj1"/>
+ <gd name="dxadj" fmla="cat2 iwd2 htadj wtadj"/>
+ <gd name="dyadj" fmla="sat2 ihd2 htadj wtadj"/>
+ <gd name="xadj" fmla="+- hc dxadj 0"/>
+ <gd name="yadj" fmla="+- vc dyadj 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj2" minR="0" maxR="100000" gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="xadj" y="yadj"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stT" swAng="swT"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x2" y="y2"/>
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="stT" swAng="swT"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="xl" y="yu"/>
+ </moveTo>
+ <lnTo>
+ <pt x="xr" y="yu"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="xl" y="yd"/>
+ </moveTo>
+ <lnTo>
+ <pt x="xr" y="yd"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x5" y="y5"/>
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="stB" swAng="swB"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x6" y="y6"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="stB" swAng="swB"/>
+ </path>
+ </pathLst>
+ </textButtonPour>
+ <textCanDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 14286"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 33333"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y0" fmla="+- t dy 0"/>
+ <gd name="y1" fmla="+- b 0 dy"/>
+ <gd name="ncd2" fmla="*/ cd2 -1 1"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="33333">
+ <pos x="hc" y="y0"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="dy" stAng="cd2" swAng="ncd2"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="dy" stAng="cd2" swAng="ncd2"/>
+ </path>
+ </pathLst>
+ </textCanDown>
+ <textCanUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 85714"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 66667 adj 100000"/>
+ <gd name="dy1" fmla="*/ a h 100000"/>
+ <gd name="dy" fmla="+- h 0 dy1"/>
+ <gd name="y0" fmla="+- t dy1 0"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="66667" maxY="100000">
+ <pos x="hc" y="y0"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="dy" stAng="cd2" swAng="cd2"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="dy" stAng="cd2" swAng="cd2"/>
+ </path>
+ </pathLst>
+ </textCanUp>
+ <textCascadeDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 44444"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 28570 adj 100000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="dy2" fmla="+- h 0 dy"/>
+ <gd name="dy3" fmla="*/ dy2 1 4"/>
+ <gd name="y2" fmla="+- t dy3 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="28570" maxY="100000">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y2"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textCascadeDown>
+ <textCascadeUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 44444"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 28570 adj 100000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="dy2" fmla="+- h 0 dy"/>
+ <gd name="dy3" fmla="*/ dy2 1 4"/>
+ <gd name="y2" fmla="+- t dy3 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="28570" maxY="100000">
+ <pos x="r" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y2"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y1"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textCascadeUp>
+ <textChevron>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000"/>
+ <gd name="y" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t b y"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="l" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="y1"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textChevron>
+ <textChevronInverted>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 75000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 50000 adj 100000"/>
+ <gd name="y" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- b 0 y"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="50000" maxY="100000">
+ <pos x="l" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="y1"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="b"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textChevronInverted>
+ <textCircle>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 10800000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj 21599999"/>
+ <gd name="d0" fmla="+- adval 0 10800000"/>
+ <gd name="d1" fmla="+- 10800000 0 adval"/>
+ <gd name="d2" fmla="+- 21600000 0 adval"/>
+ <gd name="d3" fmla="?: d1 d1 10799999"/>
+ <gd name="d4" fmla="?: d0 d2 d3"/>
+ <gd name="swAng" fmla="*/ d4 2 1"/>
+ <gd name="wt1" fmla="sin wd2 adj"/>
+ <gd name="ht1" fmla="cos hd2 adj"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefAng="adj" minAng="0" maxAng="21599999">
+ <pos x="x1" y="y1"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="adval" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textCircle>
+ <textCirclePour>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val cd2"/>
+ <gd name="adj2" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adval" fmla="pin 0 adj1 21599999"/>
+ <gd name="d0" fmla="+- adval 0 10800000"/>
+ <gd name="d1" fmla="+- 10800000 0 adval"/>
+ <gd name="d2" fmla="+- 21600000 0 adval"/>
+ <gd name="d3" fmla="?: d1 d1 10799999"/>
+ <gd name="d4" fmla="?: d0 d2 d3"/>
+ <gd name="swAng" fmla="*/ d4 2 1"/>
+ <gd name="wt1" fmla="sin wd2 adval"/>
+ <gd name="ht1" fmla="cos hd2 adval"/>
+ <gd name="dx1" fmla="cat2 wd2 ht1 wt1"/>
+ <gd name="dy1" fmla="sat2 hd2 ht1 wt1"/>
+ <gd name="x1" fmla="+- hc dx1 0"/>
+ <gd name="y1" fmla="+- vc dy1 0"/>
+ <gd name="adval2" fmla="pin 0 adj2 99000"/>
+ <gd name="ratio" fmla="*/ adval2 1 100000"/>
+ <gd name="iwd2" fmla="*/ wd2 ratio 1"/>
+ <gd name="ihd2" fmla="*/ hd2 ratio 1"/>
+ <gd name="wt2" fmla="sin iwd2 adval"/>
+ <gd name="ht2" fmla="cos ihd2 adval"/>
+ <gd name="dx2" fmla="cat2 iwd2 ht2 wt2"/>
+ <gd name="dy2" fmla="sat2 ihd2 ht2 wt2"/>
+ <gd name="x2" fmla="+- hc dx2 0"/>
+ <gd name="y2" fmla="+- vc dy2 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahPolar gdRefR="adj2" minR="0" maxR="100000" gdRefAng="adj1" minAng="0" maxAng="21599999">
+ <pos x="x2" y="y2"/>
+ </ahPolar>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="hd2" stAng="adval" swAng="swAng"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x2" y="y2"/>
+ </moveTo>
+ <arcTo wR="iwd2" hR="ihd2" stAng="adval" swAng="swAng"/>
+ </path>
+ </pathLst>
+ </textCirclePour>
+ <textCurveDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 45977"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 56338"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="gd1" fmla="*/ dy 3 4"/>
+ <gd name="gd2" fmla="*/ dy 5 4"/>
+ <gd name="gd3" fmla="*/ dy 3 8"/>
+ <gd name="gd4" fmla="*/ dy 1 8"/>
+ <gd name="gd5" fmla="+- h 0 gd3"/>
+ <gd name="gd6" fmla="+- gd4 h 0"/>
+ <gd name="y0" fmla="+- t dy 0"/>
+ <gd name="y1" fmla="+- t gd1 0"/>
+ <gd name="y2" fmla="+- t gd2 0"/>
+ <gd name="y3" fmla="+- t gd3 0"/>
+ <gd name="y4" fmla="+- t gd4 0"/>
+ <gd name="y5" fmla="+- t gd5 0"/>
+ <gd name="y6" fmla="+- t gd6 0"/>
+ <gd name="x1" fmla="+- l wd3 0"/>
+ <gd name="x2" fmla="+- r 0 wd3"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="56338">
+ <pos x="r" y="y0"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="y1"/>
+ <pt x="x2" y="y2"/>
+ <pt x="r" y="y0"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y5"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="y6"/>
+ <pt x="x2" y="y6"/>
+ <pt x="r" y="y5"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textCurveDown>
+ <textCurveUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 45977"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 56338"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="gd1" fmla="*/ dy 3 4"/>
+ <gd name="gd2" fmla="*/ dy 5 4"/>
+ <gd name="gd3" fmla="*/ dy 3 8"/>
+ <gd name="gd4" fmla="*/ dy 1 8"/>
+ <gd name="gd5" fmla="+- h 0 gd3"/>
+ <gd name="gd6" fmla="+- gd4 h 0"/>
+ <gd name="y0" fmla="+- t dy 0"/>
+ <gd name="y1" fmla="+- t gd1 0"/>
+ <gd name="y2" fmla="+- t gd2 0"/>
+ <gd name="y3" fmla="+- t gd3 0"/>
+ <gd name="y4" fmla="+- t gd4 0"/>
+ <gd name="y5" fmla="+- t gd5 0"/>
+ <gd name="y6" fmla="+- t gd6 0"/>
+ <gd name="x1" fmla="+- l wd3 0"/>
+ <gd name="x2" fmla="+- r 0 wd3"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="56338">
+ <pos x="l" y="y0"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y0"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="y2"/>
+ <pt x="x2" y="y1"/>
+ <pt x="r" y="t"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y5"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x1" y="y6"/>
+ <pt x="x2" y="y6"/>
+ <pt x="r" y="y5"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textCurveUp>
+ <textDeflate>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 18750"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 37500"/>
+ <gd name="dy" fmla="*/ a ss 100000"/>
+ <gd name="gd0" fmla="*/ dy 4 3"/>
+ <gd name="gd1" fmla="+- h 0 gd0"/>
+ <gd name="adjY" fmla="+- t dy 0"/>
+ <gd name="y0" fmla="+- t gd0 0"/>
+ <gd name="y1" fmla="+- t gd1 0"/>
+ <gd name="x0" fmla="+- l wd3 0"/>
+ <gd name="x1" fmla="+- r 0 wd3"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="37500">
+ <pos x="hc" y="adjY"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x0" y="y0"/>
+ <pt x="x1" y="y0"/>
+ <pt x="r" y="t"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x0" y="y1"/>
+ <pt x="x1" y="y1"/>
+ <pt x="r" y="b"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textDeflate>
+ <textDeflateBottom>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 6250 adj 100000"/>
+ <gd name="dy" fmla="*/ a ss 100000"/>
+ <gd name="dy2" fmla="+- h 0 dy"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="cp" fmla="+- y1 0 dy2"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="6250" maxY="100000">
+ <pos x="hc" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="cp"/>
+ <pt x="r" y="b"/>
+ </quadBezTo>
+ </path>
+ </pathLst>
+ </textDeflateBottom>
+ <textDeflateInflate>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 35000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 5000 adj 95000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="del" fmla="*/ h 5 100"/>
+ <gd name="dh1" fmla="*/ h 45 100"/>
+ <gd name="dh2" fmla="*/ h 55 100"/>
+ <gd name="yh" fmla="+- dy 0 del"/>
+ <gd name="yl" fmla="+- dy del 0"/>
+ <gd name="y3" fmla="+- yh yh dh1"/>
+ <gd name="y4" fmla="+- yl yl dh2"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="5000" maxY="95000">
+ <pos x="hc" y="dy"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="dh1"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y3"/>
+ <pt x="r" y="dh1"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="dh2"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y4"/>
+ <pt x="r" y="dh2"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textDeflateInflate>
+ <textDeflateInflateDeflate>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 3000 adj 47000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="del" fmla="*/ h 3 100"/>
+ <gd name="ey1" fmla="*/ h 30 100"/>
+ <gd name="ey2" fmla="*/ h 36 100"/>
+ <gd name="ey3" fmla="*/ h 63 100"/>
+ <gd name="ey4" fmla="*/ h 70 100"/>
+ <gd name="by" fmla="+- b 0 dy"/>
+ <gd name="yh1" fmla="+- dy 0 del"/>
+ <gd name="yl1" fmla="+- dy del 0"/>
+ <gd name="yh2" fmla="+- by 0 del"/>
+ <gd name="yl2" fmla="+- by del 0"/>
+ <gd name="y1" fmla="+- yh1 yh1 ey1"/>
+ <gd name="y2" fmla="+- yl1 yl1 ey2"/>
+ <gd name="y3" fmla="+- yh2 yh2 ey3"/>
+ <gd name="y4" fmla="+- yl2 yl2 ey4"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="3000" maxY="47000">
+ <pos x="hc" y="dy"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="ey1"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y1"/>
+ <pt x="r" y="ey1"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="ey2"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y2"/>
+ <pt x="r" y="ey2"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="ey3"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y3"/>
+ <pt x="r" y="ey3"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="ey4"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="y4"/>
+ <pt x="r" y="ey4"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textDeflateInflateDeflate>
+ <textDeflateTop>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 93750"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="cp" fmla="+- y1 dy 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="93750">
+ <pos x="hc" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="cp"/>
+ <pt x="r" y="t"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textDeflateTop>
+ <textDoubleWave1>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 6250"/>
+ <gd name="adj2" fmla="val 0"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 12500"/>
+ <gd name="a2" fmla="pin -10000 adj2 10000"/>
+ <gd name="y1" fmla="*/ h a1 100000"/>
+ <gd name="dy2" fmla="*/ y1 10 3"/>
+ <gd name="y2" fmla="+- y1 0 dy2"/>
+ <gd name="y3" fmla="+- y1 dy2 0"/>
+ <gd name="y4" fmla="+- b 0 y1"/>
+ <gd name="y5" fmla="+- y4 0 dy2"/>
+ <gd name="y6" fmla="+- y4 dy2 0"/>
+ <gd name="of" fmla="*/ w a2 100000"/>
+ <gd name="of2" fmla="*/ w a2 50000"/>
+ <gd name="x1" fmla="abs of"/>
+ <gd name="dx2" fmla="?: of2 0 of2"/>
+ <gd name="x2" fmla="+- l 0 dx2"/>
+ <gd name="dx8" fmla="?: of2 of2 0"/>
+ <gd name="x8" fmla="+- r 0 dx8"/>
+ <gd name="dx3" fmla="+/ dx2 x8 6"/>
+ <gd name="x3" fmla="+- x2 dx3 0"/>
+ <gd name="dx4" fmla="+/ dx2 x8 3"/>
+ <gd name="x4" fmla="+- x2 dx4 0"/>
+ <gd name="x5" fmla="+/ x2 x8 2"/>
+ <gd name="x6" fmla="+- x5 dx3 0"/>
+ <gd name="x7" fmla="+/ x6 x8 2"/>
+ <gd name="x9" fmla="+- l dx8 0"/>
+ <gd name="x15" fmla="+- r dx2 0"/>
+ <gd name="x10" fmla="+- x9 dx3 0"/>
+ <gd name="x11" fmla="+- x9 dx4 0"/>
+ <gd name="x12" fmla="+/ x9 x15 2"/>
+ <gd name="x13" fmla="+- x12 dx3 0"/>
+ <gd name="x14" fmla="+/ x13 x15 2"/>
+ <gd name="x16" fmla="+- r 0 x1"/>
+ <gd name="xAdj" fmla="+- hc of 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="12500">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y2"/>
+ <pt x="x4" y="y3"/>
+ <pt x="x5" y="y1"/>
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x6" y="y2"/>
+ <pt x="x7" y="y3"/>
+ <pt x="x8" y="y1"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x9" y="y4"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x10" y="y5"/>
+ <pt x="x11" y="y6"/>
+ <pt x="x12" y="y4"/>
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x13" y="y5"/>
+ <pt x="x14" y="y6"/>
+ <pt x="x15" y="y4"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textDoubleWave1>
+ <textFadeDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 33333"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 49999"/>
+ <gd name="dx" fmla="*/ a w 100000"/>
+ <gd name="x1" fmla="+- l dx 0"/>
+ <gd name="x2" fmla="+- r 0 dx"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="49999">
+ <pos x="x1" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x1" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textFadeDown>
+ <textFadeLeft>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 33333"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 49999"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="y2" fmla="+- b 0 dy"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="49999">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y2"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textFadeLeft>
+ <textFadeRight>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 33333"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 49999"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="y2" fmla="+- b 0 dy"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="49999">
+ <pos x="r" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y1"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y2"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textFadeRight>
+ <textFadeUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 33333"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 49999"/>
+ <gd name="dx" fmla="*/ a w 100000"/>
+ <gd name="x1" fmla="+- l dx 0"/>
+ <gd name="x2" fmla="+- r 0 dx"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="0" maxX="49999">
+ <pos x="x1" y="t"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x1" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="x2" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textFadeUp>
+ <textInflate>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 18750"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 20000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="gd" fmla="*/ dy 1 3"/>
+ <gd name="gd0" fmla="+- 0 0 gd"/>
+ <gd name="gd1" fmla="+- h 0 gd0"/>
+ <gd name="ty" fmla="+- t dy 0"/>
+ <gd name="by" fmla="+- b 0 dy"/>
+ <gd name="y0" fmla="+- t gd0 0"/>
+ <gd name="y1" fmla="+- t gd1 0"/>
+ <gd name="x0" fmla="+- l wd3 0"/>
+ <gd name="x1" fmla="+- r 0 wd3"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="20000">
+ <pos x="l" y="ty"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="ty"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x0" y="y0"/>
+ <pt x="x1" y="y0"/>
+ <pt x="r" y="ty"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="by"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x0" y="y1"/>
+ <pt x="x1" y="y1"/>
+ <pt x="r" y="by"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textInflate>
+ <textInflateBottom>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 60000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 60000 adj 100000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="ty" fmla="+- t dy 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="60000" maxY="100000">
+ <pos x="l" y="ty"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="ty"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="b"/>
+ <pt x="r" y="ty"/>
+ </quadBezTo>
+ </path>
+ </pathLst>
+ </textInflateBottom>
+ <textInflateTop>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 40000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 50000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="ty" fmla="+- t dy 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="50000">
+ <pos x="l" y="ty"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="ty"/>
+ </moveTo>
+ <quadBezTo>
+ <pt x="hc" y="t"/>
+ <pt x="r" y="ty"/>
+ </quadBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textInflateTop>
+ <textPlain>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 30000 adj 70000"/>
+ <gd name="mid" fmla="*/ a w 100000"/>
+ <gd name="midDir" fmla="+- mid 0 hc"/>
+ <gd name="dl" fmla="+- mid 0 l"/>
+ <gd name="dr" fmla="+- r 0 mid"/>
+ <gd name="dl2" fmla="*/ dl 2 1"/>
+ <gd name="dr2" fmla="*/ dr 2 1"/>
+ <gd name="dx" fmla="?: midDir dr2 dl2"/>
+ <gd name="xr" fmla="+- l dx 0"/>
+ <gd name="xl" fmla="+- r 0 dx"/>
+ <gd name="tlx" fmla="?: midDir l xl"/>
+ <gd name="trx" fmla="?: midDir xr r"/>
+ <gd name="blx" fmla="?: midDir xl l"/>
+ <gd name="brx" fmla="?: midDir r xr"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefX="adj" minX="30000" maxX="70000">
+ <pos x="mid" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="tlx" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="trx" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="blx" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="brx" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textPlain>
+ <textRingInside>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 60000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 50000 adj 99000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y" fmla="+- t dy 0"/>
+ <gd name="r" fmla="*/ dy 1 2"/>
+ <gd name="y1" fmla="+- t r 0"/>
+ <gd name="y2" fmla="+- b 0 r"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="50000" maxY="99000">
+ <pos x="hc" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="r" stAng="10800000" swAng="21599999"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y2"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="r" stAng="10800000" swAng="21599999"/>
+ </path>
+ </pathLst>
+ </textRingInside>
+ <textRingOutside>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 60000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 50000 adj 99000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y" fmla="+- t dy 0"/>
+ <gd name="r" fmla="*/ dy 1 2"/>
+ <gd name="y1" fmla="+- t r 0"/>
+ <gd name="y2" fmla="+- b 0 r"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="50000" maxY="99000">
+ <pos x="hc" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="r" stAng="10800000" swAng="-21599999"/>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y2"/>
+ </moveTo>
+ <arcTo wR="wd2" hR="r" stAng="10800000" swAng="-21599999"/>
+ </path>
+ </pathLst>
+ </textRingOutside>
+ <textSlantDown>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 44445"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 28569 adj 100000"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="y2" fmla="+- b 0 dy"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="28569" maxY="100000">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y2"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textSlantDown>
+ <textSlantUp>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 55555"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 71431"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="y2" fmla="+- b 0 dy"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="71431">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="y2"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textSlantUp>
+ <textStop>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 25000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 14286 adj 50000"/>
+ <gd name="dx" fmla="*/ w 1 3"/>
+ <gd name="dy" fmla="*/ a h 100000"/>
+ <gd name="x1" fmla="+- l dx 0"/>
+ <gd name="x2" fmla="+- r 0 dx"/>
+ <gd name="y1" fmla="+- t dy 0"/>
+ <gd name="y2" fmla="+- b 0 dy"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="14286" maxY="50000">
+ <pos x="l" y="dy"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y1"/>
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="t"/>
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="t"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y1"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y2"/>
+ </moveTo>
+ <lnTo>
+ <pt x="x1" y="b"/>
+ </lnTo>
+ <lnTo>
+ <pt x="x2" y="b"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y2"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textStop>
+ <textTriangle>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 100000"/>
+ <gd name="y" fmla="*/ a h 100000"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="100000">
+ <pos x="l" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="y"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="t"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="b"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="b"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textTriangle>
+ <textTriangleInverted>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj" fmla="val 50000"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a" fmla="pin 0 adj 100000"/>
+ <gd name="y" fmla="*/ a h 100000"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj" minY="0" maxY="100000">
+ <pos x="l" y="y"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="l" y="t"/>
+ </moveTo>
+ <lnTo>
+ <pt x="r" y="t"/>
+ </lnTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="l" y="y"/>
+ </moveTo>
+ <lnTo>
+ <pt x="hc" y="b"/>
+ </lnTo>
+ <lnTo>
+ <pt x="r" y="y"/>
+ </lnTo>
+ </path>
+ </pathLst>
+ </textTriangleInverted>
+ <textWave1>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500"/>
+ <gd name="adj2" fmla="val 0"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 20000"/>
+ <gd name="a2" fmla="pin -10000 adj2 10000"/>
+ <gd name="y1" fmla="*/ h a1 100000"/>
+ <gd name="dy2" fmla="*/ y1 10 3"/>
+ <gd name="y2" fmla="+- y1 0 dy2"/>
+ <gd name="y3" fmla="+- y1 dy2 0"/>
+ <gd name="y4" fmla="+- b 0 y1"/>
+ <gd name="y5" fmla="+- y4 0 dy2"/>
+ <gd name="y6" fmla="+- y4 dy2 0"/>
+ <gd name="of" fmla="*/ w a2 100000"/>
+ <gd name="of2" fmla="*/ w a2 50000"/>
+ <gd name="x1" fmla="abs of"/>
+ <gd name="dx2" fmla="?: of2 0 of2"/>
+ <gd name="x2" fmla="+- l 0 dx2"/>
+ <gd name="dx5" fmla="?: of2 of2 0"/>
+ <gd name="x5" fmla="+- r 0 dx5"/>
+ <gd name="dx3" fmla="+/ dx2 x5 3"/>
+ <gd name="x3" fmla="+- x2 dx3 0"/>
+ <gd name="x4" fmla="+/ x3 x5 2"/>
+ <gd name="x6" fmla="+- l dx5 0"/>
+ <gd name="x10" fmla="+- r dx2 0"/>
+ <gd name="x7" fmla="+- x6 dx3 0"/>
+ <gd name="x8" fmla="+/ x7 x10 2"/>
+ <gd name="x9" fmla="+- r 0 x1"/>
+ <gd name="xAdj" fmla="+- hc of 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="20000">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y2"/>
+ <pt x="x4" y="y3"/>
+ <pt x="x5" y="y1"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x6" y="y4"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x7" y="y5"/>
+ <pt x="x8" y="y6"/>
+ <pt x="x10" y="y4"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textWave1>
+ <textWave2>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 12500"/>
+ <gd name="adj2" fmla="val 0"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 20000"/>
+ <gd name="a2" fmla="pin -10000 adj2 10000"/>
+ <gd name="y1" fmla="*/ h a1 100000"/>
+ <gd name="dy2" fmla="*/ y1 10 3"/>
+ <gd name="y2" fmla="+- y1 0 dy2"/>
+ <gd name="y3" fmla="+- y1 dy2 0"/>
+ <gd name="y4" fmla="+- b 0 y1"/>
+ <gd name="y5" fmla="+- y4 0 dy2"/>
+ <gd name="y6" fmla="+- y4 dy2 0"/>
+ <gd name="of" fmla="*/ w a2 100000"/>
+ <gd name="of2" fmla="*/ w a2 50000"/>
+ <gd name="x1" fmla="abs of"/>
+ <gd name="dx2" fmla="?: of2 0 of2"/>
+ <gd name="x2" fmla="+- l 0 dx2"/>
+ <gd name="dx5" fmla="?: of2 of2 0"/>
+ <gd name="x5" fmla="+- r 0 dx5"/>
+ <gd name="dx3" fmla="+/ dx2 x5 3"/>
+ <gd name="x3" fmla="+- x2 dx3 0"/>
+ <gd name="x4" fmla="+/ x3 x5 2"/>
+ <gd name="x6" fmla="+- l dx5 0"/>
+ <gd name="x10" fmla="+- r dx2 0"/>
+ <gd name="x7" fmla="+- x6 dx3 0"/>
+ <gd name="x8" fmla="+/ x7 x10 2"/>
+ <gd name="x9" fmla="+- r 0 x1"/>
+ <gd name="xAdj" fmla="+- hc of 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="20000">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y3"/>
+ <pt x="x4" y="y2"/>
+ <pt x="x5" y="y1"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x6" y="y4"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x7" y="y6"/>
+ <pt x="x8" y="y5"/>
+ <pt x="x10" y="y4"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textWave2>
+ <textWave4>
+ <avLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="adj1" fmla="val 6250"/>
+ <gd name="adj2" fmla="val 0"/>
+ </avLst>
+ <gdLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <gd name="a1" fmla="pin 0 adj1 12500"/>
+ <gd name="a2" fmla="pin -10000 adj2 10000"/>
+ <gd name="y1" fmla="*/ h a1 100000"/>
+ <gd name="dy2" fmla="*/ y1 10 3"/>
+ <gd name="y2" fmla="+- y1 0 dy2"/>
+ <gd name="y3" fmla="+- y1 dy2 0"/>
+ <gd name="y4" fmla="+- b 0 y1"/>
+ <gd name="y5" fmla="+- y4 0 dy2"/>
+ <gd name="y6" fmla="+- y4 dy2 0"/>
+ <gd name="of" fmla="*/ w a2 100000"/>
+ <gd name="of2" fmla="*/ w a2 50000"/>
+ <gd name="x1" fmla="abs of"/>
+ <gd name="dx2" fmla="?: of2 0 of2"/>
+ <gd name="x2" fmla="+- l 0 dx2"/>
+ <gd name="dx8" fmla="?: of2 of2 0"/>
+ <gd name="x8" fmla="+- r 0 dx8"/>
+ <gd name="dx3" fmla="+/ dx2 x8 6"/>
+ <gd name="x3" fmla="+- x2 dx3 0"/>
+ <gd name="dx4" fmla="+/ dx2 x8 3"/>
+ <gd name="x4" fmla="+- x2 dx4 0"/>
+ <gd name="x5" fmla="+/ x2 x8 2"/>
+ <gd name="x6" fmla="+- x5 dx3 0"/>
+ <gd name="x7" fmla="+/ x6 x8 2"/>
+ <gd name="x9" fmla="+- l dx8 0"/>
+ <gd name="x15" fmla="+- r dx2 0"/>
+ <gd name="x10" fmla="+- x9 dx3 0"/>
+ <gd name="x11" fmla="+- x9 dx4 0"/>
+ <gd name="x12" fmla="+/ x9 x15 2"/>
+ <gd name="x13" fmla="+- x12 dx3 0"/>
+ <gd name="x14" fmla="+/ x13 x15 2"/>
+ <gd name="x16" fmla="+- r 0 x1"/>
+ <gd name="xAdj" fmla="+- hc of 0"/>
+ </gdLst>
+ <ahLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <ahXY gdRefY="adj1" minY="0" maxY="12500">
+ <pos x="l" y="y1"/>
+ </ahXY>
+ <ahXY gdRefX="adj2" minX="-10000" maxX="10000">
+ <pos x="xAdj" y="b"/>
+ </ahXY>
+ </ahLst>
+ <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
+ <path>
+ <moveTo>
+ <pt x="x2" y="y1"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x3" y="y3"/>
+ <pt x="x4" y="y2"/>
+ <pt x="x5" y="y1"/>
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x6" y="y3"/>
+ <pt x="x7" y="y2"/>
+ <pt x="x8" y="y1"/>
+ </cubicBezTo>
+ </path>
+ <path>
+ <moveTo>
+ <pt x="x9" y="y4"/>
+ </moveTo>
+ <cubicBezTo>
+ <pt x="x10" y="y6"/>
+ <pt x="x11" y="y5"/>
+ <pt x="x12" y="y4"/>
+ </cubicBezTo>
+ <cubicBezTo>
+ <pt x="x13" y="y6"/>
+ <pt x="x14" y="y5"/>
+ <pt x="x15" y="y4"/>
+ </cubicBezTo>
+ </path>
+ </pathLst>
+ </textWave4>
+</presetTextWarpDefinitions>
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
new file mode 100644
index 000000000..df7394995
--- /dev/null
+++ b/oox/source/export/shapes.cxx
@@ -0,0 +1,2728 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_wasm_strip.h>
+
+#include <sal/config.h>
+#include <sal/log.hxx>
+
+#include <filter/msfilter/util.hxx>
+#include <o3tl/string_view.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/export/shapes.hxx>
+#include <oox/export/utils.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/relationship.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <initializer_list>
+#include <string_view>
+
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/drawing/CircleKind.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XEmbedPersist.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/table/XTable.hpp>
+#include <com/sun/star/table/XMergeableCell.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/presentation/ClickAction.hpp>
+#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
+#include <com/sun/star/container/XIdentifierAccess.hpp>
+#include <tools/globname.hxx>
+#include <comphelper/classids.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <sot/exchange.hxx>
+#include <utility>
+#include <vcl/graph.hxx>
+#include <vcl/outdev.hxx>
+#include <filter/msfilter/escherex.hxx>
+#include <svx/svdoashp.hxx>
+#include <svx/svdoole2.hxx>
+#include <tools/diagnose_ex.h>
+#include <oox/export/chartexport.hxx>
+#include <oox/mathml/export.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <oox/export/DMLPresetShapeExport.hxx>
+
+using namespace ::css;
+using namespace ::css::beans;
+using namespace ::css::uno;
+using namespace ::css::drawing;
+using namespace ::css::i18n;
+using namespace ::css::table;
+using namespace ::css::container;
+using namespace ::css::document;
+using namespace ::css::text;
+
+using ::css::io::XOutputStream;
+using ::css::chart2::XChartDocument;
+using ::css::frame::XModel;
+
+using ::oox::core::XmlFilterBase;
+using ::sax_fastparser::FSHelperPtr;
+
+
+namespace oox {
+
+static void lcl_ConvertProgID(std::u16string_view rProgID,
+ OUString & o_rMediaType, OUString & o_rRelationType, OUString & o_rFileExtension)
+{
+ if (rProgID == u"Excel.Sheet.12")
+ {
+ o_rMediaType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "xlsx";
+ }
+ else if (o3tl::starts_with(rProgID, u"Excel.SheetBinaryMacroEnabled.12") )
+ {
+ o_rMediaType = "application/vnd.ms-excel.sheet.binary.macroEnabled.12";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "xlsb";
+ }
+ else if (o3tl::starts_with(rProgID, u"Excel.SheetMacroEnabled.12"))
+ {
+ o_rMediaType = "application/vnd.ms-excel.sheet.macroEnabled.12";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "xlsm";
+ }
+ else if (o3tl::starts_with(rProgID, u"Excel.Sheet"))
+ {
+ o_rMediaType = "application/vnd.ms-excel";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "xls";
+ }
+ else if (rProgID == u"PowerPoint.Show.12")
+ {
+ o_rMediaType = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "pptx";
+ }
+ else if (rProgID == u"PowerPoint.ShowMacroEnabled.12")
+ {
+ o_rMediaType = "application/vnd.ms-powerpoint.presentation.macroEnabled.12";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "pptm";
+ }
+ else if (o3tl::starts_with(rProgID, u"PowerPoint.Show"))
+ {
+ o_rMediaType = "application/vnd.ms-powerpoint";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "ppt";
+ }
+ else if (o3tl::starts_with(rProgID, u"PowerPoint.Slide.12"))
+ {
+ o_rMediaType = "application/vnd.openxmlformats-officedocument.presentationml.slide";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "sldx";
+ }
+ else if (rProgID == u"PowerPoint.SlideMacroEnabled.12")
+ {
+ o_rMediaType = "application/vnd.ms-powerpoint.slide.macroEnabled.12";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "sldm";
+ }
+ else if (rProgID == u"Word.DocumentMacroEnabled.12")
+ {
+ o_rMediaType = "application/vnd.ms-word.document.macroEnabled.12";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "docm";
+ }
+ else if (rProgID == u"Word.Document.12")
+ {
+ o_rMediaType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ o_rFileExtension = "docx";
+ }
+ else if (rProgID == u"Word.Document.8")
+ {
+ o_rMediaType = "application/msword";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "doc";
+ }
+ else if (rProgID == u"Excel.Chart.8")
+ {
+ o_rMediaType = "application/vnd.ms-excel";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "xls";
+ }
+ else if (rProgID == u"AcroExch.Document.11")
+ {
+ o_rMediaType = "application/pdf";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "pdf";
+ }
+ else
+ {
+ o_rMediaType = "application/vnd.openxmlformats-officedocument.oleObject";
+ o_rRelationType = oox::getRelationship(Relationship::OLEOBJECT);
+ o_rFileExtension = "bin";
+ }
+}
+
+static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML(
+ uno::Reference<uno::XComponentContext> const& xContext,
+ uno::Reference<embed::XEmbeddedObject> const& xObj,
+ char const*& o_rpProgID,
+ OUString & o_rMediaType, OUString & o_rRelationType, OUString & o_rSuffix)
+{
+ static struct {
+ struct {
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
+ } ClassId;
+ char const* pFilterName;
+ char const* pMediaType;
+ char const* pProgID;
+ char const* pSuffix;
+ } const s_Mapping[] = {
+ { {SO3_SW_CLASSID_60}, "MS Word 2007 XML", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Word.Document.12", "docx" },
+ { {SO3_SC_CLASSID_60}, "Calc MS Excel 2007 XML", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Excel.Sheet.12", "xlsx" },
+ { {SO3_SIMPRESS_CLASSID_60}, "Impress MS PowerPoint 2007 XML", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "PowerPoint.Show.12", "pptx" },
+ // FIXME: Draw does not appear to have a MSO format export filter?
+// { {SO3_SDRAW_CLASSID}, "", "", "", "" },
+ { {SO3_SCH_CLASSID_60}, "unused", "", "", "" },
+ { {SO3_SM_CLASSID_60}, "unused", "", "", "" },
+ };
+
+ const char * pFilterName(nullptr);
+ SvGlobalName const classId(xObj->getClassID());
+ for (auto & i : s_Mapping)
+ {
+ auto const& rId(i.ClassId);
+ SvGlobalName const temp(rId.n1, rId.n2, rId.n3, rId.b8, rId.b9, rId.b10, rId.b11, rId.b12, rId.b13, rId.b14, rId.b15);
+ if (temp == classId)
+ {
+ assert(SvGlobalName(SO3_SCH_CLASSID_60) != classId); // chart should be written elsewhere!
+ assert(SvGlobalName(SO3_SM_CLASSID_60) != classId); // formula should be written elsewhere!
+ pFilterName = i.pFilterName;
+ o_rMediaType = OUString::createFromAscii(i.pMediaType);
+ o_rpProgID = i.pProgID;
+ o_rSuffix = OUString::createFromAscii(i.pSuffix);
+ o_rRelationType = oox::getRelationship(Relationship::PACKAGE);
+ break;
+ }
+ }
+
+ if (!pFilterName)
+ {
+ SAL_WARN("oox.shape", "oox::GetOLEObjectStream: unknown ClassId " << classId.GetHexName());
+ return nullptr;
+ }
+
+ if (embed::EmbedStates::LOADED == xObj->getCurrentState())
+ {
+ xObj->changeState(embed::EmbedStates::RUNNING);
+ }
+ // use a temp stream - while it would work to store directly to a
+ // fragment stream, an error during export means we'd have to delete it
+ uno::Reference<io::XStream> const xTempStream(
+ xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.comp.MemoryStream", xContext),
+ uno::UNO_QUERY_THROW);
+ uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({
+ { "OutputStream", Any(xTempStream->getOutputStream()) },
+ { "FilterName", Any(OUString::createFromAscii(pFilterName)) }
+ }));
+ uno::Reference<frame::XStorable> xStorable(xObj->getComponent(), uno::UNO_QUERY);
+ try
+ {
+ xStorable->storeToURL("private:stream", args);
+ }
+ catch (uno::Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.shape", "oox::GetOLEObjectStream");
+ return nullptr;
+ }
+ xTempStream->getOutputStream()->closeOutput();
+ return xTempStream->getInputStream();
+}
+
+uno::Reference<io::XInputStream> GetOLEObjectStream(
+ uno::Reference<uno::XComponentContext> const& xContext,
+ uno::Reference<embed::XEmbeddedObject> const& xObj,
+ std::u16string_view i_rProgID,
+ OUString & o_rMediaType,
+ OUString & o_rRelationType,
+ OUString & o_rSuffix,
+ const char *& o_rpProgID)
+{
+ uno::Reference<io::XInputStream> xInStream;
+ try
+ {
+ uno::Reference<document::XStorageBasedDocument> const xParent(
+ uno::Reference<container::XChild>(xObj, uno::UNO_QUERY_THROW)->getParent(),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<embed::XStorage> const xParentStorage(xParent->getDocumentStorage());
+ OUString const entryName(
+ uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY_THROW)->getEntryName());
+
+ if (xParentStorage->isStreamElement(entryName))
+ {
+ lcl_ConvertProgID(i_rProgID, o_rMediaType, o_rRelationType, o_rSuffix);
+ xInStream = xParentStorage->cloneStreamElement(entryName)->getInputStream();
+ // TODO: make it possible to take the sMediaType from the stream
+ }
+ else // the object is ODF - either the whole document is
+ { // ODF, or the OLE was edited so it was converted to ODF
+ xInStream = lcl_StoreOwnAsOOXML(xContext, xObj,
+ o_rpProgID, o_rMediaType, o_rRelationType, o_rSuffix);
+ }
+ }
+ catch (uno::Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.shape", "oox::GetOLEObjectStream");
+ }
+ return xInStream;
+}
+
+} // namespace oox
+
+namespace oox::drawingml {
+
+#define GETA(propName) \
+ GetProperty( rXPropSet, #propName)
+
+#define GETAD(propName) \
+ ( GetPropertyAndState( rXPropSet, rXPropState, #propName, eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+
+#define GET(variable, propName) \
+ if ( GETA(propName) ) \
+ mAny >>= variable;
+
+ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap* pShapeMap, XmlFilterBase* pFB, DocumentType eDocumentType, DMLTextExport* pTextExport, bool bUserShapes )
+ : DrawingML( std::move(pFS), pFB, eDocumentType, pTextExport )
+ , m_nEmbeddedObjects(0)
+ , mnShapeIdMax( 1 )
+ , mbUserShapes( bUserShapes )
+ , mnXmlNamespace( nXmlNamespace )
+ , maMapModeSrc( MapUnit::Map100thMM )
+ , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) )
+ , mpShapeMap( pShapeMap ? pShapeMap : &maShapeMap )
+{
+ mpURLTransformer = std::make_shared<URLTransformer>();
+}
+
+void ShapeExport::SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer)
+{
+ mpURLTransformer = pTransformer;
+}
+
+awt::Size ShapeExport::MapSize( const awt::Size& rSize ) const
+{
+ Size aRetSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
+
+ if ( !aRetSize.Width() )
+ aRetSize.AdjustWidth( 1 );
+ if ( !aRetSize.Height() )
+ aRetSize.AdjustHeight( 1 );
+ return awt::Size( aRetSize.Width(), aRetSize.Height() );
+}
+
+static bool IsNonEmptySimpleText(const Reference<XInterface>& xIface)
+{
+ if (Reference<XSimpleText> xText{ xIface, UNO_QUERY })
+ return xText->getString().getLength();
+
+ return false;
+}
+
+bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
+{
+ Reference< XPropertySet > xPropSet( xIface, UNO_QUERY );
+
+ if( xPropSet.is() )
+ {
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+ if ( xPropSetInfo.is() )
+ {
+ if ( xPropSetInfo->hasPropertyByName( "IsEmptyPresentationObject" ) )
+ {
+ bool bIsEmptyPresObj = false;
+ if ( xPropSet->getPropertyValue( "IsEmptyPresentationObject" ) >>= bIsEmptyPresObj )
+ {
+ SAL_INFO("oox.shape", "empty presentation object " << bIsEmptyPresObj << " , props:");
+ if( bIsEmptyPresObj )
+ return true;
+ }
+ }
+
+ if ( xPropSetInfo->hasPropertyByName( "IsPresentationObject" ) )
+ {
+ bool bIsPresObj = false;
+ if ( xPropSet->getPropertyValue( "IsPresentationObject" ) >>= bIsPresObj )
+ {
+ SAL_INFO("oox.shape", "presentation object " << bIsPresObj << ", props:");
+ if( bIsPresObj )
+ return true;
+ }
+ }
+ }
+ }
+
+ return IsNonEmptySimpleText(xIface);
+}
+
+ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xShape, const bool bClosed )
+{
+ SAL_INFO("oox.shape", "write polypolygon shape");
+
+ FSHelperPtr pFS = GetFS();
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp));
+
+ awt::Point aPos = xShape->getPosition();
+ // Position is relative to group for child elements in Word, but absolute in API.
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes && m_xParent.is())
+ {
+ awt::Point aParentPos = m_xParent->getPosition();
+ aPos.X -= aParentPos.X;
+ aPos.Y -= aParentPos.Y;
+ }
+ awt::Size aSize = xShape->getSize();
+ tools::Rectangle aRect(Point(aPos.X, aPos.Y), Size(aSize.Width, aSize.Height));
+
+#if OSL_DEBUG_LEVEL > 0
+ tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon(xShape);
+ awt::Size size = MapSize( awt::Size( aRect.GetWidth(), aRect.GetHeight() ) );
+ SAL_INFO("oox.shape", "poly count " << aPolyPolygon.Count());
+ SAL_INFO("oox.shape", "size: " << size.Width << " x " << size.Height);
+#endif
+
+ // non visual shape properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ }
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteTransformation( xShape, aRect, XML_a );
+ WritePolyPolygon(xShape, bClosed);
+ Reference< XPropertySet > xProps( xShape, UNO_QUERY );
+ if( xProps.is() ) {
+ if( bClosed )
+ WriteFill( xProps );
+ WriteOutline( xProps );
+ }
+
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteClosedPolyPolygonShape( const Reference< XShape >& xShape )
+{
+ return WritePolyPolygonShape( xShape, true );
+}
+
+ShapeExport& ShapeExport::WriteOpenPolyPolygonShape( const Reference< XShape >& xShape )
+{
+ return WritePolyPolygonShape( xShape, false );
+}
+
+ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>& xShape)
+{
+ FSHelperPtr pFS = GetFS();
+
+ sal_Int32 nGroupShapeToken = XML_grpSp;
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes)
+ {
+ if (!m_xParent.is())
+ nGroupShapeToken = XML_wgp; // toplevel
+ else
+ mnXmlNamespace = XML_wpg;
+ }
+
+ pFS->startElementNS(mnXmlNamespace, nGroupShapeToken);
+
+ // non visual properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_nvGrpSpPr);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr);
+ WriteNonVisualProperties(xShape );
+ pFS->endElementNS(mnXmlNamespace, XML_nvGrpSpPr);
+ }
+ else
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr);
+
+ // visual properties
+ pFS->startElementNS(mnXmlNamespace, XML_grpSpPr);
+ WriteShapeTransformation(xShape, XML_a, false, false, true);
+ pFS->endElementNS(mnXmlNamespace, XML_grpSpPr);
+
+ uno::Reference<drawing::XShapes> xGroupShape(xShape, uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XShape> xParent = m_xParent;
+ m_xParent = xShape;
+ for (sal_Int32 i = 0; i < xGroupShape->getCount(); ++i)
+ {
+ uno::Reference<drawing::XShape> xChild(xGroupShape->getByIndex(i), uno::UNO_QUERY_THROW);
+ sal_Int32 nSavedNamespace = mnXmlNamespace;
+
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xChild, uno::UNO_QUERY_THROW);
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes)
+ {
+ // tdf#128820: WriteGraphicObjectShapePart calls WriteTextShape for non-empty simple
+ // text objects, which needs writing into wps::wsp element, so make sure to use wps
+ // namespace for those objects
+ if (xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")
+ && !IsNonEmptySimpleText(xChild))
+ mnXmlNamespace = XML_pic;
+ else
+ mnXmlNamespace = XML_wps;
+ }
+ WriteShape(xChild);
+
+ mnXmlNamespace = nSavedNamespace;
+ }
+ m_xParent = xParent;
+
+ pFS->endElementNS(mnXmlNamespace, nGroupShapeToken);
+ return *this;
+}
+
+static bool lcl_IsOnDenylist(OUString const & rShapeType)
+{
+ static const std::initializer_list<std::u16string_view> vDenylist = {
+ u"block-arc",
+ u"rectangle",
+ u"ellipse",
+ u"ring",
+ u"can",
+ u"cube",
+ u"paper",
+ u"frame",
+ u"forbidden",
+ u"smiley",
+ u"sun",
+ u"flower",
+ u"bracket-pair",
+ u"brace-pair",
+ u"quad-bevel",
+ u"round-rectangular-callout",
+ u"rectangular-callout",
+ u"round-callout",
+ u"cloud-callout",
+ u"line-callout-1",
+ u"line-callout-2",
+ u"line-callout-3",
+ u"paper",
+ u"vertical-scroll",
+ u"horizontal-scroll",
+ u"mso-spt34",
+ u"mso-spt75",
+ u"mso-spt164",
+ u"mso-spt180",
+ u"flowchart-process",
+ u"flowchart-alternate-process",
+ u"flowchart-decision",
+ u"flowchart-data",
+ u"flowchart-predefined-process",
+ u"flowchart-internal-storage",
+ u"flowchart-document",
+ u"flowchart-multidocument",
+ u"flowchart-terminator",
+ u"flowchart-preparation",
+ u"flowchart-manual-input",
+ u"flowchart-manual-operation",
+ u"flowchart-connector",
+ u"flowchart-off-page-connector",
+ u"flowchart-card",
+ u"flowchart-punched-tape",
+ u"flowchart-summing-junction",
+ u"flowchart-or",
+ u"flowchart-collate",
+ u"flowchart-sort",
+ u"flowchart-extract",
+ u"flowchart-merge",
+ u"flowchart-stored-data",
+ u"flowchart-delay",
+ u"flowchart-sequential-access",
+ u"flowchart-magnetic-disk",
+ u"flowchart-direct-access-storage",
+ u"flowchart-display"
+ };
+
+ return std::find(vDenylist.begin(), vDenylist.end(), rShapeType) != vDenylist.end();
+}
+
+static bool lcl_IsOnAllowlist(OUString const & rShapeType)
+{
+ static const std::initializer_list<std::u16string_view> vAllowlist = {
+ u"heart",
+ u"puzzle",
+ u"col-60da8460",
+ u"col-502ad400"
+ };
+
+ return std::find(vAllowlist.begin(), vAllowlist.end(), rShapeType) != vAllowlist.end();
+}
+
+static bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParameter &rParam, const Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq)
+{
+ bool bAdj = false;
+ if ( rParam.Value.getValueTypeClass() == TypeClass_DOUBLE )
+ {
+ double fValue(0.0);
+ if ( rParam.Value >>= fValue )
+ nValue = static_cast<sal_Int32>(fValue);
+ }
+ else
+ rParam.Value >>= nValue;
+
+ if ( rParam.Type == EnhancedCustomShapeParameterType::ADJUSTMENT)
+ {
+ bAdj = true;
+ sal_Int32 nIdx = nValue;
+ if ( nIdx < rSeq.getLength() )
+ {
+ if ( rSeq[ nIdx ] .Value.getValueTypeClass() == TypeClass_DOUBLE )
+ {
+ double fValue(0.0);
+ rSeq[ nIdx ].Value >>= fValue;
+ nValue = fValue;
+
+ }
+ else
+ {
+ rSeq[ nIdx ].Value >>= nValue;
+ }
+ }
+ }
+ return bAdj;
+}
+
+static void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles,
+ std::vector< std::pair< sal_Int32, sal_Int32> > &rHandlePositionList,
+ const Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq)
+{
+ for ( const Sequence< PropertyValue >& rPropSeq : rHandles )
+ {
+ static const OUStringLiteral sPosition( u"Position" );
+ bool bPosition = false;
+ EnhancedCustomShapeParameterPair aPosition;
+ for ( const PropertyValue& rPropVal: rPropSeq )
+ {
+ if ( rPropVal.Name == sPosition )
+ {
+ if ( rPropVal.Value >>= aPosition )
+ bPosition = true;
+ }
+ }
+ if ( bPosition )
+ {
+ sal_Int32 nXPosition = 0;
+ sal_Int32 nYPosition = 0;
+ // For polar handles, nXPosition is radius and nYPosition is angle
+ lcl_GetHandlePosition( nXPosition, aPosition.First , rSeq );
+ lcl_GetHandlePosition( nYPosition, aPosition.Second, rSeq );
+ rHandlePositionList.emplace_back( nXPosition, nYPosition );
+ }
+ }
+}
+
+static void lcl_AppendAdjustmentValue( std::vector< std::pair< sal_Int32, sal_Int32> > &rAvList, sal_Int32 nAdjIdx, sal_Int32 nValue )
+{
+ rAvList.emplace_back( nAdjIdx , nValue );
+}
+
+static sal_Int32 lcl_NormalizeAngle( sal_Int32 nAngle )
+{
+ nAngle = nAngle % 360;
+ return nAngle < 0 ? ( nAngle + 360 ) : nAngle ;
+}
+
+static sal_Int32 lcl_CircleAngle2CustomShapeEllipseAngleOOX(const sal_Int32 nInternAngle, const sal_Int32 nWidth, const sal_Int32 nHeight)
+{
+ if (nWidth != 0 || nHeight != 0)
+ {
+ double fAngle = basegfx::deg2rad<100>(nInternAngle); // intern 1/100 deg to rad
+ fAngle = atan2(nHeight * sin(fAngle), nWidth * cos(fAngle)); // circle to ellipse
+ fAngle = basegfx::rad2deg<60000>(fAngle); // rad to OOXML angle unit
+ sal_Int32 nAngle = basegfx::fround(fAngle); // normalize
+ nAngle = nAngle % 21600000;
+ return nAngle < 0 ? (nAngle + 21600000) : nAngle;
+ }
+ else // should be handled by caller, dummy value
+ return 0;
+}
+
+static OUString lcl_GetTarget(const css::uno::Reference<css::frame::XModel>& xModel,
+ std::u16string_view rURL)
+{
+ Reference<drawing::XDrawPagesSupplier> xDPS(xModel, uno::UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW);
+ sal_uInt32 nPageCount = xDrawPages->getCount();
+ OUString sTarget;
+
+ for (sal_uInt32 i = 0; i < nPageCount; ++i)
+ {
+ Reference<XDrawPage> xDrawPage;
+ xDrawPages->getByIndex(i) >>= xDrawPage;
+ Reference<container::XNamed> xNamed(xDrawPage, UNO_QUERY);
+ if (!xNamed)
+ continue;
+ OUString sSlideName = "#" + xNamed->getName();
+ if (rURL == sSlideName)
+ {
+ sTarget = "slide" + OUString::number(i + 1) + ".xml";
+ break;
+ }
+ }
+
+ return sTarget;
+}
+
+ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
+{
+ SAL_INFO("oox.shape", "write custom shape");
+ Reference< XPropertySet > rXPropSet( xShape, UNO_QUERY );
+ // First check, if this is a Fontwork-shape. For DrawingML, such a shape is a
+ // TextBox shape with body property prstTxWarp.
+ if (IsFontworkShape(rXPropSet))
+ {
+ ShapeExport::WriteTextShape(xShape); // qualifier to prevent PowerPointShapeExport
+ return *this;
+ }
+
+ bool bHasGeometrySeq(false);
+ Sequence< PropertyValue > aGeometrySeq;
+ OUString sShapeType("non-primitive"); // default in ODF
+ if (GETA(CustomShapeGeometry))
+ {
+ SAL_INFO("oox.shape", "got custom shape geometry");
+ if (mAny >>= aGeometrySeq)
+ {
+ bHasGeometrySeq = true;
+ SAL_INFO("oox.shape", "got custom shape geometry sequence");
+ for (const PropertyValue& rProp : std::as_const(aGeometrySeq))
+ {
+ SAL_INFO("oox.shape", "geometry property: " << rProp.Name);
+ if (rProp.Name == "Type")
+ rProp.Value >>= sShapeType;
+ }
+ }
+ }
+
+ bool bPredefinedHandlesUsed = true;
+ bool bHasHandles = false;
+
+ ShapeFlag nMirrorFlags = ShapeFlag::NONE;
+ MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType( xShape, nMirrorFlags, sShapeType );
+ assert(dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(xShape)) && "Not a SdrObjCustomShape (!)");
+ SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*SdrObject::getSdrObjectFromXShape(xShape)));
+ const bool bIsDefaultObject(
+ EscherPropertyContainer::IsDefaultObject(
+ rSdrObjCustomShape,
+ eShapeType));
+ OString sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType);
+ SAL_INFO("oox.shape", "custom shape type: " << sShapeType << " ==> " << sPresetShape);
+
+ sal_Int32 nAdjustmentValuesIndex = -1;
+ awt::Rectangle aViewBox;
+ uno::Sequence<beans::PropertyValues> aHandles;
+
+ bool bFlipH = false;
+ bool bFlipV = false;
+
+ if (bHasGeometrySeq)
+ {
+ for (int i = 0; i < aGeometrySeq.getLength(); i++)
+ {
+ const PropertyValue& rProp = aGeometrySeq[ i ];
+ SAL_INFO("oox.shape", "geometry property: " << rProp.Name);
+
+ if ( rProp.Name == "MirroredX" )
+ rProp.Value >>= bFlipH;
+
+ if ( rProp.Name == "MirroredY" )
+ rProp.Value >>= bFlipV;
+ if ( rProp.Name == "AdjustmentValues" )
+ nAdjustmentValuesIndex = i;
+ else if ( rProp.Name == "Handles" )
+ {
+ rProp.Value >>= aHandles;
+ if ( aHandles.hasElements() )
+ bHasHandles = true;
+ if( !bIsDefaultObject )
+ bPredefinedHandlesUsed = false;
+ // TODO: update nAdjustmentsWhichNeedsToBeConverted here
+ }
+ else if ( rProp.Name == "ViewBox" )
+ rProp.Value >>= aViewBox;
+ }
+ }
+
+ FSHelperPtr pFS = GetFS();
+ // non visual shape properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ bool bUseBackground = false;
+ if (GETA(FillUseSlideBackground))
+ mAny >>= bUseBackground;
+ if (bUseBackground)
+ mpFS->startElementNS(mnXmlNamespace, XML_sp, XML_useBgFill, "1");
+ else
+ mpFS->startElementNS(mnXmlNamespace, XML_sp);
+
+ bool isVisible = true ;
+ if( GETA (Visible))
+ {
+ mAny >>= isVisible;
+ }
+ pFS->startElementNS( mnXmlNamespace, XML_nvSpPr );
+ pFS->startElementNS(
+ mnXmlNamespace, XML_cNvPr, XML_id,
+ OString::number(GetShapeID(xShape) == -1 ? GetNewShapeID(xShape) : GetShapeID(xShape)),
+ XML_name, GetShapeName(xShape), XML_hidden, sax_fastparser::UseIf("1", !isVisible));
+
+ if( GETA( URL ) )
+ {
+ OUString sURL;
+ mAny >>= sURL;
+ if( !sURL.isEmpty() )
+ {
+ OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HYPERLINK),
+ mpURLTransformer->getTransformedString(sURL),
+ mpURLTransformer->isExternalURL(sURL));
+
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ }
+ }
+
+ OUString sBookmark;
+ if (GETA(Bookmark))
+ mAny >>= sBookmark;
+
+ if (GETA(OnClick))
+ {
+ OUString sPPAction;
+ presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
+ mAny >>= eClickAction;
+ if (eClickAction != presentation::ClickAction_NONE)
+ {
+ switch (eClickAction)
+ {
+ case presentation::ClickAction_STOPPRESENTATION:
+ sPPAction = "ppaction://hlinkshowjump?jump=endshow";
+ break;
+ case presentation::ClickAction_NEXTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=nextslide";
+ break;
+ case presentation::ClickAction_LASTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=lastslide";
+ break;
+ case presentation::ClickAction_PREVPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=previousslide";
+ break;
+ case presentation::ClickAction_FIRSTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=firstslide";
+ break;
+ case presentation::ClickAction_BOOKMARK:
+ sBookmark = "#" + sBookmark;
+ break;
+ default:
+ break;
+ }
+ }
+ if (!sPPAction.isEmpty())
+ pFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), "", XML_action,
+ sPPAction);
+ }
+ if (!sBookmark.isEmpty())
+ {
+ bool bExtURL = URLTransformer().isExternalURL(sBookmark);
+ sBookmark = bExtURL ? sBookmark : lcl_GetTarget(GetFB()->getModel(), sBookmark);
+
+ OUString sRelId
+ = mpFB->addRelation(mpFS->getOutputStream(),
+ bExtURL ? oox::getRelationship(Relationship::HYPERLINK)
+ : oox::getRelationship(Relationship::SLIDE),
+ sBookmark, bExtURL);
+ if (bExtURL)
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ else
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId,
+ XML_action, "ppaction://hlinksldjump");
+ }
+ pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
+ else
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_wsp);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ }
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+
+ // we export non-primitive shapes to custom geometry
+ // we also export non-ooxml shapes which have handles/equations to custom geometry, because
+ // we cannot convert ODF equations to DrawingML equations. TODO: see what binary DOC export filter does.
+ // but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a denylist
+ // we use a allowlist for shapes where mapping to MSO preset shape is not optimal
+ bool bCustGeom = true;
+ bool bOnDenylist = false;
+ if( sShapeType == "ooxml-non-primitive" )
+ bCustGeom = true;
+ else if( sShapeType.startsWith("ooxml") )
+ bCustGeom = false;
+ else if( lcl_IsOnAllowlist(sShapeType) )
+ bCustGeom = true;
+ else if( lcl_IsOnDenylist(sShapeType) )
+ {
+ bCustGeom = false;
+ bOnDenylist = true;
+ }
+
+ bool bPresetWriteSuccessful = false;
+ // Let the custom shapes what has name and preset information in OOXML, to be written
+ // as preset ones with parameters. Try that with this converter class.
+ if (!sShapeType.startsWith("ooxml") && sShapeType != "non-primitive" && !mbUserShapes
+ && xShape->getShapeType() == "com.sun.star.drawing.CustomShape"
+ && !lcl_IsOnAllowlist(sShapeType))
+ {
+ DMLPresetShapeExporter aCustomShapeConverter(this, xShape);
+ bPresetWriteSuccessful = aCustomShapeConverter.WriteShape();
+ }
+ // If preset writing has problems try to write the shape as it done before
+ if (bPresetWriteSuccessful)
+ ;// Already written do nothing.
+ else if (bCustGeom)
+ {
+ WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
+ bool bSuccess = WriteCustomGeometry(xShape, rSdrObjCustomShape);
+ // In case of Writer, the parent element is <wps:spPr>, and there the <a:custGeom> element
+ // is not optional.
+ if (!bSuccess && GetDocumentType() == DOCUMENT_DOCX)
+ {
+ WriteEmptyCustomGeometry();
+ }
+ }
+ else if (bOnDenylist && bHasHandles && nAdjustmentValuesIndex !=-1 && !sShapeType.startsWith("mso-spt"))
+ {
+ WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
+ Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
+ std::vector< std::pair< sal_Int32, sal_Int32> > aHandlePositionList;
+ std::vector< std::pair< sal_Int32, sal_Int32> > aAvList;
+ aGeometrySeq[ nAdjustmentValuesIndex ].Value >>= aAdjustmentSeq ;
+
+ lcl_AnalyzeHandles( aHandles, aHandlePositionList, aAdjustmentSeq );
+
+ sal_Int32 nXPosition = 0;
+ sal_Int32 nYPosition = 0;
+ if ( !aHandlePositionList.empty() )
+ {
+ nXPosition = aHandlePositionList[0].first ;
+ nYPosition = aHandlePositionList[0].second ;
+ }
+ switch( eShapeType )
+ {
+ case mso_sptBorderCallout1:
+ {
+ sal_Int32 adj3 = double(nYPosition)/aViewBox.Height *100000;
+ sal_Int32 adj4 = double(nXPosition)/aViewBox.Width *100000;
+ lcl_AppendAdjustmentValue( aAvList, 1, 18750 );
+ lcl_AppendAdjustmentValue( aAvList, 2, -8333 );
+ lcl_AppendAdjustmentValue( aAvList, 3, adj3 );
+ lcl_AppendAdjustmentValue( aAvList, 4, adj4 );
+ break;
+ }
+ case mso_sptBorderCallout2:
+ {
+ sal_Int32 adj5 = double(nYPosition)/aViewBox.Height *100000;
+ sal_Int32 adj6 = double(nXPosition)/aViewBox.Width *100000;
+ sal_Int32 adj3 = 18750;
+ sal_Int32 adj4 = -16667;
+ lcl_AppendAdjustmentValue( aAvList, 1, 18750 );
+ lcl_AppendAdjustmentValue( aAvList, 2, -8333 );
+ if ( aHandlePositionList.size() > 1 )
+ {
+ nXPosition = aHandlePositionList[1].first ;
+ nYPosition = aHandlePositionList[1].second ;
+ adj3 = double(nYPosition)/aViewBox.Height *100000;
+ adj4 = double(nXPosition)/aViewBox.Width *100000;
+ }
+ lcl_AppendAdjustmentValue( aAvList, 3, adj3 );
+ lcl_AppendAdjustmentValue( aAvList, 4, adj4 );
+ lcl_AppendAdjustmentValue( aAvList, 5, adj5 );
+ lcl_AppendAdjustmentValue( aAvList, 6, adj6 );
+ break;
+ }
+ case mso_sptWedgeRectCallout:
+ case mso_sptWedgeRRectCallout:
+ case mso_sptWedgeEllipseCallout:
+ case mso_sptCloudCallout:
+ {
+ sal_Int32 adj1 = (double(nXPosition)/aViewBox.Width -0.5) *100000;
+ sal_Int32 adj2 = (double(nYPosition)/aViewBox.Height -0.5) *100000;
+ lcl_AppendAdjustmentValue( aAvList, 1, adj1 );
+ lcl_AppendAdjustmentValue( aAvList, 2, adj2 );
+ if ( eShapeType == mso_sptWedgeRRectCallout)
+ {
+ lcl_AppendAdjustmentValue( aAvList, 3, 16667);
+ }
+
+ break;
+ }
+ case mso_sptFoldedCorner:
+ {
+ sal_Int32 adj = double( aViewBox.Width - nXPosition) / std::min( aViewBox.Width,aViewBox.Height ) * 100000;
+ lcl_AppendAdjustmentValue( aAvList, 0, adj );
+ break;
+ }
+ case mso_sptDonut:
+ case mso_sptSun:
+ case mso_sptMoon:
+ case mso_sptNoSmoking:
+ case mso_sptHorizontalScroll:
+ case mso_sptBevel:
+ case mso_sptBracketPair:
+ {
+ sal_Int32 adj = double( nXPosition )/aViewBox.Width*100000 ;
+ lcl_AppendAdjustmentValue( aAvList, 0, adj );
+ break;
+ }
+ case mso_sptCan:
+ case mso_sptCube:
+ case mso_sptBracePair:
+ case mso_sptVerticalScroll:
+ {
+ sal_Int32 adj = double( nYPosition )/aViewBox.Height *100000 ;
+ lcl_AppendAdjustmentValue( aAvList, 0, adj );
+ break;
+ }
+ case mso_sptSmileyFace:
+ {
+ sal_Int32 adj = double( nYPosition )/aViewBox.Height *100000 - 76458.0;
+ lcl_AppendAdjustmentValue( aAvList, 0, adj );
+ break;
+ }
+ case mso_sptBlockArc:
+ {
+ sal_Int32 nRadius = 50000 * ( 1 - double(nXPosition) / 10800);
+ sal_Int32 nAngleStart = lcl_NormalizeAngle( nYPosition );
+ sal_Int32 nAngleEnd = lcl_NormalizeAngle( 180 - nAngleStart );
+ lcl_AppendAdjustmentValue( aAvList, 1, 21600000 / 360 * nAngleStart );
+ lcl_AppendAdjustmentValue( aAvList, 2, 21600000 / 360 * nAngleEnd );
+ lcl_AppendAdjustmentValue( aAvList, 3, nRadius );
+ break;
+ }
+ // case mso_sptNil:
+ // case mso_sptBentConnector3:
+ // case mso_sptBorderCallout3:
+ default:
+ {
+ if ( sPresetShape == "frame" )
+ {
+ sal_Int32 adj1 = double( nYPosition )/aViewBox.Height *100000 ;
+ lcl_AppendAdjustmentValue( aAvList, 1, adj1 );
+ }
+ break;
+ }
+ }
+ WritePresetShape( sPresetShape , aAvList );
+ }
+ else // preset geometry
+ {
+ WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
+ if( nAdjustmentValuesIndex != -1 )
+ {
+ WritePresetShape( sPresetShape, eShapeType, bPredefinedHandlesUsed,
+ aGeometrySeq[ nAdjustmentValuesIndex ] );
+ }
+ else
+ WritePresetShape( sPresetShape );
+ }
+ if( rXPropSet.is() )
+ {
+ WriteFill( rXPropSet );
+ WriteOutline( rXPropSet );
+ WriteShapeEffects( rXPropSet );
+
+ bool bHas3DEffectinShape = false;
+ uno::Sequence<beans::PropertyValue> grabBag;
+ rXPropSet->getPropertyValue("InteropGrabBag") >>= grabBag;
+
+ for (auto const& it : std::as_const(grabBag))
+ if (it.Name == "3DEffectProperties")
+ bHas3DEffectinShape = true;
+
+ if( bHas3DEffectinShape)
+ Write3DEffects( rXPropSet, /*bIsText=*/false );
+ }
+
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ pFS->startElementNS(mnXmlNamespace, XML_style);
+ WriteShapeStyle( rXPropSet );
+ pFS->endElementNS( mnXmlNamespace, XML_style );
+
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
+{
+ SAL_INFO("oox.shape", "write ellipse shape");
+
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp));
+
+ // TODO: connector ?
+
+ // non visual shape properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr );
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
+ else
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+
+ Reference< XPropertySet > xProps( xShape, UNO_QUERY );
+ CircleKind eCircleKind(CircleKind_FULL);
+ if (xProps.is())
+ xProps->getPropertyValue("CircleKind" ) >>= eCircleKind;
+
+ // visual shape properties
+ pFS->startElementNS( mnXmlNamespace, XML_spPr );
+ WriteShapeTransformation( xShape, XML_a );
+
+ if (CircleKind_FULL == eCircleKind)
+ WritePresetShape("ellipse");
+ else
+ {
+ sal_Int32 nStartAngleIntern(9000);
+ sal_Int32 nEndAngleIntern(0);
+ if (xProps.is())
+ {
+ xProps->getPropertyValue("CircleStartAngle" ) >>= nStartAngleIntern;
+ xProps->getPropertyValue("CircleEndAngle") >>= nEndAngleIntern;
+ }
+ std::vector< std::pair<sal_Int32,sal_Int32>> aAvList;
+ awt::Size aSize = xShape->getSize();
+ if (aSize.Width != 0 || aSize.Height != 0)
+ {
+ // Our arc has 90° up, OOXML has 90° down, so mirror it.
+ // API angles are 1/100 degree.
+ sal_Int32 nStartAngleOOXML(lcl_CircleAngle2CustomShapeEllipseAngleOOX(36000 - nEndAngleIntern, aSize.Width, aSize.Height));
+ sal_Int32 nEndAngleOOXML(lcl_CircleAngle2CustomShapeEllipseAngleOOX(36000 - nStartAngleIntern, aSize.Width, aSize.Height));
+ lcl_AppendAdjustmentValue( aAvList, 1, nStartAngleOOXML);
+ lcl_AppendAdjustmentValue( aAvList, 2, nEndAngleOOXML);
+ }
+ switch (eCircleKind)
+ {
+ case CircleKind_ARC :
+ WritePresetShape("arc", aAvList);
+ break;
+ case CircleKind_SECTION :
+ WritePresetShape("pie", aAvList);
+ break;
+ case CircleKind_CUT :
+ WritePresetShape("chord", aAvList);
+ break;
+ default :
+ WritePresetShape("ellipse");
+ }
+ }
+ if( xProps.is() )
+ {
+ if (CircleKind_ARC == eCircleKind)
+ {
+ // An arc in ODF is never filled, even if a fill style other than
+ // "none" is set. OOXML arc can be filled, so set fill explicit to
+ // NONE, otherwise some hidden or inherited filling is shown.
+ FillStyle eFillStyle(FillStyle_NONE);
+ uno::Any aNewValue;
+ aNewValue <<= eFillStyle;
+ xProps->setPropertyValue("FillStyle", aNewValue);
+ }
+ WriteFill( xProps );
+ WriteOutline( xProps );
+ }
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteGraphicObjectShape( const Reference< XShape >& xShape )
+{
+ WriteGraphicObjectShapePart( xShape );
+
+ return *this;
+}
+
+void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape, const Graphic* pGraphic )
+{
+ SAL_INFO("oox.shape", "write graphic object shape");
+
+ if (IsNonEmptySimpleText(xShape))
+ {
+ SAL_INFO("oox.shape", "graphicObject: wrote only text");
+
+ WriteTextShape(xShape);
+
+ return;
+ }
+
+ SAL_INFO("oox.shape", "graphicObject without text");
+
+ uno::Reference<graphic::XGraphic> xGraphic;
+ OUString sMediaURL;
+
+ Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
+
+ if (pGraphic)
+ {
+ xGraphic.set(pGraphic->GetXGraphic());
+ }
+ else if (xShapeProps.is() && xShapeProps->getPropertySetInfo()->hasPropertyByName("Graphic"))
+ {
+ xShapeProps->getPropertyValue("Graphic") >>= xGraphic;
+ }
+
+ bool bHasMediaURL = xShapeProps.is() && xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL") && (xShapeProps->getPropertyValue("MediaURL") >>= sMediaURL);
+
+ if (!xGraphic.is() && !bHasMediaURL)
+ {
+ SAL_INFO("oox.shape", "no graphic or media URL found");
+ return;
+ }
+
+ FSHelperPtr pFS = GetFS();
+ XmlFilterBase* pFB = GetFB();
+
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ pFS->startElementNS(mnXmlNamespace, XML_pic);
+ else
+ pFS->startElementNS(mnXmlNamespace, XML_pic,
+ FSNS(XML_xmlns, XML_pic), pFB->getNamespaceURL(OOX_NS(dmlPicture)));
+
+ pFS->startElementNS(mnXmlNamespace, XML_nvPicPr);
+
+ presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
+ OUString sDescr, sURL, sBookmark, sPPAction;
+ bool bHaveDesc;
+
+ if ( ( bHaveDesc = GetProperty( xShapeProps, "Description" ) ) )
+ mAny >>= sDescr;
+ if ( GetProperty( xShapeProps, "URL" ) )
+ mAny >>= sURL;
+ if (GetProperty(xShapeProps, "Bookmark"))
+ mAny >>= sBookmark;
+ if (GetProperty(xShapeProps, "OnClick"))
+ mAny >>= eClickAction;
+
+ pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape),
+ XML_descr, sax_fastparser::UseIf(sDescr, bHaveDesc));
+
+ if (eClickAction != presentation::ClickAction_NONE)
+ {
+ switch (eClickAction)
+ {
+ case presentation::ClickAction_STOPPRESENTATION:
+ sPPAction = "ppaction://hlinkshowjump?jump=endshow";
+ break;
+ case presentation::ClickAction_NEXTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=nextslide";
+ break;
+ case presentation::ClickAction_LASTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=lastslide";
+ break;
+ case presentation::ClickAction_PREVPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=previousslide";
+ break;
+ case presentation::ClickAction_FIRSTPAGE:
+ sPPAction = "ppaction://hlinkshowjump?jump=firstslide";
+ break;
+ case presentation::ClickAction_BOOKMARK:
+ sBookmark = "#" + sBookmark;
+ break;
+ default:
+ break;
+ }
+ }
+
+ // OOXTODO: //cNvPr children: XML_extLst, XML_hlinkHover
+ if (bHasMediaURL || !sPPAction.isEmpty())
+ pFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), "", XML_action,
+ bHasMediaURL ? "ppaction://media" : sPPAction);
+ if( !sURL.isEmpty() )
+ {
+ OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HYPERLINK),
+ mpURLTransformer->getTransformedString(sURL),
+ mpURLTransformer->isExternalURL(sURL));
+
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ }
+
+ if (!sBookmark.isEmpty())
+ {
+ bool bExtURL = URLTransformer().isExternalURL(sBookmark);
+ sBookmark = bExtURL ? sBookmark : lcl_GetTarget(GetFB()->getModel(), sBookmark);
+
+ OUString sRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ bExtURL ? oox::getRelationship(Relationship::HYPERLINK)
+ : oox::getRelationship(Relationship::SLIDE),
+ sBookmark, bExtURL);
+
+ if (bExtURL)
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ else
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId, XML_action,
+ "ppaction://hlinksldjump");
+ }
+ pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
+
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvPicPr
+ // OOXTODO: XML_preferRelativeSize
+ );
+ if (bHasMediaURL)
+ WriteMediaNonVisualProperties(xShape);
+ else
+ WriteNonVisualProperties(xShape);
+
+ pFS->endElementNS( mnXmlNamespace, XML_nvPicPr );
+
+ pFS->startElementNS(mnXmlNamespace, XML_blipFill);
+
+ if (xGraphic.is())
+ {
+ WriteXGraphicBlip(xShapeProps, xGraphic, mbUserShapes);
+ }
+ else if (bHasMediaURL)
+ {
+ Reference<graphic::XGraphic> xFallbackGraphic;
+ if (xShapeProps->getPropertySetInfo()->hasPropertyByName("FallbackGraphic"))
+ xShapeProps->getPropertyValue("FallbackGraphic") >>= xFallbackGraphic;
+
+ WriteXGraphicBlip(xShapeProps, xFallbackGraphic, mbUserShapes);
+ }
+
+ if (xGraphic.is())
+ {
+ WriteSrcRectXGraphic(xShapeProps, xGraphic);
+ }
+
+ // now we stretch always when we get pGraphic (when changing that
+ // behavior, test n#780830 for regression, where the OLE sheet might get tiled
+ bool bStretch = false;
+ if( !pGraphic && GetProperty( xShapeProps, "FillBitmapStretch" ) )
+ mAny >>= bStretch;
+
+ if ( pGraphic || bStretch )
+ pFS->singleElementNS(XML_a, XML_stretch);
+
+ if (bHasMediaURL)
+ {
+ // Graphic of media shapes is always stretched.
+ pFS->startElementNS(XML_a, XML_stretch);
+ pFS->singleElementNS(XML_a, XML_fillRect);
+ pFS->endElementNS(XML_a, XML_stretch);
+ }
+
+ pFS->endElementNS( mnXmlNamespace, XML_blipFill );
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ bool bFlipH = false;
+ if( xShapeProps->getPropertySetInfo()->hasPropertyByName("IsMirrored") )
+ {
+ xShapeProps->getPropertyValue("IsMirrored") >>= bFlipH;
+ }
+ WriteShapeTransformation( xShape, XML_a, bFlipH, false, false, false, true );
+ WritePresetShape( "rect" );
+ // graphic object can come with the frame (bnc#654525)
+ WriteOutline( xShapeProps );
+
+ WriteShapeEffects( xShapeProps );
+ Write3DEffects( xShapeProps, /*bIsText=*/false );
+
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ pFS->endElementNS( mnXmlNamespace, XML_pic );
+}
+
+static void lcl_Rotate(sal_Int32 nAngle, Point center, awt::Point& pt)
+{
+ sal_Int16 nCos, nSin;
+ switch (nAngle)
+ {
+ case 90:
+ nCos = 0;
+ nSin = 1;
+ break;
+ case 180:
+ nCos = -1;
+ nSin = 0;
+ break;
+ case 270:
+ nCos = 0;
+ nSin = -1;
+ break;
+ default:
+ return;
+ }
+ sal_Int32 x = pt.X - center.X();
+ sal_Int32 y = pt.Y - center.Y();
+ pt.X = center.X() + x * nCos - y * nSin;
+ pt.Y = center.Y() + y * nCos + x * nSin;
+}
+
+static void lcl_FlipHFlipV(tools::Polygon aPoly, sal_Int32 nAngle, bool& rFlipH, bool& rFlipV)
+{
+ Point aStart = aPoly[0];
+ Point aEnd = aPoly[aPoly.GetSize() - 1];
+
+ if (aStart.X() > aEnd.X() && aStart.Y() > aEnd.Y())
+ {
+ if (nAngle)
+ {
+ if (nAngle == 90)
+ rFlipH = true;
+ if (nAngle == 270)
+ rFlipV = true;
+ }
+ else // 0°
+ {
+ rFlipH = true;
+ rFlipV = true;
+ }
+ }
+
+ if (aStart.X() < aEnd.X() && aStart.Y() < aEnd.Y())
+ {
+ if (nAngle)
+ {
+ if (nAngle != 270)
+ {
+ rFlipH = true;
+ rFlipV = true;
+ }
+ else
+ rFlipH = true;
+ }
+ }
+
+ if (aStart.Y() < aEnd.Y() && aStart.X() > aEnd.X())
+ {
+ if (nAngle)
+ {
+ if (nAngle == 180)
+ rFlipV = true;
+ if (nAngle == 270)
+ {
+ rFlipV = true;
+ rFlipH = true;
+ }
+ }
+ else // 0°
+ {
+ rFlipH = true;
+ }
+ }
+
+ if (aStart.Y() > aEnd.Y() && aStart.X() < aEnd.X())
+ {
+ if (nAngle)
+ {
+ if (nAngle == 90)
+ {
+ rFlipH = true;
+ rFlipV = true;
+ }
+ if (nAngle == 180)
+ rFlipH = true;
+ }
+ else // 0°
+ rFlipV = true;
+ }
+}
+
+static sal_Int32 lcl_GetAngle(tools::Polygon aPoly)
+{
+ sal_Int32 nAngle;
+ Point aStartPoint = aPoly[0];
+ Point aEndPoint = aPoly[aPoly.GetSize() - 1];
+ if (aStartPoint.X() == aPoly[1].X())
+ {
+ if ((aStartPoint.X() < aEndPoint.X() && aStartPoint.Y() > aEndPoint.Y())
+ || (aStartPoint.X() > aEndPoint.X() && aStartPoint.Y() < aEndPoint.Y()))
+ {
+ nAngle = 90;
+ }
+ else
+ nAngle = 270;
+ }
+ else
+ {
+ if (aStartPoint.X() > aPoly[1].X())
+ nAngle = 180;
+ else
+ nAngle = 0;
+ }
+
+ return nAngle;
+}
+
+// Adjust value decide the position, where the connector should turn.
+static void lcl_GetConnectorAdjustValue(const Reference<XShape>& xShape, tools::Polygon aPoly,
+ ConnectorType eConnectorType,
+ std::vector<std::pair<sal_Int32, sal_Int32>>& rAvList)
+{
+ sal_Int32 nAdjCount = 0;
+ if (eConnectorType == ConnectorType_CURVE)
+ {
+ if (aPoly.GetSize() == 4)
+ {
+ if ((aPoly[0].X() == aPoly[1].X() && aPoly[2].X() == aPoly[3].X())
+ || (aPoly[0].Y() == aPoly[1].Y() && aPoly[2].Y() == aPoly[3].Y()))
+ {
+ nAdjCount = 1; // curvedConnector3
+ }
+ else
+ nAdjCount = 0; // curvedConnector2
+ }
+ else if (aPoly.GetSize() > 4)
+ {
+ if ((aPoly[2].X() == aPoly[3].X() && aPoly[3].X() == aPoly[4].X())
+ || (aPoly[2].Y() == aPoly[3].Y() && aPoly[3].Y() == aPoly[4].Y()))
+ {
+ nAdjCount = 3; // curvedConnector5
+ }
+ else
+ nAdjCount = 2; // curvedConnector4
+ }
+ }
+ else
+ {
+ switch (aPoly.GetSize())
+ {
+ case 3:
+ nAdjCount = 0; // bentConnector2
+ break;
+ case 4:
+ nAdjCount = 1; // bentConnector3
+ break;
+ case 5:
+ nAdjCount = 2; // bentConnector4
+ break;
+ case 6:
+ nAdjCount = 3; // bentConnector5
+ break;
+ }
+ }
+
+ if (nAdjCount)
+ {
+ sal_Int32 nAdjustValue;
+ Point aStart = aPoly[0];
+ Point aEnd = aPoly[aPoly.GetSize() - 1];
+
+ for (sal_Int32 i = 1; i <= nAdjCount; ++i)
+ {
+ Point aPt = aPoly[i];
+
+ if (aEnd.Y() == aStart.Y())
+ aEnd.setY(aStart.Y() + 1);
+ if (aEnd.X() == aStart.X())
+ aEnd.setX(aStart.X() + 1);
+
+ bool bVertical = aPoly[1].X() - aStart.X() != 0 ? true : false;
+ // vertical and horizon alternate
+ if (i % 2 == 1)
+ bVertical = !bVertical;
+
+ if (eConnectorType == ConnectorType_CURVE)
+ {
+ awt::Size aSize = xShape->getSize();
+ awt::Point aShapePosition = xShape->getPosition();
+ tools::Rectangle aBoundRect = aPoly.GetBoundRect();
+
+ if (bVertical)
+ {
+ if ((aBoundRect.GetSize().Height() - aSize.Height) == 1)
+ aPt.setY(aPoly[i + 1].Y());
+ else if (aStart.Y() > aPt.Y())
+ aPt.setY(aShapePosition.Y);
+ else
+ aPt.setY(aShapePosition.Y + aSize.Height);
+ }
+ else
+ {
+ if ((aBoundRect.GetSize().Width() - aSize.Width) == 1)
+ aPt.setX(aPoly[i + 1].X());
+ else if (aStart.X() > aPt.X())
+ aPt.setX(aShapePosition.X);
+ else
+ aPt.setX(aShapePosition.X + aSize.Width);
+ }
+ }
+
+ if (bVertical)
+ nAdjustValue = ((aPt.Y() - aStart.Y()) * 100000) / (aEnd.Y() - aStart.Y());
+ else
+ nAdjustValue = ((aPt.X() - aStart.X()) * 100000) / (aEnd.X() - aStart.X());
+
+ rAvList.emplace_back(i, nAdjustValue);
+ }
+ }
+}
+
+static sal_Int32 lcl_GetGluePointId(sal_Int32 nGluePointId)
+{
+ if (nGluePointId > 3)
+ return nGluePointId - 4;
+ else
+ {
+ // change id of the bounding box (1 <-> 3)
+ if (nGluePointId == 1)
+ return 3; // Right
+ else if (nGluePointId == 3)
+ return 1; // Left
+ }
+
+ return nGluePointId;
+}
+
+ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape )
+{
+ bool bFlipH = false;
+ bool bFlipV = false;
+ sal_Int32 nAngle = 0;
+ sal_Int32 nStartGlueId = 0;
+ sal_Int32 nEndGlueId = 0;
+
+ SAL_INFO("oox.shape", "write connector shape");
+
+ FSHelperPtr pFS = GetFS();
+
+ OUString sGeometry;
+ std::vector<std::pair<sal_Int32, sal_Int32>> aAdjustValueList;
+ Reference< XPropertySet > rXPropSet( xShape, UNO_QUERY );
+ Reference< XPropertyState > rXPropState( xShape, UNO_QUERY );
+ awt::Point aStartPoint, aEndPoint;
+ Reference< XShape > rXShapeA;
+ Reference< XShape > rXShapeB;
+ PropertyState eState;
+ ConnectorType eConnectorType = ConnectorType_STANDARD;
+ GET(eConnectorType, EdgeKind);
+
+ switch( eConnectorType ) {
+ case ConnectorType_CURVE:
+ sGeometry = "curvedConnector";
+ break;
+ case ConnectorType_LINES:
+ case ConnectorType_STANDARD:
+ sGeometry = "bentConnector";
+ break;
+ default:
+ case ConnectorType_LINE:
+ sGeometry = "straightConnector1";
+ break;
+ }
+
+ if( GETAD( EdgeStartPoint ) ) {
+ mAny >>= aStartPoint;
+ if( GETAD( EdgeEndPoint ) ) {
+ mAny >>= aEndPoint;
+ }
+ }
+ GET( rXShapeA, EdgeStartConnection );
+ GET( rXShapeB, EdgeEndConnection );
+
+ GET(nStartGlueId, StartGluePointIndex);
+ if (nStartGlueId != -1)
+ nStartGlueId = lcl_GetGluePointId(nStartGlueId);
+ GET(nEndGlueId, EndGluePointIndex);
+ if (nEndGlueId != -1)
+ nEndGlueId = lcl_GetGluePointId(nEndGlueId);
+
+ // Position is relative to group in Word, but relative to anchor of group in API.
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes && m_xParent.is())
+ {
+ awt::Point aParentPos = m_xParent->getPosition();
+ aStartPoint.X -= aParentPos.X;
+ aStartPoint.Y -= aParentPos.Y;
+ aEndPoint.X -= aParentPos.X;
+ aEndPoint.Y -= aParentPos.Y;
+ }
+ EscherConnectorListEntry aConnectorEntry( xShape, aStartPoint, rXShapeA, aEndPoint, rXShapeB );
+
+ if (eConnectorType != ConnectorType_LINE)
+ {
+ tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon(xShape);
+ if (aPolyPolygon.Count() > 0)
+ {
+ tools::Polygon aPoly = aPolyPolygon.GetObject(0);
+ lcl_GetConnectorAdjustValue(xShape, aPoly, eConnectorType, aAdjustValueList);
+ nAngle = lcl_GetAngle(aPoly);
+ lcl_FlipHFlipV(aPoly, nAngle, bFlipH, bFlipV);
+ if (nAngle)
+ {
+ Point center((aEndPoint.X + aStartPoint.X) / 2, (aEndPoint.Y + aStartPoint.Y) / 2);
+ lcl_Rotate(nAngle, center, aStartPoint);
+ lcl_Rotate(nAngle, center, aEndPoint);
+ nAngle *= 60000;
+ }
+ sGeometry = sGeometry + OUString::number(aAdjustValueList.size() + 2);
+ }
+ }
+
+ tools::Rectangle aRect( Point( aStartPoint.X, aStartPoint.Y ), Point( aEndPoint.X, aEndPoint.Y ) );
+ if( aRect.getWidth() < 0 ) {
+ aRect.SetLeft(aEndPoint.X);
+ aRect.setWidth( aStartPoint.X - aEndPoint.X );
+ if (eConnectorType == ConnectorType_LINE)
+ bFlipH = true;
+ }
+
+ if( aRect.getHeight() < 0 ) {
+ aRect.SetTop(aEndPoint.Y);
+ aRect.setHeight( aStartPoint.Y - aEndPoint.Y );
+ if (eConnectorType == ConnectorType_LINE)
+ bFlipV = true;
+ }
+
+ // tdf#99810 connector shape (cxnSp) is not valid with namespace 'wps'
+ const auto nShapeNode = (mnXmlNamespace == XML_wps ? XML_wsp : XML_cxnSp);
+ pFS->startElementNS(mnXmlNamespace, nShapeNode);
+
+ if (mnXmlNamespace == XML_wps)
+ {
+ // non visual connector shape drawing properties
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvCnPr);
+ }
+ else
+ {
+ // non visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_nvCxnSpPr);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ // non visual connector shape drawing properties
+ pFS->startElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
+
+ if (GetShapeID(rXShapeA) == -1)
+ GetNewShapeID(rXShapeA);
+ if (GetShapeID(rXShapeB) == -1)
+ GetNewShapeID(rXShapeB);
+ WriteConnectorConnections(nStartGlueId, nEndGlueId, GetShapeID(rXShapeA), GetShapeID(rXShapeB));
+ pFS->endElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
+ if (GetDocumentType() == DOCUMENT_PPTX)
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+ pFS->endElementNS(mnXmlNamespace, XML_nvCxnSpPr);
+ }
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteTransformation( xShape, aRect, XML_a, bFlipH, bFlipV, nAngle );
+ // TODO: write adjustments (ppt export doesn't work well there either)
+ WritePresetShape( sGeometry.toUtf8(), aAdjustValueList);
+ Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
+ if( xShapeProps.is() )
+ WriteOutline( xShapeProps );
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ // connector shape (cxnSp) cannot contain text (txBody) (according to schema)
+ if( nShapeNode != XML_cxnSp )
+ {
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+ }
+
+ pFS->endElementNS(mnXmlNamespace, nShapeNode);
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
+{
+ bool bFlipH = false;
+ bool bFlipV = false;
+
+ SAL_INFO("oox.shape", "write line shape");
+
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp));
+
+ tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape );
+ if( aPolyPolygon.Count() == 1 && aPolyPolygon[ 0 ].GetSize() == 2)
+ {
+ const tools::Polygon& rPoly = aPolyPolygon[ 0 ];
+
+ bFlipH = ( rPoly[ 0 ].X() > rPoly[ 1 ].X() );
+ bFlipV = ( rPoly[ 0 ].Y() > rPoly[ 1 ].Y() );
+ }
+
+ // non visual shape properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ }
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr );
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV, true);
+ WritePresetShape( "line" );
+ Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
+ if( xShapeProps.is() )
+ WriteOutline( xShapeProps );
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ //write style
+ pFS->startElementNS(mnXmlNamespace, XML_style);
+ WriteShapeStyle( xShapeProps );
+ pFS->endElementNS( mnXmlNamespace, XML_style );
+
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( const Reference< XShape >& xShape, const char* pName )
+{
+ GetFS()->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, pName );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteNonVisualProperties( const Reference< XShape >& )
+{
+ // Override to generate //nvPr elements.
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape )
+{
+ SAL_INFO("oox.shape", "write rectangle shape");
+
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp));
+
+ sal_Int32 nRadius = 0;
+
+ Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
+ if( xShapeProps.is() )
+ {
+ xShapeProps->getPropertyValue( "CornerRadius" ) >>= nRadius;
+ }
+
+ if( nRadius )
+ {
+ nRadius = MapSize( awt::Size( nRadius, 0 ) ).Width;
+ }
+ //TODO: use nRadius value more precisely than just deciding whether to use
+ // "rect" or "roundRect" preset shape below
+
+ // non visual shape properties
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes)
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteShapeTransformation( xShape, XML_a );
+ WritePresetShape( nRadius == 0 ? "rect" : "roundRect" );
+ Reference< XPropertySet > xProps( xShape, UNO_QUERY );
+ if( xProps.is() )
+ {
+ WriteFill( xProps );
+ WriteOutline( xProps );
+ }
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ // write text
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+typedef ShapeExport& (ShapeExport::*ShapeConverter)( const Reference< XShape >& );
+typedef std::unordered_map< const char*, ShapeConverter, rtl::CStringHash, rtl::CStringEqual> NameToConvertMapType;
+
+static const NameToConvertMapType& lcl_GetConverters()
+{
+ static NameToConvertMapType const shape_converters
+ {
+ // tdf#98736 export CaptionShape as TextShape, because it is non-ooxml shape and
+ // we can't export this shape as CustomShape
+ // TODO: WriteCaptionShape
+ { "com.sun.star.drawing.CaptionShape" , &ShapeExport::WriteTextShape },
+
+ { "com.sun.star.drawing.ClosedBezierShape" , &ShapeExport::WriteClosedPolyPolygonShape },
+ { "com.sun.star.drawing.ConnectorShape" , &ShapeExport::WriteConnectorShape },
+ { "com.sun.star.drawing.CustomShape" , &ShapeExport::WriteCustomShape },
+ { "com.sun.star.drawing.EllipseShape" , &ShapeExport::WriteEllipseShape },
+ { "com.sun.star.drawing.GraphicObjectShape" , &ShapeExport::WriteGraphicObjectShape },
+ { "com.sun.star.drawing.LineShape" , &ShapeExport::WriteLineShape },
+ { "com.sun.star.drawing.MediaShape" , &ShapeExport::WriteGraphicObjectShape },
+ { "com.sun.star.drawing.OpenBezierShape" , &ShapeExport::WriteOpenPolyPolygonShape },
+ { "com.sun.star.drawing.PolyPolygonShape" , &ShapeExport::WriteClosedPolyPolygonShape },
+ { "com.sun.star.drawing.PolyLineShape" , &ShapeExport::WriteOpenPolyPolygonShape },
+ { "com.sun.star.drawing.RectangleShape" , &ShapeExport::WriteRectangleShape },
+ { "com.sun.star.drawing.OLE2Shape" , &ShapeExport::WriteOLE2Shape },
+ { "com.sun.star.drawing.TableShape" , &ShapeExport::WriteTableShape },
+ { "com.sun.star.drawing.TextShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.drawing.GroupShape" , &ShapeExport::WriteGroupShape },
+
+ { "com.sun.star.presentation.GraphicObjectShape" , &ShapeExport::WriteGraphicObjectShape },
+ { "com.sun.star.presentation.MediaShape" , &ShapeExport::WriteGraphicObjectShape },
+ { "com.sun.star.presentation.ChartShape" , &ShapeExport::WriteOLE2Shape },
+ { "com.sun.star.presentation.OLE2Shape" , &ShapeExport::WriteOLE2Shape },
+ { "com.sun.star.presentation.TableShape" , &ShapeExport::WriteTableShape },
+ { "com.sun.star.presentation.TextShape" , &ShapeExport::WriteTextShape },
+
+ { "com.sun.star.presentation.DateTimeShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.FooterShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.HeaderShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.NotesShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.OutlinerShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.SlideNumberShape" , &ShapeExport::WriteTextShape },
+ { "com.sun.star.presentation.TitleTextShape" , &ShapeExport::WriteTextShape },
+ };
+ return shape_converters;
+}
+
+ShapeExport& ShapeExport::WriteShape( const Reference< XShape >& xShape )
+{
+ if (!xShape)
+ throw lang::IllegalArgumentException();
+
+ OUString sShapeType = xShape->getShapeType();
+ SAL_INFO("oox.shape", "write shape: " << sShapeType);
+ NameToConvertMapType::const_iterator aConverter
+ = lcl_GetConverters().find(sShapeType.toUtf8().getStr());
+ if (aConverter == lcl_GetConverters().end())
+ {
+ SAL_INFO("oox.shape", "unknown shape");
+ return WriteUnknownShape( xShape );
+ }
+
+ if (GetDocumentType() == DOCUMENT_PPTX)
+ {
+ Reference< XPropertySet > xShapeProperties(xShape, UNO_QUERY);
+ if (xShapeProperties && xShapeProperties->getPropertySetInfo()
+ && xShapeProperties->getPropertySetInfo()->hasPropertyByName("IsPresentationObject")
+ && xShapeProperties->getPropertyValue("IsPresentationObject").hasValue())
+ mbPlaceholder = xShapeProperties->getPropertyValue("IsPresentationObject").get<bool>();
+ }
+
+ (this->*(aConverter->second))( xShape );
+
+ return *this;
+}
+
+static bool lcl_isTextBox(const Reference<XInterface>& xIface)
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(xIface, uno::UNO_QUERY);
+ if (!xPropertySet.is())
+ return false;
+ uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ if (!xPropertySetInfo->hasPropertyByName("TextBox"))
+ return false;
+ css::uno::Any aTextBox(xPropertySet->getPropertyValue("TextBox"));
+ if (!aTextBox.hasValue())
+ return false;
+ return aTextBox.get<bool>();
+}
+
+ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles )
+{
+ // In case this shape has an associated textbox, then export that, and we're done.
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes && GetTextExport())
+ {
+ if (lcl_isTextBox(xIface))
+ {
+ GetTextExport()->WriteTextBox(uno::Reference<drawing::XShape>(xIface, uno::UNO_QUERY_THROW));
+ WriteText( xIface, /*bBodyPr=*/true, /*bText=*/false, /*nXmlNamespace=*/nXmlNamespace );
+ return *this;
+ }
+ }
+
+ Reference< XText > xXText( xIface, UNO_QUERY );
+ if( (NonEmptyText( xIface ) || GetDocumentType() == DOCUMENT_PPTX)
+ && xXText.is() )
+ {
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElementNS(nXmlNamespace,
+ (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_txBody : XML_txbx));
+ WriteText(xIface, /*bBodyPr=*/(GetDocumentType() != DOCUMENT_DOCX || mbUserShapes), /*bText=*/true,
+ /*nXmlNamespace=*/0, /*bWritePropertiesAsLstStyles=*/bWritePropertiesAsLstStyles);
+ pFS->endElementNS( nXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_txBody : XML_txbx) );
+ if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes)
+ WriteText( xIface, /*bBodyPr=*/true, /*bText=*/false, /*nXmlNamespace=*/nXmlNamespace );
+ }
+ else if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes)
+ mpFS->singleElementNS(nXmlNamespace, XML_bodyPr);
+
+ return *this;
+}
+
+void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
+{
+ Reference< XTable > xTable;
+ Reference< XPropertySet > xPropSet( rXShape, UNO_QUERY );
+
+ mpFS->startElementNS(XML_a, XML_graphic);
+ mpFS->startElementNS(XML_a, XML_graphicData,
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/table");
+
+ if ( xPropSet.is() && ( xPropSet->getPropertyValue( "Model" ) >>= xTable ) )
+ {
+ mpFS->startElementNS(XML_a, XML_tbl);
+ mpFS->startElementNS(XML_a, XML_tblPr);
+ WriteShapeEffects(xPropSet);
+ mpFS->endElementNS(XML_a, XML_tblPr);
+
+ Reference< container::XIndexAccess > xColumns( xTable->getColumns(), UNO_QUERY_THROW );
+ Reference< container::XIndexAccess > xRows( xTable->getRows(), UNO_QUERY_THROW );
+ sal_uInt16 nRowCount = static_cast< sal_uInt16 >( xRows->getCount() );
+ sal_uInt16 nColumnCount = static_cast< sal_uInt16 >( xColumns->getCount() );
+
+ mpFS->startElementNS(XML_a, XML_tblGrid);
+
+ for ( sal_Int32 x = 0; x < nColumnCount; x++ )
+ {
+ Reference< XPropertySet > xColPropSet( xColumns->getByIndex( x ), UNO_QUERY_THROW );
+ sal_Int32 nWidth(0);
+ xColPropSet->getPropertyValue( "Width" ) >>= nWidth;
+
+ mpFS->singleElementNS(XML_a, XML_gridCol,
+ XML_w, OString::number(oox::drawingml::convertHmmToEmu(nWidth)));
+ }
+
+ mpFS->endElementNS( XML_a, XML_tblGrid );
+
+ // map for holding the transpose index of the merged cells and pair<parentTransposeIndex, parentCell>
+ typedef std::unordered_map<sal_Int32, std::pair<sal_Int32, Reference< XMergeableCell> > > transposeTableMap;
+ transposeTableMap mergedCellMap;
+
+ for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
+ {
+ Reference< XPropertySet > xRowPropSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
+ sal_Int32 nRowHeight(0);
+
+ xRowPropSet->getPropertyValue( "Height" ) >>= nRowHeight;
+
+ mpFS->startElementNS(XML_a, XML_tr,
+ XML_h, OString::number(oox::drawingml::convertHmmToEmu(nRowHeight)));
+ for( sal_Int32 nColumn = 0; nColumn < nColumnCount; nColumn++ )
+ {
+ Reference< XMergeableCell > xCell( xTable->getCellByPosition( nColumn, nRow ),
+ UNO_QUERY_THROW );
+ sal_Int32 transposedIndexofCell = (nRow * nColumnCount) + nColumn;
+
+ //assume we will open a cell, set to false below if we won't
+ bool bCellOpened = true;
+
+ if(xCell->getColumnSpan() > 1 && xCell->getRowSpan() > 1)
+ {
+ // having both : horizontal and vertical merge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_gridSpan, OString::number(xCell->getColumnSpan()),
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
+ // since, XMergeableCell doesn't have the information about
+ // cell having hMerge or vMerge.
+ // So, Populating the merged cell map in-order to use it to
+ // decide the attribute for the individual cell.
+ for(sal_Int32 columnIndex = nColumn; columnIndex < nColumn+xCell->getColumnSpan(); ++columnIndex)
+ {
+ for(sal_Int32 rowIndex = nRow; rowIndex < nRow+xCell->getRowSpan(); ++rowIndex)
+ {
+ sal_Int32 transposeIndexForMergeCell =
+ (rowIndex * nColumnCount) + columnIndex;
+ mergedCellMap[transposeIndexForMergeCell] =
+ std::make_pair(transposedIndexofCell, xCell);
+ }
+ }
+
+ }
+ else if(xCell->getColumnSpan() > 1)
+ {
+ // having : horizontal merge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_gridSpan, OString::number(xCell->getColumnSpan()));
+ for(sal_Int32 columnIndex = nColumn; columnIndex < nColumn + xCell->getColumnSpan(); ++columnIndex) {
+ sal_Int32 transposeIndexForMergeCell = (nRow*nColumnCount) + columnIndex;
+ mergedCellMap[transposeIndexForMergeCell] =
+ std::make_pair(transposedIndexofCell, xCell);
+ }
+ }
+ else if(xCell->getRowSpan() > 1)
+ {
+ // having : vertical merge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
+
+ for(sal_Int32 rowIndex = nRow; rowIndex < nRow + xCell->getRowSpan(); ++rowIndex) {
+ sal_Int32 transposeIndexForMergeCell = (rowIndex*nColumnCount) + nColumn;
+ mergedCellMap[transposeIndexForMergeCell] =
+ std::make_pair(transposedIndexofCell, xCell);
+ }
+ }
+ else
+ {
+ // now, the cell can be an independent cell or
+ // it can be a cell which is been merged to some parent cell
+ if(!xCell->isMerged())
+ {
+ // independent cell
+ mpFS->startElementNS(XML_a, XML_tc);
+ }
+ else
+ {
+ // it a merged cell to some parent cell
+ // find the parent cell for the current cell at hand
+ transposeTableMap::iterator it = mergedCellMap.find(transposedIndexofCell);
+ if(it != mergedCellMap.end())
+ {
+ sal_Int32 transposeIndexOfParent = it->second.first;
+ Reference< XMergeableCell > parentCell = it->second.second;
+ // finding the row and column index for the parent cell from transposed index
+ sal_Int32 parentColumnIndex = transposeIndexOfParent % nColumnCount;
+ sal_Int32 parentRowIndex = transposeIndexOfParent / nColumnCount;
+ if(nColumn == parentColumnIndex)
+ {
+ // the cell is vertical merge and it might have gridspan
+ if(parentCell->getColumnSpan() > 1)
+ {
+ // vMerge and has gridSpan
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1),
+ XML_gridSpan, OString::number(xCell->getColumnSpan()));
+ }
+ else
+ {
+ // only vMerge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1));
+ }
+ }
+ else if(nRow == parentRowIndex)
+ {
+ // the cell is horizontal merge and it might have rowspan
+ if(parentCell->getRowSpan() > 1)
+ {
+ // hMerge and has rowspan
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_hMerge, OString::number(1),
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
+ }
+ else
+ {
+ // only hMerge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_hMerge, OString::number(1));
+ }
+ }
+ else
+ {
+ // has hMerge and vMerge
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1),
+ XML_hMerge, OString::number(1));
+ }
+ }
+ else
+ bCellOpened = false;
+ }
+ }
+
+ if (bCellOpened)
+ {
+ WriteTextBox( xCell, XML_a );
+
+ Reference< XPropertySet > xCellPropSet(xCell, UNO_QUERY_THROW);
+ WriteTableCellProperties(xCellPropSet);
+
+ mpFS->endElementNS( XML_a, XML_tc );
+ }
+ }
+
+ mpFS->endElementNS( XML_a, XML_tr );
+ }
+
+ mpFS->endElementNS( XML_a, XML_tbl );
+ }
+
+ mpFS->endElementNS( XML_a, XML_graphicData );
+ mpFS->endElementNS( XML_a, XML_graphic );
+}
+
+void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCellPropSet)
+{
+ sal_Int32 nLeftMargin(0), nRightMargin(0);
+ TextVerticalAdjust eVerticalAlignment;
+ const char* sVerticalAlignment;
+
+ Any aLeftMargin = xCellPropSet->getPropertyValue("TextLeftDistance");
+ aLeftMargin >>= nLeftMargin;
+
+ Any aRightMargin = xCellPropSet->getPropertyValue("TextRightDistance");
+ aRightMargin >>= nRightMargin;
+
+ Any aVerticalAlignment = xCellPropSet->getPropertyValue("TextVerticalAdjust");
+ aVerticalAlignment >>= eVerticalAlignment;
+ sVerticalAlignment = GetTextVerticalAdjust(eVerticalAlignment);
+
+ mpFS->startElementNS(XML_a, XML_tcPr, XML_anchor, sVerticalAlignment,
+ XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)), nLeftMargin > 0),
+ XML_marR, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRightMargin)), nRightMargin > 0));
+
+ // Write background fill for table cell.
+ // TODO
+ // tcW : Table cell width
+ WriteTableCellBorders(xCellPropSet);
+ DrawingML::WriteFill(xCellPropSet);
+ mpFS->endElementNS( XML_a, XML_tcPr );
+}
+
+void ShapeExport::WriteBorderLine(const sal_Int32 XML_line, const BorderLine2& rBorderLine)
+{
+// While importing the table cell border line width, it converts EMU->Hmm then divided result by 2.
+// To get original value of LineWidth need to multiple by 2.
+ sal_Int32 nBorderWidth = rBorderLine.LineWidth;
+ nBorderWidth *= 2;
+ nBorderWidth = oox::drawingml::convertHmmToEmu( nBorderWidth );
+
+ if ( nBorderWidth > 0 )
+ {
+ mpFS->startElementNS(XML_a, XML_line, XML_w, OString::number(nBorderWidth));
+ if ( rBorderLine.Color == sal_Int32( COL_AUTO ) )
+ mpFS->singleElementNS(XML_a, XML_noFill);
+ else
+ DrawingML::WriteSolidFill( ::Color(ColorTransparency, rBorderLine.Color) );
+ mpFS->endElementNS( XML_a, XML_line );
+ }
+ else if( nBorderWidth == 0)
+ {
+ mpFS->startElementNS(XML_a, XML_line);
+ mpFS->singleElementNS(XML_a, XML_noFill);
+ mpFS->endElementNS( XML_a, XML_line );
+ }
+}
+
+void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPropSet)
+{
+ BorderLine2 aBorderLine;
+
+// lnL - Left Border Line Properties of table cell
+ xCellPropSet->getPropertyValue("LeftBorder") >>= aBorderLine;
+ WriteBorderLine( XML_lnL, aBorderLine );
+
+// lnR - Right Border Line Properties of table cell
+ xCellPropSet->getPropertyValue("RightBorder") >>= aBorderLine;
+ WriteBorderLine( XML_lnR, aBorderLine );
+
+// lnT - Top Border Line Properties of table cell
+ xCellPropSet->getPropertyValue("TopBorder") >>= aBorderLine;
+ WriteBorderLine( XML_lnT, aBorderLine );
+
+// lnB - Bottom Border Line Properties of table cell
+ xCellPropSet->getPropertyValue("BottomBorder") >>= aBorderLine;
+ WriteBorderLine( XML_lnB, aBorderLine );
+}
+
+ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
+{
+ FSHelperPtr pFS = GetFS();
+
+ pFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
+
+ pFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
+
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
+
+ if( GetDocumentType() == DOCUMENT_PPTX )
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+ pFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
+
+ WriteShapeTransformation( xShape, mnXmlNamespace );
+ WriteTable( xShape );
+
+ pFS->endElementNS( mnXmlNamespace, XML_graphicFrame );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
+{
+ FSHelperPtr pFS = GetFS();
+ Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY);
+
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp));
+
+ // non visual shape properties
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ pFS->startElementNS(mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ OUString sURL;
+ if (GetProperty(xShapeProps, "URL"))
+ mAny >>= sURL;
+
+ if (!sURL.isEmpty())
+ {
+ OUString sRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HYPERLINK),
+ mpURLTransformer->getTransformedString(sURL),
+ mpURLTransformer->isExternalURL(sURL));
+
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
+ }
+ pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
+ }
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1");
+ if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
+ {
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
+
+ // visual shape properties
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteShapeTransformation( xShape, XML_a );
+ WritePresetShape( "rect" );
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, UNO_QUERY);
+ if (!IsFontworkShape(xShapeProps)) // Fontwork needs fill and outline in run properties instead.
+ {
+ WriteBlipOrNormalFill(xPropertySet, "Graphic");
+ WriteOutline(xPropertySet);
+ WriteShapeEffects(xPropertySet);
+ }
+ pFS->endElementNS( mnXmlNamespace, XML_spPr );
+
+ WriteTextBox( xShape, mnXmlNamespace );
+
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp) );
+
+ return *this;
+}
+
+void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
+{
+ Reference<XPropertySet> const xPropSet(xShape, UNO_QUERY);
+ assert(xPropSet.is());
+ Reference<XModel> xMathModel;
+ xPropSet->getPropertyValue("Model") >>= xMathModel;
+ assert(xMathModel.is());
+ assert(GetDocumentType() != DOCUMENT_DOCX); // should be written in DocxAttributeOutput
+ SAL_WARN_IF(GetDocumentType() == DOCUMENT_XLSX, "oox.shape", "Math export to XLSX isn't tested, should it happen here?");
+
+ // ECMA standard does not actually allow oMath outside of
+ // WordProcessingML so write a MCE like PPT 2010 does
+ mpFS->startElementNS(XML_mc, XML_AlternateContent);
+ mpFS->startElementNS(XML_mc, XML_Choice,
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)),
+ XML_Requires, "a14");
+ mpFS->startElementNS(mnXmlNamespace, XML_sp);
+ mpFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
+ mpFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+ mpFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1");
+ mpFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+ mpFS->endElementNS(mnXmlNamespace, XML_nvSpPr);
+ mpFS->startElementNS(mnXmlNamespace, XML_spPr);
+ WriteShapeTransformation(xShape, XML_a);
+ WritePresetShape("rect");
+ mpFS->endElementNS(mnXmlNamespace, XML_spPr);
+ mpFS->startElementNS(mnXmlNamespace, XML_txBody);
+ mpFS->startElementNS(XML_a, XML_bodyPr);
+ mpFS->endElementNS(XML_a, XML_bodyPr);
+ mpFS->startElementNS(XML_a, XML_p);
+ mpFS->startElementNS(XML_a14, XML_m);
+
+ oox::FormulaExportBase *const pMagic(dynamic_cast<oox::FormulaExportBase*>(xMathModel.get()));
+ assert(pMagic);
+ pMagic->writeFormulaOoxml(GetFS(), GetFB()->getVersion(), GetDocumentType(),
+ FormulaExportBase::eFormulaAlign::INLINE);
+
+ mpFS->endElementNS(XML_a14, XML_m);
+ mpFS->endElementNS(XML_a, XML_p);
+ mpFS->endElementNS(mnXmlNamespace, XML_txBody);
+ mpFS->endElementNS(mnXmlNamespace, XML_sp);
+ mpFS->endElementNS(XML_mc, XML_Choice);
+ mpFS->startElementNS(XML_mc, XML_Fallback);
+ // TODO: export bitmap shape as fallback
+ mpFS->endElementNS(XML_mc, XML_Fallback);
+ mpFS->endElementNS(XML_mc, XML_AlternateContent);
+}
+
+ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
+{
+ Reference< XPropertySet > xPropSet( xShape, UNO_QUERY );
+ if (!xPropSet.is())
+ return *this;
+
+ enum { CHART, MATH, OTHER } eType(OTHER);
+ OUString clsid;
+ xPropSet->getPropertyValue("CLSID") >>= clsid;
+ if (!clsid.isEmpty())
+ {
+ SvGlobalName aClassID;
+ bool const isValid = aClassID.MakeId(clsid);
+ assert(isValid); (void)isValid;
+ if (SotExchange::IsChart(aClassID))
+ eType = CHART;
+ else if (SotExchange::IsMath(aClassID))
+ eType = MATH;
+ }
+
+ if (CHART == eType)
+ {
+ Reference< XChartDocument > xChartDoc;
+ xPropSet->getPropertyValue("Model") >>= xChartDoc;
+ assert(xChartDoc.is());
+ //export the chart
+#if !ENABLE_WASM_STRIP_CHART
+ // WASM_CHART change
+ // TODO: With Chart extracted this cannot really happen since
+ // no Chart could've been added at all
+ ChartExport aChartExport( mnXmlNamespace, GetFS(), xChartDoc, GetFB(), GetDocumentType() );
+ static sal_Int32 nChartCount = 0;
+ aChartExport.WriteChartObj( xShape, GetNewShapeID( xShape ), ++nChartCount );
+#endif
+ return *this;
+ }
+
+ if (MATH == eType)
+ {
+ WriteMathShape(xShape);
+ return *this;
+ }
+
+ uno::Reference<embed::XEmbeddedObject> const xObj(
+ xPropSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY);
+
+ if (!xObj.is())
+ {
+ SAL_WARN("oox.shape", "ShapeExport::WriteOLE2Shape: no object");
+
+ // tdf#152436 Export the preview graphic of the object if the object is missing.
+ SdrObject* pSdrOLE2(SdrObject::getSdrObjectFromXShape(xShape));
+ if (auto pOle2Obj = dynamic_cast<SdrOle2Obj*>(pSdrOLE2))
+ {
+ const Graphic* pGraphic = pOle2Obj->GetGraphic();
+ if (pGraphic)
+ WriteGraphicObjectShapePart(xShape, pGraphic);
+ }
+
+ return *this;
+ }
+
+ uno::Sequence<beans::PropertyValue> grabBag;
+ OUString entryName;
+ try
+ {
+ uno::Reference<beans::XPropertySet> const xParent(
+ uno::Reference<container::XChild>(xObj, uno::UNO_QUERY_THROW)->getParent(),
+ uno::UNO_QUERY_THROW);
+
+ xParent->getPropertyValue("InteropGrabBag") >>= grabBag;
+
+ entryName = uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY_THROW)->getEntryName();
+ }
+ catch (uno::Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.shape", "ShapeExport::WriteOLE2Shape");
+ return *this;
+ }
+
+ OUString progID;
+
+ for (auto const& it : std::as_const(grabBag))
+ {
+ if (it.Name == "EmbeddedObjects")
+ {
+ uno::Sequence<beans::PropertyValue> objects;
+ it.Value >>= objects;
+ for (auto const& object : std::as_const(objects))
+ {
+ if (object.Name == entryName)
+ {
+ uno::Sequence<beans::PropertyValue> props;
+ object.Value >>= props;
+ for (auto const& prop : std::as_const(props))
+ {
+ if (prop.Name == "ProgID")
+ {
+ prop.Value >>= progID;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+
+ OUString sMediaType;
+ OUString sRelationType;
+ OUString sSuffix;
+ const char * pProgID(nullptr);
+
+ uno::Reference<io::XInputStream> const xInStream =
+ oox::GetOLEObjectStream(
+ mpFB->getComponentContext(), xObj, progID,
+ sMediaType, sRelationType, sSuffix, pProgID);
+
+ if (!xInStream.is())
+ {
+ return *this;
+ }
+
+ OString anotherProgID;
+ if (!pProgID && !progID.isEmpty())
+ {
+ anotherProgID = OUStringToOString(progID, RTL_TEXTENCODING_UTF8);
+ pProgID = anotherProgID.getStr();
+ }
+
+ assert(!sMediaType.isEmpty());
+ assert(!sRelationType.isEmpty());
+ assert(!sSuffix.isEmpty());
+
+ OUString sFileName = "embeddings/oleObject" + OUString::number(++m_nEmbeddedObjects) + "." + sSuffix;
+ uno::Reference<io::XOutputStream> const xOutStream(
+ mpFB->openFragmentStream(
+ OUString::createFromAscii(GetComponentDir()) + "/" + sFileName,
+ sMediaType));
+ assert(xOutStream.is()); // no reason why that could fail
+
+ try {
+ ::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream);
+ } catch (uno::Exception const&) {
+ TOOLS_WARN_EXCEPTION("oox.shape", "ShapeExport::WriteOLEObject");
+ }
+
+ OUString const sRelId = mpFB->addRelation(
+ mpFS->getOutputStream(), sRelationType,
+ OUStringConcatenation(OUString::createFromAscii(GetRelationCompPrefix()) + sFileName));
+
+ mpFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
+
+ mpFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
+
+ mpFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape));
+
+ mpFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
+
+ if (GetDocumentType() == DOCUMENT_PPTX)
+ mpFS->singleElementNS(mnXmlNamespace, XML_nvPr);
+ mpFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
+
+ WriteShapeTransformation( xShape, mnXmlNamespace );
+
+ mpFS->startElementNS(XML_a, XML_graphic);
+ mpFS->startElementNS(XML_a, XML_graphicData,
+ XML_uri, "http://schemas.openxmlformats.org/presentationml/2006/ole");
+ if (pProgID)
+ {
+ mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
+ XML_progId, pProgID,
+ FSNS(XML_r, XML_id), sRelId,
+ XML_spid, "" );
+ }
+ else
+ {
+ mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
+//? XML_name, "Document",
+ FSNS(XML_r, XML_id), sRelId,
+ // The spec says that this is a required attribute, but PowerPoint can only handle an empty value.
+ XML_spid, "" );
+ }
+
+ mpFS->singleElementNS( mnXmlNamespace, XML_embed );
+
+ // pic element
+ SdrObject* pSdrOLE2(SdrObject::getSdrObjectFromXShape(xShape));
+ // The spec doesn't allow <p:pic> here, but PowerPoint requires it.
+ bool bEcma = mpFB->getVersion() == oox::core::ECMA_DIALECT;
+ if (bEcma)
+ if (auto pOle2Obj = dynamic_cast<SdrOle2Obj*>(pSdrOLE2))
+ {
+ const Graphic* pGraphic = pOle2Obj->GetGraphic();
+ if (pGraphic)
+ WriteGraphicObjectShapePart( xShape, pGraphic );
+ }
+
+ mpFS->endElementNS( mnXmlNamespace, XML_oleObj );
+
+ mpFS->endElementNS( XML_a, XML_graphicData );
+ mpFS->endElementNS( XML_a, XML_graphic );
+
+ mpFS->endElementNS( mnXmlNamespace, XML_graphicFrame );
+
+ return *this;
+}
+
+ShapeExport& ShapeExport::WriteUnknownShape( const Reference< XShape >& )
+{
+ // Override this method to do something useful.
+ return *this;
+}
+
+sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape >& rXShape )
+{
+ return GetNewShapeID( rXShape, GetFB() );
+}
+
+sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape >& rXShape, XmlFilterBase* pFB )
+{
+ if( !rXShape.is() )
+ return -1;
+
+ sal_Int32 nID = pFB->GetUniqueId();
+
+ (*mpShapeMap)[ rXShape ] = nID;
+
+ return nID;
+}
+
+sal_Int32 ShapeExport::GetShapeID( const Reference< XShape >& rXShape )
+{
+ return GetShapeID( rXShape, mpShapeMap );
+}
+
+sal_Int32 ShapeExport::GetShapeID( const Reference< XShape >& rXShape, ShapeHashMap* pShapeMap )
+{
+ if( !rXShape.is() )
+ return -1;
+
+ ShapeHashMap::const_iterator aIter = pShapeMap->find( rXShape );
+
+ if( aIter == pShapeMap->end() )
+ return -1;
+
+ return aIter->second;
+}
+
+OUString ShapeExport::GetShapeName(const Reference<XShape>& xShape)
+{
+ Reference<XPropertySet> rXPropSet(xShape, UNO_QUERY);
+
+ // Empty name keeps the object unnamed.
+ OUString sName;
+
+ if (GetProperty(rXPropSet, "Name"))
+ mAny >>= sName;
+ return sName;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
new file mode 100644
index 000000000..4f2654fae
--- /dev/null
+++ b/oox/source/export/vmlexport.cxx
@@ -0,0 +1,1529 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_folders.h>
+#include <rtl/bootstrap.hxx>
+#include <svl/itemset.hxx>
+#include <oox/export/drawingml.hxx>
+#include <oox/export/vmlexport.hxx>
+#include <sax/fastattribs.hxx>
+
+#include <oox/token/tokens.hxx>
+
+#include <rtl/strbuf.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+
+#include <tools/stream.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdograf.hxx>
+#include <svx/sdmetitm.hxx>
+#include <vcl/cvtgrf.hxx>
+#include <filter/msfilter/msdffimp.hxx>
+#include <filter/msfilter/util.hxx>
+#include <filter/msfilter/escherex.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+
+#include <cstdio>
+
+using namespace sax_fastparser;
+using namespace oox::vml;
+using namespace com::sun::star;
+
+const sal_Int32 Tag_Container = 44444;
+const sal_Int32 Tag_Commit = 44445;
+
+VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport )
+ : EscherEx( std::make_shared<EscherExGlobal>(), nullptr, /*bOOXML=*/true )
+ , m_pSerializer( pSerializer )
+ , m_pTextExport( pTextExport )
+ , m_eHOri( 0 )
+ , m_eVOri( 0 )
+ , m_eHRel( 0 )
+ , m_eVRel( 0 )
+ , m_bInline( false )
+ , m_pSdrObject( nullptr )
+ , m_nShapeType( ESCHER_ShpInst_Nil )
+ , m_nShapeFlags(ShapeFlag::NONE)
+ , m_ShapeStyle( 200 )
+ , m_aShapeTypeWritten( ESCHER_ShpInst_COUNT )
+ , m_bSkipwzName( false )
+ , m_bUseHashMarkForType( false )
+ , m_bOverrideShapeIdGeneration( false )
+ , m_nShapeIDCounter( 0 )
+{
+ mnGroupLevel = 1;
+}
+
+void VMLExport::SetFS( const ::sax_fastparser::FSHelperPtr& pSerializer )
+{
+ m_pSerializer = pSerializer;
+}
+
+VMLExport::~VMLExport()
+{
+ delete mpOutStrm;
+ mpOutStrm = nullptr;
+}
+
+void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
+{
+ EscherEx::OpenContainer( nEscherContainer, nRecInstance );
+
+ if ( nEscherContainer != ESCHER_SpContainer )
+ return;
+
+ // opening a shape container
+ SAL_WARN_IF(m_nShapeType != ESCHER_ShpInst_Nil, "oox.vml", "opening shape inside of a shape!");
+ m_nShapeType = ESCHER_ShpInst_Nil;
+ m_pShapeAttrList = FastSerializerHelper::createAttrList();
+
+ m_ShapeStyle.setLength(0);
+ m_ShapeStyle.ensureCapacity(200);
+
+ // postpone the output so that we are able to write even the elements
+ // that we learn inside Commit()
+ m_pSerializer->mark(Tag_Container);
+}
+
+void VMLExport::CloseContainer()
+{
+ if ( mRecTypes.back() == ESCHER_SpContainer )
+ {
+ // write the shape now when we have all the info
+ sal_Int32 nShapeElement = StartShape();
+
+ m_pSerializer->mergeTopMarks(Tag_Container);
+
+ EndShape( nShapeElement );
+
+ // cleanup
+ m_nShapeType = ESCHER_ShpInst_Nil;
+ m_pShapeAttrList = nullptr;
+ }
+
+ EscherEx::CloseContainer();
+}
+
+sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const tools::Rectangle* pRect )
+{
+ sal_uInt32 nShapeId = GenerateShapeId();
+
+ OStringBuffer aStyle( 200 );
+ rtl::Reference<FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
+
+ pAttrList->add( XML_id, ShapeIdString( nShapeId ) );
+
+ if ( rShapeName.getLength() )
+ pAttrList->add( XML_alt, rShapeName );
+
+ bool rbAbsolutePos = true;
+ //editAs
+ OUString rEditAs = EscherEx::GetEditAs();
+ if (!rEditAs.isEmpty())
+ {
+ pAttrList->add(XML_editas, rEditAs);
+ rbAbsolutePos = false;
+ }
+
+ // style
+ if ( pRect )
+ AddRectangleDimensions( aStyle, *pRect, rbAbsolutePos );
+
+ if ( !aStyle.isEmpty() )
+ pAttrList->add( XML_style, aStyle.makeStringAndClear() );
+
+ // coordorigin/coordsize
+ if ( pRect && ( mnGroupLevel == 1 ) )
+ {
+ pAttrList->add( XML_coordorigin,
+ OString::number( pRect->Left() ) + "," + OString::number( pRect->Top() ) );
+
+ pAttrList->add( XML_coordsize,
+ OString::number( pRect->Right() - pRect->Left() ) + "," +
+ OString::number( pRect->Bottom() - pRect->Top() ) );
+ }
+
+ m_pSerializer->startElementNS( XML_v, XML_group, pAttrList );
+
+ mnGroupLevel++;
+ return nShapeId;
+}
+
+void VMLExport::LeaveGroup()
+{
+ --mnGroupLevel;
+ m_pSerializer->endElementNS( XML_v, XML_group );
+}
+
+void VMLExport::AddShape( sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uInt32 nShapeId )
+{
+ m_nShapeType = nShapeType;
+ m_nShapeFlags = nShapeFlags;
+
+ m_sShapeId = ShapeIdString( nShapeId );
+ // If shape is a watermark object - should keep the original shape's name
+ // because Microsoft detects if it is a watermark by the actual name
+ if (!IsWaterMarkShape(m_pSdrObject->GetName()))
+ {
+ // Not a watermark object
+ m_pShapeAttrList->add( XML_id, m_sShapeId );
+ }
+ else
+ {
+ // A watermark object - store the optional shape ID
+ m_pShapeAttrList->add( XML_id, m_pSdrObject->GetName() );
+ // also ('o:spid')
+ m_pShapeAttrList->addNS( XML_o, XML_spid, m_sShapeId );
+ }
+}
+
+bool VMLExport::IsWaterMarkShape(std::u16string_view rStr)
+{
+ if (rStr.empty() ) return false;
+
+ return o3tl::starts_with(rStr, u"PowerPlusWaterMarkObject") || o3tl::starts_with(rStr, u"WordPictureWatermark");
+}
+
+void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString& sShapeIDPrefix)
+{
+ m_bOverrideShapeIdGeneration = bOverrideShapeIdGen;
+ if(bOverrideShapeIdGen)
+ {
+ assert(!sShapeIDPrefix.isEmpty());
+ m_sShapeIDPrefix = sShapeIDPrefix;
+ }
+ else
+ m_sShapeIDPrefix.clear();
+}
+
+static void impl_AddArrowHead( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, sal_uInt32 nValue )
+{
+ if ( !pAttrList )
+ return;
+
+ const char *pArrowHead = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineNoEnd: pArrowHead = "none"; break;
+ case ESCHER_LineArrowEnd: pArrowHead = "block"; break;
+ case ESCHER_LineArrowStealthEnd: pArrowHead = "classic"; break;
+ case ESCHER_LineArrowDiamondEnd: pArrowHead = "diamond"; break;
+ case ESCHER_LineArrowOvalEnd: pArrowHead = "oval"; break;
+ case ESCHER_LineArrowOpenEnd: pArrowHead = "open"; break;
+ }
+
+ if ( pArrowHead )
+ pAttrList->add( nElement, pArrowHead );
+}
+
+static void impl_AddArrowLength( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, sal_uInt32 nValue )
+{
+ if ( !pAttrList )
+ return;
+
+ const char *pArrowLength = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineShortArrow: pArrowLength = "short"; break;
+ case ESCHER_LineMediumLenArrow: pArrowLength = "medium"; break;
+ case ESCHER_LineLongArrow: pArrowLength = "long"; break;
+ }
+
+ if ( pArrowLength )
+ pAttrList->add( nElement, pArrowLength );
+}
+
+static void impl_AddArrowWidth( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, sal_uInt32 nValue )
+{
+ if ( !pAttrList )
+ return;
+
+ const char *pArrowWidth = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineNarrowArrow: pArrowWidth = "narrow"; break;
+ case ESCHER_LineMediumWidthArrow: pArrowWidth = "medium"; break;
+ case ESCHER_LineWideArrow: pArrowWidth = "wide"; break;
+ }
+
+ if ( pArrowWidth )
+ pAttrList->add( nElement, pArrowWidth );
+}
+
+static void impl_AddBool( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, bool bValue )
+{
+ if ( !pAttrList )
+ return;
+
+ pAttrList->add( nElement, bValue? "t": "f" );
+}
+
+static void impl_AddColor( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, sal_uInt32 nColor )
+{
+ SAL_WARN_IF( nColor & 0xFF000000 , "oox.vml" , "TODO: this is not a RGB value!");
+
+ if ( !pAttrList || ( nColor & 0xFF000000 ) )
+ return;
+
+ nColor = ( ( nColor & 0xFF ) << 16 ) + ( nColor & 0xFF00 ) + ( ( nColor & 0xFF0000 ) >> 16 );
+
+ const char *pColor = nullptr;
+ char pRgbColor[10];
+ switch ( nColor )
+ {
+ case 0x000000: pColor = "black"; break;
+ case 0xC0C0C0: pColor = "silver"; break;
+ case 0x808080: pColor = "gray"; break;
+ case 0xFFFFFF: pColor = "white"; break;
+ case 0x800000: pColor = "maroon"; break;
+ case 0xFF0000: pColor = "red"; break;
+ case 0x800080: pColor = "purple"; break;
+ case 0xFF00FF: pColor = "fuchsia"; break;
+ case 0x008000: pColor = "green"; break;
+ case 0x00FF00: pColor = "lime"; break;
+ case 0x808000: pColor = "olive"; break;
+ case 0xFFFF00: pColor = "yellow"; break;
+ case 0x000080: pColor = "navy"; break;
+ case 0x0000FF: pColor = "blue"; break;
+ case 0x008080: pColor = "teal"; break;
+ case 0x00FFFF: pColor = "aqua"; break;
+ default:
+ {
+ snprintf( pRgbColor, sizeof( pRgbColor ), "#%06x", static_cast< unsigned int >( nColor ) ); // not too handy to use OString::valueOf() here :-(
+ pColor = pRgbColor;
+ }
+ break;
+ }
+
+ pAttrList->add( nElement, pColor );
+}
+
+static void impl_AddInt( sax_fastparser::FastAttributeList *pAttrList, sal_Int32 nElement, sal_uInt32 nValue )
+{
+ if ( !pAttrList )
+ return;
+
+ pAttrList->add( nElement, OString::number( nValue ).getStr() );
+}
+
+static sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal )
+{
+ sal_uInt16 nRet = *pVal++;
+ nRet += ( *pVal++ ) << 8;
+ return nRet;
+}
+
+static sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize )
+{
+ sal_Int32 nRet = 0;
+ if ( ( nPointSize == 0xfff0 ) || ( nPointSize == 4 ) )
+ {
+ sal_uInt16 nUnsigned = *pVal++;
+ nUnsigned += ( *pVal++ ) << 8;
+
+ nRet = sal_Int16( nUnsigned );
+ }
+ else if ( nPointSize == 8 )
+ {
+ sal_uInt32 nUnsigned = *pVal++;
+ nUnsigned += ( *pVal++ ) << 8;
+ nUnsigned += ( *pVal++ ) << 16;
+ nUnsigned += ( *pVal++ ) << 24;
+
+ nRet = nUnsigned;
+ }
+
+ return nRet;
+}
+
+void VMLExport::AddSdrObjectVMLObject( const SdrObject& rObj)
+{
+ m_pSdrObject = &rObj;
+}
+void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect )
+{
+ if ( m_nShapeType == ESCHER_ShpInst_Nil )
+ return;
+
+ // postpone the output of the embedded elements so that they are written
+ // inside the shapes
+ m_pSerializer->mark(Tag_Commit);
+
+ // dimensions
+ if ( m_nShapeType == ESCHER_ShpInst_Line )
+ AddLineDimensions( rRect );
+ else
+ {
+ if ( IsWaterMarkShape( m_pSdrObject->GetName() ) )
+ {
+ // Watermark need some padding to be compatible with MSO
+ tools::Long nPaddingY = 0;
+ const SfxItemSet& rSet = m_pSdrObject->GetMergedItemSet();
+ if ( const SdrMetricItem* pItem = rSet.GetItem( SDRATTR_TEXT_UPPERDIST ) )
+ nPaddingY += pItem->GetValue();
+
+ tools::Rectangle aRect( rRect );
+ aRect.setHeight( aRect.getHeight() + nPaddingY );
+ AddRectangleDimensions( m_ShapeStyle, aRect );
+ }
+ else
+ AddRectangleDimensions( m_ShapeStyle, rRect );
+ }
+
+ // properties
+ bool bAlreadyWritten[ 0xFFF ] = {};
+ const EscherProperties &rOpts = rProps.GetOpts();
+ for (auto const& opt : rOpts)
+ {
+ sal_uInt16 nId = ( opt.nPropId & 0x0FFF );
+
+ if ( bAlreadyWritten[ nId ] )
+ continue;
+
+ switch ( nId )
+ {
+ case ESCHER_Prop_WrapText: // 133
+ {
+ const char *pWrapType = nullptr;
+ switch ( opt.nPropValue )
+ {
+ case ESCHER_WrapSquare:
+ case ESCHER_WrapByPoints: pWrapType = "square"; break; // these two are equivalent according to the docu
+ case ESCHER_WrapNone: pWrapType = "none"; break;
+ case ESCHER_WrapTopBottom:
+ case ESCHER_WrapThrough:
+ break; // last two are *undefined* in MS-ODRAW, don't exist in VML
+ }
+ if ( pWrapType )
+ {
+ m_ShapeStyle.append(";mso-wrap-style:");
+ m_ShapeStyle.append(pWrapType);
+ }
+ }
+ bAlreadyWritten[ ESCHER_Prop_WrapText ] = true;
+ break;
+
+ case ESCHER_Prop_AnchorText: // 135
+ {
+ char const* pValue(nullptr);
+ switch (opt.nPropValue)
+ {
+ case ESCHER_AnchorTop:
+ pValue = "top";
+ break;
+ case ESCHER_AnchorMiddle:
+ pValue = "middle";
+ break;
+ case ESCHER_AnchorBottom:
+ pValue = "bottom";
+ break;
+ case ESCHER_AnchorTopCentered:
+ pValue = "top-center";
+ break;
+ case ESCHER_AnchorMiddleCentered:
+ pValue = "middle-center";
+ break;
+ case ESCHER_AnchorBottomCentered:
+ pValue = "bottom-center";
+ break;
+ case ESCHER_AnchorTopBaseline:
+ pValue = "top-baseline";
+ break;
+ case ESCHER_AnchorBottomBaseline:
+ pValue = "bottom-baseline";
+ break;
+ case ESCHER_AnchorTopCenteredBaseline:
+ pValue = "top-center-baseline";
+ break;
+ case ESCHER_AnchorBottomCenteredBaseline:
+ pValue = "bottom-center-baseline";
+ break;
+ }
+ m_ShapeStyle.append(";v-text-anchor:");
+ m_ShapeStyle.append(pValue);
+ }
+ break;
+
+ case ESCHER_Prop_txflTextFlow: // 136
+ {
+ // at least "bottom-to-top" only has an effect when it's on the v:textbox element, not on v:shape
+ assert(m_TextboxStyle.isEmpty());
+ switch (opt.nPropValue)
+ {
+ case ESCHER_txflHorzN:
+ m_TextboxStyle.append("layout-flow:horizontal");
+ break;
+ case ESCHER_txflTtoBA:
+ m_TextboxStyle.append("layout-flow:vertical");
+ break;
+ case ESCHER_txflBtoT:
+ m_TextboxStyle.append("mso-layout-flow-alt:bottom-to-top");
+ break;
+ default:
+ assert(false); // unimplemented in escher export
+ break;
+ }
+ }
+ break;
+
+ // coordorigin
+ case ESCHER_Prop_geoLeft: // 320
+ case ESCHER_Prop_geoTop: // 321
+ {
+ sal_uInt32 nLeft = 0, nTop = 0;
+
+ if ( nId == ESCHER_Prop_geoLeft )
+ {
+ nLeft = opt.nPropValue;
+ rProps.GetOpt( ESCHER_Prop_geoTop, nTop );
+ }
+ else
+ {
+ nTop = opt.nPropValue;
+ rProps.GetOpt( ESCHER_Prop_geoLeft, nLeft );
+ }
+ if(nTop!=0 && nLeft!=0)
+ m_pShapeAttrList->add( XML_coordorigin,
+ OString::number( nLeft ) + "," + OString::number( nTop ) );
+ }
+ bAlreadyWritten[ ESCHER_Prop_geoLeft ] = true;
+ bAlreadyWritten[ ESCHER_Prop_geoTop ] = true;
+ break;
+
+ // coordsize
+ case ESCHER_Prop_geoRight: // 322
+ case ESCHER_Prop_geoBottom: // 323
+ {
+ sal_uInt32 nLeft = 0, nRight = 0, nTop = 0, nBottom = 0;
+ rProps.GetOpt( ESCHER_Prop_geoLeft, nLeft );
+ rProps.GetOpt( ESCHER_Prop_geoTop, nTop );
+
+ if ( nId == ESCHER_Prop_geoRight )
+ {
+ nRight = opt.nPropValue;
+ rProps.GetOpt( ESCHER_Prop_geoBottom, nBottom );
+ }
+ else
+ {
+ nBottom = opt.nPropValue;
+ rProps.GetOpt( ESCHER_Prop_geoRight, nRight );
+ }
+
+ if(nBottom!=0 && nRight!=0 )
+ m_pShapeAttrList->add( XML_coordsize,
+ OString::number( nRight - nLeft ) + "," + OString::number( nBottom - nTop ) );
+ }
+ bAlreadyWritten[ ESCHER_Prop_geoRight ] = true;
+ bAlreadyWritten[ ESCHER_Prop_geoBottom ] = true;
+ break;
+
+ case ESCHER_Prop_pVertices: // 325
+ case ESCHER_Prop_pSegmentInfo: // 326
+ {
+ EscherPropSortStruct aVertices;
+ EscherPropSortStruct aSegments;
+
+ if ( rProps.GetOpt( ESCHER_Prop_pVertices, aVertices ) &&
+ rProps.GetOpt( ESCHER_Prop_pSegmentInfo, aSegments ) )
+ {
+ const sal_uInt8 *pVerticesIt = aVertices.nProp.data() + 6;
+ const sal_uInt8 *pSegmentIt = aSegments.nProp.data();
+ OStringBuffer aPath( 512 );
+
+ sal_uInt16 nPointSize = aVertices.nProp[4] + ( aVertices.nProp[5] << 8 );
+
+ // number of segments
+ sal_uInt16 nSegments = impl_GetUInt16( pSegmentIt );
+ pSegmentIt += 4;
+
+ for ( ; nSegments; --nSegments )
+ {
+ sal_uInt16 nSeg = impl_GetUInt16( pSegmentIt );
+
+ // The segment type is stored in the upper 3 bits
+ // and segment count is stored in the lower 13
+ // bits.
+ unsigned char nSegmentType = (nSeg & 0xE000) >> 13;
+ unsigned short nSegmentCount = nSeg & 0x03FF;
+
+ switch (nSegmentType)
+ {
+ case msopathMoveTo:
+ {
+ sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize );
+ if (nX >= 0 && nY >= 0 )
+ aPath.append( "m" + OString::number( nX ) + "," + OString::number( nY ) );
+ break;
+ }
+ case msopathClientEscape:
+ break;
+ case msopathEscape:
+ {
+ // If the segment type is msopathEscape, the lower 13 bits are
+ // divided in a 5 bit escape code and 8 bit
+ // vertex count (not segment count!)
+ unsigned char nEscapeCode = (nSegmentCount & 0x1F00) >> 8;
+ unsigned char nVertexCount = nSegmentCount & 0x00FF;
+ pVerticesIt += nVertexCount;
+
+ switch (nEscapeCode)
+ {
+ case 0xa: // nofill
+ aPath.append( "nf" );
+ break;
+ case 0xb: // nostroke
+ aPath.append( "ns" );
+ break;
+ }
+
+ break;
+ }
+ case msopathLineTo:
+ for (unsigned short i = 0; i < nSegmentCount; ++i)
+ {
+ sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize );
+ aPath.append( "l" + OString::number( nX ) + "," + OString::number( nY ) );
+ }
+ break;
+ case msopathCurveTo:
+ for (unsigned short i = 0; i < nSegmentCount; ++i)
+ {
+ sal_Int32 nX1 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nY1 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nX2 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nY2 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nX3 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ sal_Int32 nY3 = impl_GetPointComponent( pVerticesIt, nPointSize );
+ aPath.append( "c" + OString::number( nX1 ) + "," + OString::number( nY1 ) + "," +
+ OString::number( nX2 ) + "," + OString::number( nY2 ) + "," +
+ OString::number( nX3 ) + "," + OString::number( nY3 ) );
+ }
+ break;
+ case msopathClose:
+ aPath.append( "x" );
+ break;
+ case msopathEnd:
+ aPath.append( "e" );
+ break;
+ default:
+ SAL_WARN("oox", "Totally b0rked");
+ break;
+ case msopathInvalid:
+ SAL_WARN("oox", "Invalid - should never be found");
+ break;
+ }
+ }
+ OString pathString = aPath.makeStringAndClear();
+ if ( !pathString.isEmpty() && pathString != "xe" )
+ m_pShapeAttrList->add( XML_path, pathString );
+ }
+ else
+ SAL_WARN("oox.vml", "unhandled shape path, missing either pVertices or pSegmentInfo.");
+ }
+ bAlreadyWritten[ ESCHER_Prop_pVertices ] = true;
+ bAlreadyWritten[ ESCHER_Prop_pSegmentInfo ] = true;
+ break;
+
+ case ESCHER_Prop_fillType: // 384
+ case ESCHER_Prop_fillColor: // 385
+ case ESCHER_Prop_fillBackColor: // 387
+ case ESCHER_Prop_fillBlip: // 390
+ case ESCHER_Prop_fNoFillHitTest: // 447
+ case ESCHER_Prop_fillOpacity: // 386
+ {
+ sal_uInt32 nValue;
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList
+ = FastSerializerHelper::createAttrList();
+
+ bool imageData = false;
+ EscherPropSortStruct aStruct;
+ const SdrGrafObj* pSdrGrafObj = dynamic_cast<const SdrGrafObj*>(m_pSdrObject);
+
+ if (pSdrGrafObj && pSdrGrafObj->isSignatureLine() && m_pTextExport)
+ {
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrListSignatureLine
+ = FastSerializerHelper::createAttrList();
+ pAttrListSignatureLine->add(XML_issignatureline, "t");
+ if (!pSdrGrafObj->getSignatureLineId().isEmpty())
+ {
+ pAttrListSignatureLine->add(
+ XML_id, pSdrGrafObj->getSignatureLineId());
+ }
+ if (!pSdrGrafObj->getSignatureLineSuggestedSignerName().isEmpty())
+ {
+ pAttrListSignatureLine->add(
+ FSNS(XML_o, XML_suggestedsigner),
+ pSdrGrafObj->getSignatureLineSuggestedSignerName());
+ }
+ if (!pSdrGrafObj->getSignatureLineSuggestedSignerTitle().isEmpty())
+ {
+ pAttrListSignatureLine->add(
+ FSNS(XML_o, XML_suggestedsigner2),
+ pSdrGrafObj->getSignatureLineSuggestedSignerTitle());
+ }
+ if (!pSdrGrafObj->getSignatureLineSuggestedSignerEmail().isEmpty())
+ {
+ pAttrListSignatureLine->add(
+ FSNS(XML_o, XML_suggestedsigneremail),
+ pSdrGrafObj->getSignatureLineSuggestedSignerEmail());
+ }
+ if (!pSdrGrafObj->getSignatureLineSigningInstructions().isEmpty())
+ {
+ pAttrListSignatureLine->add(XML_signinginstructionsset, "t");
+ pAttrListSignatureLine->add(
+ FSNS(XML_o, XML_signinginstructions),
+ pSdrGrafObj->getSignatureLineSigningInstructions());
+ }
+ pAttrListSignatureLine->add(
+ XML_showsigndate,
+ pSdrGrafObj->isSignatureLineShowSignDate() ? "t" : "f");
+ pAttrListSignatureLine->add(
+ XML_allowcomments,
+ pSdrGrafObj->isSignatureLineCanAddComment() ? "t" : "f");
+
+ m_pSerializer->singleElementNS(
+ XML_o, XML_signatureline,
+ pAttrListSignatureLine);
+
+ // Get signature line graphic
+ const uno::Reference<graphic::XGraphic>& xGraphic
+ = pSdrGrafObj->getSignatureLineUnsignedGraphic();
+ Graphic aGraphic(xGraphic);
+ OUString aImageId = m_pTextExport->GetDrawingML().WriteImage(aGraphic, false);
+ pAttrList->add(FSNS(XML_r, XML_id), aImageId);
+ imageData = true;
+ }
+ else if (rProps.GetOpt(ESCHER_Prop_fillBlip, aStruct) && m_pTextExport)
+ {
+ SvMemoryStream aStream;
+ // The first bytes are WW8-specific, we're only interested in the PNG
+ int nHeaderSize = 25;
+ aStream.WriteBytes(aStruct.nProp.data() + nHeaderSize,
+ aStruct.nProp.size() - nHeaderSize);
+ aStream.Seek(0);
+ Graphic aGraphic;
+ GraphicConverter::Import(aStream, aGraphic);
+ OUString aImageId = m_pTextExport->GetDrawingML().WriteImage(aGraphic, false);
+ pAttrList->add(FSNS(XML_r, XML_id), aImageId);
+ imageData = true;
+ }
+
+ if (rProps.GetOpt(ESCHER_Prop_fNoFillHitTest, nValue))
+ impl_AddBool(pAttrList.get(), FSNS(XML_o, XML_detectmouseclick), nValue != 0);
+
+ if (imageData)
+ m_pSerializer->singleElementNS( XML_v, XML_imagedata, pAttrList );
+ else
+ {
+ if ( rProps.GetOpt( ESCHER_Prop_fillType, nValue ) )
+ {
+ const char *pFillType = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_FillSolid: pFillType = "solid"; break;
+ // TODO case ESCHER_FillPattern: pFillType = ""; break;
+ case ESCHER_FillTexture: pFillType = "tile"; break;
+ // TODO case ESCHER_FillPicture: pFillType = ""; break;
+ // TODO case ESCHER_FillShade: pFillType = ""; break;
+ // TODO case ESCHER_FillShadeCenter: pFillType = ""; break;
+ // TODO case ESCHER_FillShadeShape: pFillType = ""; break;
+ // TODO case ESCHER_FillShadeScale: pFillType = ""; break;
+ // TODO case ESCHER_FillShadeTitle: pFillType = ""; break;
+ // TODO case ESCHER_FillBackground: pFillType = ""; break;
+ default:
+ SAL_INFO("oox.vml", "Unhandled fill type: " << nValue);
+ break;
+ }
+ if ( pFillType )
+ pAttrList->add( XML_type, pFillType );
+ }
+ else if (!rProps.GetOpt(ESCHER_Prop_fillColor, nValue))
+ pAttrList->add( XML_on, "false" );
+
+ if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) )
+ impl_AddColor( m_pShapeAttrList.get(), XML_fillcolor, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_fillBackColor, nValue ) )
+ impl_AddColor( pAttrList.get(), XML_color2, nValue );
+
+
+ if (rProps.GetOpt(ESCHER_Prop_fillOpacity, nValue))
+ // Partly undo the transformation at the end of EscherPropertyContainer::CreateFillProperties(): VML opacity is 0..1.
+ pAttrList->add(XML_opacity, OString::number(double((nValue * 100) >> 16) / 100));
+ m_pSerializer->singleElementNS( XML_v, XML_fill, pAttrList );
+
+ }
+ }
+ bAlreadyWritten[ ESCHER_Prop_fillType ] = true;
+ bAlreadyWritten[ ESCHER_Prop_fillColor ] = true;
+ bAlreadyWritten[ ESCHER_Prop_fillBackColor ] = true;
+ bAlreadyWritten[ ESCHER_Prop_fillBlip ] = true;
+ bAlreadyWritten[ ESCHER_Prop_fNoFillHitTest ] = true;
+ bAlreadyWritten[ ESCHER_Prop_fillOpacity ] = true;
+ break;
+
+ case ESCHER_Prop_lineColor: // 448
+ case ESCHER_Prop_lineWidth: // 459
+ case ESCHER_Prop_lineDashing: // 462
+ case ESCHER_Prop_lineStartArrowhead: // 464
+ case ESCHER_Prop_lineEndArrowhead: // 465
+ case ESCHER_Prop_lineStartArrowWidth: // 466
+ case ESCHER_Prop_lineStartArrowLength: // 467
+ case ESCHER_Prop_lineEndArrowWidth: // 468
+ case ESCHER_Prop_lineEndArrowLength: // 469
+ case ESCHER_Prop_lineJoinStyle: // 470
+ case ESCHER_Prop_lineEndCapStyle: // 471
+ {
+ sal_uInt32 nValue;
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineColor, nValue ) )
+ impl_AddColor( pAttrList.get(), XML_color, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineWidth, nValue ) )
+ impl_AddInt( pAttrList.get(), XML_weight, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineDashing, nValue ) )
+ {
+ const char *pDashStyle = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineSolid: pDashStyle = "solid"; break;
+ case ESCHER_LineDashSys: pDashStyle = "shortdash"; break;
+ case ESCHER_LineDotSys: pDashStyle = "shortdot"; break;
+ case ESCHER_LineDashDotSys: pDashStyle = "shortdashdot"; break;
+ case ESCHER_LineDashDotDotSys: pDashStyle = "shortdashdotdot"; break;
+ case ESCHER_LineDotGEL: pDashStyle = "dot"; break;
+ case ESCHER_LineDashGEL: pDashStyle = "dash"; break;
+ case ESCHER_LineLongDashGEL: pDashStyle = "longdash"; break;
+ case ESCHER_LineDashDotGEL: pDashStyle = "dashdot"; break;
+ case ESCHER_LineLongDashDotGEL: pDashStyle = "longdashdot"; break;
+ case ESCHER_LineLongDashDotDotGEL: pDashStyle = "longdashdotdot"; break;
+ }
+ if ( pDashStyle )
+ pAttrList->add( XML_dashstyle, pDashStyle );
+ }
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowhead, nValue ) )
+ impl_AddArrowHead( pAttrList.get(), XML_startarrow, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowhead, nValue ) )
+ impl_AddArrowHead( pAttrList.get(), XML_endarrow, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowWidth, nValue ) )
+ impl_AddArrowWidth( pAttrList.get(), XML_startarrowwidth, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowLength, nValue ) )
+ impl_AddArrowLength( pAttrList.get(), XML_startarrowlength, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowWidth, nValue ) )
+ impl_AddArrowWidth( pAttrList.get(), XML_endarrowwidth, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowLength, nValue ) )
+ impl_AddArrowLength( pAttrList.get(), XML_endarrowlength, nValue );
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineJoinStyle, nValue ) )
+ {
+ const char *pJoinStyle = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineJoinBevel: pJoinStyle = "bevel"; break;
+ case ESCHER_LineJoinMiter: pJoinStyle = "miter"; break;
+ case ESCHER_LineJoinRound: pJoinStyle = "round"; break;
+ }
+ if ( pJoinStyle )
+ pAttrList->add( XML_joinstyle, pJoinStyle );
+ }
+
+ if ( rProps.GetOpt( ESCHER_Prop_lineEndCapStyle, nValue ) )
+ {
+ const char *pEndCap = nullptr;
+ switch ( nValue )
+ {
+ case ESCHER_LineEndCapRound: pEndCap = "round"; break;
+ case ESCHER_LineEndCapSquare: pEndCap = "square"; break;
+ case ESCHER_LineEndCapFlat: pEndCap = "flat"; break;
+ }
+ if ( pEndCap )
+ pAttrList->add( XML_endcap, pEndCap );
+ }
+
+ m_pSerializer->singleElementNS( XML_v, XML_stroke, pAttrList );
+ }
+ bAlreadyWritten[ ESCHER_Prop_lineColor ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineWidth ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineDashing ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineStartArrowhead ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineEndArrowhead ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineStartArrowWidth ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineStartArrowLength ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineEndArrowWidth ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineEndArrowLength ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineJoinStyle ] = true;
+ bAlreadyWritten[ ESCHER_Prop_lineEndCapStyle ] = true;
+ break;
+
+ case ESCHER_Prop_fHidden:
+ if ( !opt.nPropValue )
+ m_ShapeStyle.append( ";visibility:hidden" );
+ break;
+ case ESCHER_Prop_shadowColor:
+ case ESCHER_Prop_fshadowObscured:
+ {
+ sal_uInt32 nValue = 0;
+ bool bShadow = false;
+ bool bObscured = false;
+ if ( rProps.GetOpt( ESCHER_Prop_fshadowObscured, nValue ) )
+ {
+ bShadow = (( nValue & 0x20002 ) == 0x20002 );
+ bObscured = (( nValue & 0x10001 ) == 0x10001 );
+ }
+ if ( bShadow )
+ {
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
+ impl_AddBool( pAttrList.get(), XML_on, bShadow );
+ impl_AddBool( pAttrList.get(), XML_obscured, bObscured );
+
+ if ( rProps.GetOpt( ESCHER_Prop_shadowColor, nValue ) )
+ impl_AddColor( pAttrList.get(), XML_color, nValue );
+
+ m_pSerializer->singleElementNS( XML_v, XML_shadow, pAttrList );
+ bAlreadyWritten[ ESCHER_Prop_fshadowObscured ] = true;
+ bAlreadyWritten[ ESCHER_Prop_shadowColor ] = true;
+ }
+ }
+ break;
+ case ESCHER_Prop_gtextUNICODE:
+ case ESCHER_Prop_gtextFont:
+ {
+ EscherPropSortStruct aUnicode;
+ if (rProps.GetOpt(ESCHER_Prop_gtextUNICODE, aUnicode))
+ {
+ SvMemoryStream aStream;
+
+ if(!opt.nProp.empty())
+ {
+ aStream.WriteBytes(opt.nProp.data(), opt.nProp.size());
+ }
+
+ aStream.Seek(0);
+ OUString aTextPathString = SvxMSDffManager::MSDFFReadZString(aStream, opt.nProp.size(), true);
+ aStream.Seek(0);
+
+ m_pSerializer->singleElementNS(XML_v, XML_path, XML_textpathok, "t");
+
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
+ pAttrList->add(XML_on, "t");
+ pAttrList->add(XML_fitshape, "t");
+ pAttrList->add(XML_string, aTextPathString);
+ EscherPropSortStruct aFont;
+ OUString aStyle;
+ if (rProps.GetOpt(ESCHER_Prop_gtextFont, aFont))
+ {
+ aStream.WriteBytes(aFont.nProp.data(), aFont.nProp.size());
+ aStream.Seek(0);
+ OUString aTextPathFont = SvxMSDffManager::MSDFFReadZString(aStream, aFont.nProp.size(), true);
+ aStyle += "font-family:\"" + aTextPathFont + "\"";
+ }
+ sal_uInt32 nSize;
+ if (rProps.GetOpt(ESCHER_Prop_gtextSize, nSize))
+ {
+ float nSizeF = static_cast<sal_Int32>(nSize) / 65536.0;
+ OUString aSize = OUString::number(nSizeF);
+ aStyle += ";font-size:" + aSize + "pt";
+ }
+ if (IsWaterMarkShape(m_pSdrObject->GetName()))
+ pAttrList->add(XML_trim, "t");
+
+ if (!aStyle.isEmpty())
+ pAttrList->add(XML_style, aStyle);
+ m_pSerializer->singleElementNS(XML_v, XML_textpath, pAttrList);
+ }
+
+ bAlreadyWritten[ESCHER_Prop_gtextUNICODE] = true;
+ bAlreadyWritten[ESCHER_Prop_gtextFont] = true;
+ }
+ break;
+ case ESCHER_Prop_Rotation:
+ {
+ // The higher half of the variable contains the angle.
+ m_ShapeStyle.append(";rotation:" + OString::number(double(opt.nPropValue >> 16)));
+ bAlreadyWritten[ESCHER_Prop_Rotation] = true;
+ }
+ break;
+ case ESCHER_Prop_fNoLineDrawDash:
+ {
+ // See DffPropertyReader::ApplyLineAttributes().
+ impl_AddBool( m_pShapeAttrList.get(), XML_stroked, (opt.nPropValue & 8) != 0 );
+ bAlreadyWritten[ESCHER_Prop_fNoLineDrawDash] = true;
+ }
+ break;
+ case ESCHER_Prop_wzName:
+ {
+ SvMemoryStream aStream;
+
+ if(!opt.nProp.empty())
+ {
+ aStream.WriteBytes(opt.nProp.data(), opt.nProp.size());
+ }
+
+ aStream.Seek(0);
+ OUString idStr = SvxMSDffManager::MSDFFReadZString(aStream, opt.nProp.size(), true);
+ aStream.Seek(0);
+ if (!IsWaterMarkShape(m_pSdrObject->GetName()) && !m_bSkipwzName)
+ m_pShapeAttrList->add(XML_ID, idStr);
+
+ bAlreadyWritten[ESCHER_Prop_wzName] = true;
+ }
+ break;
+ default:
+#if OSL_DEBUG_LEVEL > 0
+ const size_t opt_nProp_size(opt.nProp.size());
+ const sal_uInt8 opt_nProp_empty(0);
+ fprintf( stderr, "TODO VMLExport::Commit(), unimplemented id: %d, value: %" SAL_PRIuUINT32 ", data: [%zu, %p]\n",
+ nId,
+ opt.nPropValue,
+ opt_nProp_size,
+ 0 == opt_nProp_size ? &opt_nProp_empty : opt.nProp.data());
+ if ( opt.nProp.size() )
+ {
+ const sal_uInt8 *pIt = opt.nProp.data();
+ fprintf( stderr, " ( " );
+ for ( int nCount = opt.nProp.size(); nCount; --nCount )
+ {
+ fprintf( stderr, "%02x ", *pIt );
+ ++pIt;
+ }
+ fprintf( stderr, ")\n" );
+ }
+#endif
+ break;
+ }
+ }
+
+ m_pSerializer->mergeTopMarks(Tag_Commit, sax_fastparser::MergeMarks::POSTPONE );
+}
+
+OString VMLExport::ShapeIdString( sal_uInt32 nId )
+{
+ if(m_bOverrideShapeIdGeneration)
+ return m_sShapeIDPrefix + OString::number( nId );
+ else
+ return "shape_" + OString::number( nId );
+}
+
+void VMLExport::AddFlipXY( )
+{
+ if (m_nShapeFlags & (ShapeFlag::FlipH | ShapeFlag::FlipV))
+ {
+ m_ShapeStyle.append( ";flip:" );
+
+ if (m_nShapeFlags & ShapeFlag::FlipH)
+ m_ShapeStyle.append( "x" );
+
+ if (m_nShapeFlags & ShapeFlag::FlipV)
+ m_ShapeStyle.append( "y" );
+ }
+}
+
+void VMLExport::AddLineDimensions( const tools::Rectangle& rRectangle )
+{
+ // style
+ if (!m_ShapeStyle.isEmpty())
+ m_ShapeStyle.append( ";" );
+
+ m_ShapeStyle.append( "position:absolute" );
+
+ AddFlipXY();
+
+ // the actual dimensions
+ OString aLeft, aTop, aRight, aBottom;
+
+ if ( mnGroupLevel == 1 )
+ {
+ const OString aPt( "pt" );
+ aLeft = OString::number( double( rRectangle.Left() ) / 20 ) + aPt;
+ aTop = OString::number( double( rRectangle.Top() ) / 20 ) + aPt;
+ aRight = OString::number( double( rRectangle.Right() ) / 20 ) + aPt;
+ aBottom = OString::number( double( rRectangle.Bottom() ) / 20 ) + aPt;
+ }
+ else
+ {
+ aLeft = OString::number( rRectangle.Left() );
+ aTop = OString::number( rRectangle.Top() );
+ aRight = OString::number( rRectangle.Right() );
+ aBottom = OString::number( rRectangle.Bottom() );
+ }
+
+ m_pShapeAttrList->add( XML_from, aLeft + "," + aTop );
+
+ m_pShapeAttrList->add( XML_to, aRight + "," + aBottom );
+}
+
+void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const tools::Rectangle& rRectangle, bool rbAbsolutePos)
+{
+ if ( !rBuffer.isEmpty() )
+ rBuffer.append( ";" );
+
+ if (rbAbsolutePos && !m_bInline)
+ {
+ rBuffer.append( "position:absolute;" );
+ }
+
+ if(m_bInline)
+ {
+ rBuffer.append( "width:" + OString::number( double( rRectangle.Right() - rRectangle.Left() ) / 20 ) +
+ "pt;height:" + OString::number( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 ) +
+ "pt" );
+ }
+ else if ( mnGroupLevel == 1 )
+ {
+ rBuffer.append( "margin-left:" + OString::number( double( rRectangle.Left() ) / 20 ) +
+ "pt;margin-top:" + OString::number( double( rRectangle.Top() ) / 20 ) +
+ "pt;width:" + OString::number( double( rRectangle.Right() - rRectangle.Left() ) / 20 ) +
+ "pt;height:" + OString::number( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 ) +
+ "pt" );
+ }
+ else
+ {
+ rBuffer.append( "left:" + OString::number( rRectangle.Left() ) +
+ ";top:" + OString::number( rRectangle.Top() ) +
+ ";width:" + OString::number( rRectangle.Right() - rRectangle.Left() ) +
+ ";height:" + OString::number( rRectangle.Bottom() - rRectangle.Top() ) );
+ }
+
+ AddFlipXY();
+}
+
+void VMLExport::AddShapeAttribute( sal_Int32 nAttribute, const OString& rValue )
+{
+ m_pShapeAttrList->add( nAttribute, rValue );
+}
+
+static std::vector<OString> lcl_getShapeTypes()
+{
+ std::vector<OString> aRet;
+
+ OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/vml-shape-types");
+ rtl::Bootstrap::expandMacros(aPath);
+ SvFileStream aStream(aPath, StreamMode::READ);
+ if (aStream.GetError() != ERRCODE_NONE)
+ SAL_WARN("oox", "failed to open vml-shape-types");
+ OStringBuffer aLine;
+ bool bNotDone = aStream.ReadLine(aLine);
+ while (bNotDone)
+ {
+ // Filter out comments.
+ if (!o3tl::starts_with(aLine, "/"))
+ aRet.push_back(OString(aLine));
+ bNotDone = aStream.ReadLine(aLine);
+ }
+ return aRet;
+}
+
+static bool lcl_isTextBox(const SdrObject* pSdrObject)
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY);
+ if (!xPropertySet.is())
+ return false;
+ uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ if (!xPropertySetInfo->hasPropertyByName("TextBox"))
+ return false;
+ css::uno::Any aTextBox(xPropertySet->getPropertyValue("TextBox"));
+ if (!aTextBox.hasValue())
+ return false;
+ return aTextBox.get<bool>();
+}
+
+static OUString lcl_getAnchorIdFromGrabBag(const SdrObject* pSdrObject)
+{
+ OUString aResult;
+
+ uno::Reference<beans::XPropertySet> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY);
+ if (xShape->getPropertySetInfo()->hasPropertyByName("InteropGrabBag"))
+ {
+ comphelper::SequenceAsHashMap aInteropGrabBag(xShape->getPropertyValue("InteropGrabBag"));
+ if (aInteropGrabBag.find("AnchorId") != aInteropGrabBag.end())
+ aInteropGrabBag["AnchorId"] >>= aResult;
+ }
+
+ return aResult;
+}
+
+sal_uInt32 VMLExport::GenerateShapeId()
+{
+ if(!m_bOverrideShapeIdGeneration)
+ return EscherEx::GenerateShapeId();
+ else
+ return m_nShapeIDCounter++;
+}
+
+OString VMLExport::GetVMLShapeTypeDefinition(
+ std::string_view sShapeID, const bool bIsPictureFrame )
+{
+ OString sShapeType;
+ if ( !bIsPictureFrame )
+ // We don't have a shape definition for host control in presetShapeDefinitions.xml
+ // So use a definition copied from DOCX file created with MSO
+ sShapeType = OString::Concat("<v:shapetype id=\"_x0000_t") + sShapeID +
+ "\" coordsize=\"21600,21600\" o:spt=\"" + sShapeID +
+ "\" path=\"m,l,21600l21600,21600l21600,xe\">\n"
+ "<v:stroke joinstyle=\"miter\"/>\n"
+ "<v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/>\n"
+ "<o:lock v:ext=\"edit\" shapetype=\"t\"/>\n"
+ "</v:shapetype>";
+ else
+ // We don't have a shape definition for picture frame in presetShapeDefinitions.xml
+ // So use a definition copied from DOCX file created with MSO
+ sShapeType = OString::Concat("<v:shapetype id=\"_x0000_t") + sShapeID +
+ "\" coordsize=\"21600,21600\" o:spt=\"" + sShapeID +
+ "\" o:preferrelative=\"t\" path=\"m@4@5l@4@11@9@11@9@5xe\" filled=\"f\" stroked=\"f\">\n"
+ "<v:stroke joinstyle=\"miter\"/>\n"
+ "<v:formulas>\n"
+ "<v:f eqn=\"if lineDrawn pixelLineWidth 0\"/>\n"
+ "<v:f eqn=\"sum @0 1 0\"/>\n"
+ "<v:f eqn=\"sum 0 0 @1\"/>\n"
+ "<v:f eqn=\"prod @2 1 2\"/>\n"
+ "<v:f eqn=\"prod @3 21600 pixelWidth\"/>\n"
+ "<v:f eqn=\"prod @3 21600 pixelHeight\"/>\n"
+ "<v:f eqn=\"sum @0 0 1\"/>\n"
+ "<v:f eqn=\"prod @6 1 2\"/>\n"
+ "<v:f eqn=\"prod @7 21600 pixelWidth\"/>\n"
+ "<v:f eqn=\"sum @8 21600 0\"/>\n"
+ "<v:f eqn=\"prod @7 21600 pixelHeight\"/>\n"
+ "<v:f eqn=\"sum @10 21600 0\"/>\n"
+ "</v:formulas>\n"
+ "<v:path o:extrusionok=\"f\" gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n"
+ "<o:lock v:ext=\"edit\" aspectratio=\"t\"/>\n"
+ "</v:shapetype>";
+ return sShapeType;
+}
+
+sal_Int32 VMLExport::StartShape()
+{
+ if ( m_nShapeType == ESCHER_ShpInst_Nil )
+ return -1;
+
+ // some of the shapes have their own name ;-)
+ sal_Int32 nShapeElement = -1;
+ bool bReferToShapeType = false;
+ switch ( m_nShapeType )
+ {
+ case ESCHER_ShpInst_NotPrimitive: nShapeElement = XML_shape; break;
+ case ESCHER_ShpInst_Rectangle: nShapeElement = XML_rect; break;
+ case ESCHER_ShpInst_RoundRectangle: nShapeElement = XML_roundrect; break;
+ case ESCHER_ShpInst_Ellipse: nShapeElement = XML_oval; break;
+ case ESCHER_ShpInst_Arc: nShapeElement = XML_arc; break;
+ case ESCHER_ShpInst_Line: nShapeElement = XML_line; break;
+ case ESCHER_ShpInst_HostControl:
+ {
+ bReferToShapeType = true;
+ nShapeElement = XML_shape;
+ if ( !m_aShapeTypeWritten[ m_nShapeType ] )
+ {
+ m_pSerializer->write(GetVMLShapeTypeDefinition(OString::number(m_nShapeType), false));
+ m_aShapeTypeWritten[ m_nShapeType ] = true;
+ }
+ break;
+ }
+ case ESCHER_ShpInst_PictureFrame:
+ {
+ bReferToShapeType = true;
+ nShapeElement = XML_shape;
+ if ( !m_aShapeTypeWritten[ m_nShapeType ] )
+ {
+ m_pSerializer->write(GetVMLShapeTypeDefinition(OString::number(m_nShapeType), true));
+ m_aShapeTypeWritten[ m_nShapeType ] = true;
+ }
+ break;
+ }
+ default:
+ if ( m_nShapeType < ESCHER_ShpInst_COUNT )
+ {
+ nShapeElement = XML_shape;
+
+ // a predefined shape?
+ static std::vector<OString> aShapeTypes = lcl_getShapeTypes();
+ SAL_WARN_IF(m_nShapeType >= aShapeTypes.size(), "oox.vml", "Unknown shape type!");
+ if (m_nShapeType < aShapeTypes.size() && aShapeTypes[m_nShapeType] != "NULL")
+ {
+ bReferToShapeType = true;
+ if ( !m_aShapeTypeWritten[ m_nShapeType ] )
+ {
+ m_pSerializer->write(aShapeTypes[m_nShapeType]);
+ m_aShapeTypeWritten[ m_nShapeType ] = true;
+ }
+ }
+ else
+ {
+ // rectangle is probably the best fallback...
+ nShapeElement = XML_rect;
+ }
+ }
+ break;
+ }
+
+ // anchoring
+ switch (m_eHOri)
+ {
+ case text::HoriOrientation::LEFT:
+ m_ShapeStyle.append(";mso-position-horizontal:left");
+ break;
+ case text::HoriOrientation::CENTER:
+ m_ShapeStyle.append(";mso-position-horizontal:center");
+ break;
+ case text::HoriOrientation::RIGHT:
+ m_ShapeStyle.append(";mso-position-horizontal:right");
+ break;
+ case text::HoriOrientation::INSIDE:
+ m_ShapeStyle.append(";mso-position-horizontal:inside");
+ break;
+ case text::HoriOrientation::OUTSIDE:
+ m_ShapeStyle.append(";mso-position-horizontal:outside");
+ break;
+ default:
+ case text::HoriOrientation::NONE:
+ break;
+ }
+ switch (m_eHRel)
+ {
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ m_ShapeStyle.append(";mso-position-horizontal-relative:margin");
+ break;
+ case text::RelOrientation::PAGE_FRAME:
+ case text::RelOrientation::PAGE_LEFT:
+ case text::RelOrientation::PAGE_RIGHT:
+ m_ShapeStyle.append(";mso-position-horizontal-relative:page");
+ break;
+ case text::RelOrientation::CHAR:
+ m_ShapeStyle.append(";mso-position-horizontal-relative:char");
+ break;
+ default:
+ break;
+ }
+
+ switch (m_eVOri)
+ {
+ case text::VertOrientation::TOP:
+ case text::VertOrientation::LINE_TOP:
+ case text::VertOrientation::CHAR_TOP:
+ m_ShapeStyle.append(";mso-position-vertical:top");
+ break;
+ case text::VertOrientation::CENTER:
+ case text::VertOrientation::LINE_CENTER:
+ m_ShapeStyle.append(";mso-position-vertical:center");
+ break;
+ case text::VertOrientation::BOTTOM:
+ case text::VertOrientation::LINE_BOTTOM:
+ case text::VertOrientation::CHAR_BOTTOM:
+ m_ShapeStyle.append(";mso-position-vertical:bottom");
+ break;
+ default:
+ case text::VertOrientation::NONE:
+ break;
+ }
+ switch (m_eVRel)
+ {
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ m_ShapeStyle.append(";mso-position-vertical-relative:margin");
+ break;
+ case text::RelOrientation::PAGE_FRAME:
+ m_ShapeStyle.append(";mso-position-vertical-relative:page");
+ break;
+ default:
+ break;
+ }
+
+ if (!m_pSdrObject->getHyperlink().isEmpty())
+ m_pShapeAttrList->add(
+ XML_href, m_pSdrObject->getHyperlink());
+
+ m_pShapeAttrList->addNS(XML_o, XML_allowincell, m_IsFollowingTextFlow ? "t" : "f");
+
+ // add style
+ m_pShapeAttrList->add( XML_style, m_ShapeStyle.makeStringAndClear() );
+
+ OUString sAnchorId = lcl_getAnchorIdFromGrabBag(m_pSdrObject);
+ if (!sAnchorId.isEmpty())
+ m_pShapeAttrList->addNS(XML_wp14, XML_anchorId, sAnchorId);
+
+ if ( nShapeElement >= 0 && !m_pShapeAttrList->hasAttribute( XML_type ) && bReferToShapeType )
+ {
+ OString sType;
+ if (m_bUseHashMarkForType)
+ sType = "#";
+ m_pShapeAttrList->add( XML_type, sType +
+ "_x0000_t" + OString::number( m_nShapeType ) );
+ }
+
+ // start of the shape
+ m_pSerializer->startElementNS( XML_v, nShapeElement, m_pShapeAttrList );
+
+ OString const textboxStyle(m_TextboxStyle.makeStringAndClear());
+
+ // now check if we have some editeng text (not associated textbox) and we have a text exporter registered
+ const SdrTextObj* pTxtObj = dynamic_cast<const SdrTextObj*>( m_pSdrObject );
+ if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject))
+ {
+ std::optional<OutlinerParaObject> pParaObj;
+
+ /*
+ #i13885#
+ When the object is actively being edited, that text is not set into
+ the objects normal text object, but lives in a separate object.
+ */
+ if (pTxtObj->IsTextEditActive())
+ {
+ pParaObj = pTxtObj->CreateEditOutlinerParaObject();
+ }
+ else if (pTxtObj->GetOutlinerParaObject())
+ {
+ pParaObj = *pTxtObj->GetOutlinerParaObject();
+ }
+
+ if( pParaObj )
+ {
+ rtl::Reference<sax_fastparser::FastAttributeList> pTextboxAttrList = FastSerializerHelper::createAttrList();
+ if (!textboxStyle.isEmpty())
+ {
+ pTextboxAttrList->add(XML_style, textboxStyle);
+ }
+
+ // this is reached only in case some text is attached to the shape
+ m_pSerializer->startElementNS(XML_v, XML_textbox, pTextboxAttrList);
+ m_pTextExport->WriteOutliner(*pParaObj);
+ m_pSerializer->endElementNS(XML_v, XML_textbox);
+ }
+ }
+
+ return nShapeElement;
+}
+
+void VMLExport::EndShape( sal_Int32 nShapeElement )
+{
+ if ( nShapeElement < 0 )
+ return;
+
+ if (m_pTextExport && lcl_isTextBox(m_pSdrObject))
+ {
+ uno::Reference<drawing::XShape> xShape {const_cast<SdrObject*>(m_pSdrObject)->getUnoShape(), uno::UNO_QUERY};
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ bool bBottomToTop = false;
+ if (xPropertySetInfo->hasPropertyByName("CustomShapeGeometry"))
+ {
+ // In this case a DrawingML DOCX was imported.
+ comphelper::SequenceAsHashMap aCustomShapeProperties(
+ xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ if (aCustomShapeProperties.find("TextPreRotateAngle") != aCustomShapeProperties.end())
+ {
+ sal_Int32 nTextRotateAngle = aCustomShapeProperties["TextPreRotateAngle"].get<sal_Int32>();
+ if (nTextRotateAngle == -270)
+ bBottomToTop = true;
+ }
+ }
+ else
+ {
+ // In this case a pure VML DOCX was imported, so there is no CustomShapeGeometry.
+ auto pTextExport = m_pTextExport->GetDrawingML().GetTextExport();
+ // FIXME: somewhy pTextExport is always nullptr, we should find its reason
+ if (pTextExport)
+ {
+ auto xTextFrame = pTextExport->GetUnoTextFrame(xShape);
+ uno::Reference<beans::XPropertySet> xPropSet(xTextFrame, uno::UNO_QUERY);
+ auto aAny = xPropSet->getPropertyValue("WritingMode");
+ sal_Int16 nWritingMode;
+ if (aAny >>= nWritingMode)
+ {
+ switch (nWritingMode)
+ {
+ case text::WritingMode2::BT_LR:
+ bBottomToTop = true;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ rtl::Reference<sax_fastparser::FastAttributeList> pTextboxAttrList = FastSerializerHelper::createAttrList();
+ if (bBottomToTop)
+ pTextboxAttrList->add(XML_style, "mso-layout-flow-alt:bottom-to-top");
+ m_pSerializer->startElementNS(XML_v, XML_textbox, pTextboxAttrList);
+
+ m_pTextExport->WriteVMLTextBox(uno::Reference<drawing::XShape>(xPropertySet, uno::UNO_QUERY_THROW));
+
+ m_pSerializer->endElementNS(XML_v, XML_textbox);
+ }
+
+ if (m_pWrapAttrList)
+ {
+ m_pSerializer->singleElementNS(XML_w10, XML_wrap, m_pWrapAttrList);
+ }
+
+ // end of the shape
+ m_pSerializer->endElementNS( XML_v, nShapeElement );
+}
+
+OString const & VMLExport::AddSdrObject( const SdrObject& rObj,
+ bool const bIsFollowingTextFlow,
+ sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel,
+ FastAttributeList* pWrapAttrList,
+ const bool bOOxmlExport )
+{
+ m_pSdrObject = &rObj;
+ m_eHOri = eHOri;
+ m_eVOri = eVOri;
+ m_eHRel = eHRel;
+ m_eVRel = eVRel;
+ m_pWrapAttrList = pWrapAttrList;
+ m_bInline = false;
+ m_IsFollowingTextFlow = bIsFollowingTextFlow;
+ EscherEx::AddSdrObject(rObj, bOOxmlExport);
+ return m_sShapeId;
+}
+
+OString const & VMLExport::AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport )
+{
+ m_pSdrObject = &rObj;
+ m_eHOri = -1;
+ m_eVOri = -1;
+ m_eHRel = -1;
+ m_eVRel = -1;
+ m_pWrapAttrList.clear();
+ m_bInline = true;
+ m_IsFollowingTextFlow = true;
+ EscherEx::AddSdrObject(rObj, bOOxmlExport);
+ return m_sShapeId;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx
new file mode 100644
index 000000000..c247fdb43
--- /dev/null
+++ b/oox/source/helper/attributelist.cxx
@@ -0,0 +1,361 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/attributelist.hxx>
+
+#include <osl/diagnose.h>
+#include <rtl/ustrbuf.hxx>
+#include <sax/fastattribs.hxx>
+#include <oox/token/tokenmap.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace {
+
+const sal_Int32 XSTRING_ENCCHAR_LEN = 7;
+
+bool lclAddHexDigit( sal_Unicode& orcChar, sal_Unicode cDigit, int nBitShift )
+{
+ if( ('0' <= cDigit) && (cDigit <= '9') ) { orcChar |= ((cDigit - '0') << nBitShift); return true; }
+ if( ('a' <= cDigit) && (cDigit <= 'f') ) { orcChar |= ((cDigit - 'a' + 10) << nBitShift); return true; }
+ if( ('A' <= cDigit) && (cDigit <= 'F') ) { orcChar |= ((cDigit - 'A' + 10) << nBitShift); return true; }
+ return false;
+}
+
+sal_Unicode lclGetXChar( const sal_Unicode*& rpcStr, const sal_Unicode* pcEnd )
+{
+ sal_Unicode cChar = 0;
+ if( (pcEnd - rpcStr >= XSTRING_ENCCHAR_LEN) &&
+ (rpcStr[ 0 ] == '_') &&
+ (rpcStr[ 1 ] == 'x') &&
+ (rpcStr[ 6 ] == '_') &&
+ lclAddHexDigit( cChar, rpcStr[ 2 ], 12 ) &&
+ lclAddHexDigit( cChar, rpcStr[ 3 ], 8 ) &&
+ lclAddHexDigit( cChar, rpcStr[ 4 ], 4 ) &&
+ lclAddHexDigit( cChar, rpcStr[ 5 ], 0 ) )
+ {
+ rpcStr += XSTRING_ENCCHAR_LEN;
+ return cChar;
+ }
+ return *rpcStr++;
+}
+
+} // namespace
+
+#define STRING_TO_TOKEN(color) if (sColorName == u"" #color) return XML_##color
+sal_Int32 getHighlightColorTokenFromString(std::u16string_view sColorName)
+{
+ STRING_TO_TOKEN(black);
+ STRING_TO_TOKEN(blue);
+ STRING_TO_TOKEN(cyan);
+ STRING_TO_TOKEN(darkBlue);
+ STRING_TO_TOKEN(darkCyan);
+ STRING_TO_TOKEN(darkGreen);
+ STRING_TO_TOKEN(darkMagenta);
+ STRING_TO_TOKEN(darkRed);
+ STRING_TO_TOKEN(darkYellow);
+ STRING_TO_TOKEN(darkGray);
+ STRING_TO_TOKEN(green);
+ STRING_TO_TOKEN(lightGray);
+ STRING_TO_TOKEN(magenta);
+ STRING_TO_TOKEN(red);
+ STRING_TO_TOKEN(white);
+ STRING_TO_TOKEN(yellow);
+ STRING_TO_TOKEN(none);
+
+ return XML_TOKEN_INVALID;
+}
+
+sal_Int32 AttributeConversion::decodeToken( std::u16string_view rValue )
+{
+ return TokenMap::getTokenFromUnicode( rValue );
+}
+
+OUString AttributeConversion::decodeXString( const OUString& rValue )
+{
+ // string shorter than one encoded character - no need to decode
+ if( rValue.getLength() < XSTRING_ENCCHAR_LEN )
+ return rValue;
+ OUStringBuffer aBuffer;
+ const sal_Unicode* pcStr = rValue.getStr();
+ const sal_Unicode* pcEnd = pcStr + rValue.getLength();
+ while( pcStr < pcEnd )
+ aBuffer.append( lclGetXChar( pcStr, pcEnd ) );
+ return aBuffer.makeStringAndClear();
+}
+
+sal_Int32 AttributeConversion::decodeInteger( std::u16string_view rValue )
+{
+ return o3tl::toInt32(rValue);
+}
+
+sal_uInt32 AttributeConversion::decodeUnsigned( std::u16string_view rValue )
+{
+ return getLimitedValue< sal_uInt32, sal_Int64 >( o3tl::toInt64(rValue), 0, SAL_MAX_UINT32 );
+}
+
+sal_Int64 AttributeConversion::decodeHyper( std::u16string_view rValue )
+{
+ return o3tl::toInt64(rValue);
+}
+
+sal_Int32 AttributeConversion::decodeIntegerHex( std::u16string_view rValue )
+{
+ // It looks like all Office Open XML attributes containing hexadecimal
+ // values are based on xsd:hexBinary and so use an unsigned representation:
+ return static_cast< sal_Int32 >(o3tl::toUInt32(rValue, 16));
+ //TODO: Change this function to return sal_uInt32 and get rid of the
+ // cast, but that will have a ripple effect
+}
+
+AttributeList::AttributeList( const Reference< XFastAttributeList >& rxAttribs ) :
+ mxAttribs( rxAttribs ),
+ mpAttribList( nullptr )
+{
+ OSL_ENSURE( mxAttribs.is(), "AttributeList::AttributeList - missing attribute list interface" );
+}
+
+sax_fastparser::FastAttributeList *AttributeList::getAttribList() const
+{
+ if( mpAttribList == nullptr )
+ {
+ mpAttribList = &sax_fastparser::castToFastAttributeList( mxAttribs );
+ }
+ return mpAttribList;
+}
+
+bool AttributeList::hasAttribute( sal_Int32 nAttrToken ) const
+{
+ return mxAttribs->hasAttribute( nAttrToken );
+}
+
+oox::drawingml::Color AttributeList::getHighlightColor(sal_Int32 nAttrToken) const
+{
+ OUString sColorVal = mxAttribs->getValue(nAttrToken);
+ oox::drawingml::Color aColor;
+ aColor.setHighlight(getHighlightColorTokenFromString(sColorVal));
+ return aColor;
+}
+
+// optional return values -----------------------------------------------------
+
+OptValue< sal_Int32 > AttributeList::getToken( sal_Int32 nAttrToken ) const
+{
+ sal_Int32 nToken = mxAttribs->getOptionalValueToken( nAttrToken, XML_TOKEN_INVALID );
+ return OptValue< sal_Int32 >( nToken != XML_TOKEN_INVALID, nToken );
+}
+
+OptValue< OUString > AttributeList::getString( sal_Int32 nAttrToken ) const
+{
+ // check if the attribute exists (empty string may be different to missing attribute)
+ if( mxAttribs->hasAttribute( nAttrToken ) )
+ return OptValue< OUString >( mxAttribs->getOptionalValue( nAttrToken ) );
+ return OptValue< OUString >();
+}
+
+OptValue< OUString > AttributeList::getXString( sal_Int32 nAttrToken ) const
+{
+ // check if the attribute exists (empty string may be different to missing attribute)
+ if( mxAttribs->hasAttribute( nAttrToken ) )
+ return OptValue< OUString >( AttributeConversion::decodeXString( mxAttribs->getOptionalValue( nAttrToken ) ) );
+ return OptValue< OUString >();
+}
+
+OptValue< double > AttributeList::getDouble( sal_Int32 nAttrToken ) const
+{
+ double nValue;
+ bool bValid = getAttribList()->getAsDouble( nAttrToken, nValue );
+ return OptValue< double >( bValid, nValue );
+}
+
+OptValue< sal_Int32 > AttributeList::getInteger( sal_Int32 nAttrToken ) const
+{
+ sal_Int32 nValue;
+ bool bValid = getAttribList()->getAsInteger( nAttrToken, nValue );
+ return OptValue< sal_Int32 >( bValid, nValue );
+}
+
+OptValue< sal_uInt32 > AttributeList::getUnsigned( sal_Int32 nAttrToken ) const
+{
+ OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
+ bool bValid = !aValue.isEmpty();
+ return OptValue< sal_uInt32 >( bValid, AttributeConversion::decodeUnsigned( aValue ) );
+}
+
+OptValue< sal_Int64 > AttributeList::getHyper( sal_Int32 nAttrToken ) const
+{
+ OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
+ bool bValid = !aValue.isEmpty();
+ return OptValue< sal_Int64 >( bValid, bValid ? AttributeConversion::decodeHyper( aValue ) : 0 );
+}
+
+OptValue< sal_Int32 > AttributeList::getIntegerHex( sal_Int32 nAttrToken ) const
+{
+ OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
+ bool bValid = !aValue.isEmpty();
+ return OptValue< sal_Int32 >( bValid, bValid ? AttributeConversion::decodeIntegerHex( aValue ) : 0 );
+}
+
+OptValue< bool > AttributeList::getBool( sal_Int32 nAttrToken ) const
+{
+ const char *pAttr;
+
+ // catch the common cases as quickly as possible first
+ bool bHasAttr = getAttribList()->getAsChar( nAttrToken, pAttr );
+ if( !bHasAttr )
+ return OptValue< bool >();
+ if( !strcmp( pAttr, "false" ) )
+ return OptValue< bool >( false );
+ if( !strcmp( pAttr, "true" ) )
+ return OptValue< bool >( true );
+
+ // now for all the crazy stuff
+
+ // boolean attributes may be "t", "f", "true", "false", "on", "off", "1", or "0"
+ switch( getToken( nAttrToken, XML_TOKEN_INVALID ) )
+ {
+ case XML_t: return OptValue< bool >( true ); // used in VML
+ case XML_true: return OptValue< bool >( true );
+ case XML_on: return OptValue< bool >( true );
+ case XML_f: return OptValue< bool >( false ); // used in VML
+ case XML_false: return OptValue< bool >( false );
+ case XML_off: return OptValue< bool >( false );
+ }
+ OptValue< sal_Int32 > onValue = getInteger( nAttrToken );
+ return OptValue< bool >( onValue.has(), onValue.get() != 0 );
+}
+
+OptValue< util::DateTime > AttributeList::getDateTime( sal_Int32 nAttrToken ) const
+{
+ OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
+ util::DateTime aDateTime;
+ bool bValid = (aValue.getLength() == 19 || (aValue.getLength() == 20 && aValue[19] == 'Z')) &&
+ (aValue[ 4 ] == '-') && (aValue[ 7 ] == '-') && (aValue[ 10 ] == 'T') &&
+ (aValue[ 13 ] == ':') && (aValue[ 16 ] == ':');
+ if( bValid )
+ {
+ aDateTime.Year = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 0, 4 )) );
+ aDateTime.Month = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 5, 2 )) );
+ aDateTime.Day = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 8, 2 )) );
+ aDateTime.Hours = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 11, 2 )) );
+ aDateTime.Minutes = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 14, 2 )) );
+ aDateTime.Seconds = static_cast< sal_uInt16 >( o3tl::toInt32(aValue.subView( 17, 2 )) );
+ }
+ return OptValue< util::DateTime >( bValid, aDateTime );
+}
+
+// defaulted return values ----------------------------------------------------
+
+sal_Int32 AttributeList::getToken( sal_Int32 nAttrToken, sal_Int32 nDefault ) const
+{
+ return mxAttribs->getOptionalValueToken( nAttrToken, nDefault );
+}
+
+OUString AttributeList::getString( sal_Int32 nAttrToken, const OUString& rDefault ) const
+{
+ // try to avoid slow exception throw/catch if we can
+ if (rDefault.isEmpty())
+ return mxAttribs->getOptionalValue( nAttrToken );
+
+ try
+ {
+ return mxAttribs->getValue( nAttrToken );
+ }
+ catch( Exception& )
+ {
+ }
+ return rDefault;
+}
+
+OUString AttributeList::getXString( sal_Int32 nAttrToken, const OUString& rDefault ) const
+{
+ return getXString( nAttrToken ).get( rDefault );
+}
+
+const char* AttributeList::getChar( sal_Int32 nAttrToken ) const
+{
+ const char* p = nullptr;
+ bool bValid = getAttribList()->getAsChar(nAttrToken, p);
+ if (!bValid)
+ p = nullptr;
+
+ return p;
+}
+
+double AttributeList::getDouble( sal_Int32 nAttrToken, double fDefault ) const
+{
+ return getDouble( nAttrToken ).get( fDefault );
+}
+
+sal_Int32 AttributeList::getInteger( sal_Int32 nAttrToken, sal_Int32 nDefault ) const
+{
+ return getInteger( nAttrToken ).get( nDefault );
+}
+
+sal_uInt32 AttributeList::getUnsigned( sal_Int32 nAttrToken, sal_uInt32 nDefault ) const
+{
+ return getUnsigned( nAttrToken ).get( nDefault );
+}
+
+sal_Int64 AttributeList::getHyper( sal_Int32 nAttrToken, sal_Int64 nDefault ) const
+{
+ return getHyper( nAttrToken ).get( nDefault );
+}
+
+sal_Int32 AttributeList::getIntegerHex( sal_Int32 nAttrToken, sal_Int32 nDefault ) const
+{
+ return getIntegerHex( nAttrToken ).get( nDefault );
+}
+
+sal_uInt32 AttributeList::getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 nDefault ) const
+{
+ return getIntegerHex( nAttrToken ).get( nDefault );
+}
+
+bool AttributeList::getBool( sal_Int32 nAttrToken, bool bDefault ) const
+{
+ return getBool( nAttrToken ).get( bDefault );
+}
+
+util::DateTime AttributeList::getDateTime( sal_Int32 nAttrToken, const util::DateTime& rDefault ) const
+{
+ return getDateTime( nAttrToken ).get( rDefault );
+}
+
+std::vector<sal_Int32> AttributeList::getTokenList(sal_Int32 nAttrToken) const
+{
+ std::vector<sal_Int32> aValues;
+ OUString sValue = getString(nAttrToken, "");
+ sal_Int32 nIndex = 0;
+ do
+ {
+ aValues.push_back(AttributeConversion::decodeToken(o3tl::getToken(sValue, 0, ' ', nIndex)));
+ } while (nIndex >= 0);
+
+ return aValues;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
new file mode 100644
index 000000000..27cbc6ad6
--- /dev/null
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -0,0 +1,322 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/binaryinputstream.hxx>
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <string.h>
+#include <algorithm>
+#include <vector>
+#include <rtl/ustrbuf.hxx>
+#include <osl/diagnose.h>
+#include <oox/helper/binaryoutputstream.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const sal_Int32 INPUTSTREAM_BUFFERSIZE = 0x8000;
+
+} // namespace
+
+OUString BinaryInputStream::readNulUnicodeArray()
+{
+ OUStringBuffer aBuffer;
+ for (;;)
+ {
+ sal_uInt16 nChar = readuInt16();
+ if ( mbEof || (nChar == 0) ) break;
+ aBuffer.append( static_cast< sal_Unicode >( nChar ) );
+ }
+ return aBuffer.makeStringAndClear();
+}
+
+OString BinaryInputStream::readCharArray( sal_Int32 nChars )
+{
+ if( nChars <= 0 )
+ return OString();
+
+ ::std::vector< sal_uInt8 > aBuffer;
+ sal_Int32 nCharsRead = readArray( aBuffer, nChars );
+ if( nCharsRead <= 0 )
+ return OString();
+
+ aBuffer.resize( static_cast< size_t >( nCharsRead ) );
+ // NUL characters are replaced by question marks.
+ ::std::replace( aBuffer.begin(), aBuffer.end(), '\0', '?' );
+
+ return OString(reinterpret_cast<char*>(aBuffer.data()), nCharsRead);
+}
+
+OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc )
+{
+ return OStringToOUString( readCharArray( nChars ), eTextEnc );
+}
+
+OUString BinaryInputStream::readUnicodeArray( sal_Int32 nChars )
+{
+ if( nChars <= 0 )
+ return OUString();
+
+ ::std::vector< sal_uInt16 > aBuffer;
+ sal_Int32 nCharsRead = readArray( aBuffer, nChars );
+ if( nCharsRead <= 0 )
+ return OUString();
+
+ aBuffer.resize( static_cast< size_t >( nCharsRead ) );
+ // don't allow nul chars
+ ::std::replace( aBuffer.begin(), aBuffer.begin() + nCharsRead, '\0', '?' );
+
+ OUStringBuffer aStringBuffer;
+ aStringBuffer.ensureCapacity( nCharsRead );
+ for (auto const& elem : aBuffer)
+ aStringBuffer.append( static_cast< sal_Unicode >(elem) );
+ return aStringBuffer.makeStringAndClear();
+}
+
+OUString BinaryInputStream::readCompressedUnicodeArray( sal_Int32 nChars, bool bCompressed )
+{
+ return bCompressed ?
+ // ISO-8859-1 maps all byte values 0xHH to the same Unicode code point U+00HH
+ readCharArrayUC( nChars, RTL_TEXTENCODING_ISO_8859_1 ) :
+ readUnicodeArray( nChars );
+}
+
+void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm )
+{
+ sal_Int64 nBytes = SAL_MAX_INT64;
+ sal_Int32 nBufferSize = INPUTSTREAM_BUFFERSIZE;
+ StreamDataSequence aBuffer( nBufferSize );
+ while( nBytes > 0 )
+ {
+ sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, nBufferSize );
+ sal_Int32 nBytesRead = readData( aBuffer, nReadSize );
+ rOutStrm.writeData( aBuffer );
+ if( nReadSize == nBytesRead )
+ nBytes -= nReadSize;
+ else
+ nBytes = 0;
+ }
+}
+
+BinaryXInputStream::BinaryXInputStream( const Reference< XInputStream >& rxInStrm, bool bAutoClose ) :
+ BinaryStreamBase( Reference< XSeekable >( rxInStrm, UNO_QUERY ).is() ),
+ BinaryXSeekableStream( Reference< XSeekable >( rxInStrm, UNO_QUERY ) ),
+ maBuffer( INPUTSTREAM_BUFFERSIZE ),
+ mxInStrm( rxInStrm ),
+ mbAutoClose( bAutoClose && rxInStrm.is() )
+{
+ mbEof = !mxInStrm.is();
+}
+
+BinaryXInputStream::~BinaryXInputStream()
+{
+ close();
+}
+
+void BinaryXInputStream::close()
+{
+ OSL_ENSURE( !mbAutoClose || mxInStrm.is(), "BinaryXInputStream::close - invalid call" );
+ if( mxInStrm.is() ) try
+ {
+ mxInStrm->closeInput();
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "BinaryXInputStream::close - closing input stream failed" );
+ }
+ mxInStrm.clear();
+ mbAutoClose = false;
+ BinaryXSeekableStream::close();
+}
+
+sal_Int32 BinaryXInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ sal_Int32 nRet = 0;
+ if( !mbEof && (nBytes > 0) ) try
+ {
+ nRet = mxInStrm->readBytes( orData, nBytes );
+ mbEof = nRet != nBytes;
+ }
+ catch( Exception& )
+ {
+ mbEof = true;
+ }
+ return nRet;
+}
+
+sal_Int32 BinaryXInputStream::readMemory( void* opMem, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nRet = 0;
+ if( !mbEof && (nBytes > 0) )
+ {
+ sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int32 >( nBytes, 0, INPUTSTREAM_BUFFERSIZE );
+ sal_uInt8* opnMem = static_cast< sal_uInt8* >( opMem );
+ while( !mbEof && (nBytes > 0) )
+ {
+ sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int32 >( nBytes, 0, nBufferSize );
+ sal_Int32 nBytesRead = readData( maBuffer, nReadSize, nAtomSize );
+ if( nBytesRead > 0 )
+ memcpy( opnMem, maBuffer.getConstArray(), static_cast< size_t >( nBytesRead ) );
+ opnMem += nBytesRead;
+ nBytes -= nBytesRead;
+ nRet += nBytesRead;
+ }
+ }
+ return nRet;
+}
+
+void BinaryXInputStream::skip( sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ if( !mbEof ) try
+ {
+ mxInStrm->skipBytes( nBytes );
+ }
+ catch( Exception& )
+ {
+ mbEof = true;
+ }
+}
+
+SequenceInputStream::SequenceInputStream( const StreamDataSequence& rData ) :
+ BinaryStreamBase( true ),
+ SequenceSeekableStream( rData )
+{
+}
+
+sal_Int32 SequenceInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ sal_Int32 nReadBytes = 0;
+ if( !mbEof )
+ {
+ nReadBytes = getMaxBytes( nBytes );
+ orData.realloc( nReadBytes );
+ if( nReadBytes > 0 )
+ memcpy( orData.getArray(), mpData->getConstArray() + mnPos, static_cast< size_t >( nReadBytes ) );
+ mnPos += nReadBytes;
+ mbEof = nReadBytes < nBytes;
+ }
+ return nReadBytes;
+}
+
+sal_Int32 SequenceInputStream::readMemory( void* opMem, sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ sal_Int32 nReadBytes = 0;
+ if( !mbEof )
+ {
+ nReadBytes = getMaxBytes( nBytes );
+ if( nReadBytes > 0 )
+ memcpy( opMem, mpData->getConstArray() + mnPos, static_cast< size_t >( nReadBytes ) );
+ mnPos += nReadBytes;
+ mbEof = nReadBytes < nBytes;
+ }
+ return nReadBytes;
+}
+
+void SequenceInputStream::skip( sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ if( !mbEof )
+ {
+ sal_Int32 nSkipBytes = getMaxBytes( nBytes );
+ mnPos += nSkipBytes;
+ mbEof = nSkipBytes < nBytes;
+ }
+}
+
+RelativeInputStream::RelativeInputStream( BinaryInputStream& rInStrm, sal_Int64 nSize ) :
+ BinaryStreamBase( rInStrm.isSeekable() ),
+ mpInStrm( &rInStrm ),
+ mnStartPos( rInStrm.tell() ),
+ mnRelPos( 0 )
+{
+ sal_Int64 nRemaining = rInStrm.getRemaining();
+ mnSize = (nRemaining >= 0) ? ::std::min( nSize, nRemaining ) : nSize;
+ mbEof = mbEof || rInStrm.isEof() || (mnSize < 0);
+}
+
+sal_Int64 RelativeInputStream::size() const
+{
+ return mpInStrm ? mnSize : -1;
+}
+
+sal_Int64 RelativeInputStream::tell() const
+{
+ return mpInStrm ? mnRelPos : -1;
+}
+
+void RelativeInputStream::seek( sal_Int64 nPos )
+{
+ if( mpInStrm && isSeekable() && (mnStartPos >= 0) )
+ {
+ mnRelPos = getLimitedValue< sal_Int64, sal_Int64 >( nPos, 0, mnSize );
+ mpInStrm->seek( mnStartPos + mnRelPos );
+ mbEof = (mnRelPos != nPos) || mpInStrm->isEof();
+ }
+}
+
+void RelativeInputStream::close()
+{
+ mpInStrm = nullptr;
+ mbEof = true;
+}
+
+sal_Int32 RelativeInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nReadBytes = 0;
+ if( !mbEof )
+ {
+ sal_Int32 nMaxBytes = getMaxBytes( nBytes );
+ nReadBytes = mpInStrm->readData( orData, nMaxBytes, nAtomSize );
+ mnRelPos += nReadBytes;
+ mbEof = (nMaxBytes < nBytes) || mpInStrm->isEof();
+ }
+ return nReadBytes;
+}
+
+sal_Int32 RelativeInputStream::readMemory( void* opMem, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nReadBytes = 0;
+ if( !mbEof )
+ {
+ sal_Int32 nMaxBytes = getMaxBytes( nBytes );
+ nReadBytes = mpInStrm->readMemory( opMem, nMaxBytes, nAtomSize );
+ mnRelPos += nReadBytes;
+ mbEof = (nMaxBytes < nBytes) || mpInStrm->isEof();
+ }
+ return nReadBytes;
+}
+
+void RelativeInputStream::skip( sal_Int32 nBytes, size_t nAtomSize )
+{
+ if( !mbEof )
+ {
+ sal_Int32 nSkipBytes = getMaxBytes( nBytes );
+ mpInStrm->skip( nSkipBytes, nAtomSize );
+ mnRelPos += nSkipBytes;
+ mbEof = nSkipBytes < nBytes;
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
new file mode 100644
index 000000000..50ce7f11c
--- /dev/null
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -0,0 +1,184 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/binaryoutputstream.hxx>
+
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <osl/diagnose.h>
+#include <string.h>
+
+namespace oox {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const sal_Int32 OUTPUTSTREAM_BUFFERSIZE = 0x8000;
+
+} // namespace
+
+BinaryXOutputStream::BinaryXOutputStream( const Reference< XOutputStream >& rxOutStrm, bool bAutoClose ) :
+ BinaryStreamBase( Reference< XSeekable >( rxOutStrm, UNO_QUERY ).is() ),
+ BinaryXSeekableStream( Reference< XSeekable >( rxOutStrm, UNO_QUERY ) ),
+ maBuffer( OUTPUTSTREAM_BUFFERSIZE ),
+ mxOutStrm( rxOutStrm ),
+ mbAutoClose( bAutoClose && rxOutStrm.is() )
+{
+ mbEof = !mxOutStrm.is();
+}
+
+BinaryXOutputStream::~BinaryXOutputStream()
+{
+ close();
+}
+
+void BinaryXOutputStream::close()
+{
+ OSL_ENSURE( !mbAutoClose || mxOutStrm.is(), "BinaryXOutputStream::close - invalid call" );
+ if( mxOutStrm.is() ) try
+ {
+ mxOutStrm->flush();
+ if ( mbAutoClose )
+ mxOutStrm->closeOutput();
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "BinaryXOutputStream::close - closing output stream failed" );
+ }
+ mxOutStrm.clear();
+ mbAutoClose = false;
+ BinaryXSeekableStream::close();
+}
+
+void BinaryXOutputStream::writeData( const StreamDataSequence& rData, size_t /*nAtomSize*/ )
+{
+ if( mxOutStrm.is() ) try
+ {
+ mxOutStrm->writeBytes( rData );
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL( "BinaryXOutputStream::writeData - stream read error" );
+ }
+}
+
+void BinaryXOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize )
+{
+ if( !(mxOutStrm.is() && (nBytes > 0)) )
+ return;
+
+ sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int32 >( nBytes, 0, (OUTPUTSTREAM_BUFFERSIZE / nAtomSize) * nAtomSize );
+ const sal_uInt8* pnMem = static_cast< const sal_uInt8* >( pMem );
+ while( nBytes > 0 )
+ {
+ sal_Int32 nWriteSize = getLimitedValue< sal_Int32, sal_Int32 >( nBytes, 0, nBufferSize );
+ maBuffer.realloc( nWriteSize );
+ memcpy( maBuffer.getArray(), pnMem, static_cast< size_t >( nWriteSize ) );
+ writeData( maBuffer, nAtomSize );
+ pnMem += nWriteSize;
+ nBytes -= nWriteSize;
+ }
+}
+
+void
+BinaryOutputStream::writeCharArrayUC( std::u16string_view rString, rtl_TextEncoding eTextEnc )
+{
+ OString sBuf( OUStringToOString( rString, eTextEnc ) );
+ sBuf = sBuf.replace( '\0', '?' );
+ writeMemory( static_cast< const void* >( sBuf.getStr() ), sBuf.getLength() );
+}
+
+void
+BinaryOutputStream::writeUnicodeArray( const OUString& rString )
+{
+ OUString sBuf = rString.replace( '\0', '?' );
+#ifdef OSL_BIGENDIAN
+ // need a non-const buffer for swapping byte order
+ sal_Unicode notConst[sBuf.getLength()];
+ memcpy( notConst, sBuf.getStr(), sizeof(sal_Unicode)*sBuf.getLength() );
+ writeArray( notConst, sBuf.getLength() );
+#else
+ writeArray( sBuf.getStr(), sBuf.getLength() );
+#endif
+}
+
+void BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, bool bCompressed )
+{
+ if ( bCompressed )
+ // ISO-8859-1 maps all byte values 0xHH to the same Unicode code point U+00HH
+ writeCharArrayUC( rString, RTL_TEXTENCODING_ISO_8859_1 );
+ else
+ writeUnicodeArray( rString );
+}
+
+SequenceOutputStream::SequenceOutputStream( StreamDataSequence & rData ) :
+ BinaryStreamBase( true ),
+ mpData( &rData ),
+ mnPos( 0 )
+{
+}
+
+void SequenceOutputStream::writeData( const StreamDataSequence& rData, size_t nAtomSize )
+{
+ if( mpData && rData.hasElements() )
+ writeMemory( rData.getConstArray(), rData.getLength(), nAtomSize );
+}
+
+void SequenceOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ if( mpData && (nBytes > 0) )
+ {
+ if( mpData->getLength() - mnPos < nBytes )
+ mpData->realloc( mnPos + nBytes );
+ memcpy( mpData->getArray() + mnPos, pMem, static_cast< size_t >( nBytes ) );
+ mnPos += nBytes;
+ }
+}
+
+sal_Int64 SequenceOutputStream::size() const
+{
+ return mpData ? mpData->getLength() : -1;
+}
+
+sal_Int64 SequenceOutputStream::tell() const
+{
+ return mpData ? mnPos : -1;
+}
+
+void SequenceOutputStream::seek( sal_Int64 nPos )
+{
+ if( mpData )
+ {
+ mnPos = getLimitedValue< sal_Int32, sal_Int64 >( nPos, 0, mpData->getLength() );
+ mbEof = mnPos != nPos;
+ }
+}
+
+void SequenceOutputStream::close()
+{
+ mpData = nullptr;
+ mbEof = true;
+}
+
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/binarystreambase.cxx b/oox/source/helper/binarystreambase.cxx
new file mode 100644
index 000000000..1e3ef11ae
--- /dev/null
+++ b/oox/source/helper/binarystreambase.cxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/binarystreambase.hxx>
+#include <oox/helper/helper.hxx>
+
+#include <com/sun/star/io/XSeekable.hpp>
+#include <tools/diagnose_ex.h>
+
+namespace oox {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+BinaryStreamBase::~BinaryStreamBase()
+{
+}
+
+sal_Int64 BinaryStreamBase::getRemaining() const
+{
+ // do not use isSeekable(), implementations may provide stream position and size even if not seekable
+ sal_Int64 nPos = tell();
+ sal_Int64 nLen = size();
+ return ((nPos >= 0) && (nLen >= 0)) ? ::std::max< sal_Int64 >( nLen - nPos, 0 ) : -1;
+}
+
+void BinaryStreamBase::alignToBlock( sal_Int32 nBlockSize, sal_Int64 nAnchorPos )
+{
+ sal_Int64 nStrmPos = tell();
+ // nothing to do, if stream is at anchor position
+ if( mbSeekable && (0 <= nAnchorPos) && (nAnchorPos != nStrmPos) && (nBlockSize > 1) )
+ {
+ // prevent modulo with negative arguments...
+ sal_Int64 nSkipSize = (nAnchorPos < nStrmPos) ?
+ (nBlockSize - ((nStrmPos - nAnchorPos - 1) % nBlockSize) - 1) :
+ ((nAnchorPos - nStrmPos) % nBlockSize);
+ seek( nStrmPos + nSkipSize );
+ }
+}
+
+BinaryXSeekableStream::BinaryXSeekableStream( const Reference< XSeekable >& rxSeekable ) :
+ BinaryStreamBase( rxSeekable.is() ),
+ mxSeekable( rxSeekable )
+{
+}
+
+BinaryXSeekableStream::~BinaryXSeekableStream()
+{
+}
+
+sal_Int64 BinaryXSeekableStream::size() const
+{
+ if( mxSeekable.is() ) try
+ {
+ return mxSeekable->getLength();
+ }
+ catch( Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "BinaryXSeekableStream::size" );
+ }
+ return -1;
+}
+
+sal_Int64 BinaryXSeekableStream::tell() const
+{
+ if( mxSeekable.is() ) try
+ {
+ return mxSeekable->getPosition();
+ }
+ catch( Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "BinaryXSeekableStream::tell" );
+ }
+ return -1;
+}
+
+void BinaryXSeekableStream::seek( sal_Int64 nPos )
+{
+ if( mxSeekable.is() ) try
+ {
+ mbEof = false;
+ mxSeekable->seek( nPos );
+ }
+ catch( Exception& )
+ {
+ mbEof = true;
+ }
+}
+
+void BinaryXSeekableStream::close()
+{
+ mxSeekable.clear();
+ mbEof = true;
+}
+
+SequenceSeekableStream::SequenceSeekableStream( const StreamDataSequence& rData ) :
+ BinaryStreamBase( true ),
+ mpData( &rData ),
+ mnPos( 0 )
+{
+}
+
+sal_Int64 SequenceSeekableStream::size() const
+{
+ return mpData ? mpData->getLength() : -1;
+}
+
+sal_Int64 SequenceSeekableStream::tell() const
+{
+ return mpData ? mnPos : -1;
+}
+
+void SequenceSeekableStream::seek( sal_Int64 nPos )
+{
+ if( mpData )
+ {
+ mnPos = getLimitedValue< sal_Int32, sal_Int64 >( nPos, 0, mpData->getLength() );
+ mbEof = mnPos != nPos;
+ }
+}
+
+void SequenceSeekableStream::close()
+{
+ mpData = nullptr;
+ mbEof = true;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx
new file mode 100644
index 000000000..60e225e17
--- /dev/null
+++ b/oox/source/helper/containerhelper.cxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <algorithm>
+
+#include <oox/helper/containerhelper.hxx>
+
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <osl/diagnose.h>
+
+namespace oox {
+
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+struct ValueRangeComp
+{
+ bool operator()( const ValueRange& rLHS, const ValueRange& rRHS ) const
+ {
+ return rLHS.mnLast < rRHS.mnFirst;
+ }
+};
+
+} // namespace
+
+void ValueRangeSet::insert( const ValueRange& rRange )
+{
+ // find the first range that contains or follows the starting point of the passed range
+ ValueRangeVector::iterator aBeg = maRanges.begin();
+ ValueRangeVector::iterator aEnd = maRanges.end();
+ ValueRangeVector::iterator aIt = ::std::lower_bound( aBeg, aEnd, rRange, ValueRangeComp() );
+ // nothing to do if found range contains passed range
+ if( (aIt != aEnd) && aIt->contains( rRange ) ) return;
+ // check if previous range can be used to merge with the passed range
+ if( (aIt != aBeg) && ((aIt - 1)->mnLast + 1 == rRange.mnFirst) ) --aIt;
+ // check if current range (aIt) can be used to merge with passed range
+ if( (aIt != aEnd) && aIt->intersects( rRange ) )
+ {
+ // set new start value to existing range
+ aIt->mnFirst = ::std::min( aIt->mnFirst, rRange.mnFirst );
+ // search first range that cannot be merged anymore (aNext)
+ ValueRangeVector::iterator aNext = aIt + 1;
+ while( (aNext != aEnd) && aNext->intersects( rRange ) ) ++aNext;
+ // set new end value to existing range
+ aIt->mnLast = ::std::max( (aNext - 1)->mnLast, rRange.mnLast );
+ // remove ranges covered by new existing range (aIt)
+ maRanges.erase( aIt + 1, aNext );
+ }
+ else
+ {
+ // merging not possible: insert new range
+ maRanges.insert( aIt, rRange );
+ }
+}
+
+OUString ContainerHelper::getUnusedName(
+ const Reference< XNameAccess >& rxNameAccess, const OUString& rSuggestedName,
+ sal_Unicode cSeparator )
+{
+ OSL_ENSURE( rxNameAccess.is(), "ContainerHelper::getUnusedName - missing XNameAccess interface" );
+
+ OUString aNewName = rSuggestedName;
+ sal_Int32 nIndex = -1;
+ while( rxNameAccess->hasByName( aNewName ) )
+ aNewName = rSuggestedName + OUStringChar(cSeparator) + OUString::number( nIndex++ );
+ return aNewName;
+}
+
+bool ContainerHelper::insertByName(
+ const Reference< XNameContainer >& rxNameContainer,
+ const OUString& rName, const Any& rObject )
+{
+ OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByName - missing XNameContainer interface" );
+ bool bRet = false;
+ try
+ {
+ if( rxNameContainer->hasByName( rName ) )
+ rxNameContainer->replaceByName( rName, rObject );
+ else
+ rxNameContainer->insertByName( rName, rObject );
+ bRet = true;
+ }
+ catch( Exception& )
+ {
+ }
+ OSL_ENSURE( bRet, "ContainerHelper::insertByName - cannot insert object" );
+ return bRet;
+}
+
+OUString ContainerHelper::insertByUnusedName(
+ const Reference< XNameContainer >& rxNameContainer,
+ const OUString& rSuggestedName, sal_Unicode cSeparator,
+ const Any& rObject )
+{
+ OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByUnusedName - missing XNameContainer interface" );
+
+ // find an unused name
+ OUString aNewName = getUnusedName( rxNameContainer, rSuggestedName, cSeparator );
+
+ // insert the new object and return its resulting name
+ insertByName( rxNameContainer, aNewName, rObject );
+ return aNewName;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx
new file mode 100644
index 000000000..761fc9644
--- /dev/null
+++ b/oox/source/helper/grabbagstack.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <oox/helper/grabbagstack.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/sequence.hxx>
+
+namespace oox
+{
+
+using namespace css::beans;
+using namespace css::uno;
+
+GrabBagStack::GrabBagStack(const OUString& aElementName)
+{
+ mCurrentElement.maElementName = aElementName;
+}
+
+GrabBagStack::~GrabBagStack()
+{}
+
+bool GrabBagStack::isStackEmpty() const
+{
+ return mStack.empty();
+}
+
+PropertyValue GrabBagStack::getRootProperty()
+{
+ while(!mStack.empty())
+ pop();
+
+ PropertyValue aProperty;
+ aProperty.Name = mCurrentElement.maElementName;
+ aProperty.Value <<= comphelper::containerToSequence(mCurrentElement.maPropertyList);
+
+ return aProperty;
+}
+
+void GrabBagStack::appendElement(const OUString& aName, const Any& aAny)
+{
+ PropertyValue aValue;
+ aValue.Name = aName;
+ aValue.Value = aAny;
+ mCurrentElement.maPropertyList.push_back(aValue);
+}
+
+void GrabBagStack::push(const OUString& aKey)
+{
+ mStack.push(mCurrentElement);
+ mCurrentElement.maElementName = aKey;
+ mCurrentElement.maPropertyList.clear();
+}
+
+void GrabBagStack::pop()
+{
+ OUString aName = mCurrentElement.maElementName;
+ Sequence<PropertyValue> aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList));
+ mCurrentElement = mStack.top();
+ mStack.pop();
+ appendElement(aName, Any(aSequence));
+}
+
+void GrabBagStack::addInt32(const OUString& aElementName, sal_Int32 aIntValue)
+{
+ appendElement(aElementName, Any(aIntValue));
+}
+
+void GrabBagStack::addString(const OUString& aElementName, const OUString& aStringValue)
+{
+ appendElement(aElementName, Any(aStringValue));
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
new file mode 100644
index 000000000..f327d7eba
--- /dev/null
+++ b/oox/source/helper/graphichelper.cxx
@@ -0,0 +1,323 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/graphichelper.hxx>
+
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/graphic/GraphicProvider.hpp>
+#include <com/sun/star/graphic/GraphicMapper.hpp>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/seqstream.hxx>
+#include <vcl/wmfexternal.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
+#include <tools/gen.hxx>
+#include <tools/diagnose_ex.h>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::graphic;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+sal_Int32 lclConvertScreenPixelToHmm( double fPixel, double fPixelPerHmm )
+{
+ return static_cast< sal_Int32 >( (fPixelPerHmm > 0.0) ? (fPixel / fPixelPerHmm + 0.5) : 0.0 );
+}
+
+} // namespace
+
+GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& /*rxTargetFrame*/, const StorageRef& rxStorage ) :
+ mxContext( rxContext ),
+ mxStorage( rxStorage )
+{
+ OSL_ENSURE( mxContext.is(), "GraphicHelper::GraphicHelper - missing component context" );
+ if( mxContext.is() )
+ mxGraphicProvider.set( graphic::GraphicProvider::create( mxContext ), uno::UNO_QUERY );
+
+ //! TODO: get colors from system
+ maSystemPalette[ XML_3dDkShadow ] = Color(0x716F64);
+ maSystemPalette[ XML_3dLight ] = Color(0xF1EFE2);
+ maSystemPalette[ XML_activeBorder ] = Color(0xD4D0C8);
+ maSystemPalette[ XML_activeCaption ] = Color(0x0054E3);
+ maSystemPalette[ XML_appWorkspace ] = Color(0x808080);
+ maSystemPalette[ XML_background ] = Color(0x004E98);
+ maSystemPalette[ XML_btnFace ] = Color(0xECE9D8);
+ maSystemPalette[ XML_btnHighlight ] = Color(0xFFFFFF);
+ maSystemPalette[ XML_btnShadow ] = Color(0xACA899);
+ maSystemPalette[ XML_btnText ] = Color(0x000000);
+ maSystemPalette[ XML_captionText ] = Color(0xFFFFFF);
+ maSystemPalette[ XML_gradientActiveCaption ] = Color(0x3D95FF);
+ maSystemPalette[ XML_gradientInactiveCaption ] = Color(0xD8E4F8);
+ maSystemPalette[ XML_grayText ] = Color(0xACA899);
+ maSystemPalette[ XML_highlight ] = Color(0x316AC5);
+ maSystemPalette[ XML_highlightText ] = Color(0xFFFFFF);
+ maSystemPalette[ XML_hotLight ] = Color(0x000080);
+ maSystemPalette[ XML_inactiveBorder ] = Color(0xD4D0C8);
+ maSystemPalette[ XML_inactiveCaption ] = Color(0x7A96DF);
+ maSystemPalette[ XML_inactiveCaptionText ] = Color(0xD8E4F8);
+ maSystemPalette[ XML_infoBk ] = Color(0xFFFFE1);
+ maSystemPalette[ XML_infoText ] = Color(0x000000);
+ maSystemPalette[ XML_menu ] = Color(0xFFFFFF);
+ maSystemPalette[ XML_menuBar ] = Color(0xECE9D8);
+ maSystemPalette[ XML_menuHighlight ] = Color(0x316AC5);
+ maSystemPalette[ XML_menuText ] = Color(0x000000);
+ maSystemPalette[ XML_scrollBar ] = Color(0xD4D0C8);
+ maSystemPalette[ XML_window ] = Color(0xFFFFFF);
+ maSystemPalette[ XML_windowFrame ] = Color(0x000000);
+ maSystemPalette[ XML_windowText ] = Color(0x000000);
+
+ // Note that we cannot try to get DeviceInfo from the current frame here,
+ // because there might not be a current frame yet
+ mxDefaultOutputDevice = Application::GetDefaultDevice();
+ maDeviceInfo = mxDefaultOutputDevice->GetDeviceInfo();
+ // 100 000 is 1 meter in MM100.
+ // various unit tests rely on these values being exactly this and not the "true" values
+ Size aDefault = mxDefaultOutputDevice->LogicToPixel(Size(100000, 100000), MapMode(MapUnit::Map100thMM));
+ maDeviceInfo.PixelPerMeterX = aDefault.Width();
+ maDeviceInfo.PixelPerMeterY = aDefault.Height();
+ mfPixelPerHmmX = maDeviceInfo.PixelPerMeterX / 100000.0;
+ mfPixelPerHmmY = maDeviceInfo.PixelPerMeterY / 100000.0;
+}
+
+GraphicHelper::~GraphicHelper()
+{
+}
+
+// System colors and predefined colors ----------------------------------------
+
+::Color GraphicHelper::getSystemColor( sal_Int32 nToken, ::Color nDefaultRgb ) const
+{
+ return ContainerHelper::getMapElement( maSystemPalette, nToken, nDefaultRgb );
+}
+
+::Color GraphicHelper::getSchemeColor( sal_Int32 /*nToken*/ ) const
+{
+ OSL_FAIL( "GraphicHelper::getSchemeColor - scheme colors not implemented" );
+ return API_RGB_TRANSPARENT;
+}
+
+::Color GraphicHelper::getPaletteColor( sal_Int32 /*nPaletteIdx*/ ) const
+{
+ OSL_FAIL( "GraphicHelper::getPaletteColor - palette colors not implemented" );
+ return API_RGB_TRANSPARENT;
+}
+
+sal_Int32 GraphicHelper::getDefaultChartAreaFillStyle() const
+{
+ return XML_solidFill;
+}
+
+sal_Int32 GraphicHelper::getDefaultChartAreaLineStyle()
+{
+ return XML_solidFill;
+}
+
+sal_Int16 GraphicHelper::getDefaultChartAreaLineWidth()
+{
+ // this value is what MSO 2016 writes fixing incomplete MSO 2010 documents (0.75 pt in emu)
+ return 9525;
+}
+
+// Device info and device dependent unit conversion ---------------------------
+
+sal_Int32 GraphicHelper::convertScreenPixelXToHmm( double fPixelX ) const
+{
+ return lclConvertScreenPixelToHmm( fPixelX, mfPixelPerHmmX );
+}
+
+sal_Int32 GraphicHelper::convertScreenPixelYToHmm( double fPixelY ) const
+{
+ return lclConvertScreenPixelToHmm( fPixelY, mfPixelPerHmmY );
+}
+
+awt::Size GraphicHelper::convertScreenPixelToHmm( const awt::Size& rPixel ) const
+{
+ return awt::Size( convertScreenPixelXToHmm( rPixel.Width ), convertScreenPixelYToHmm( rPixel.Height ) );
+}
+
+double GraphicHelper::convertHmmToScreenPixelX( sal_Int32 nHmmX ) const
+{
+ return nHmmX * mfPixelPerHmmX;
+}
+
+double GraphicHelper::convertHmmToScreenPixelY( sal_Int32 nHmmY ) const
+{
+ return nHmmY * mfPixelPerHmmY;
+}
+
+awt::Point GraphicHelper::convertHmmToScreenPixel( const awt::Point& rHmm ) const
+{
+ return awt::Point(
+ static_cast< sal_Int32 >( convertHmmToScreenPixelX( rHmm.X ) + 0.5 ),
+ static_cast< sal_Int32 >( convertHmmToScreenPixelY( rHmm.Y ) + 0.5 ) );
+}
+
+awt::Size GraphicHelper::convertHmmToScreenPixel( const awt::Size& rHmm ) const
+{
+ return awt::Size(
+ static_cast< sal_Int32 >( convertHmmToScreenPixelX( rHmm.Width ) + 0.5 ),
+ static_cast< sal_Int32 >( convertHmmToScreenPixelY( rHmm.Height ) + 0.5 ) );
+}
+
+awt::Point GraphicHelper::convertHmmToAppFont( const awt::Point& rHmm ) const
+{
+ try
+ {
+ awt::Point aPixel = convertHmmToScreenPixel( rHmm );
+ MapMode aMode(MapUnit::MapAppFont);
+ ::Point aVCLPoint(aPixel.X, aPixel.Y);
+ ::Point aDevPoint = mxDefaultOutputDevice->PixelToLogic(aVCLPoint, aMode );
+ return awt::Point(aDevPoint.X(), aDevPoint.Y());
+ }
+ catch( Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+ return awt::Point( 0, 0 );
+}
+
+awt::Size GraphicHelper::convertHmmToAppFont( const awt::Size& rHmm ) const
+{
+ try
+ {
+ awt::Size aPixel = convertHmmToScreenPixel( rHmm );
+ MapMode aMode(MapUnit::MapAppFont);
+ ::Size aVCLSize(aPixel.Width, aPixel.Height);
+ ::Size aDevSz = mxDefaultOutputDevice->PixelToLogic(aVCLSize, aMode );
+ return awt::Size(aDevSz.Width(), aDevSz.Height());
+ }
+ catch( Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("oox");
+ }
+ return awt::Size( 0, 0 );
+}
+
+
+// Graphics and graphic objects ----------------------------------------------
+
+Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStream >& rxInStrm,
+ const WmfExternal* pExtHeader ) const
+{
+ Reference< XGraphic > xGraphic;
+ if( rxInStrm.is() && mxGraphicProvider.is() ) try
+ {
+ Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("InputStream", rxInStrm),
+ comphelper::makePropertyValue("LazyRead", true) };
+
+ if ( pExtHeader && pExtHeader->mapMode > 0 )
+ {
+ aArgs.realloc( aArgs.getLength() + 1 );
+ auto pArgs = aArgs.getArray();
+ Sequence< PropertyValue > aFilterData{
+ comphelper::makePropertyValue("ExternalWidth", pExtHeader->xExt),
+ comphelper::makePropertyValue("ExternalHeight", pExtHeader->yExt),
+ comphelper::makePropertyValue("ExternalMapMode", pExtHeader->mapMode)
+ };
+ pArgs[ 2 ].Name = "FilterData";
+ pArgs[ 2 ].Value <<= aFilterData;
+ }
+
+ xGraphic = mxGraphicProvider->queryGraphic( aArgs );
+ }
+ catch( Exception& )
+ {
+ }
+ return xGraphic;
+}
+
+Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& rGraphicData ) const
+{
+ Reference< XGraphic > xGraphic;
+ if( rGraphicData.hasElements() )
+ {
+ Reference< XInputStream > xInStrm( new ::comphelper::SequenceInputStream( rGraphicData ) );
+ xGraphic = importGraphic( xInStrm );
+ }
+ return xGraphic;
+}
+
+Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStreamName, const WmfExternal* pExtHeader ) const
+{
+ Reference< XGraphic > xGraphic;
+ OSL_ENSURE( !rStreamName.isEmpty(), "GraphicHelper::importEmbeddedGraphic - empty stream name" );
+
+ if( !rStreamName.isEmpty() )
+ {
+ initializeGraphicMapperIfNeeded();
+
+ SAL_WARN_IF(!mxGraphicMapper.is(), "oox", "GraphicHelper::importEmbeddedGraphic - graphic mapper not available");
+
+ xGraphic = mxGraphicMapper->findGraphic(rStreamName);
+ if (!xGraphic.is())
+ {
+ auto xStream = mxStorage->openInputStream(rStreamName);
+ xGraphic = importGraphic(xStream, pExtHeader);
+ if (xGraphic.is())
+ mxGraphicMapper->putGraphic(rStreamName, xGraphic);
+ }
+ }
+ return xGraphic;
+}
+
+awt::Size GraphicHelper::getOriginalSize( const Reference< XGraphic >& xGraphic ) const
+{
+ awt::Size aSizeHmm;
+ PropertySet aPropSet( xGraphic );
+ if( aPropSet.getProperty( aSizeHmm, PROP_Size100thMM ) && (aSizeHmm.Width == 0) && (aSizeHmm.Height == 0) ) // MAPMODE_PIXEL used?
+ {
+ awt::Size aSizePixel( 0, 0 );
+ if( aPropSet.getProperty( aSizePixel, PROP_SizePixel ) )
+ aSizeHmm = convertScreenPixelToHmm( aSizePixel );
+ }
+ return aSizeHmm;
+}
+
+void GraphicHelper::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rGraphicMapper)
+{
+ mxGraphicMapper = rGraphicMapper;
+}
+
+void GraphicHelper::initializeGraphicMapperIfNeeded() const
+{
+ if (!mxGraphicMapper.is())
+ {
+ auto* pNonConstThis = const_cast<GraphicHelper*>(this);
+ pNonConstThis->mxGraphicMapper = graphic::GraphicMapper::create(mxContext);
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
new file mode 100644
index 000000000..c5115bba3
--- /dev/null
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -0,0 +1,159 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/modelobjecthelper.hxx>
+
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <oox/helper/containerhelper.hxx>
+#include <osl/diagnose.h>
+
+namespace oox {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxModelFactory, const OUString& rServiceName ) :
+ mxModelFactory( rxModelFactory ),
+ maServiceName( rServiceName ),
+ mnIndex( 0 )
+{
+ OSL_ENSURE( mxModelFactory.is(), "ObjectContainer::ObjectContainer - missing service factory" );
+}
+
+ObjectContainer::~ObjectContainer()
+{
+}
+
+bool ObjectContainer::hasObject( const OUString& rObjName ) const
+{
+ createContainer();
+ return mxContainer.is() && mxContainer->hasByName( rObjName );
+}
+
+Any ObjectContainer::getObject( const OUString& rObjName ) const
+{
+ if( hasObject( rObjName ) )
+ return mxContainer->getByName( rObjName );
+ return Any();
+}
+
+OUString ObjectContainer::insertObject( const OUString& rObjName, const Any& rObj, bool bInsertByUnusedName )
+{
+ createContainer();
+ if( mxContainer.is() )
+ {
+ if( bInsertByUnusedName )
+ return ContainerHelper::insertByUnusedName( mxContainer, rObjName + OUString::number( ++mnIndex ), ' ', rObj );
+ if( ContainerHelper::insertByName( mxContainer, rObjName, rObj ) )
+ return rObjName;
+ }
+ return OUString();
+}
+
+void ObjectContainer::createContainer() const
+{
+ if( !mxContainer.is() && mxModelFactory.is() ) try
+ {
+ mxContainer.set( mxModelFactory->createInstance( maServiceName ), UNO_QUERY_THROW );
+ mxModelFactory.clear();
+ }
+ catch( Exception& )
+ {
+ }
+ OSL_ENSURE( mxContainer.is(), "ObjectContainer::createContainer - container not found" );
+}
+
+constexpr OUStringLiteral gaDashNameBase( u"msLineDash " ); ///< Base name for all named line dashes.
+constexpr OUStringLiteral gaGradientNameBase( u"msFillGradient " ); ///< Base name for all named fill gradients.
+constexpr OUStringLiteral gaTransGradNameBase( u"msTransGradient " ); ///< Base name for all named fill gradients.
+constexpr OUStringLiteral gaBitmapUrlNameBase( u"msFillBitmap " ); ///< Base name for all named fill bitmap URLs.
+constexpr OUStringLiteral gaHatchNameBase( u"msFillHatch " ); ///< Base name for all named fill hatches.
+
+ModelObjectHelper::ModelObjectHelper( const Reference< XMultiServiceFactory >& rxModelFactory ) :
+ maMarkerContainer( rxModelFactory, "com.sun.star.drawing.MarkerTable" ),
+ maDashContainer( rxModelFactory, "com.sun.star.drawing.DashTable" ),
+ maGradientContainer( rxModelFactory, "com.sun.star.drawing.GradientTable" ),
+ maTransGradContainer( rxModelFactory, "com.sun.star.drawing.TransparencyGradientTable" ),
+ maBitmapUrlContainer( rxModelFactory, "com.sun.star.drawing.BitmapTable" ),
+ maHatchContainer( rxModelFactory, "com.sun.star.drawing.HatchTable" )
+{
+}
+
+bool ModelObjectHelper::hasLineMarker( const OUString& rMarkerName ) const
+{
+ return maMarkerContainer.hasObject( rMarkerName );
+}
+
+bool ModelObjectHelper::insertLineMarker( const OUString& rMarkerName, const PolyPolygonBezierCoords& rMarker )
+{
+ OSL_ENSURE( rMarker.Coordinates.hasElements(), "ModelObjectHelper::insertLineMarker - line marker without coordinates" );
+ if( rMarker.Coordinates.hasElements() )
+ return !maMarkerContainer.insertObject( rMarkerName, Any( rMarker ), false ).isEmpty();
+ return false;
+}
+
+OUString ModelObjectHelper::insertLineDash( const LineDash& rDash )
+{
+ return maDashContainer.insertObject( gaDashNameBase, Any( rDash ), true );
+}
+
+OUString ModelObjectHelper::insertFillGradient( const awt::Gradient& rGradient )
+{
+ return maGradientContainer.insertObject( gaGradientNameBase, Any( rGradient ), true );
+}
+
+OUString ModelObjectHelper::insertTransGrandient( const awt::Gradient& rGradient )
+{
+ return maTransGradContainer.insertObject( gaTransGradNameBase, Any( rGradient ), true );
+}
+
+OUString ModelObjectHelper::insertFillBitmapXGraphic(uno::Reference<graphic::XGraphic> const & rxGraphic)
+{
+ uno::Reference<awt::XBitmap> xBitmap(rxGraphic, uno::UNO_QUERY);
+ if (xBitmap.is())
+ return maBitmapUrlContainer.insertObject(gaBitmapUrlNameBase, Any(xBitmap), true);
+ return OUString();
+}
+
+OUString ModelObjectHelper::insertFillHatch(const drawing::Hatch& rHatch)
+{
+ return maHatchContainer.insertObject( gaHatchNameBase, Any( rHatch ), true );
+}
+
+uno::Reference<awt::XBitmap> ModelObjectHelper::getFillBitmap(OUString const & rGraphicName)
+{
+ uno::Reference<awt::XBitmap> xBitmap;
+ uno::Any aAny = maBitmapUrlContainer.getObject(rGraphicName);
+ if (aAny.has<uno::Reference<awt::XBitmap>>())
+ xBitmap = aAny.get<uno::Reference<awt::XBitmap>>();
+ return xBitmap;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/ooxresid.cxx b/oox/source/helper/ooxresid.cxx
new file mode 100644
index 000000000..6ad02a70b
--- /dev/null
+++ b/oox/source/helper/ooxresid.cxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+#include <ooxresid.hxx>
+#include <unotools/resmgr.hxx>
+
+OUString OoxResId(TranslateId aId) { return Translate::get(aId, Translate::Create("oox")); }
+OUString URLResId(TranslateId aId) { return Translate::get(aId, Translate::Create("sd")); }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/source/helper/progressbar.cxx b/oox/source/helper/progressbar.cxx
new file mode 100644
index 000000000..86170b47e
--- /dev/null
+++ b/oox/source/helper/progressbar.cxx
@@ -0,0 +1,167 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/progressbar.hxx>
+
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <oox/helper/helper.hxx>
+
+#include <sal/log.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::task;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const sal_Int32 PROGRESS_RANGE = 1000000;
+
+} // namespace
+
+IProgressBar::~IProgressBar()
+{
+}
+
+ISegmentProgressBar::~ISegmentProgressBar()
+{
+}
+
+ProgressBar::ProgressBar( const Reference< XStatusIndicator >& rxIndicator, const OUString& rText ) :
+ mxIndicator( rxIndicator ),
+ mfPosition( 0 )
+{
+ if( mxIndicator.is() )
+ mxIndicator->start( rText, PROGRESS_RANGE );
+}
+
+ProgressBar::~ProgressBar()
+{
+ if( mxIndicator.is() )
+ mxIndicator->end();
+}
+
+double ProgressBar::getPosition() const
+{
+ return mfPosition;
+}
+
+void ProgressBar::setPosition( double fPosition )
+{
+ SAL_WARN_IF( (mfPosition > fPosition) || (fPosition > 1.0), "oox", "ProgressBar::setPosition - invalid position" );
+ mfPosition = getLimitedValue< double >( fPosition, mfPosition, 1.0 );
+ if( mxIndicator.is() )
+ mxIndicator->setValue( static_cast< sal_Int32 >( mfPosition * PROGRESS_RANGE ) );
+}
+
+namespace prv {
+
+namespace {
+
+class SubSegment : public ISegmentProgressBar
+{
+public:
+ explicit SubSegment( IProgressBar& rParentProgress, double fStartPos, double fLength );
+
+ virtual double getPosition() const override;
+ virtual void setPosition( double fPosition ) override;
+
+ virtual double getFreeLength() const override;
+ virtual ISegmentProgressBarRef createSegment( double fLength ) override;
+
+private:
+ IProgressBar& mrParentProgress;
+ double mfStartPos;
+ double mfLength;
+ double mfPosition;
+ double mfFreeStart;
+};
+
+}
+
+SubSegment::SubSegment( IProgressBar& rParentProgress, double fStartPos, double fLength ) :
+ mrParentProgress( rParentProgress ),
+ mfStartPos( fStartPos ),
+ mfLength( fLength ),
+ mfPosition( 0.0 ),
+ mfFreeStart( 0.0 )
+{
+}
+
+double SubSegment::getPosition() const
+{
+ return mfPosition;
+}
+
+void SubSegment::setPosition( double fPosition )
+{
+ SAL_WARN_IF( (mfPosition > fPosition) || (fPosition > 1.0), "oox", "SubSegment::setPosition - invalid position" );
+ mfPosition = getLimitedValue< double >( fPosition, mfPosition, 1.0 );
+ mrParentProgress.setPosition( mfStartPos + mfPosition * mfLength );
+}
+
+double SubSegment::getFreeLength() const
+{
+ return 1.0 - mfFreeStart;
+}
+
+ISegmentProgressBarRef SubSegment::createSegment( double fLength )
+{
+ SAL_WARN_IF( (0.0 >= fLength) || (fLength > getFreeLength()), "oox", "SubSegment::createSegment - invalid length" );
+ fLength = getLimitedValue< double >( fLength, 0.0, getFreeLength() );
+ ISegmentProgressBarRef xSegment = std::make_shared<prv::SubSegment>( *this, mfFreeStart, fLength );
+ mfFreeStart += fLength;
+ return xSegment;
+}
+
+} // namespace oox::prv
+
+SegmentProgressBar::SegmentProgressBar( const Reference< XStatusIndicator >& rxIndicator, const OUString& rText ) :
+ maProgress( rxIndicator, rText ),
+ mfFreeStart( 0.0 )
+{
+}
+
+double SegmentProgressBar::getPosition() const
+{
+ return maProgress.getPosition();
+}
+
+void SegmentProgressBar::setPosition( double fPosition )
+{
+ maProgress.setPosition( fPosition );
+}
+
+double SegmentProgressBar::getFreeLength() const
+{
+ return 1.0 - mfFreeStart;
+}
+
+ISegmentProgressBarRef SegmentProgressBar::createSegment( double fLength )
+{
+ SAL_WARN_IF( (0.0 >= fLength) || (fLength > getFreeLength()), "oox", "SegmentProgressBar::createSegment - invalid length" );
+ fLength = getLimitedValue< double >( fLength, 0.0, getFreeLength() );
+ ISegmentProgressBarRef xSegment = std::make_shared<prv::SubSegment>( maProgress, mfFreeStart, fLength );
+ mfFreeStart += fLength;
+ return xSegment;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
new file mode 100644
index 000000000..f45291ea8
--- /dev/null
+++ b/oox/source/helper/propertymap.cxx
@@ -0,0 +1,956 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/propertymap.hxx>
+
+#if OSL_DEBUG_LEVEL > 0
+# include <cstdio>
+# include <com/sun/star/style/LineSpacing.hpp>
+# include <com/sun/star/text/WritingMode.hpp>
+using ::com::sun::star::style::LineSpacing;
+using ::com::sun::star::text::WritingMode;
+#include <comphelper/anytostring.hxx>
+#include <iostream>
+#endif
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <osl/diagnose.h>
+#include <mutex>
+#include <sal/log.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/propertynames.hxx>
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::Property;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::beans::UnknownPropertyException;
+using ::com::sun::star::beans::XPropertyChangeListener;
+using ::com::sun::star::beans::XPropertySet;
+using ::com::sun::star::beans::XPropertySetInfo;
+using ::com::sun::star::beans::XVetoableChangeListener;
+using ::com::sun::star::container::XIndexReplace;
+
+#if OSL_DEBUG_LEVEL > 0
+#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+using ::com::sun::star::style::LineSpacing;
+using ::com::sun::star::text::WritingMode;
+using ::com::sun::star::drawing::TextHorizontalAdjust;
+using ::com::sun::star::drawing::TextVerticalAdjust;
+#endif
+
+namespace oox {
+using ::com::sun::star::container::XIndexReplace;
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+using ::com::sun::star::drawing::TextHorizontalAdjust;
+using ::com::sun::star::drawing::TextVerticalAdjust;
+
+namespace {
+
+/** This class implements a generic XPropertySet.
+
+ Properties of all names and types can be set and later retrieved.
+ TODO: move this to comphelper or better find an existing implementation
+ */
+class GenericPropertySet : public ::cppu::WeakImplHelper< XPropertySet, XPropertySetInfo >
+{
+public:
+ explicit GenericPropertySet( const PropertyMap& rPropMap );
+
+ // XPropertySet
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) override;
+ virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
+ virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) override;
+ virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) override;
+ virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) override;
+ virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) override;
+
+ // XPropertySetInfo
+ virtual Sequence< Property > SAL_CALL getProperties() override;
+ virtual Property SAL_CALL getPropertyByName( const OUString& aName ) override;
+ virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override;
+
+private:
+ std::mutex mMutex;
+ PropertyNameMap maPropMap;
+};
+
+GenericPropertySet::GenericPropertySet( const PropertyMap& rPropMap )
+{
+ rPropMap.fillPropertyNameMap(maPropMap);
+}
+
+Reference< XPropertySetInfo > SAL_CALL GenericPropertySet::getPropertySetInfo()
+{
+ return this;
+}
+
+void SAL_CALL GenericPropertySet::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
+{
+ std::scoped_lock aGuard( mMutex );
+ maPropMap[ rPropertyName ] = rValue;
+}
+
+Any SAL_CALL GenericPropertySet::getPropertyValue( const OUString& rPropertyName )
+{
+ PropertyNameMap::iterator aIt = maPropMap.find( rPropertyName );
+ if( aIt == maPropMap.end() )
+ throw UnknownPropertyException(rPropertyName);
+ return aIt->second;
+}
+
+// listeners are not supported by this implementation
+void SAL_CALL GenericPropertySet::addPropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::removePropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::addVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::removeVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
+
+// XPropertySetInfo
+Sequence< Property > SAL_CALL GenericPropertySet::getProperties()
+{
+ Sequence< Property > aSeq( static_cast< sal_Int32 >( maPropMap.size() ) );
+ Property* pProperty = aSeq.getArray();
+ for (auto const& prop : maPropMap)
+ {
+ pProperty->Name = prop.first;
+ pProperty->Handle = 0;
+ pProperty->Type = prop.second.getValueType();
+ pProperty->Attributes = 0;
+ ++pProperty;
+ }
+ return aSeq;
+}
+
+Property SAL_CALL GenericPropertySet::getPropertyByName( const OUString& rPropertyName )
+{
+ PropertyNameMap::iterator aIt = maPropMap.find( rPropertyName );
+ if( aIt == maPropMap.end() )
+ throw UnknownPropertyException(rPropertyName);
+ Property aProperty;
+ aProperty.Name = aIt->first;
+ aProperty.Handle = 0;
+ aProperty.Type = aIt->second.getValueType();
+ aProperty.Attributes = 0;
+ return aProperty;
+}
+
+sal_Bool SAL_CALL GenericPropertySet::hasPropertyByName( const OUString& rPropertyName )
+{
+ return maPropMap.find( rPropertyName ) != maPropMap.end();
+}
+
+} // namespace
+
+PropertyMap::PropertyMap() :
+ mpPropNames( &GetPropertyNameVector() ) // pointer instead reference to get compiler generated copy c'tor and operator=
+{
+}
+
+bool PropertyMap::hasProperty( sal_Int32 nPropId ) const
+{
+ return maProperties.find( nPropId ) != maProperties.end();
+}
+
+bool PropertyMap::setAnyProperty( sal_Int32 nPropId, const Any& rValue )
+{
+ if( nPropId < 0 )
+ return false;
+
+ maProperties[ nPropId ] = rValue;
+ return true;
+}
+
+Any PropertyMap::getProperty( sal_Int32 nPropId )
+{
+ return maProperties[ nPropId ];
+}
+
+void PropertyMap::erase( sal_Int32 nPropId )
+{
+ maProperties.erase(nPropId);
+}
+
+bool PropertyMap::empty() const
+{
+ return maProperties.empty();
+}
+
+void PropertyMap::assignUsed( const PropertyMap& rPropMap )
+{
+ maProperties.insert(rPropMap.maProperties.begin(), rPropMap.maProperties.end());
+}
+
+const OUString& PropertyMap::getPropertyName( sal_Int32 nPropId )
+{
+ OSL_ENSURE( (0 <= nPropId) && (nPropId < PROP_COUNT), "PropertyMap::getPropertyName - invalid property identifier" );
+ return GetPropertyNameVector()[ nPropId ];
+}
+
+sal_Int32 PropertyMap::getPropertyId( std::u16string_view sPropName )
+{
+ // This may use a std::map to get faster from String to ID in the
+ // future, inside the [0..PROP_COUNT[ entries. Since it is currently
+ // only used for Diagram re-creation I opted for less memory usage here
+ if(sPropName.empty())
+ return -1;
+
+ const std::vector<OUString>& rVec(GetPropertyNameVector());
+ for(size_t a(0); a < rVec.size(); a++)
+ if(rVec[a] == sPropName)
+ return a;
+
+ return -1;
+}
+
+void PropertyMap::assignAll( const PropertyMap& rPropMap )
+{
+ for (auto const& prop : rPropMap.maProperties)
+ maProperties[prop.first] = prop.second;
+}
+
+Sequence< PropertyValue > PropertyMap::makePropertyValueSequence() const
+{
+ Sequence< PropertyValue > aSeq( static_cast< sal_Int32 >( maProperties.size() ) );
+ PropertyValue* pValues = aSeq.getArray();
+ for (auto const& prop : maProperties)
+ {
+ OSL_ENSURE( (0 <= prop.first) && (prop.first < PROP_COUNT), "PropertyMap::makePropertyValueSequence - invalid property identifier" );
+ pValues->Name = (*mpPropNames)[ prop.first ];
+ pValues->Value = prop.second;
+ pValues->State = PropertyState_DIRECT_VALUE;
+ ++pValues;
+ }
+ return aSeq;
+}
+
+void PropertyMap::fillSequences( Sequence< OUString >& rNames, Sequence< Any >& rValues ) const
+{
+ rNames.realloc( static_cast< sal_Int32 >( maProperties.size() ) );
+ rValues.realloc( static_cast< sal_Int32 >( maProperties.size() ) );
+ if( maProperties.empty() )
+ return;
+
+ OUString* pNames = rNames.getArray();
+ Any* pValues = rValues.getArray();
+ for (auto const& prop : maProperties)
+ {
+ OSL_ENSURE( (0 <= prop.first) && (prop.first < PROP_COUNT), "PropertyMap::fillSequences - invalid property identifier" );
+ *pNames = (*mpPropNames)[ prop.first ];
+ *pValues = prop.second;
+ ++pNames;
+ ++pValues;
+ }
+}
+
+void PropertyMap::fillPropertyNameMap(PropertyNameMap& rMap) const
+{
+ for (auto const& prop : maProperties)
+ {
+ rMap.insert(std::pair<OUString, Any>((*mpPropNames)[prop.first], prop.second));
+ }
+}
+
+Reference< XPropertySet > PropertyMap::makePropertySet() const
+{
+ return new GenericPropertySet( *this );
+}
+
+#if OSL_DEBUG_LEVEL > 0
+static void lclDumpAnyValue( const Any& value)
+{
+ OUString strValue;
+ Sequence< OUString > strArray;
+ Sequence< Any > anyArray;
+ Sequence< PropertyValue > propArray;
+ Sequence< Sequence< PropertyValue > > propArrayArray;
+ Sequence< EnhancedCustomShapeAdjustmentValue > adjArray;
+ Sequence< EnhancedCustomShapeSegment > segArray;
+ Sequence< EnhancedCustomShapeParameterPair > ppArray;
+ EnhancedCustomShapeSegment segment;
+ EnhancedCustomShapeParameterPair pp;
+ EnhancedCustomShapeParameter par;
+ HomogenMatrix3 aMatrix;
+ sal_Int32 intValue = 0;
+ sal_uInt32 uintValue = 0;
+ sal_Int16 int16Value = 0;
+ sal_uInt16 uint16Value = 0;
+ float floatValue = 0;
+ bool boolValue = false;
+ LineSpacing spacing;
+// RectanglePoint pointValue;
+ WritingMode aWritingMode;
+ TextVerticalAdjust aTextVertAdj;
+ TextHorizontalAdjust aTextHorizAdj;
+ Reference< XIndexReplace > xNumRule;
+
+ if( value >>= strValue )
+ fprintf (stderr,"\"%s\"\n", USS( strValue ) );
+ else if( value >>= strArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<strArray.getLength(); i++ )
+ fprintf (stderr,"\t\t\t[%3d] \"%s\"\n", i, USS( strArray[i] ) );
+ } else if( value >>= propArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<propArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] %s (%s) ", i, USS( propArray[i].Name ), USS(propArray[i].Value.getValueTypeName()) );
+ lclDumpAnyValue( propArray[i].Value );
+ }
+ } else if( value >>= propArrayArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<propArrayArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] ", i);
+ lclDumpAnyValue( Any (propArrayArray[i]) );
+ }
+ } else if( value >>= anyArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<anyArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(value.getValueTypeName()) );
+ lclDumpAnyValue( anyArray[i] );
+ }
+ } else if( value >>= adjArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<adjArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(adjArray[i].Value.getValueTypeName()) );
+ lclDumpAnyValue( adjArray[i].Value );
+ }
+ } else if( value >>= segArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<segArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] ", i );
+ lclDumpAnyValue( Any( segArray[i] ) );
+ }
+ } else if( value >>= ppArray ) {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<ppArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] ", i );
+ lclDumpAnyValue( Any( ppArray[i] ) );
+ }
+ } else if( value >>= segment ) {
+ fprintf (stderr,"Command: %d Count: %d\n", segment.Command, segment.Count);
+ } else if( value >>= pp ) {
+ fprintf (stderr,"First: ");
+ lclDumpAnyValue( Any (pp.First) );
+ fprintf (stderr,"\t\t\t Second: ");
+ lclDumpAnyValue( Any (pp.Second) );
+ } else if( value >>= par ) {
+ fprintf (stderr,"Parameter (%s): ", USS(par.Value.getValueTypeName()));
+ lclDumpAnyValue( par.Value );
+ } else if( value >>= aMatrix ) {
+ fprintf (stderr,"Matrix\n%f %f %f\n%f %f %f\n%f %f %f\n", aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3, aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3, aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3);
+ } else if( value >>= intValue )
+ fprintf (stderr,"%-10" SAL_PRIdINT32 " (hex: %" SAL_PRIxUINT32 ")\n", intValue, intValue);
+ else if( value >>= uintValue )
+ fprintf (stderr,"%-10" SAL_PRIuUINT32 " (hex: %" SAL_PRIxUINT32 ")\n", uintValue, uintValue);
+ else if( value >>= int16Value )
+ fprintf (stderr,"%-10d (hex: %x)\n", int16Value, int16Value);
+ else if( value >>= uint16Value )
+ fprintf (stderr,"%-10d (hex: %x)\n", uint16Value, uint16Value);
+ else if( value >>= floatValue )
+ fprintf (stderr,"%f\n", floatValue);
+ else if( value >>= boolValue )
+ fprintf (stderr,"%-10d (bool)\n", boolValue);
+ else if( value >>= xNumRule ) {
+ fprintf (stderr, "XIndexReplace\n");
+ if (xNumRule.is()) {
+ for (int k=0; k<xNumRule->getCount(); k++) {
+ Sequence< PropertyValue > aBulletPropSeq;
+ fprintf (stderr, "level %d\n", k);
+ if (xNumRule->getByIndex (k) >>= aBulletPropSeq) {
+ for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) {
+ fprintf(stderr, "%46s = ", USS (rProp.Name));
+ lclDumpAnyValue (rProp.Value);
+ }
+ }
+ }
+ } else {
+ fprintf (stderr, "empty reference\n");
+ }
+ } else if( value >>= aWritingMode )
+ fprintf(stderr, "%d writing mode\n", static_cast<int>(aWritingMode));
+ else if( value >>= aTextVertAdj ) {
+ const char* s = "unknown";
+ switch( aTextVertAdj ) {
+ case TextVerticalAdjust_TOP:
+ s = "top";
+ break;
+ case TextVerticalAdjust_CENTER:
+ s = "center";
+ break;
+ case TextVerticalAdjust_BOTTOM:
+ s = "bottom";
+ break;
+ case TextVerticalAdjust_BLOCK:
+ s = "block";
+ break;
+ case TextVerticalAdjust::TextVerticalAdjust_MAKE_FIXED_SIZE:
+ s = "make_fixed_size";
+ break;
+ }
+ fprintf (stderr, "%s\n", s);
+ } else if( value >>= aTextHorizAdj ) {
+ const char* s = "unknown";
+ switch( aTextHorizAdj ) {
+ case TextHorizontalAdjust_LEFT:
+ s = "left";
+ break;
+ case TextHorizontalAdjust_CENTER:
+ s = "center";
+ break;
+ case TextHorizontalAdjust_RIGHT:
+ s = "right";
+ break;
+ case TextHorizontalAdjust_BLOCK:
+ s = "block";
+ break;
+ case TextHorizontalAdjust::TextHorizontalAdjust_MAKE_FIXED_SIZE:
+ s = "make_fixed_size";
+ break;
+ }
+ fprintf (stderr, "%s\n", s);
+ } else if( value >>= spacing ) {
+ fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height);
+ } else if( value.isExtractableTo(::cppu::UnoType<sal_Int32>::get())) {
+ fprintf (stderr,"is extractable to int32\n");
+ }
+// else if( value >>= pointValue )
+// fprintf (stderr,"%d (RectanglePoint)\n", pointValue);
+ else
+ fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName()));
+}
+
+#ifdef DBG_UTIL
+void PropertyMap::dump( const Reference< XPropertySet >& rXPropSet )
+{
+ Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
+ const Sequence< Property > props = info->getProperties ();
+
+ SAL_INFO("oox", "dump props, len: " << props.getLength ());
+
+ for (Property const & prop : props) {
+ OString name = OUStringToOString( prop.Name, RTL_TEXTENCODING_UTF8);
+ fprintf (stderr,"%30s = ", name.getStr() );
+
+ try {
+ lclDumpAnyValue (rXPropSet->getPropertyValue( prop.Name ));
+ } catch (const Exception&) {
+ fprintf (stderr,"unable to get '%s' value\n", USS(prop.Name));
+ }
+ }
+}
+#endif
+
+static void printLevel (int level)
+{
+ for (int i=0; i<level; i++)
+ fprintf (stderr, " ");
+}
+
+static const char *lclGetEnhancedParameterType( sal_uInt16 nType )
+{
+ const char* type;
+ switch (nType) {
+ case EnhancedCustomShapeParameterType::NORMAL:
+ type = "EnhancedCustomShapeParameterType::NORMAL";
+ break;
+ case EnhancedCustomShapeParameterType::EQUATION:
+ type = "EnhancedCustomShapeParameterType::EQUATION";
+ break;
+ case EnhancedCustomShapeParameterType::ADJUSTMENT:
+ type = "EnhancedCustomShapeParameterType::ADJUSTMENT";
+ break;
+ case EnhancedCustomShapeParameterType::LEFT:
+ type = "EnhancedCustomShapeParameterType::LEFT";
+ break;
+ case EnhancedCustomShapeParameterType::TOP:
+ type = "EnhancedCustomShapeParameterType::TOP";
+ break;
+ case EnhancedCustomShapeParameterType::RIGHT:
+ type = "EnhancedCustomShapeParameterType::RIGHT";
+ break;
+ case EnhancedCustomShapeParameterType::BOTTOM:
+ type = "EnhancedCustomShapeParameterType::BOTTOM";
+ break;
+ case EnhancedCustomShapeParameterType::XSTRETCH:
+ type = "EnhancedCustomShapeParameterType::XSTRETCH";
+ break;
+ case EnhancedCustomShapeParameterType::YSTRETCH:
+ type = "EnhancedCustomShapeParameterType::YSTRETCH";
+ break;
+ case EnhancedCustomShapeParameterType::HASSTROKE:
+ type = "EnhancedCustomShapeParameterType::HASSTROKE";
+ break;
+ case EnhancedCustomShapeParameterType::HASFILL:
+ type = "EnhancedCustomShapeParameterType::HASFILL";
+ break;
+ case EnhancedCustomShapeParameterType::WIDTH:
+ type = "EnhancedCustomShapeParameterType::WIDTH";
+ break;
+ case EnhancedCustomShapeParameterType::HEIGHT:
+ type = "EnhancedCustomShapeParameterType::HEIGHT";
+ break;
+ case EnhancedCustomShapeParameterType::LOGWIDTH:
+ type = "EnhancedCustomShapeParameterType::LOGWIDTH";
+ break;
+ case EnhancedCustomShapeParameterType::LOGHEIGHT:
+ type = "EnhancedCustomShapeParameterType::LOGHEIGHT";
+ break;
+ default:
+ type = "unknown";
+ break;
+ }
+ return type;
+}
+
+static void printParameterPairData(int level, EnhancedCustomShapeParameterPair const &pp)
+{
+ // These are always sal_Int32s so lets depend on that for our packing ...
+ sal_Int32 nFirstValue = {};
+ sal_Int32 nSecondValue = {}; // spurious -Werror=maybe-uninitialized
+ if (!(pp.First.Value >>= nFirstValue))
+ assert (false);
+ if (!(pp.Second.Value >>= nSecondValue))
+ assert (false);
+
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ printLevel (level + 1);
+ fprintf (stderr, "%s,\n", lclGetEnhancedParameterType(pp.First.Type));
+ printLevel (level + 1);
+ fprintf (stderr, "%s,\n", lclGetEnhancedParameterType(pp.Second.Type));
+ printLevel (level + 1);
+ fprintf (stderr, "%d, %d\n", static_cast<int>(nFirstValue), static_cast<int>(nSecondValue));
+ printLevel (level);
+ fprintf (stderr, "}");
+}
+
+static const char* lclDumpAnyValueCode( const Any& value, int level)
+{
+ OUString strValue;
+ Sequence< OUString > strArray;
+ Sequence< Any > anyArray;
+ Sequence< awt::Size > sizeArray;
+ Sequence< PropertyValue > propArray;
+ Sequence< Sequence< PropertyValue > > propArrayArray;
+ Sequence< EnhancedCustomShapeAdjustmentValue > adjArray;
+ Sequence< EnhancedCustomShapeTextFrame > segTextFrame;
+ Sequence< EnhancedCustomShapeSegment > segArray;
+ Sequence< EnhancedCustomShapeParameterPair > ppArray;
+ EnhancedCustomShapeSegment segment;
+ EnhancedCustomShapeTextFrame textFrame;
+ EnhancedCustomShapeParameterPair pp;
+ EnhancedCustomShapeParameter par;
+ awt::Rectangle rect;
+ awt::Size size;
+ sal_Int32 intValue;
+ sal_uInt32 uintValue;
+ sal_Int16 int16Value;
+ sal_uInt16 uint16Value;
+ sal_Int64 int64Value;
+ float floatValue = 0;
+ bool boolValue;
+ LineSpacing spacing;
+// RectanglePoint pointValue;
+ WritingMode aWritingMode;
+ TextVerticalAdjust aTextVertAdj;
+ TextHorizontalAdjust aTextHorizAdj;
+ Reference< XIndexReplace > xNumRule;
+
+ if( value >>= strValue )
+ {
+ printLevel (level);
+ fprintf (stderr,"OUString str = \"%s\";\n", USS( strValue ) );
+ return "Any (str)";
+ }
+ else if( value >>= strArray )
+ {
+ if (strArray.getLength() == 0)
+ return "Sequence< OUString >(0)";
+
+ printLevel (level);
+ fprintf (stderr,"static const char *aStrings[] = {\n");
+ for( int i=0; i<strArray.getLength(); i++ ) {
+ printLevel (level + 1);
+ fprintf (stderr,"\"%s\"%s\n", USS( strArray[i] ), i < strArray.getLength() - 1 ? "," : "" );
+ }
+ printLevel (level);
+ fprintf (stderr,"};\n");
+ return "createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings )";
+ }
+ else if( value >>= propArray )
+ {
+ printLevel (level);
+ fprintf (stderr,"Sequence< PropertyValue > aPropSequence (%" SAL_PRIdINT32 ");\n", propArray.getLength());
+ for( int i=0; i<propArray.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ printLevel (level + 1);
+ fprintf (stderr, "aPropSequence [%d].Name = \"%s\";\n", i, USS( propArray[i].Name ));
+ const char *var = lclDumpAnyValueCode( propArray[i].Value, level + 1 );
+ printLevel (level + 1);
+ fprintf (stderr, "aPropSequence [%d].Value = makeAny (%s);\n", i, var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aPropSequence";
+ }
+ else if( value >>= sizeArray )
+ {
+ printLevel (level);
+ fprintf (stderr, "Sequence< awt::Size > aSizeSequence (%" SAL_PRIdINT32 ");\n", sizeArray.getLength());
+ for( int i=0; i<sizeArray.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char *var = lclDumpAnyValueCode (Any (sizeArray[i]), level + 1);
+ printLevel (level + 1);
+ fprintf (stderr, "aSizeSequence [%d] = %s;\n", i, var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aSizeSequence";
+ }
+ else if( value >>= propArrayArray )
+ {
+ printLevel (level);
+ fprintf (stderr,"Sequence< Sequence < PropertyValue > > aPropSequenceSequence (%" SAL_PRIdINT32 ");\n", propArrayArray.getLength());
+ for( int i=0; i<propArrayArray.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char *var = lclDumpAnyValueCode( Any (propArrayArray[i]), level + 1 );
+ printLevel (level + 1);
+ fprintf (stderr, "aPropSequenceSequence [%d] = %s;\n", i, var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aPropSequenceSequence";
+ }
+ else if( value >>= anyArray )
+ {
+ fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+ for( int i=0; i<anyArray.getLength(); i++ ) {
+ fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(value.getValueTypeName()) );
+ lclDumpAnyValue( anyArray[i] );
+ }
+ }
+ else if( value >>= adjArray )
+ {
+ printLevel (level);
+ fprintf (stderr,"Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (%" SAL_PRIdINT32 ");\n", adjArray.getLength());
+ for( int i=0; i<adjArray.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char *var = lclDumpAnyValueCode( adjArray[i].Value, level + 1 );
+ printLevel (level + 1);
+ fprintf (stderr, "aAdjSequence [%d].Value = %s;\n", i, var);
+ if (adjArray[i].Name.getLength() > 0) {
+ printLevel (level + 1);
+ fprintf (stderr, "aAdjSequence [%d].Name = \"%s\";\n", i, USS (adjArray[i].Name));
+ }
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aAdjSequence";
+ }
+ else if( value >>= segArray )
+ {
+ if (segArray.getLength() == 0)
+ return "Sequence< EnhancedCustomShapeSegment >(0)";
+
+ printLevel (level);
+ fprintf (stderr,"static const sal_uInt16 nValues[] = {\n");
+ printLevel (level);
+ fprintf (stderr,"// Command, Count\n");
+ for( int i = 0; i < segArray.getLength(); i++ ) {
+ printLevel (level + 1);
+ fprintf (stderr,"%d,%d%s\n", segArray[i].Command,
+ segArray[i].Count, i < segArray.getLength() - 1 ? "," : "");
+ }
+ printLevel (level);
+ fprintf (stderr,"};\n");
+ return "createSegmentSequence( SAL_N_ELEMENTS( nValues ), nValues )";
+ }
+ else if( value >>= segTextFrame )
+ {
+ printLevel (level);
+ fprintf (stderr, "Sequence< EnhancedCustomShapeTextFrame > aTextFrameSeq (%" SAL_PRIdINT32 ");\n", segTextFrame.getLength());
+ for( int i=0; i<segTextFrame.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char *var = lclDumpAnyValueCode (Any (segTextFrame[i]), level + 1);
+ printLevel (level + 1);
+ fprintf (stderr, "aTextFrameSeq [%d] = %s;\n", i, var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aTextFrameSeq";
+ }
+ else if( value >>= ppArray )
+ {
+ printLevel (level);
+ if (ppArray.getLength() == 0)
+ return "Sequence< EnhancedCustomShapeParameterPair >(0)";
+
+ fprintf (stderr, "static const CustomShapeProvider::ParameterPairData aData[] = {\n");
+ for( int i = 0; i < ppArray.getLength(); i++ ) {
+ printParameterPairData(level + 1, ppArray[i]);
+ fprintf (stderr,"%s\n", i < ppArray.getLength() - 1 ? "," : "");
+ }
+ printLevel (level);
+ fprintf (stderr,"};\n");
+
+ return "createParameterPairSequence(SAL_N_ELEMENTS(aData), aData)";
+ }
+ else if( value >>= segment )
+ {
+ printLevel (level);
+ fprintf (stderr, "EnhancedCustomShapeSegment aSegment;\n");
+ printLevel (level);
+ // TODO: use EnhancedCustomShapeSegmentCommand constants
+ fprintf (stderr, "aSegment.Command = %d;\n", segment.Command);
+ printLevel (level);
+ fprintf (stderr, "aSegment.Count = %d;\n", segment.Count);
+ return "aSegment";
+ }
+ else if( value >>= textFrame )
+ {
+ printLevel (level);
+ fprintf (stderr, "EnhancedCustomShapeTextFrame aTextFrame;\n");
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ {
+ const char* var = lclDumpAnyValueCode( Any (textFrame.TopLeft), level + 1 );
+ printLevel (level + 1);
+ fprintf (stderr, "aTextFrame.TopLeft = %s;\n", var);
+ }
+ printLevel (level);
+ fprintf (stderr, "}\n");
+
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ {
+ const char* var = lclDumpAnyValueCode( Any (textFrame.BottomRight), level + 1 );
+ printLevel (level + 1);
+ fprintf (stderr, "aTextFrame.BottomRight = %s;\n", var);
+ }
+ printLevel (level);
+ fprintf (stderr, "}\n");
+
+ return "aTextFrame";
+ }
+ else if( value >>= pp )
+ {
+ printLevel (level);
+ fprintf (stderr, "static const CustomShapeProvider::ParameterPairData aData =\n");
+ printParameterPairData(level, pp);
+ fprintf (stderr, ";\n");
+
+ return "createParameterPair(&aData)";
+ }
+ else if( value >>= par )
+ {
+ printLevel (level);
+ fprintf (stderr,"EnhancedCustomShapeParameter aParameter;\n");
+ const char* var = lclDumpAnyValueCode( par.Value, level );
+ printLevel (level);
+ fprintf (stderr,"aParameter.Value = %s;\n", var);
+ printLevel (level);
+ fprintf (stderr,"aParameter.Type = %s;\n",
+ lclGetEnhancedParameterType(par.Type));
+ return "aParameter";
+ }
+ else if( value >>= int64Value )
+ {
+ printLevel (level);
+ fprintf (stderr,"Any aAny ((sal_Int64) %" SAL_PRIdINT64 ");\n", int64Value);
+ return "aAny";
+ }
+ else if( value >>= intValue )
+ fprintf (stderr,"%" SAL_PRIdINT32 " (hex: %" SAL_PRIxUINT32 ")\n", intValue, intValue);
+ else if( value >>= uintValue )
+ fprintf (stderr,"%" SAL_PRIdINT32 " (hex: %" SAL_PRIxUINT32 ")\n", uintValue, uintValue);
+ else if( value >>= int16Value )
+ fprintf (stderr,"%d (hex: %x)\n", int16Value, int16Value);
+ else if( value >>= uint16Value )
+ fprintf (stderr,"%d (hex: %x)\n", uint16Value, uint16Value);
+ else if( value >>= floatValue )
+ fprintf (stderr,"%f\n", floatValue);
+ else if( value >>= boolValue ) {
+ if (boolValue)
+ return "(sal_Bool) sal_True";
+ else
+ return "(sal_Bool) sal_False";
+ }
+ else if( value >>= xNumRule ) {
+ fprintf (stderr, "XIndexReplace\n");
+ for (int k=0; k<xNumRule->getCount(); k++) {
+ Sequence< PropertyValue > aBulletPropSeq;
+ fprintf (stderr, "level %d\n", k);
+ if (xNumRule->getByIndex (k) >>= aBulletPropSeq) {
+ for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) {
+ fprintf(stderr, "%46s = ", USS (rProp.Name));
+ lclDumpAnyValue (rProp.Value);
+ }
+ }
+ }
+ }
+ else if( value >>= aWritingMode )
+ fprintf (stderr, "%d writing mode\n", static_cast<int>(aWritingMode));
+ else if( value >>= aTextVertAdj ) {
+ const char* s = "unknown";
+ switch( aTextVertAdj ) {
+ case TextVerticalAdjust_TOP:
+ s = "top";
+ break;
+ case TextVerticalAdjust_CENTER:
+ s = "center";
+ break;
+ case TextVerticalAdjust_BOTTOM:
+ s = "bottom";
+ break;
+ case TextVerticalAdjust_BLOCK:
+ s = "block";
+ break;
+ case TextVerticalAdjust::TextVerticalAdjust_MAKE_FIXED_SIZE:
+ s = "make_fixed_size";
+ break;
+ }
+ fprintf (stderr, "%s\n", s);
+ }
+ else if( value >>= aTextHorizAdj ) {
+ const char* s = "unknown";
+ switch( aTextHorizAdj ) {
+ case TextHorizontalAdjust_LEFT:
+ s = "left";
+ break;
+ case TextHorizontalAdjust_CENTER:
+ s = "center";
+ break;
+ case TextHorizontalAdjust_RIGHT:
+ s = "right";
+ break;
+ case TextHorizontalAdjust_BLOCK:
+ s = "block";
+ break;
+ case TextHorizontalAdjust::TextHorizontalAdjust_MAKE_FIXED_SIZE:
+ s = "make_fixed_size";
+ break;
+ }
+ fprintf (stderr, "%s\n", s);
+ }
+ else if( value >>= spacing ) {
+ fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height);
+ }
+ else if( value >>= rect ) {
+ printLevel (level);
+ fprintf (stderr, "awt::Rectangle aRectangle;\n");
+ printLevel (level);
+ fprintf (stderr, "aRectangle.X = %" SAL_PRIdINT32 ";\n", rect.X);
+ printLevel (level);
+ fprintf (stderr, "aRectangle.Y = %" SAL_PRIdINT32 ";\n", rect.Y);
+ printLevel (level);
+ fprintf (stderr, "aRectangle.Width = %" SAL_PRIdINT32 ";\n", rect.Width);
+ printLevel (level);
+ fprintf (stderr, "aRectangle.Height = %" SAL_PRIdINT32 ";\n", rect.Height);
+ return "aRectangle";
+ }
+ else if( value >>= size ) {
+ printLevel (level);
+ fprintf (stderr, "awt::Size aSize;\n");
+ printLevel (level);
+ fprintf (stderr, "aSize.Width = %" SAL_PRIdINT32 ";\n", size.Width);
+ printLevel (level);
+ fprintf (stderr, "aSize.Height = %" SAL_PRIdINT32 ";\n", size.Height);
+ return "aSize";
+ }
+ else if( value.isExtractableTo(::cppu::UnoType<sal_Int32>::get())) {
+ fprintf (stderr,"is extractable to int32\n");
+ }
+ else
+ fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName()));
+
+ return "";
+}
+
+void PropertyMap::dumpCode( const Reference< XPropertySet >& rXPropSet )
+{
+ Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
+ const Sequence< Property > props = info->getProperties ();
+ static const OUStringLiteral sType = u"Type";
+
+ for (const Property& rProp : props) {
+
+ // ignore Type, it is set elsewhere
+ if (rProp.Name == sType)
+ continue;
+
+ OString name = OUStringToOString( rProp.Name, RTL_TEXTENCODING_UTF8);
+
+ try {
+ int level = 1;
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char* var = lclDumpAnyValueCode (rXPropSet->getPropertyValue (rProp.Name), level + 1);
+ printLevel (level + 1);
+ fprintf (stderr,"aPropertyMap.setProperty(PROP_%s, %s);\n", name.getStr(), var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ } catch (const Exception&) {
+ fprintf (stderr,"unable to get '%s' value\n", USS(rProp.Name));
+ }
+ }
+}
+
+void PropertyMap::dumpData(const Reference<XPropertySet>& xPropertySet)
+{
+ Reference<XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
+ const Sequence<Property> aProperties = xPropertySetInfo->getProperties();
+
+ for (const Property& rProp : aProperties)
+ {
+ std::cerr << rProp.Name << std::endl;
+ std::cerr << comphelper::anyToString(xPropertySet->getPropertyValue(rProp.Name)) << std::endl;
+ }
+}
+
+#endif
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx
new file mode 100644
index 000000000..98151d5fb
--- /dev/null
+++ b/oox/source/helper/propertyset.cxx
@@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/propertyset.hxx>
+
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
+#include <oox/helper/propertymap.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+
+void PropertySet::set( const Reference< XPropertySet >& rxPropSet )
+{
+ mxPropSet = rxPropSet;
+ mxMultiPropSet.set( mxPropSet, UNO_QUERY );
+ if( mxPropSet.is() ) try
+ {
+ mxPropSetInfo = mxPropSet->getPropertySetInfo();
+ }
+ catch( Exception& )
+ {
+ }
+}
+
+bool PropertySet::hasProperty( sal_Int32 nPropId ) const
+{
+ if( mxPropSetInfo.is() ) try
+ {
+ const OUString& rPropName = PropertyMap::getPropertyName( nPropId );
+ return mxPropSetInfo->hasPropertyByName( rPropName );
+ }
+ catch( Exception& )
+ {
+ }
+ return false;
+}
+
+// Get properties -------------------------------------------------------------
+
+Any PropertySet::getAnyProperty( sal_Int32 nPropId ) const
+{
+ Any aValue;
+ return implGetPropertyValue( aValue, PropertyMap::getPropertyName( nPropId ) ) ? aValue : Any();
+}
+
+// Set properties -------------------------------------------------------------
+
+bool PropertySet::setAnyProperty( sal_Int32 nPropId, const Any& rValue )
+{
+ return implSetPropertyValue( PropertyMap::getPropertyName( nPropId ), rValue );
+}
+
+void PropertySet::setProperties( const Sequence< OUString >& rPropNames, const Sequence< Any >& rValues )
+{
+ OSL_ENSURE( rPropNames.getLength() == rValues.getLength(),
+ "PropertySet::setProperties - length of sequences different" );
+
+ if( mxMultiPropSet.is() ) try
+ {
+ mxMultiPropSet->setPropertyValues( rPropNames, rValues );
+ return;
+ }
+ catch( Exception& )
+ {
+ SAL_WARN( "oox", "PropertySet::setProperties - cannot set all property values, fallback to single mode" );
+ }
+
+ if( mxPropSet.is() )
+ {
+ const Any* pValue = rValues.getConstArray();
+ for( const OUString& rPropName : rPropNames )
+ implSetPropertyValue( rPropName, *pValue++ );
+ }
+}
+
+void PropertySet::setProperties( const PropertyMap& rPropertyMap )
+{
+ if( !rPropertyMap.empty() )
+ {
+ Sequence< OUString > aPropNames;
+ Sequence< Any > aValues;
+ rPropertyMap.fillSequences( aPropNames, aValues );
+ setProperties( aPropNames, aValues );
+ }
+}
+
+// private --------------------------------------------------------------------
+
+bool PropertySet::implGetPropertyValue( Any& orValue, const OUString& rPropName ) const
+{
+ if( mxPropSet.is() ) try
+ {
+ orValue = mxPropSet->getPropertyValue( rPropName );
+ return true;
+ }
+ catch( const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "PropertySet::implGetPropertyValue - cannot get property \"" <<
+ rPropName << "\"");
+ }
+ return false;
+}
+
+bool PropertySet::implSetPropertyValue( const OUString& rPropName, const Any& rValue )
+{
+ if( mxPropSet.is() ) try
+ {
+ mxPropSet->setPropertyValue( rPropName, rValue );
+ return true;
+ }
+ catch( const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "PropertySet::implSetPropertyValue - cannot set property \"" <<
+ rPropName << "\"");
+ }
+ return false;
+}
+
+#ifdef DBG_UTIL
+void PropertySet::dump()
+{
+ PropertyMap::dump( mxPropSet );
+}
+#endif
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
new file mode 100644
index 000000000..50e7562dc
--- /dev/null
+++ b/oox/source/helper/storagebase.cxx
@@ -0,0 +1,255 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/storagebase.hxx>
+
+#include <com/sun/star/io/XStream.hpp>
+#include <osl/diagnose.h>
+#include <rtl/ustrbuf.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+void lclSplitFirstElement( OUString& orElement, OUString& orRemainder, const OUString& _aFullName )
+{
+ OUString aFullName = _aFullName;
+ sal_Int32 nSlashPos = aFullName.indexOf( '/' );
+
+ // strip leading slashes
+ while( nSlashPos == 0 )
+ {
+ aFullName = aFullName.copy(1);
+ nSlashPos = aFullName.indexOf( '/' );
+ }
+
+ if( (0 <= nSlashPos) && (nSlashPos < aFullName.getLength()) )
+ {
+ orElement = aFullName.copy( 0, nSlashPos );
+ orRemainder = aFullName.copy( nSlashPos + 1 );
+ }
+ else
+ {
+ orElement = aFullName;
+ }
+}
+
+} // namespace
+
+StorageBase::StorageBase( const Reference< XInputStream >& rxInStream, bool bBaseStreamAccess ) :
+ mxInStream( rxInStream ),
+ mbBaseStreamAccess( bBaseStreamAccess ),
+ mbReadOnly( true )
+{
+ OSL_ENSURE( mxInStream.is(), "StorageBase::StorageBase - missing base input stream" );
+}
+
+StorageBase::StorageBase( const Reference< XStream >& rxOutStream, bool bBaseStreamAccess ) :
+ mxOutStream( rxOutStream ),
+ mbBaseStreamAccess( bBaseStreamAccess ),
+ mbReadOnly( false )
+{
+ OSL_ENSURE( mxOutStream.is(), "StorageBase::StorageBase - missing base output stream" );
+}
+
+StorageBase::StorageBase( const StorageBase& rParentStorage, const OUString& rStorageName, bool bReadOnly ) :
+ maParentPath( rParentStorage.getPath() ),
+ maStorageName( rStorageName ),
+ mbBaseStreamAccess( false ),
+ mbReadOnly( bReadOnly )
+{
+}
+
+StorageBase::~StorageBase()
+{
+}
+
+bool StorageBase::isStorage() const
+{
+ return implIsStorage();
+}
+
+bool StorageBase::isRootStorage() const
+{
+ return implIsStorage() && maStorageName.isEmpty();
+}
+
+Reference< XStorage > StorageBase::getXStorage() const
+{
+ return implGetXStorage();
+}
+
+OUString StorageBase::getPath() const
+{
+ OUStringBuffer aBuffer( maParentPath );
+ if( !aBuffer.isEmpty() )
+ aBuffer.append( '/' );
+ aBuffer.append( maStorageName );
+ return aBuffer.makeStringAndClear();
+}
+
+void StorageBase::getElementNames( ::std::vector< OUString >& orElementNames ) const
+{
+ orElementNames.clear();
+ implGetElementNames( orElementNames );
+}
+
+StorageRef StorageBase::openSubStorage( const OUString& rStorageName, bool bCreateMissing )
+{
+ StorageRef xSubStorage;
+ OSL_ENSURE( !bCreateMissing || !mbReadOnly, "StorageBase::openSubStorage - cannot create substorage in read-only mode" );
+ if( !bCreateMissing || !mbReadOnly )
+ {
+ OUString aElement, aRemainder;
+ lclSplitFirstElement( aElement, aRemainder, rStorageName );
+ if( !aElement.isEmpty() )
+ xSubStorage = getSubStorage( aElement, bCreateMissing );
+ if( xSubStorage && !aRemainder.isEmpty() )
+ xSubStorage = xSubStorage->openSubStorage( aRemainder, bCreateMissing );
+ }
+ return xSubStorage;
+}
+
+Reference< XInputStream > StorageBase::openInputStream( const OUString& rStreamName )
+{
+ Reference< XInputStream > xInStream;
+ OUString aElement, aRemainder;
+ lclSplitFirstElement( aElement, aRemainder, rStreamName );
+ if( !aElement.isEmpty() )
+ {
+ if( !aRemainder.isEmpty() )
+ {
+ StorageRef xSubStorage = getSubStorage( aElement, false );
+ if( xSubStorage )
+ xInStream = xSubStorage->openInputStream( aRemainder );
+ }
+ else
+ {
+ xInStream = implOpenInputStream( aElement );
+ }
+ }
+ else if( mbBaseStreamAccess )
+ {
+ xInStream = mxInStream;
+ }
+ return xInStream;
+}
+
+Reference< XOutputStream > StorageBase::openOutputStream( const OUString& rStreamName )
+{
+ Reference< XOutputStream > xOutStream;
+ OSL_ENSURE( !mbReadOnly, "StorageBase::openOutputStream - cannot create output stream in read-only mode" );
+ if( !mbReadOnly )
+ {
+ OUString aElement, aRemainder;
+ lclSplitFirstElement( aElement, aRemainder, rStreamName );
+ if( !aElement.isEmpty() )
+ {
+ if( !aRemainder.isEmpty() )
+ {
+ StorageRef xSubStorage = getSubStorage( aElement, true );
+ if( xSubStorage )
+ xOutStream = xSubStorage->openOutputStream( aRemainder );
+ }
+ else
+ {
+ xOutStream = implOpenOutputStream( aElement );
+ }
+ }
+ else if( mbBaseStreamAccess )
+ {
+ xOutStream = mxOutStream->getOutputStream();
+ }
+ }
+ return xOutStream;
+}
+
+void StorageBase::copyToStorage( StorageBase& rDestStrg, const OUString& rElementName )
+{
+ OSL_ENSURE( rDestStrg.isStorage() && !rDestStrg.isReadOnly(), "StorageBase::copyToStorage - invalid destination" );
+ OSL_ENSURE( !rElementName.isEmpty(), "StorageBase::copyToStorage - invalid element name" );
+ if( !rDestStrg.isStorage() || rDestStrg.isReadOnly() || rElementName.isEmpty() )
+ return;
+
+ StorageRef xSubStrg = openSubStorage( rElementName, false );
+ if( xSubStrg )
+ {
+ StorageRef xDestSubStrg = rDestStrg.openSubStorage( rElementName, true );
+ if( xDestSubStrg )
+ xSubStrg->copyStorageToStorage( *xDestSubStrg );
+ }
+ else
+ {
+ Reference< XInputStream > xInStrm = openInputStream( rElementName );
+ if( xInStrm.is() )
+ {
+ Reference< XOutputStream > xOutStrm = rDestStrg.openOutputStream( rElementName );
+ if( xOutStrm.is() )
+ {
+ BinaryXInputStream aInStrm( xInStrm, true );
+ BinaryXOutputStream aOutStrm( xOutStrm, true );
+ aInStrm.copyToStream( aOutStrm );
+ }
+ }
+ }
+}
+
+void StorageBase::copyStorageToStorage( StorageBase& rDestStrg )
+{
+ OSL_ENSURE( rDestStrg.isStorage() && !rDestStrg.isReadOnly(), "StorageBase::copyToStorage - invalid destination" );
+ if( rDestStrg.isStorage() && !rDestStrg.isReadOnly() )
+ {
+ ::std::vector< OUString > aElements;
+ getElementNames( aElements );
+ for (auto const& elem : aElements)
+ copyToStorage(rDestStrg, elem);
+ }
+}
+
+void StorageBase::commit()
+{
+ OSL_ENSURE( !mbReadOnly, "StorageBase::commit - cannot commit in read-only mode" );
+ if( !mbReadOnly )
+ {
+ // commit all open substorages
+ maSubStorages.forEachMem( &StorageBase::commit );
+ // commit this storage
+ implCommit();
+ }
+}
+
+// private --------------------------------------------------------------------
+
+StorageRef StorageBase::getSubStorage( const OUString& rElementName, bool bCreateMissing )
+{
+ StorageRef& rxSubStrg = maSubStorages[ rElementName ];
+ if( !rxSubStrg )
+ rxSubStrg = implOpenSubStorage( rElementName, bCreateMissing );
+ return rxSubStrg;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
new file mode 100644
index 000000000..a48860c35
--- /dev/null
+++ b/oox/source/helper/textinputstream.cxx
@@ -0,0 +1,208 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/textinputstream.hxx>
+
+#include <com/sun/star/io/NotConnectedException.hpp>
+#include <com/sun/star/io/TextInputStream.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <osl/diagnose.h>
+#include <rtl/tencinfo.h>
+#include <oox/helper/binaryinputstream.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+/** Implementation of a UNO input stream wrapping a binary input stream.
+ */
+class UnoBinaryInputStream : public ::cppu::WeakImplHelper< XInputStream >
+{
+public:
+ explicit UnoBinaryInputStream( BinaryInputStream& rInStrm );
+
+ virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead ) override;
+ virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead ) override;
+ virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) override;
+ virtual sal_Int32 SAL_CALL available() override;
+ virtual void SAL_CALL closeInput() override;
+
+private:
+ /// @throws NotConnectedException
+ void ensureConnected() const;
+
+private:
+ BinaryInputStream* mpInStrm;
+};
+
+UnoBinaryInputStream::UnoBinaryInputStream( BinaryInputStream& rInStrm ) :
+ mpInStrm( &rInStrm )
+{
+}
+
+sal_Int32 SAL_CALL UnoBinaryInputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
+{
+ ensureConnected();
+ return mpInStrm->readData( rData, nBytesToRead );
+}
+
+sal_Int32 SAL_CALL UnoBinaryInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
+{
+ ensureConnected();
+ return mpInStrm->readData( rData, nMaxBytesToRead );
+}
+
+void SAL_CALL UnoBinaryInputStream::skipBytes( sal_Int32 nBytesToSkip )
+{
+ ensureConnected();
+ mpInStrm->skip( nBytesToSkip );
+}
+
+sal_Int32 SAL_CALL UnoBinaryInputStream::available()
+{
+ ensureConnected();
+ throw RuntimeException( "Functionality not supported", Reference< XInputStream >() );
+}
+
+void SAL_CALL UnoBinaryInputStream::closeInput()
+{
+ ensureConnected();
+ mpInStrm->close();
+ mpInStrm = nullptr;
+}
+
+void UnoBinaryInputStream::ensureConnected() const
+{
+ if( !mpInStrm )
+ throw NotConnectedException( "Stream closed" );
+}
+
+} // namespace
+
+TextInputStream::TextInputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm, rtl_TextEncoding eTextEnc )
+{
+ init( rxContext, rxInStrm, eTextEnc );
+}
+
+TextInputStream::TextInputStream( const Reference< XComponentContext >& rxContext, BinaryInputStream& rInStrm, rtl_TextEncoding eTextEnc )
+{
+ init( rxContext, new UnoBinaryInputStream( rInStrm ), eTextEnc );
+}
+
+TextInputStream::~TextInputStream()
+{
+}
+
+bool TextInputStream::isEof() const
+{
+ if( mxTextStrm.is() ) try
+ {
+ return mxTextStrm->isEOF();
+ }
+ catch (const Exception&)
+ {
+ }
+ return true;
+}
+
+OUString TextInputStream::readLine()
+{
+ if( mxTextStrm.is() ) try
+ {
+ /* The function createFinalString() adds a character that may have
+ been buffered in the previous call of readToChar() (see below). */
+ return createFinalString( mxTextStrm->readLine() );
+ }
+ catch (const Exception&)
+ {
+ mxTextStrm.clear();
+ }
+ return OUString();
+}
+
+OUString TextInputStream::readToChar( sal_Unicode cChar, bool bIncludeChar )
+{
+ if( mxTextStrm.is() ) try
+ {
+ Sequence< sal_Unicode > aDelimiters{ cChar };
+ /* Always get the delimiter character from the UNO text input stream.
+ In difference to this implementation, it will not return it in the
+ next call but silently skip it. If caller specifies to exclude the
+ character in this call, it will be returned in the next call of one
+ of the own member functions. The function createFinalString() adds
+ a character that has been buffered in the previous call. */
+ OUString aString = createFinalString( mxTextStrm->readString( aDelimiters, false ) );
+ // remove last character from string and remember it for next call
+ if( !bIncludeChar && !aString.isEmpty() && (aString[ aString.getLength() - 1 ] == cChar) )
+ {
+ mcPendingChar = cChar;
+ aString = aString.copy( 0, aString.getLength() - 1 );
+ }
+ return aString;
+ }
+ catch (const Exception&)
+ {
+ mxTextStrm.clear();
+ }
+ return OUString();
+}
+
+Reference< XTextInputStream2 > TextInputStream::createXTextInputStream(
+ const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm, rtl_TextEncoding eTextEnc )
+{
+ Reference< XTextInputStream2 > xTextStrm;
+ const char* pcCharset = rtl_getBestMimeCharsetFromTextEncoding( eTextEnc );
+ OSL_ENSURE( pcCharset, "TextInputStream::createXTextInputStream - unsupported text encoding" );
+ if( rxContext.is() && rxInStrm.is() && pcCharset ) try
+ {
+ xTextStrm = css::io::TextInputStream::create( rxContext );
+ xTextStrm->setInputStream( rxInStrm );
+ xTextStrm->setEncoding( OUString::createFromAscii( pcCharset ) );
+ }
+ catch (const Exception&)
+ {
+ }
+ return xTextStrm;
+}
+
+// private --------------------------------------------------------------------
+
+OUString TextInputStream::createFinalString( const OUString& rString )
+{
+ if( mcPendingChar == 0 )
+ return rString;
+
+ OUString aString = OUStringChar( mcPendingChar ) + rString;
+ mcPendingChar = 0;
+ return aString;
+}
+
+void TextInputStream::init( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm, rtl_TextEncoding eTextEnc )
+{
+ mcPendingChar = 0;
+ mxTextStrm = createXTextInputStream( rxContext, rxInStrm, eTextEnc );
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx
new file mode 100644
index 000000000..d11d145bb
--- /dev/null
+++ b/oox/source/helper/zipstorage.cxx
@@ -0,0 +1,203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/zipstorage.hxx>
+
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/storagehelper.hxx>
+
+namespace oox {
+
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStream ) :
+ StorageBase( rxInStream, false )
+{
+ OSL_ENSURE( rxContext.is(), "ZipStorage::ZipStorage - missing component context" );
+ // create base storage object
+ if( !rxContext.is() )
+ return;
+
+ try
+ {
+ /* #i105325# ::comphelper::OStorageHelper::GetStorageFromInputStream()
+ cannot be used here as it will open a storage with format type
+ 'PackageFormat' that will not work with OOXML packages.
+
+ #161971# The MS-document storages should always be opened in repair
+ mode to ignore the format errors and get so much info as possible.
+ I hate this solution, but it seems to be the only consistent way to
+ handle the MS documents.
+
+ TODO: #i105410# switch to 'OFOPXMLFormat' and use its
+ implementation of relations handling.
+ */
+ mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
+ ZIP_STORAGE_FORMAT_STRING, rxInStream, rxContext, false);
+ }
+ catch (Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.storage", "ZipStorage::ZipStorage exception opening input storage");
+ }
+}
+
+ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const Reference< XStream >& rxStream ) :
+ StorageBase( rxStream, false )
+{
+ OSL_ENSURE( rxContext.is(), "ZipStorage::ZipStorage - missing component context" );
+ // create base storage object
+ if( rxContext.is() ) try
+ {
+ const sal_Int32 nOpenMode = ElementModes::READWRITE | ElementModes::TRUNCATE;
+ mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream(
+ OFOPXML_STORAGE_FORMAT_STRING, rxStream, nOpenMode, rxContext, true);
+ }
+ catch (Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.storage", "ZipStorage::ZipStorage exception opening output storage");
+ }
+}
+
+ZipStorage::ZipStorage( const ZipStorage& rParentStorage, const Reference< XStorage >& rxStorage, const OUString& rElementName ) :
+ StorageBase( rParentStorage, rElementName, rParentStorage.isReadOnly() ),
+ mxStorage( rxStorage )
+{
+ SAL_WARN_IF(!mxStorage.is(), "oox.storage", "ZipStorage::ZipStorage "
+ " - missing storage" );
+}
+
+ZipStorage::~ZipStorage()
+{
+}
+
+bool ZipStorage::implIsStorage() const
+{
+ return mxStorage.is();
+}
+
+Reference< XStorage > ZipStorage::implGetXStorage() const
+{
+ return mxStorage;
+}
+
+void ZipStorage::implGetElementNames( ::std::vector< OUString >& orElementNames ) const
+{
+ if( mxStorage.is() ) try
+ {
+ const Sequence<OUString> aNames = mxStorage->getElementNames();
+ if( aNames.hasElements() )
+ orElementNames.insert( orElementNames.end(), aNames.begin(), aNames.end() );
+ }
+ catch (Exception const&)
+ {
+ TOOLS_INFO_EXCEPTION("oox.storage", "getElementNames");
+ }
+}
+
+StorageRef ZipStorage::implOpenSubStorage( const OUString& rElementName, bool bCreateMissing )
+{
+ Reference< XStorage > xSubXStorage;
+ bool bMissing = false;
+ if( mxStorage.is() ) try
+ {
+ // XStorage::isStorageElement may throw various exceptions...
+ if( mxStorage->isStorageElement( rElementName ) )
+ xSubXStorage = mxStorage->openStorageElement(
+ rElementName, css::embed::ElementModes::READ );
+ }
+ catch( NoSuchElementException& )
+ {
+ bMissing = true;
+ }
+ catch (Exception const&)
+ {
+ TOOLS_INFO_EXCEPTION("oox.storage", "openStorageElement");
+ }
+
+ if( bMissing && bCreateMissing ) try
+ {
+ xSubXStorage = mxStorage->openStorageElement(
+ rElementName, css::embed::ElementModes::READWRITE );
+ }
+ catch (Exception const&)
+ {
+ TOOLS_INFO_EXCEPTION("oox.storage", "openStorageElement");
+ }
+
+ StorageRef xSubStorage;
+ if( xSubXStorage.is() )
+ xSubStorage.reset( new ZipStorage( *this, xSubXStorage, rElementName ) );
+ return xSubStorage;
+}
+
+Reference< XInputStream > ZipStorage::implOpenInputStream( const OUString& rElementName )
+{
+ Reference< XInputStream > xInStream;
+ if( mxStorage.is() ) try
+ {
+ xInStream.set( mxStorage->openStreamElement( rElementName, css::embed::ElementModes::READ ), UNO_QUERY );
+ }
+ catch (Exception const&)
+ {
+ TOOLS_INFO_EXCEPTION("oox.storage", "openStreamElement");
+ }
+ return xInStream;
+}
+
+Reference< XOutputStream > ZipStorage::implOpenOutputStream( const OUString& rElementName )
+{
+ Reference< XOutputStream > xOutStream;
+ if( mxStorage.is() ) try
+ {
+ xOutStream.set( mxStorage->openStreamElement( rElementName, css::embed::ElementModes::READWRITE ), UNO_QUERY );
+ }
+ catch (Exception const&)
+ {
+ TOOLS_INFO_EXCEPTION("oox.storage", "openStreamElement");
+ }
+ return xOutStream;
+}
+
+void ZipStorage::implCommit() const
+{
+ try
+ {
+ Reference< XTransactedObject >( mxStorage, UNO_QUERY_THROW )->commit();
+ }
+ catch (Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox.storage", "commit");
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/mathml/export.cxx b/oox/source/mathml/export.cxx
new file mode 100644
index 000000000..ceb40d0df
--- /dev/null
+++ b/oox/source/mathml/export.cxx
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <oox/mathml/export.hxx>
+
+namespace oox
+{
+FormulaExportBase::FormulaExportBase() {}
+
+} // namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/mathml/import.cxx b/oox/source/mathml/import.cxx
new file mode 100644
index 000000000..bff603d2b
--- /dev/null
+++ b/oox/source/mathml/import.cxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <oox/mathml/import.hxx>
+
+#include <oox/mathml/importutils.hxx>
+#include <oox/core/contexthandler.hxx>
+#include <oox/token/namespaces.hxx>
+
+#include <drawingml/textparagraph.hxx>
+
+
+using namespace ::com::sun::star;
+
+namespace oox
+{
+
+FormulaImportBase::FormulaImportBase()
+{
+}
+
+namespace formulaimport {
+
+namespace {
+
+class LazyMathBufferingContext : public core::ContextHandler
+{
+private:
+ XmlStreamBuilder & m_rBuilder;
+ std::vector<sal_Int32> m_OpenElements;
+
+public:
+ LazyMathBufferingContext(core::ContextHandler const& rParent,
+ drawingml::TextParagraph & rPara);
+
+ // com.sun.star.xml.sax.XFastContextHandler interface ---------------------
+
+ virtual void SAL_CALL startFastElement(::sal_Int32 Element, const uno::Reference<xml::sax::XFastAttributeList>& xAttribs) override;
+ virtual void SAL_CALL endFastElement(::sal_Int32 Element) override;
+ virtual uno::Reference< xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(::sal_Int32 Element, const uno::Reference<xml::sax::XFastAttributeList >& xAttribs) override;
+ virtual void SAL_CALL characters(const OUString& rChars) override;
+
+};
+
+}
+
+LazyMathBufferingContext::LazyMathBufferingContext(
+ core::ContextHandler const& rParent, drawingml::TextParagraph & rPara)
+ : core::ContextHandler(rParent)
+ , m_rBuilder(rPara.GetMathXml())
+{
+}
+
+void SAL_CALL LazyMathBufferingContext::startFastElement(
+ sal_Int32 const nElement,
+ uno::Reference<xml::sax::XFastAttributeList> const& xAttrs)
+{
+ if (0 < m_OpenElements.size()) // ignore a14:m
+ { // ignore outer oMathPara
+ if (1 != m_OpenElements.size() || OOX_TOKEN(officeMath, oMathPara) != nElement)
+ {
+ m_rBuilder.appendOpeningTag(nElement, xAttrs);
+ }
+ }
+ m_OpenElements.push_back(nElement);
+}
+
+void SAL_CALL LazyMathBufferingContext::endFastElement(sal_Int32 const nElement)
+{
+ m_OpenElements.pop_back();
+ if (0 < m_OpenElements.size()) // ignore a14:m
+ { // ignore outer oMathPara
+ if (1 != m_OpenElements.size() || OOX_TOKEN(officeMath, oMathPara) != nElement)
+ {
+ m_rBuilder.appendClosingTag(nElement);
+ }
+ }
+}
+
+uno::Reference<xml::sax::XFastContextHandler> SAL_CALL
+LazyMathBufferingContext::createFastChildContext(sal_Int32 const,
+ uno::Reference<xml::sax::XFastAttributeList> const&)
+{
+ return this;
+}
+
+void SAL_CALL LazyMathBufferingContext::characters(OUString const& rChars)
+{
+ if (0 < m_OpenElements.size()) // ignore a14:m
+ {
+ if (m_OpenElements.back() == OOX_TOKEN(officeMath, t))
+ {
+ m_rBuilder.appendCharacters(rChars);
+ }
+ }
+}
+
+} // namespace oox::formulaimport
+
+rtl::Reference<core::ContextHandler> CreateLazyMathBufferingContext(
+ core::ContextHandler const& rParent, drawingml::TextParagraph & rPara)
+{
+ return new formulaimport::LazyMathBufferingContext(rParent, rPara);
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx
new file mode 100644
index 000000000..16f527389
--- /dev/null
+++ b/oox/source/mathml/importutils.cxx
@@ -0,0 +1,337 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <oox/mathml/importutils.hxx>
+
+#include <assert.h>
+
+#include <com/sun/star/xml/FastAttribute.hpp>
+#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+#include <oox/token/tokenmap.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/token/namespaces.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+
+#define OPENING( token ) XML_STREAM_OPENING( token )
+#define CLOSING( token ) XML_STREAM_CLOSING( token )
+
+using namespace com::sun::star;
+
+namespace oox::formulaimport
+{
+
+namespace
+{
+// a class that inherits from AttributeList, builds the internal data and then will be sliced off
+// during conversion to the base class
+class AttributeListBuilder
+ : public XmlStream::AttributeList
+{
+public:
+ explicit AttributeListBuilder( const uno::Reference< xml::sax::XFastAttributeList >& a );
+};
+
+AttributeListBuilder::AttributeListBuilder( const uno::Reference< xml::sax::XFastAttributeList >& a )
+{
+ if( !a )
+ return;
+ const uno::Sequence< xml::FastAttribute > aFastAttrSeq = a->getFastAttributes();
+ for( const xml::FastAttribute& rFastAttr : aFastAttrSeq )
+ {
+ attrs[ rFastAttr.Token ] = rFastAttr.Value;
+ }
+}
+
+OString tokenToString( int token )
+{
+ uno::Sequence< sal_Int8 > const & aTokenNameSeq = StaticTokenMap().getUtf8TokenName( token & TOKEN_MASK );
+ OString tokenname( reinterpret_cast< const char* >( aTokenNameSeq.getConstArray() ), aTokenNameSeq.getLength() );
+ if( tokenname.isEmpty())
+ tokenname = "???";
+ int nmsp = ( token & NMSP_MASK & ~( TAG_OPENING | TAG_CLOSING ));
+#if 0 // this is awfully long
+ OString namespacename = StaticNamespaceMap::get().count( nmsp ) != 0
+ ? StaticNamespaceMap::get()[ nmsp ] : OString( "???" );
+#else
+ OString namespacename;
+ // only few are needed actually
+ switch( nmsp )
+ {
+ case NMSP_officeMath:
+ namespacename = "m";
+ break;
+ case NMSP_doc:
+ namespacename = "w";
+ break;
+ default:
+ namespacename = "?";
+ break;
+ }
+#endif
+ if( token == OPENING( token ))
+ return "<" + namespacename + ":" + tokenname + ">";
+ if( token == CLOSING( token ))
+ return "</" + namespacename + ":" + tokenname + ">";
+ // just the name itself, not specified whether opening or closing
+ return namespacename + ":" + tokenname;
+}
+
+} // namespace
+
+OUString& XmlStream::AttributeList::operator[] (int token)
+{
+ return attrs[token];
+}
+
+OUString XmlStream::AttributeList::attribute( int token, const OUString& def ) const
+{
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
+ if( find != attrs.end())
+ return find->second;
+ return def;
+}
+
+bool XmlStream::AttributeList::attribute( int token, bool def ) const
+{
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
+ if( find != attrs.end())
+ {
+ const OUString sValue = find->second;
+ if( sValue.equalsIgnoreAsciiCase("true") ||
+ sValue.equalsIgnoreAsciiCase("on") ||
+ sValue.equalsIgnoreAsciiCase("t") ||
+ sValue.equalsIgnoreAsciiCase("1") )
+ return true;
+ if( sValue.equalsIgnoreAsciiCase("false") ||
+ sValue.equalsIgnoreAsciiCase("off") ||
+ sValue.equalsIgnoreAsciiCase("f") ||
+ sValue.equalsIgnoreAsciiCase("0") )
+ return false;
+ SAL_WARN( "oox.xmlstream", "Cannot convert \'" << sValue << "\' to bool." );
+ }
+ return def;
+}
+
+sal_Unicode XmlStream::AttributeList::attribute( int token, sal_Unicode def ) const
+{
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
+ if( find != attrs.end())
+ {
+ if( !find->second.isEmpty() )
+ {
+ if( find->second.getLength() != 1 )
+ SAL_WARN( "oox.xmlstream", "Cannot convert \'" << find->second << "\' to sal_Unicode, stripping." );
+ return find->second[ 0 ];
+ }
+ }
+ return def;
+}
+
+XmlStream::Tag::Tag( int t, const uno::Reference< xml::sax::XFastAttributeList >& a )
+: token( t )
+, attributes( AttributeListBuilder( a ))
+{
+}
+
+XmlStream::Tag::Tag( int t, const AttributeList& a )
+: token( t )
+, attributes( a )
+{
+}
+
+XmlStream::Tag::operator bool() const
+{
+ return token != XML_TOKEN_INVALID;
+}
+
+XmlStream::XmlStream()
+: pos( 0 )
+{
+ // make sure our extra bit does not conflict with values used by oox
+ assert( TAG_OPENING > ( 1024 << NMSP_SHIFT ));
+}
+
+bool XmlStream::atEnd() const
+{
+ return pos >= tags.size();
+}
+
+XmlStream::Tag XmlStream::currentTag() const
+{
+ if( pos >= tags.size())
+ return Tag();
+ return tags[ pos ];
+}
+
+int XmlStream::currentToken() const
+{
+ if( pos >= tags.size())
+ return XML_TOKEN_INVALID;
+ return tags[ pos ].token;
+}
+
+void XmlStream::moveToNextTag()
+{
+ if( pos < tags.size())
+ ++pos;
+}
+
+XmlStream::Tag XmlStream::ensureOpeningTag( int token )
+{
+ return checkTag( OPENING( token ), false );
+}
+
+XmlStream::Tag XmlStream::checkOpeningTag( int token )
+{
+ return checkTag( OPENING( token ), true );
+}
+
+void XmlStream::ensureClosingTag( int token )
+{
+ checkTag( CLOSING( token ), false );
+}
+
+XmlStream::Tag XmlStream::checkTag( int token, bool optional )
+{
+ // either it's the following tag, or find it
+ int savedPos = pos;
+ if( optional )
+ { // avoid printing debug messages about skipping tags if the optional one
+ // will not be found and the position will be reset back
+ if( currentToken() != token && !findTagInternal( token, true ))
+ {
+ pos = savedPos;
+ return Tag();
+ }
+ }
+ if( currentToken() == token || findTag( token ))
+ {
+ Tag ret = currentTag();
+ moveToNextTag();
+ return ret; // ok
+ }
+ if( optional )
+ { // not a problem, just rewind
+ pos = savedPos;
+ return Tag();
+ }
+ SAL_WARN( "oox.xmlstream", "Expected tag " << tokenToString( token ) << " not found." );
+ return Tag();
+}
+
+bool XmlStream::findTag( int token )
+{
+ return findTagInternal( token, false );
+}
+
+bool XmlStream::findTagInternal( int token, bool silent )
+{
+ int depth = 0;
+ for(;
+ !atEnd();
+ moveToNextTag())
+ {
+ if( depth > 0 ) // we're inside a nested element, skip those
+ {
+ if( currentToken() == OPENING( currentToken()))
+ {
+ if( !silent )
+ SAL_INFO( "oox.xmlstream", "Skipping tag " << tokenToString( currentToken()));
+ ++depth;
+ }
+ else if( currentToken() == CLOSING( currentToken()))
+ {
+ if( !silent )
+ SAL_INFO( "oox.xmlstream", "Skipping tag " << tokenToString( currentToken()));
+ --depth;
+ }
+ else
+ {
+ if( !silent )
+ SAL_WARN( "oox.xmlstream", "Malformed token " << currentToken() << " ("
+ << tokenToString( currentToken()) << ")" );
+ abort();
+ }
+ continue;
+ }
+ if( currentToken() == token )
+ return true; // ok, found
+ if( currentToken() == CLOSING( currentToken()))
+ return false; // that would be leaving current element, so not found
+ if( currentToken() == OPENING( currentToken()))
+ {
+ if( !silent )
+ SAL_INFO( "oox.xmlstream", "Skipping tag " << tokenToString( currentToken()));
+ ++depth;
+ }
+ else
+ abort();
+ }
+ if( !silent )
+ SAL_WARN( "oox.xmlstream", "Unexpected end of stream reached." );
+ return false;
+}
+
+void XmlStream::skipElementInternal( int token, bool silent )
+{
+ int closing = ( token & ~TAG_OPENING ) | TAG_CLOSING; // make it a closing tag
+ assert( currentToken() == OPENING( token ));
+ if( !silent )
+ SAL_INFO( "oox.xmlstream", "Skipping unexpected element " << tokenToString( currentToken()));
+ moveToNextTag();
+ // and just find the matching closing tag
+ if( findTag( closing ))
+ {
+ if( !silent )
+ SAL_INFO( "oox.xmlstream", "Skipped unexpected element " << tokenToString( token ));
+ moveToNextTag(); // and skip it too
+ return;
+ }
+ // this one is an unexpected problem, do not silent it
+ SAL_WARN( "oox.xmlstream", "Expected end of element " << tokenToString( token ) << " not found." );
+}
+
+void XmlStream::handleUnexpectedTag()
+{
+ if( atEnd())
+ return;
+ if( currentToken() == CLOSING( currentToken()))
+ {
+ SAL_INFO( "oox.xmlstream", "Skipping unexpected tag " << tokenToString( currentToken()));
+ moveToNextTag(); // just skip it
+ return;
+ }
+ skipElementInternal( currentToken(), false ); // otherwise skip the entire element
+}
+
+void XmlStreamBuilder::appendOpeningTag( int token, const uno::Reference< xml::sax::XFastAttributeList >& attrs )
+{
+ tags.emplace_back( OPENING( token ), attrs );
+}
+
+void XmlStreamBuilder::appendOpeningTag( int token, const AttributeList& attrs )
+{
+ tags.emplace_back( OPENING( token ), attrs );
+}
+
+void XmlStreamBuilder::appendClosingTag( int token )
+{
+ tags.emplace_back( CLOSING( token ));
+}
+
+void XmlStreamBuilder::appendCharacters( std::u16string_view chars )
+{
+ assert( !tags.empty());
+ tags.back().text += chars;
+}
+
+} // namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
new file mode 100644
index 000000000..6467e51bc
--- /dev/null
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -0,0 +1,291 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/axbinaryreader.hxx>
+
+#include <oox/ole/axfontdata.hxx>
+#include <oox/ole/olehelper.hxx>
+
+#include <osl/diagnose.h>
+
+namespace oox::ole {
+
+namespace {
+
+const sal_uInt32 AX_STRING_SIZEMASK = 0x7FFFFFFF;
+const sal_uInt32 AX_STRING_COMPRESSED = 0x80000000;
+
+} // namespace
+
+AxAlignedInputStream::AxAlignedInputStream( BinaryInputStream& rInStrm ) :
+ BinaryStreamBase( false ),
+ mpInStrm( &rInStrm ),
+ mnStrmPos( 0 ),
+ mnStrmSize( rInStrm.getRemaining() )
+{
+ mbEof = mbEof || rInStrm.isEof();
+}
+
+sal_Int64 AxAlignedInputStream::size() const
+{
+ return mpInStrm ? mnStrmSize : -1;
+}
+
+sal_Int64 AxAlignedInputStream::tell() const
+{
+ return mpInStrm ? mnStrmPos : -1;
+}
+
+void AxAlignedInputStream::seek( sal_Int64 nPos )
+{
+ mbEof = mbEof || (nPos < mnStrmPos);
+ if( !mbEof )
+ skip( static_cast< sal_Int32 >( nPos - mnStrmPos ) );
+}
+
+void AxAlignedInputStream::close()
+{
+ mpInStrm = nullptr;
+ mbEof = true;
+}
+
+sal_Int32 AxAlignedInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nReadSize = 0;
+ if( !mbEof )
+ {
+ nReadSize = mpInStrm->readData( orData, nBytes, nAtomSize );
+ mnStrmPos += nReadSize;
+ mbEof = mpInStrm->isEof();
+ }
+ return nReadSize;
+}
+
+sal_Int32 AxAlignedInputStream::readMemory( void* opMem, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nReadSize = 0;
+ if( !mbEof )
+ {
+ nReadSize = mpInStrm->readMemory( opMem, nBytes, nAtomSize );
+ mnStrmPos += nReadSize;
+ mbEof = mpInStrm->isEof();
+ }
+ return nReadSize;
+}
+
+void AxAlignedInputStream::skip( sal_Int32 nBytes, size_t nAtomSize )
+{
+ if( !mbEof )
+ {
+ mpInStrm->skip( nBytes, nAtomSize );
+ mnStrmPos += nBytes;
+ mbEof = mpInStrm->isEof();
+ }
+}
+
+void AxAlignedInputStream::align( size_t nSize )
+{
+ skip( static_cast< sal_Int32 >( (nSize - (mnStrmPos % nSize)) % nSize ) );
+}
+
+namespace {
+
+bool lclReadString( AxAlignedInputStream& rInStrm, OUString& rValue, sal_uInt32 nSize, bool bArrayString )
+{
+ bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
+ sal_uInt32 nBufSize = nSize & AX_STRING_SIZEMASK;
+ // Unicode: simple strings store byte count, array strings store char count
+ sal_Int32 nChars = static_cast< sal_Int32 >( nBufSize / ((bCompressed || bArrayString) ? 1 : 2) );
+ bool bValidChars = nChars <= 65536;
+ OSL_ENSURE( bValidChars, "lclReadString - string too long" );
+ sal_Int64 nEndPos = rInStrm.tell() + nChars * (bCompressed ? 1 : 2);
+ nChars = ::std::min< sal_Int32 >( nChars, 65536 );
+ rValue = rInStrm.readCompressedUnicodeArray( nChars, bCompressed );
+ rInStrm.seek( nEndPos );
+ return bValidChars;
+}
+
+} // namespace
+
+AxBinaryPropertyReader::ComplexProperty::~ComplexProperty()
+{
+}
+
+bool AxBinaryPropertyReader::PairProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ mrPairData.first = rInStrm.readInt32();
+ mrPairData.second = rInStrm.readInt32();
+ return true;
+}
+
+bool AxBinaryPropertyReader::StringProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ return lclReadString( rInStrm, mrValue, mnSize, false );
+}
+
+bool AxBinaryPropertyReader::ArrayStringProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ sal_Int64 nEndPos = rInStrm.tell() + mnSize;
+ while( rInStrm.tell() < nEndPos )
+ {
+ OUString aString;
+ if( !lclReadString( rInStrm, aString, rInStrm.readuInt32(), true ) )
+ return false;
+ mrArray.push_back( aString );
+ // every array string is aligned on 4 byte boundaries
+ rInStrm.align( 4 );
+ }
+ return true;
+}
+
+bool AxBinaryPropertyReader::GuidProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ mrGuid = OleHelper::importGuid( rInStrm );
+ return true;
+}
+
+bool AxBinaryPropertyReader::FontProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ return mrFontData.importGuidAndFont( rInStrm );
+}
+
+bool AxBinaryPropertyReader::PictureProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+ return OleHelper::importStdPic( mrPicData, rInStrm );
+}
+
+AxBinaryPropertyReader::AxBinaryPropertyReader( BinaryInputStream& rInStrm, bool b64BitPropFlags ) :
+ maInStrm( rInStrm ),
+ mbValid( true )
+{
+ // version and size of property block
+ maInStrm.skip( 2 );
+ sal_uInt16 nBlockSize = maInStrm.readuInt16();
+ mnPropsEnd = maInStrm.tell() + nBlockSize;
+ // flagfield containing existing properties
+ if( b64BitPropFlags )
+ mnPropFlags = maInStrm.readInt64();
+ else
+ mnPropFlags = maInStrm.readuInt32();
+ mnNextProp = 1;
+}
+
+void AxBinaryPropertyReader::readBoolProperty( bool& orbValue, bool bReverse )
+{
+ // there is no data, the boolean value is equivalent to the property flag itself
+ orbValue = startNextProperty() != bReverse;
+}
+
+void AxBinaryPropertyReader::readPairProperty( AxPairData& orPairData )
+{
+ if( startNextProperty() )
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<PairProperty>( orPairData ) ) );
+}
+
+void AxBinaryPropertyReader::readStringProperty( OUString& orValue )
+{
+ if( startNextProperty() )
+ {
+ sal_uInt32 nSize = maInStrm.readAligned< sal_uInt32 >();
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<StringProperty>( orValue, nSize ) ) );
+ }
+}
+
+void AxBinaryPropertyReader::readArrayStringProperty( std::vector<OUString>& orValue )
+{
+ if( startNextProperty() )
+ {
+ sal_uInt32 nSize = maInStrm.readAligned< sal_uInt32 >();
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<ArrayStringProperty>( orValue, nSize ) ) );
+ }
+}
+
+void AxBinaryPropertyReader::readGuidProperty( OUString& orGuid )
+{
+ if( startNextProperty() )
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<GuidProperty>( orGuid ) ) );
+}
+
+void AxBinaryPropertyReader::readFontProperty( AxFontData& orFontData )
+{
+ if( startNextProperty() )
+ {
+ sal_Int16 nData = maInStrm.readAligned< sal_Int16 >();
+ if( ensureValid( nData == -1 ) )
+ maStreamProps.push_back( ComplexPropVector::value_type( std::make_shared<FontProperty>( orFontData ) ) );
+ }
+}
+
+void AxBinaryPropertyReader::readPictureProperty( StreamDataSequence& orPicData )
+{
+ if( startNextProperty() )
+ {
+ sal_Int16 nData = maInStrm.readAligned< sal_Int16 >();
+ if( ensureValid( nData == -1 ) )
+ maStreamProps.push_back( ComplexPropVector::value_type( std::make_shared<PictureProperty>( orPicData ) ) );
+ }
+}
+
+bool AxBinaryPropertyReader::finalizeImport()
+{
+ // read large properties
+ maInStrm.align( 4 );
+ if( ensureValid( mnPropFlags == 0 ) )
+ {
+ for (auto const& largeProp : maLargeProps)
+ {
+ if (!ensureValid())
+ break;
+ ensureValid( largeProp->readProperty( maInStrm ) );
+ maInStrm.align( 4 );
+ }
+ }
+ maInStrm.seek( mnPropsEnd );
+
+ // read stream properties (no stream alignment between properties!)
+ if( ensureValid() )
+ {
+ for (auto const& streamProp : maStreamProps)
+ {
+ if (!ensureValid())
+ break;
+ ensureValid( streamProp->readProperty( maInStrm ) );
+ }
+ }
+
+ return mbValid;
+}
+
+bool AxBinaryPropertyReader::ensureValid( bool bCondition )
+{
+ mbValid = mbValid && bCondition && !maInStrm.isEof();
+ return mbValid;
+}
+
+bool AxBinaryPropertyReader::startNextProperty()
+{
+ bool bHasProp = getFlag( mnPropFlags, mnNextProp );
+ setFlag( mnPropFlags, mnNextProp, false );
+ mnNextProp <<= 1;
+ return ensureValid() && bHasProp;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
new file mode 100644
index 000000000..b9c4b66be
--- /dev/null
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#include <oox/ole/axbinarywriter.hxx>
+
+namespace oox::ole {
+
+namespace {
+
+const sal_uInt32 AX_STRING_COMPRESSED = 0x80000000;
+
+} // namespace
+
+AxAlignedOutputStream::AxAlignedOutputStream( BinaryOutputStream& rOutStrm ) :
+ BinaryStreamBase( false ),
+ mpOutStrm( &rOutStrm ),
+ mnStrmPos( 0 ),
+ mnStrmSize( rOutStrm.getRemaining() ),
+ mnWrappedBeginPos( rOutStrm.tell() )
+{
+ mbEof = mbEof || rOutStrm.isEof();
+}
+
+sal_Int64 AxAlignedOutputStream::size() const
+{
+ return mpOutStrm ? mnStrmSize : -1;
+}
+
+sal_Int64 AxAlignedOutputStream::tell() const
+{
+ return mpOutStrm ? mnStrmPos : -1;
+}
+
+void AxAlignedOutputStream::seek( sal_Int64 nPos )
+{
+ mbEof = (nPos < 0);
+ if( !mbEof )
+ {
+ mpOutStrm->seek( static_cast< sal_Int32 >( mnWrappedBeginPos + nPos ) );
+ mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
+ }
+}
+
+void AxAlignedOutputStream::close()
+{
+ mpOutStrm = nullptr;
+ mbEof = true;
+}
+
+void AxAlignedOutputStream::writeData( const StreamDataSequence& orData, size_t nAtomSize )
+{
+ mpOutStrm->writeData( orData, nAtomSize );
+ mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
+}
+
+void AxAlignedOutputStream::writeMemory( const void* opMem, sal_Int32 nBytes, size_t nAtomSize )
+{
+ mpOutStrm->writeMemory( opMem, nBytes, nAtomSize );
+ mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
+}
+
+void AxAlignedOutputStream::pad( sal_Int32 nBytes )
+{
+ //PRESUMABLY we need to pad with 0's here as appropriate
+ css::uno::Sequence< sal_Int8 > aData( nBytes );
+ // ok we could be padding with rubbish here, but really that shouldn't matter
+ // set to 0(s), easier to not get fooled by 0's when looking at
+ // binary content...
+ memset( static_cast<void*>( aData.getArray() ), 0, nBytes );
+ mpOutStrm->writeData( aData );
+ mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
+}
+
+void AxAlignedOutputStream::align( size_t nSize )
+{
+ pad( static_cast< sal_Int32 >( (nSize - (mnStrmPos % nSize)) % nSize ) );
+}
+
+namespace {
+
+void lclWriteString( AxAlignedOutputStream& rOutStrm, OUString const & rValue, sal_uInt32 nSize )
+{
+ bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
+ rOutStrm.writeCompressedUnicodeArray( rValue, bCompressed );
+}
+
+} // namespace
+
+AxBinaryPropertyWriter::ComplexProperty::~ComplexProperty()
+{
+}
+
+bool AxBinaryPropertyWriter::PairProperty::writeProperty( AxAlignedOutputStream& rOutStrm )
+{
+ rOutStrm.WriteInt32(mrPairData.first).WriteInt32(mrPairData.second);
+ return true;
+}
+
+bool AxBinaryPropertyWriter::StringProperty::writeProperty( AxAlignedOutputStream& rOutStrm )
+{
+ lclWriteString( rOutStrm, mrValue, mnSize );
+ return true;
+}
+
+AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bool b64BitPropFlags ) :
+ maOutStrm( rOutStrm ),
+ mnPropFlags( 0x0 ),
+ mbValid( true ),
+ mb64BitPropFlags( b64BitPropFlags )
+{
+ sal_uInt16 nId( 0x0200 );
+ maOutStrm.WriteUInt16(nId);
+ mnBlockSize = 0; // will be filled in the finalize method
+
+ maOutStrm.WriteUInt16(nId);
+ mnPropFlagsStart = maOutStrm.tell();
+
+ if( mb64BitPropFlags )
+ maOutStrm.WriteInt64( mnPropFlags );
+ else
+ maOutStrm.WriteUInt32( mnPropFlags );
+ mnNextProp = 1;
+}
+
+void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue )
+{
+ // orbValue == bReverse false then we want to set the bit, e.g. don't skip
+ startNextProperty( !orbValue );
+}
+
+void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
+{
+ startNextProperty();
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<PairProperty>( orPairData ) ) );
+}
+
+void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
+{
+ sal_uInt32 nSize = orValue.getLength() * 2;
+ setFlag( nSize, AX_STRING_COMPRESSED, false );
+ maOutStrm.writeAligned< sal_uInt32 >( nSize );
+ maLargeProps.push_back( ComplexPropVector::value_type( std::make_shared<StringProperty>( orValue, nSize ) ) );
+ startNextProperty();
+}
+
+void AxBinaryPropertyWriter::finalizeExport()
+{
+ // write large properties
+ maOutStrm.align( 4 );
+ for (auto const& largeProp : maLargeProps)
+ {
+ if (!ensureValid())
+ break;
+ largeProp->writeProperty( maOutStrm );
+ maOutStrm.align( 4 );
+ }
+
+ mnBlockSize = maOutStrm.tell() - mnPropFlagsStart;
+
+ // write stream properties (no stream alignment between properties!)
+ for (auto const& streamProp : maStreamProps)
+ {
+ if (!ensureValid())
+ break;
+ streamProp->writeProperty( maOutStrm );
+ }
+
+ sal_Int64 nPos = maOutStrm.tell();
+ maOutStrm.seek( mnPropFlagsStart - sizeof( mnBlockSize ) );
+
+ maOutStrm.WriteInt16( mnBlockSize );
+
+ if( mb64BitPropFlags )
+ maOutStrm.WriteInt64( mnPropFlags );
+ else
+ maOutStrm.WriteUInt32( mnPropFlags );
+
+ maOutStrm.seek( nPos );
+}
+
+bool AxBinaryPropertyWriter::ensureValid()
+{
+ mbValid = mbValid && !maOutStrm.isEof();
+ return mbValid;
+}
+
+void AxBinaryPropertyWriter::startNextProperty( bool bSkip )
+{
+ // if we are skipping then we clear the flag
+ setFlag( mnPropFlags, mnNextProp, !bSkip );
+ mnNextProp <<= 1;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
new file mode 100644
index 000000000..a3573b395
--- /dev/null
+++ b/oox/source/ole/axcontrol.cxx
@@ -0,0 +1,2786 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/axcontrol.hxx>
+
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/ImagePosition.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/awt/ScrollBarOrientation.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/TextAlign.hpp>
+#include <com/sun/star/awt/VisualEffect.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/form/binding/XBindableValue.hpp>
+#include <com/sun/star/form/binding/XListEntrySink.hpp>
+#include <com/sun/star/form/binding/XListEntrySource.hpp>
+#include <com/sun/star/form/binding/XValueBinding.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+#include <com/sun/star/style/VerticalAlignment.hpp>
+#include <com/sun/star/table/CellAddress.hpp>
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#include <rtl/tencinfo.h>
+#include <osl/diagnose.h>
+#include <vcl/font.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/ole/axbinarywriter.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
+#include <o3tl/string_view.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::form;
+using namespace ::com::sun::star::form::binding;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sheet;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::table;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const sal_uInt32 COMCTL_ID_SIZE = 0x12344321;
+
+const sal_uInt32 COMCTL_ID_COMMONDATA = 0xABCDEF01;
+const sal_uInt32 COMCTL_COMMON_FLATBORDER = 0x00000001;
+const sal_uInt32 COMCTL_COMMON_ENABLED = 0x00000002;
+const sal_uInt32 COMCTL_COMMON_3DBORDER = 0x00000004;
+
+const sal_uInt32 COMCTL_ID_COMPLEXDATA = 0xBDECDE1F;
+const sal_uInt32 COMCTL_COMPLEX_FONT = 0x00000001;
+const sal_uInt32 COMCTL_COMPLEX_MOUSEICON = 0x00000002;
+
+const sal_uInt32 COMCTL_ID_SCROLLBAR_60 = 0x99470A83;
+const sal_uInt32 COMCTL_SCROLLBAR_HOR = 0x00000010;
+
+const sal_uInt32 COMCTL_ID_PROGRESSBAR_50 = 0xE6E17E84;
+const sal_uInt32 COMCTL_ID_PROGRESSBAR_60 = 0x97AB8A01;
+
+const sal_uInt32 AX_CMDBUTTON_DEFFLAGS = 0x0000001B;
+const sal_uInt32 AX_LABEL_DEFFLAGS = 0x0080001B;
+const sal_uInt32 AX_IMAGE_DEFFLAGS = 0x0000001B;
+const sal_uInt32 AX_MORPHDATA_DEFFLAGS = 0x2C80081B;
+const sal_uInt32 AX_SPINBUTTON_DEFFLAGS = 0x0000001B;
+const sal_uInt32 AX_SCROLLBAR_DEFFLAGS = 0x0000001B;
+
+const sal_uInt16 AX_POS_TOPLEFT = 0;
+const sal_uInt16 AX_POS_TOP = 1;
+const sal_uInt16 AX_POS_TOPRIGHT = 2;
+const sal_uInt16 AX_POS_LEFT = 3;
+const sal_uInt16 AX_POS_CENTER = 4;
+const sal_uInt16 AX_POS_RIGHT = 5;
+const sal_uInt16 AX_POS_BOTTOMLEFT = 6;
+const sal_uInt16 AX_POS_BOTTOM = 7;
+const sal_uInt16 AX_POS_BOTTOMRIGHT = 8;
+
+#define AX_PICPOS_IMPL( label, image ) ((AX_POS_##label << 16) | AX_POS_##image)
+const sal_uInt32 AX_PICPOS_LEFTTOP = AX_PICPOS_IMPL( TOPRIGHT, TOPLEFT );
+const sal_uInt32 AX_PICPOS_LEFTCENTER = AX_PICPOS_IMPL( RIGHT, LEFT );
+const sal_uInt32 AX_PICPOS_LEFTBOTTOM = AX_PICPOS_IMPL( BOTTOMRIGHT, BOTTOMLEFT );
+const sal_uInt32 AX_PICPOS_RIGHTTOP = AX_PICPOS_IMPL( TOPLEFT, TOPRIGHT );
+const sal_uInt32 AX_PICPOS_RIGHTCENTER = AX_PICPOS_IMPL( LEFT, RIGHT );
+const sal_uInt32 AX_PICPOS_RIGHTBOTTOM = AX_PICPOS_IMPL( BOTTOMLEFT, BOTTOMRIGHT );
+const sal_uInt32 AX_PICPOS_ABOVELEFT = AX_PICPOS_IMPL( BOTTOMLEFT, TOPLEFT );
+const sal_uInt32 AX_PICPOS_ABOVECENTER = AX_PICPOS_IMPL( BOTTOM, TOP );
+const sal_uInt32 AX_PICPOS_ABOVERIGHT = AX_PICPOS_IMPL( BOTTOMRIGHT, TOPRIGHT );
+const sal_uInt32 AX_PICPOS_BELOWLEFT = AX_PICPOS_IMPL( TOPLEFT, BOTTOMLEFT );
+const sal_uInt32 AX_PICPOS_BELOWCENTER = AX_PICPOS_IMPL( TOP, BOTTOM );
+const sal_uInt32 AX_PICPOS_BELOWRIGHT = AX_PICPOS_IMPL( TOPRIGHT, BOTTOMRIGHT );
+const sal_uInt32 AX_PICPOS_CENTER = AX_PICPOS_IMPL( CENTER, CENTER );
+#undef AX_PICPOS_IMPL
+
+const sal_Int32 AX_MATCHENTRY_FIRSTLETTER = 0;
+const sal_Int32 AX_MATCHENTRY_COMPLETE = 1;
+const sal_Int32 AX_MATCHENTRY_NONE = 2;
+
+const sal_Int32 AX_ORIENTATION_AUTO = -1;
+const sal_Int32 AX_ORIENTATION_VERTICAL = 0;
+const sal_Int32 AX_ORIENTATION_HORIZONTAL = 1;
+
+const sal_Int32 AX_PROPTHUMB_ON = -1;
+
+const sal_uInt32 AX_TABSTRIP_TABS = 0;
+const sal_uInt32 AX_TABSTRIP_NONE = 2;
+
+const sal_uInt32 AX_CONTAINER_ENABLED = 0x00000004;
+const sal_uInt32 AX_CONTAINER_NOCLASSTABLE = 0x00008000;
+
+const sal_uInt32 AX_CONTAINER_DEFFLAGS = 0x00000004;
+
+const sal_Int32 AX_CONTAINER_DEFWIDTH = 4000;
+const sal_Int32 AX_CONTAINER_DEFHEIGHT = 3000;
+
+const sal_Int32 AX_CONTAINER_CYCLEALL = 0;
+
+const sal_Int32 AX_CONTAINER_SCR_NONE = 0x00;
+
+const sal_Int16 API_BORDER_NONE = 0;
+const sal_Int16 API_BORDER_SUNKEN = 1;
+const sal_Int16 API_BORDER_FLAT = 2;
+
+const sal_Int16 API_STATE_UNCHECKED = 0;
+const sal_Int16 API_STATE_CHECKED = 1;
+const sal_Int16 API_STATE_DONTKNOW = 2;
+
+/** Tries to extract a range address from a defined name. */
+bool lclExtractRangeFromName( CellRangeAddress& orRangeAddr, const Reference< XModel >& rxDocModel, const OUString& rAddressString )
+{
+ try
+ {
+ PropertySet aPropSet( rxDocModel );
+ Reference< XNameAccess > xRangesNA( aPropSet.getAnyProperty( PROP_NamedRanges ), UNO_QUERY_THROW );
+ Reference< XCellRangeReferrer > xReferrer( xRangesNA->getByName( rAddressString ), UNO_QUERY_THROW );
+ Reference< XCellRangeAddressable > xAddressable( xReferrer->getReferredCells(), UNO_QUERY_THROW );
+ orRangeAddr = xAddressable->getRangeAddress();
+ return true;
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+ return false;
+}
+
+bool lclExtractAddressFromName( CellAddress& orAddress, const Reference< XModel >& rxDocModel, const OUString& rAddressString )
+{
+ CellRangeAddress aRangeAddr;
+ if( lclExtractRangeFromName( aRangeAddr, rxDocModel, rAddressString ) &&
+ (aRangeAddr.StartColumn == aRangeAddr.EndColumn) &&
+ (aRangeAddr.StartRow == aRangeAddr.EndRow) )
+ {
+ orAddress.Sheet = aRangeAddr.Sheet;
+ orAddress.Column = aRangeAddr.StartColumn;
+ orAddress.Row = aRangeAddr.StartRow;
+ return true;
+ }
+ return false;
+}
+
+void lclPrepareConverter( PropertySet& rConverter, const Reference< XModel >& rxDocModel,
+ const OUString& rAddressString, sal_Int32 nRefSheet, bool bRange )
+{
+ if( !rConverter.is() ) try
+ {
+ Reference< XMultiServiceFactory > xModelFactory( rxDocModel, UNO_QUERY_THROW );
+ OUString aServiceName = bRange ?
+ OUString( "com.sun.star.table.CellRangeAddressConversion" ) :
+ OUString( "com.sun.star.table.CellAddressConversion" );
+ rConverter.set( xModelFactory->createInstance( aServiceName ) );
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+ rConverter.setProperty( PROP_XLA1Representation, rAddressString );
+ rConverter.setProperty( PROP_ReferenceSheet, nRefSheet );
+}
+
+} // namespace
+
+ControlConverter::ControlConverter( const Reference< XModel >& rxDocModel,
+ const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) :
+ mxDocModel( rxDocModel ),
+ mrGraphicHelper( rGraphicHelper ),
+ mbDefaultColorBgr( bDefaultColorBgr )
+{
+ OSL_ENSURE( mxDocModel.is(), "ControlConverter::ControlConverter - missing document model" );
+}
+
+ControlConverter::~ControlConverter()
+{
+}
+
+// Generic conversion ---------------------------------------------------------
+
+void ControlConverter::convertPosition( PropertyMap& rPropMap, const AxPairData& rPos ) const
+{
+ // position is given in 1/100 mm, UNO needs AppFont units
+ awt::Point aAppFontPos = mrGraphicHelper.convertHmmToAppFont( awt::Point( rPos.first, rPos.second ) );
+ rPropMap.setProperty( PROP_PositionX, aAppFontPos.X );
+ rPropMap.setProperty( PROP_PositionY, aAppFontPos.Y );
+}
+
+void ControlConverter::convertSize( PropertyMap& rPropMap, const AxPairData& rSize ) const
+{
+ // size is given in 1/100 mm, UNO needs AppFont units
+ awt::Size aAppFontSize = mrGraphicHelper.convertHmmToAppFont( awt::Size( rSize.first, rSize.second ) );
+ rPropMap.setProperty( PROP_Width, aAppFontSize.Width );
+ rPropMap.setProperty( PROP_Height, aAppFontSize.Height );
+}
+
+void ControlConverter::convertColor( PropertyMap& rPropMap, sal_Int32 nPropId, sal_uInt32 nOleColor ) const
+{
+ rPropMap.setProperty( nPropId, OleHelper::decodeOleColor( mrGraphicHelper, nOleColor, mbDefaultColorBgr ) );
+}
+
+void ControlConverter::convertToMSColor( PropertySet const & rPropSet, sal_Int32 nPropId, sal_uInt32& nOleColor, sal_uInt32 nDefault )
+{
+ sal_uInt32 nRGB = 0;
+ if (rPropSet.getProperty( nRGB, nPropId ))
+ nOleColor = OleHelper::encodeOleColor( nRGB );
+ else
+ nOleColor = nDefault;
+}
+void ControlConverter::convertPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData ) const
+{
+ if( rPicData.hasElements() )
+ {
+ uno::Reference<graphic::XGraphic> xGraphic = mrGraphicHelper.importGraphic(rPicData);
+ if (xGraphic.is())
+ rPropMap.setProperty(PROP_Graphic, xGraphic);
+ }
+}
+
+void ControlConverter::convertOrientation( PropertyMap& rPropMap, bool bHorizontal )
+{
+ sal_Int32 nScrollOrient = bHorizontal ? ScrollBarOrientation::HORIZONTAL : ScrollBarOrientation::VERTICAL;
+ rPropMap.setProperty( PROP_Orientation, nScrollOrient );
+}
+
+void ControlConverter::convertToMSOrientation( PropertySet const & rPropSet, bool& bHorizontal )
+{
+ sal_Int32 nScrollOrient = ScrollBarOrientation::HORIZONTAL;
+ if ( rPropSet.getProperty( nScrollOrient, PROP_Orientation ) )
+ bHorizontal = ( nScrollOrient == ScrollBarOrientation::HORIZONTAL );
+}
+
+void ControlConverter::convertVerticalAlign( PropertyMap& rPropMap, sal_Int32 nVerticalAlign )
+{
+ VerticalAlignment eAlign = VerticalAlignment_TOP;
+ switch( nVerticalAlign )
+ {
+ case XML_Top: eAlign = VerticalAlignment_TOP; break;
+ case XML_Center: eAlign = VerticalAlignment_MIDDLE; break;
+ case XML_Bottom: eAlign = VerticalAlignment_BOTTOM; break;
+ }
+ rPropMap.setProperty( PROP_VerticalAlign, eAlign );
+}
+
+void ControlConverter::convertScrollabilitySettings( PropertyMap& rPropMap,
+ const AxPairData& rScrollPos, const AxPairData& rScrollArea,
+ sal_Int32 nScrollBars ) const
+{
+ awt::Size tmpSize = mrGraphicHelper.convertHmmToAppFont( awt::Size( rScrollArea.first, rScrollArea.second ) );
+ awt::Point tmpPos = mrGraphicHelper.convertHmmToAppFont( awt::Point( rScrollPos.first, rScrollPos.second ) );
+ rPropMap.setProperty( PROP_ScrollHeight, tmpSize.Height );
+ rPropMap.setProperty( PROP_ScrollWidth, tmpSize.Width );
+ rPropMap.setProperty( PROP_ScrollTop, tmpPos.Y );
+ rPropMap.setProperty( PROP_ScrollLeft, tmpPos.X );
+ rPropMap.setProperty( PROP_HScroll, ( nScrollBars & 0x1 ) == 0x1 );
+ rPropMap.setProperty( PROP_VScroll, ( nScrollBars & 0x2 ) == 0x2 );
+}
+
+void ControlConverter::convertScrollBar( PropertyMap& rPropMap,
+ sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nPosition,
+ sal_Int32 nSmallChange, sal_Int32 nLargeChange, bool bAwtModel )
+{
+ rPropMap.setProperty( PROP_ScrollValueMin, ::std::min( nMin, nMax ) );
+ rPropMap.setProperty( PROP_ScrollValueMax, ::std::max( nMin, nMax ) );
+ rPropMap.setProperty( PROP_LineIncrement, nSmallChange );
+ rPropMap.setProperty( PROP_BlockIncrement, nLargeChange );
+ rPropMap.setProperty( bAwtModel ? PROP_ScrollValue : PROP_DefaultScrollValue, nPosition );
+}
+
+void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlModel,
+ const OUString& rCtrlSource, const OUString& rRowSource, sal_Int32 nRefSheet ) const
+{
+ // value binding
+ if( !rCtrlSource.isEmpty() ) try
+ {
+ // first check if the XBindableValue interface is supported
+ Reference< XBindableValue > xBindable( rxCtrlModel, UNO_QUERY_THROW );
+
+ // convert address string to cell address struct
+ CellAddress aAddress;
+ if( !lclExtractAddressFromName( aAddress, mxDocModel, rCtrlSource ) )
+ {
+ lclPrepareConverter( maAddressConverter, mxDocModel, rCtrlSource, nRefSheet, false );
+ if( !maAddressConverter.getProperty( aAddress, PROP_Address ) )
+ throw RuntimeException();
+ }
+
+ // create argument sequence
+ Sequence< Any > aArgs{ Any(NamedValue("BoundCell", Any(aAddress))) };
+
+ // create the CellValueBinding instance and set at the control model
+ Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
+ Reference< XValueBinding > xBinding( xModelFactory->createInstanceWithArguments( "com.sun.star.table.CellValueBinding", aArgs ), UNO_QUERY_THROW );
+ xBindable->setValueBinding( xBinding );
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+
+ // list entry source
+ if( rRowSource.isEmpty() )
+ return;
+
+ try
+ {
+ // first check if the XListEntrySink interface is supported
+ Reference< XListEntrySink > xEntrySink( rxCtrlModel, UNO_QUERY_THROW );
+
+ // convert address string to cell range address struct
+ CellRangeAddress aRangeAddr;
+ if( !lclExtractRangeFromName( aRangeAddr, mxDocModel, rRowSource ) )
+ {
+ lclPrepareConverter( maRangeConverter, mxDocModel, rRowSource, nRefSheet, true );
+ if( !maRangeConverter.getProperty( aRangeAddr, PROP_Address ) )
+ throw RuntimeException();
+ }
+
+ // create argument sequence
+ Sequence< Any > aArgs{ Any(NamedValue("CellRange", Any(aRangeAddr))) };
+
+ // create the EntrySource instance and set at the control model
+ Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
+ Reference< XListEntrySource > xEntrySource( xModelFactory->createInstanceWithArguments("com.sun.star.table.CellRangeListSource", aArgs ), UNO_QUERY_THROW );
+ xEntrySink->setListEntrySource( xEntrySource );
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+}
+
+// ActiveX (Forms 2.0) specific conversion ------------------------------------
+
+void ControlConverter::convertAxBackground( PropertyMap& rPropMap,
+ sal_uInt32 nBackColor, sal_uInt32 nFlags, ApiTransparencyMode eTranspMode ) const
+{
+ bool bOpaque = getFlag( nFlags, AX_FLAGS_OPAQUE );
+ switch( eTranspMode )
+ {
+ case ApiTransparencyMode::NotSupported:
+ // fake transparency by using system window background if needed
+ convertColor( rPropMap, PROP_BackgroundColor, bOpaque ? nBackColor : AX_SYSCOLOR_WINDOWBACK );
+ break;
+ case ApiTransparencyMode::Void:
+ // keep transparency by leaving the (void) default property value
+ if( bOpaque )
+ convertColor( rPropMap, PROP_BackgroundColor, nBackColor );
+ break;
+ }
+}
+
+void ControlConverter::convertAxBorder( PropertyMap& rPropMap,
+ sal_uInt32 nBorderColor, sal_Int32 nBorderStyle, sal_Int32 nSpecialEffect ) const
+{
+ sal_Int16 nBorder = (nBorderStyle == AX_BORDERSTYLE_SINGLE) ? API_BORDER_FLAT :
+ ((nSpecialEffect == AX_SPECIALEFFECT_FLAT) ? API_BORDER_NONE : API_BORDER_SUNKEN);
+ rPropMap.setProperty( PROP_Border, nBorder );
+ convertColor( rPropMap, PROP_BorderColor, nBorderColor );
+}
+
+void ControlConverter::convertToAxBorder( PropertySet const & rPropSet,
+ sal_uInt32& nBorderColor, sal_Int32& nBorderStyle, sal_Int32& nSpecialEffect )
+{
+ sal_Int16 nBorder = API_BORDER_NONE;
+ rPropSet.getProperty( nBorder, PROP_Border );
+ nBorderStyle = AX_BORDERSTYLE_NONE;
+ nSpecialEffect = AX_SPECIALEFFECT_FLAT;
+ switch ( nBorder )
+ {
+ case API_BORDER_FLAT:
+ nBorderStyle = AX_BORDERSTYLE_SINGLE;
+ break;
+ case API_BORDER_SUNKEN:
+ nSpecialEffect = AX_SPECIALEFFECT_SUNKEN;
+ break;
+ case API_BORDER_NONE:
+ default:
+ break;
+ }
+ convertToMSColor( rPropSet, PROP_BorderColor, nBorderColor );
+}
+
+void ControlConverter::convertAxVisualEffect( PropertyMap& rPropMap, sal_Int32 nSpecialEffect )
+{
+ sal_Int16 nVisualEffect = (nSpecialEffect == AX_SPECIALEFFECT_FLAT) ? VisualEffect::FLAT : VisualEffect::LOOK3D;
+ rPropMap.setProperty( PROP_VisualEffect, nVisualEffect );
+}
+
+void ControlConverter::convertToAxVisualEffect( PropertySet const & rPropSet, sal_Int32& nSpecialEffect )
+{
+ sal_Int16 nVisualEffect = AX_SPECIALEFFECT_FLAT;
+ rPropSet.getProperty( nVisualEffect, PROP_VisualEffect );
+ // is this appropriate AX_SPECIALEFFECT_XXXX value ?
+ if (nVisualEffect == VisualEffect::LOOK3D )
+ nSpecialEffect = AX_SPECIALEFFECT_RAISED;
+}
+
+void ControlConverter::convertAxPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData, sal_uInt32 nPicPos ) const
+{
+ // the picture
+ convertPicture( rPropMap, rPicData );
+
+ // picture position
+ sal_Int16 nImagePos = ImagePosition::LeftCenter;
+ switch( nPicPos )
+ {
+ case AX_PICPOS_LEFTTOP: nImagePos = ImagePosition::LeftTop; break;
+ case AX_PICPOS_LEFTCENTER: nImagePos = ImagePosition::LeftCenter; break;
+ case AX_PICPOS_LEFTBOTTOM: nImagePos = ImagePosition::LeftBottom; break;
+ case AX_PICPOS_RIGHTTOP: nImagePos = ImagePosition::RightTop; break;
+ case AX_PICPOS_RIGHTCENTER: nImagePos = ImagePosition::RightCenter; break;
+ case AX_PICPOS_RIGHTBOTTOM: nImagePos = ImagePosition::RightBottom; break;
+ case AX_PICPOS_ABOVELEFT: nImagePos = ImagePosition::AboveLeft; break;
+ case AX_PICPOS_ABOVECENTER: nImagePos = ImagePosition::AboveCenter; break;
+ case AX_PICPOS_ABOVERIGHT: nImagePos = ImagePosition::AboveRight; break;
+ case AX_PICPOS_BELOWLEFT: nImagePos = ImagePosition::BelowLeft; break;
+ case AX_PICPOS_BELOWCENTER: nImagePos = ImagePosition::BelowCenter; break;
+ case AX_PICPOS_BELOWRIGHT: nImagePos = ImagePosition::BelowRight; break;
+ case AX_PICPOS_CENTER: nImagePos = ImagePosition::Centered; break;
+ default: OSL_FAIL( "ControlConverter::convertAxPicture - unknown picture position" );
+ }
+ rPropMap.setProperty( PROP_ImagePosition, nImagePos );
+}
+
+void ControlConverter::convertAxPicture( PropertyMap& rPropMap, const StreamDataSequence& rPicData,
+ sal_Int32 nPicSizeMode ) const
+{
+ // the picture
+ convertPicture( rPropMap, rPicData );
+
+ // picture scale mode
+ sal_Int16 nScaleMode = ImageScaleMode::NONE;
+ switch( nPicSizeMode )
+ {
+ case AX_PICSIZE_CLIP: nScaleMode = ImageScaleMode::NONE; break;
+ case AX_PICSIZE_STRETCH: nScaleMode = ImageScaleMode::ANISOTROPIC; break;
+ case AX_PICSIZE_ZOOM: nScaleMode = ImageScaleMode::ISOTROPIC; break;
+ default: OSL_FAIL( "ControlConverter::convertAxPicture - unknown picture size mode" );
+ }
+ rPropMap.setProperty( PROP_ScaleMode, nScaleMode );
+}
+
+void ControlConverter::convertAxState( PropertyMap& rPropMap,
+ const OUString& rValue, sal_Int32 nMultiSelect, ApiDefaultStateMode eDefStateMode, bool bAwtModel )
+{
+ bool bBooleanState = eDefStateMode == API_DEFAULTSTATE_BOOLEAN;
+ bool bSupportsTriState = eDefStateMode == API_DEFAULTSTATE_TRISTATE;
+
+ // state
+ sal_Int16 nState = bSupportsTriState ? API_STATE_DONTKNOW : API_STATE_UNCHECKED;
+ if( rValue.getLength() == 1 ) switch( rValue[ 0 ] )
+ {
+ case '0': nState = API_STATE_UNCHECKED; break;
+ case '1': nState = API_STATE_CHECKED; break;
+ // any other string (also empty) means 'dontknow'
+ }
+ sal_Int32 nPropId = bAwtModel ? PROP_State : PROP_DefaultState;
+ if( bBooleanState )
+ rPropMap.setProperty( nPropId, nState != API_STATE_UNCHECKED );
+ else
+ rPropMap.setProperty( nPropId, nState );
+
+ // tristate
+ if( bSupportsTriState )
+ rPropMap.setProperty( PROP_TriState, nMultiSelect == AX_SELECTION_MULTI );
+}
+
+void ControlConverter::convertToAxState( PropertySet const & rPropSet,
+ OUString& rValue, sal_Int32& nMultiSelect, ApiDefaultStateMode eDefStateMode )
+{
+ bool bSupportsTriState = eDefStateMode == API_DEFAULTSTATE_TRISTATE;
+
+ sal_Int16 nState = API_STATE_DONTKNOW;
+
+ // need to use State for current state ( I think this is regardless of whether
+ // control is awt or not )
+ rPropSet.getProperty( nState, PROP_State );
+
+ rValue.clear(); // empty e.g. 'don't know'
+ if ( nState == API_STATE_UNCHECKED )
+ rValue = "0";
+ else if ( nState == API_STATE_CHECKED )
+ rValue = "1";
+
+ // tristate
+ if( bSupportsTriState )
+ {
+ bool bTriStateEnabled = false;
+ bool bPropertyExists = rPropSet.getProperty( bTriStateEnabled, PROP_TriState );
+ if( bPropertyExists && bTriStateEnabled )
+ nMultiSelect = AX_SELECTION_MULTI;
+ }
+}
+
+void ControlConverter::convertAxOrientation( PropertyMap& rPropMap,
+ const AxPairData& rSize, sal_Int32 nOrientation )
+{
+ bool bHorizontal = true;
+ switch( nOrientation )
+ {
+ case AX_ORIENTATION_AUTO: bHorizontal = rSize.first > rSize.second; break;
+ case AX_ORIENTATION_VERTICAL: bHorizontal = false; break;
+ case AX_ORIENTATION_HORIZONTAL: bHorizontal = true; break;
+ default: OSL_FAIL( "ControlConverter::convertAxOrientation - unknown orientation" );
+ }
+ convertOrientation( rPropMap, bHorizontal );
+}
+
+void ControlConverter::convertToAxOrientation( PropertySet const & rPropSet,
+ sal_Int32& nOrientation )
+{
+ bool bHorizontal = true;
+ convertToMSOrientation( rPropSet, bHorizontal );
+
+ if ( bHorizontal )
+ nOrientation = AX_ORIENTATION_HORIZONTAL;
+ else
+ nOrientation = AX_ORIENTATION_VERTICAL;
+}
+
+ControlModelBase::ControlModelBase() :
+ maSize( 0, 0 ),
+ mbAwtModel( false )
+{
+}
+
+ControlModelBase::~ControlModelBase()
+{
+}
+
+OUString ControlModelBase::getServiceName() const
+{
+ ApiControlType eCtrlType = getControlType();
+ if( mbAwtModel ) switch( eCtrlType )
+ {
+ case API_CONTROL_BUTTON: return "com.sun.star.awt.UnoControlButtonModel";
+ case API_CONTROL_FIXEDTEXT: return "com.sun.star.awt.UnoControlFixedTextModel";
+ case API_CONTROL_IMAGE: return "com.sun.star.awt.UnoControlImageControlModel";
+ case API_CONTROL_CHECKBOX: return "com.sun.star.awt.UnoControlCheckBoxModel";
+ case API_CONTROL_RADIOBUTTON: return "com.sun.star.form.component.RadioButton";
+ case API_CONTROL_EDIT: return "com.sun.star.awt.UnoControlEditModel";
+ case API_CONTROL_NUMERIC: return "com.sun.star.awt.UnoControlNumericFieldModel";
+ case API_CONTROL_LISTBOX: return "com.sun.star.form.component.ListBox";
+ case API_CONTROL_COMBOBOX: return "com.sun.star.form.component.ComboBox";
+ case API_CONTROL_SPINBUTTON: return "com.sun.star.form.component.SpinButton";
+ case API_CONTROL_SCROLLBAR: return "com.sun.star.form.component.ScrollBar";
+ case API_CONTROL_PROGRESSBAR: return "com.sun.star.awt.UnoControlProgressBarModel";
+ case API_CONTROL_GROUPBOX: return "com.sun.star.form.component.GroupBox";
+ case API_CONTROL_FRAME: return "com.sun.star.awt.UnoFrameModel";
+ case API_CONTROL_PAGE: return "com.sun.star.awt.UnoPageModel";
+ case API_CONTROL_MULTIPAGE: return "com.sun.star.awt.UnoMultiPageModel";
+ case API_CONTROL_DIALOG: return "com.sun.star.awt.UnoControlDialogModel";
+ default: OSL_FAIL( "ControlModelBase::getServiceName - no AWT model service supported" );
+ }
+ else switch( eCtrlType )
+ {
+ case API_CONTROL_BUTTON: return "com.sun.star.form.component.CommandButton";
+ case API_CONTROL_FIXEDTEXT: return "com.sun.star.form.component.FixedText";
+ case API_CONTROL_IMAGE: return "com.sun.star.form.component.DatabaseImageControl";
+ case API_CONTROL_CHECKBOX: return "com.sun.star.form.component.CheckBox";
+ case API_CONTROL_RADIOBUTTON: return "com.sun.star.form.component.RadioButton";
+ case API_CONTROL_EDIT: return "com.sun.star.form.component.TextField";
+ case API_CONTROL_NUMERIC: return "com.sun.star.form.component.NumericField";
+ case API_CONTROL_LISTBOX: return "com.sun.star.form.component.ListBox";
+ case API_CONTROL_COMBOBOX: return "com.sun.star.form.component.ComboBox";
+ case API_CONTROL_SPINBUTTON: return "com.sun.star.form.component.SpinButton";
+ case API_CONTROL_SCROLLBAR: return "com.sun.star.form.component.ScrollBar";
+ case API_CONTROL_GROUPBOX: return "com.sun.star.form.component.GroupBox";
+ default: OSL_FAIL( "ControlModelBase::getServiceName - no form component service supported" );
+ }
+ return OUString();
+}
+
+void ControlModelBase::importProperty( sal_Int32 /*nPropId*/, const OUString& /*rValue*/ )
+{
+}
+
+void ControlModelBase::importPictureData( sal_Int32 /*nPropId*/, BinaryInputStream& /*rInStrm*/ )
+{
+}
+
+void ControlModelBase::convertProperties( PropertyMap& /*rPropMap*/, const ControlConverter& /*rConv*/ ) const
+{
+}
+
+void ControlModelBase::convertFromProperties( PropertySet& /*rPropMap*/, const ControlConverter& /*rConv*/ )
+{
+}
+
+void ControlModelBase::convertSize( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rConv.convertSize( rPropMap, maSize );
+}
+
+ComCtlModelBase::ComCtlModelBase( sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6,
+ sal_uInt16 nVersion ) :
+ maFontData( "Tahoma", 82500 ),
+ mnFlags( 0 ),
+ mnVersion( nVersion ),
+ mnDataPartId5( nDataPartId5 ),
+ mnDataPartId6( nDataPartId6 ),
+ mbCommonPart( true ),
+ mbComplexPart( true )
+{
+}
+
+bool ComCtlModelBase::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ // read initial size part and header of the control data part
+ if( importSizePart( rInStrm ) && readPartHeader( rInStrm, getDataPartId(), mnVersion ) )
+ {
+ // if flags part exists, the first int32 of the data part contains its size
+ sal_uInt32 nCommonPartSize = 0;
+ if (mbCommonPart)
+ nCommonPartSize = rInStrm.readuInt32();
+ // implementations must read the exact amount of data, stream must point to its end afterwards
+ importControlData( rInStrm );
+ // read following parts
+ if( !rInStrm.isEof() &&
+ (!mbCommonPart || importCommonPart( rInStrm, nCommonPartSize )) &&
+ (!mbComplexPart || importComplexPart( rInStrm )) )
+ {
+ return !rInStrm.isEof();
+ }
+ }
+ return false;
+}
+
+void ComCtlModelBase::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ if( mbCommonPart )
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, COMCTL_COMMON_ENABLED ) );
+ ControlModelBase::convertProperties( rPropMap, rConv );
+}
+
+sal_uInt32 ComCtlModelBase::getDataPartId() const
+{
+ switch( mnVersion )
+ {
+ case COMCTL_VERSION_50: return mnDataPartId5;
+ case COMCTL_VERSION_60: return mnDataPartId6;
+ }
+ OSL_FAIL( "ComCtlObjectBase::getDataPartId - unexpected version" );
+ return SAL_MAX_UINT32;
+}
+
+bool ComCtlModelBase::readPartHeader( BinaryInputStream& rInStrm, sal_uInt32 nExpPartId, sal_uInt16 nExpMajor, sal_uInt16 nExpMinor )
+{
+ // no idea if all this is correct...
+ sal_uInt32 nPartId = rInStrm.readuInt32();
+ sal_uInt16 nMinor = rInStrm.readuInt16();
+ sal_uInt16 nMajor = rInStrm.readuInt16();
+ bool bPartId = nPartId == nExpPartId;
+ OSL_ENSURE( bPartId, "ComCtlObjectBase::readPartHeader - unexpected part identifier" );
+ bool bVersion = ((nExpMajor == SAL_MAX_UINT16) || (nExpMajor == nMajor)) && ((nExpMinor == SAL_MAX_UINT16) || (nExpMinor == nMinor));
+ OSL_ENSURE( bVersion, "ComCtlObjectBase::readPartHeader - unexpected part version" );
+ return !rInStrm.isEof() && bPartId && bVersion;
+}
+
+bool ComCtlModelBase::importSizePart( BinaryInputStream& rInStrm )
+{
+ if( readPartHeader( rInStrm, COMCTL_ID_SIZE, 0, 8 ) )
+ {
+ maSize.first = rInStrm.readInt32();
+ maSize.second = rInStrm.readInt32();
+ return !rInStrm.isEof();
+ }
+ return false;
+}
+
+bool ComCtlModelBase::importCommonPart( BinaryInputStream& rInStrm, sal_uInt32 nPartSize )
+{
+ sal_Int64 nEndPos = rInStrm.tell() + nPartSize;
+ if( (nPartSize >= 16) && readPartHeader( rInStrm, COMCTL_ID_COMMONDATA, 5, 0 ) )
+ {
+ rInStrm.skip( 4 );
+ mnFlags = rInStrm.readuInt32();
+ rInStrm.seek( nEndPos );
+ return !rInStrm.isEof();
+ }
+ return false;
+}
+
+bool ComCtlModelBase::importComplexPart( BinaryInputStream& rInStrm )
+{
+ if( readPartHeader( rInStrm, COMCTL_ID_COMPLEXDATA, 5, 1 ) )
+ {
+ sal_uInt32 nContFlags = rInStrm.readuInt32();
+ bool bReadOk =
+ (!getFlag( nContFlags, COMCTL_COMPLEX_FONT ) || OleHelper::importStdFont( maFontData, rInStrm, true )) &&
+ (!getFlag( nContFlags, COMCTL_COMPLEX_MOUSEICON ) || OleHelper::importStdPic( maMouseIcon, rInStrm ));
+ return bReadOk && !rInStrm.isEof();
+ }
+ return false;
+}
+
+ComCtlScrollBarModel::ComCtlScrollBarModel( sal_uInt16 nVersion ) :
+ ComCtlModelBase( SAL_MAX_UINT32, COMCTL_ID_SCROLLBAR_60, nVersion ),
+ mnScrollBarFlags( 0x00000011 ),
+ mnLargeChange( 1 ),
+ mnSmallChange( 1 ),
+ mnMin( 0 ),
+ mnMax( 32767 ),
+ mnPosition( 0 )
+{
+}
+
+ApiControlType ComCtlScrollBarModel::getControlType() const
+{
+ return API_CONTROL_SCROLLBAR;
+}
+
+void ComCtlScrollBarModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Border, API_BORDER_NONE );
+ ControlConverter::convertOrientation( rPropMap, getFlag( mnScrollBarFlags, COMCTL_SCROLLBAR_HOR ) );
+ ControlConverter::convertScrollBar( rPropMap, mnMin, mnMax, mnPosition, mnSmallChange, mnLargeChange, mbAwtModel );
+ ComCtlModelBase::convertProperties( rPropMap, rConv );
+}
+
+void ComCtlScrollBarModel::importControlData( BinaryInputStream& rInStrm )
+{
+ mnScrollBarFlags = rInStrm.readuInt32();
+ mnLargeChange = rInStrm.readInt32();
+ mnSmallChange = rInStrm.readInt32();
+ mnMin = rInStrm.readInt32();
+ mnMax = rInStrm.readInt32();
+ mnPosition = rInStrm.readInt32();
+}
+
+ComCtlProgressBarModel::ComCtlProgressBarModel( sal_uInt16 nVersion ) :
+ ComCtlModelBase( COMCTL_ID_PROGRESSBAR_50, COMCTL_ID_PROGRESSBAR_60, nVersion ),
+ mfMin( 0.0 ),
+ mfMax( 100.0 ),
+ mnVertical( 0 ),
+ mnSmooth( 0 )
+{
+}
+
+ApiControlType ComCtlProgressBarModel::getControlType() const
+{
+ return API_CONTROL_PROGRESSBAR;
+}
+
+void ComCtlProgressBarModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ sal_uInt16 nBorder = getFlag( mnFlags, COMCTL_COMMON_3DBORDER ) ? API_BORDER_SUNKEN :
+ (getFlag( mnFlags, COMCTL_COMMON_FLATBORDER ) ? API_BORDER_FLAT : API_BORDER_NONE);
+ rPropMap.setProperty( PROP_Border, nBorder );
+ rPropMap.setProperty( PROP_ProgressValueMin, getLimitedValue< sal_Int32, double >( ::std::min( mfMin, mfMax ), 0.0, SAL_MAX_INT32 ) );
+ rPropMap.setProperty( PROP_ProgressValueMax, getLimitedValue< sal_Int32, double >( ::std::max( mfMin, mfMax ), 0.0, SAL_MAX_INT32 ) );
+ // ComCtl model does not provide current value?
+ ComCtlModelBase::convertProperties( rPropMap, rConv );
+}
+
+void ComCtlProgressBarModel::importControlData( BinaryInputStream& rInStrm )
+{
+ mfMin = rInStrm.readFloat();
+ mfMax = rInStrm.readFloat();
+ if( mnVersion == COMCTL_VERSION_60 )
+ {
+ mnVertical = rInStrm.readuInt16();
+ mnSmooth = rInStrm.readuInt16();
+ }
+}
+
+AxControlModelBase::AxControlModelBase()
+{
+}
+
+void AxControlModelBase::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ // size of the control shape: format is "width;height"
+ case XML_Size:
+ {
+ sal_Int32 nSepPos = rValue.indexOf( ';' );
+ OSL_ENSURE( nSepPos >= 0, "AxControlModelBase::importProperty - missing separator in 'Size' property" );
+ if( nSepPos >= 0 )
+ {
+ maSize.first = o3tl::toInt32(rValue.subView( 0, nSepPos ));
+ maSize.second = o3tl::toInt32(rValue.subView( nSepPos + 1 ));
+ }
+ }
+ break;
+ }
+}
+
+AxFontDataModel::AxFontDataModel( bool bSupportsAlign ) :
+ mbSupportsAlign( bSupportsAlign )
+{
+}
+
+void AxFontDataModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_FontName: maFontData.maFontName = rValue; break;
+ case XML_FontEffects:
+ maFontData.mnFontEffects = static_cast<AxFontFlags>(AttributeConversion::decodeUnsigned( rValue ));
+ break;
+ case XML_FontHeight: maFontData.mnFontHeight = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_FontCharSet: maFontData.mnFontCharSet = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_ParagraphAlign:
+ maFontData.mnHorAlign = static_cast<AxHorizontalAlign>(AttributeConversion::decodeInteger( rValue ));
+ break;
+ default: AxControlModelBase::importProperty( nPropId, rValue );
+ }
+}
+
+bool AxFontDataModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ return maFontData.importBinaryModel( rInStrm );
+}
+
+void AxFontDataModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ maFontData.exportBinaryModel( rOutStrm );
+}
+void AxFontDataModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ // font name
+ if( !maFontData.maFontName.isEmpty() )
+ rPropMap.setProperty( PROP_FontName, maFontData.maFontName );
+
+ // font effects
+ rPropMap.setProperty( PROP_FontWeight, maFontData.mnFontEffects & AxFontFlags::Bold ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL );
+ rPropMap.setProperty( PROP_FontSlant, maFontData.mnFontEffects & AxFontFlags::Italic ? FontSlant_ITALIC : FontSlant_NONE );
+ if (maFontData.mnFontEffects & AxFontFlags::Underline)
+ rPropMap.setProperty( PROP_FontUnderline, maFontData.mbDblUnderline ? awt::FontUnderline::DOUBLE : awt::FontUnderline::SINGLE );
+ else
+ rPropMap.setProperty( PROP_FontUnderline, awt::FontUnderline::NONE );
+ rPropMap.setProperty( PROP_FontStrikeout, maFontData.mnFontEffects & AxFontFlags::Strikeout ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE );
+ rPropMap.setProperty( PROP_FontHeight, maFontData.getHeightPoints() );
+
+ // font character set
+ rtl_TextEncoding eFontEnc = RTL_TEXTENCODING_DONTKNOW;
+ if( (0 <= maFontData.mnFontCharSet) && (maFontData.mnFontCharSet <= SAL_MAX_UINT8) )
+ eFontEnc = rtl_getTextEncodingFromWindowsCharset( static_cast< sal_uInt8 >( maFontData.mnFontCharSet ) );
+ if( eFontEnc != RTL_TEXTENCODING_DONTKNOW )
+ rPropMap.setProperty( PROP_FontCharset, static_cast< sal_Int16 >( eFontEnc ) );
+
+ // text alignment
+ if( mbSupportsAlign )
+ {
+ sal_Int32 nAlign = awt::TextAlign::LEFT;
+ switch( maFontData.mnHorAlign )
+ {
+ case AxHorizontalAlign::Left: nAlign = awt::TextAlign::LEFT; break;
+ case AxHorizontalAlign::Right: nAlign = awt::TextAlign::RIGHT; break;
+ case AxHorizontalAlign::Center: nAlign = awt::TextAlign::CENTER; break;
+ default: OSL_FAIL( "AxFontDataModel::convertProperties - unknown text alignment" );
+ }
+ // form controls expect short value
+ rPropMap.setProperty( PROP_Align, static_cast< sal_Int16 >( nAlign ) );
+ }
+
+ // process base class properties
+ AxControlModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxFontDataModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& /*rConv */)
+{
+ rPropSet.getProperty( maFontData.maFontName, PROP_FontName );
+ float fontWeight = float(0);
+ if ( rPropSet.getProperty(fontWeight, PROP_FontWeight ) )
+ setFlag( maFontData.mnFontEffects, AxFontFlags::Bold, ( fontWeight == awt::FontWeight::BOLD ) );
+ FontSlant nSlant = FontSlant_NONE;
+ if ( rPropSet.getProperty( nSlant, PROP_FontSlant ) )
+ setFlag( maFontData.mnFontEffects, AxFontFlags::Italic, ( nSlant == FontSlant_ITALIC ) );
+
+ sal_Int16 nUnderLine = awt::FontUnderline::NONE;
+ if ( rPropSet.getProperty( nUnderLine, PROP_FontUnderline ) )
+ setFlag( maFontData.mnFontEffects, AxFontFlags::Underline, nUnderLine != awt::FontUnderline::NONE && nUnderLine != awt::FontUnderline::DONTKNOW);
+ sal_Int16 nStrikeout = awt::FontStrikeout::NONE ;
+ if ( rPropSet.getProperty( nStrikeout, PROP_FontStrikeout ) )
+ setFlag( maFontData.mnFontEffects, AxFontFlags::Strikeout, nStrikeout != awt::FontStrikeout::NONE && nStrikeout != awt::FontStrikeout::DONTKNOW);
+
+ float fontHeight = 0.0;
+ if ( rPropSet.getProperty( fontHeight, PROP_FontHeight ) )
+ {
+ if ( fontHeight == 0 ) // tdf#118684
+ {
+ vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont();
+ fontHeight = static_cast< float >( aDefaultVCLFont.GetFontHeight() );
+ }
+ maFontData.setHeightPoints( static_cast< sal_Int16 >( fontHeight ) );
+ }
+
+ // TODO - handle textencoding
+ sal_Int16 nAlign = 0;
+ if ( rPropSet.getProperty( nAlign, PROP_Align ) )
+ {
+ switch ( nAlign )
+ {
+ case awt::TextAlign::LEFT: maFontData.mnHorAlign = AxHorizontalAlign::Left; break;
+ case awt::TextAlign::RIGHT: maFontData.mnHorAlign = AxHorizontalAlign::Right; break;
+ case awt::TextAlign::CENTER: maFontData.mnHorAlign = AxHorizontalAlign::Center; break;
+ default: OSL_FAIL( "AxFontDataModel::convertFromProperties - unknown text alignment" );
+ }
+ }
+}
+
+AxCommandButtonModel::AxCommandButtonModel() :
+ mnTextColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnFlags( AX_CMDBUTTON_DEFFLAGS ),
+ mnPicturePos( AX_PICPOS_ABOVECENTER ),
+ mnVerticalAlign( XML_Center ),
+ mbFocusOnClick( true )
+{
+}
+
+void AxCommandButtonModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_Caption: maCaption = rValue; break;
+ case XML_ForeColor: mnTextColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_PicturePosition: mnPicturePos = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_TakeFocusOnClick: mbFocusOnClick = AttributeConversion::decodeInteger( rValue ) != 0; break;
+ default: AxFontDataModel::importProperty( nPropId, rValue );
+ }
+}
+
+void AxCommandButtonModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
+{
+ switch( nPropId )
+ {
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
+ default: AxFontDataModel::importPictureData( nPropId, rInStrm );
+ }
+}
+
+bool AxCommandButtonModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readStringProperty( maCaption );
+ aReader.readIntProperty< sal_uInt32 >( mnPicturePos );
+ aReader.readPairProperty( maSize );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readPictureProperty( maPictureData );
+ aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+ aReader.readBoolProperty( mbFocusOnClick, true ); // binary flag means "do not take focus"
+ aReader.skipPictureProperty(); // mouse icon
+ return aReader.finalizeImport() && AxFontDataModel::importBinaryModel( rInStrm );
+}
+
+void AxCommandButtonModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.writeIntProperty< sal_uInt32 >( mnTextColor );
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ aWriter.skipProperty(); // default backcolour
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ aWriter.writeStringProperty( maCaption );
+ aWriter.skipProperty(); // pict pos
+ aWriter.writePairProperty( maSize );
+ aWriter.skipProperty(); // mouse pointer
+ aWriter.skipProperty(); // picture data
+ aWriter.skipProperty(); // accelerator
+ aWriter.writeBoolProperty( mbFocusOnClick ); // binary flag means "do not take focus"
+ aWriter.skipProperty(); // mouse icon
+ aWriter.finalizeExport();
+ AxFontDataModel::exportBinaryModel( rOutStrm );
+}
+
+void AxCommandButtonModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x40, 0x32, 0x05, 0xD7,
+ 0x69, 0xCE, 0xCD, 0x11, 0xA7, 0x77, 0x00, 0xDD,
+ 0x01, 0x14, 0x3C, 0x57, 0x22, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6d, 0x73, 0x20,
+ 0x32, 0x2e, 0x30, 0x20, 0x43, 0x6F, 0x6D, 0x6D,
+ 0x61, 0x6E, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6F,
+ 0x6E, 0x00, 0x10, 0x00, 0x00, 0x00, 0x45, 0x6D,
+ 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x4F,
+ 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x16, 0x00,
+ 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E,
+ 0x43, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x42,
+ 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x2E, 0x31, 0x00,
+ 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+ApiControlType AxCommandButtonModel::getControlType() const
+{
+ return API_CONTROL_BUTTON;
+}
+
+void AxCommandButtonModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_WORDWRAP ) );
+ rPropMap.setProperty( PROP_FocusOnClick, mbFocusOnClick );
+ rConv.convertColor( rPropMap, PROP_TextColor, mnTextColor );
+ ControlConverter::convertVerticalAlign( rPropMap, mnVerticalAlign );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::NotSupported );
+ rConv.convertAxPicture( rPropMap, maPictureData, mnPicturePos );
+ AxFontDataModel::convertProperties( rPropMap, rConv );
+}
+
+void AxCommandButtonModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ (void)rPropSet.getProperty(maCaption, PROP_Label);
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_Enabled ) )
+ setFlag( mnFlags, AX_FLAGS_ENABLED, bRes );
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) )
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+ (void)rPropSet.getProperty(mbFocusOnClick, PROP_FocusOnClick);
+
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+
+ AxFontDataModel::convertFromProperties( rPropSet, rConv );
+}
+
+AxLabelModel::AxLabelModel() :
+ mnTextColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnFlags( AX_LABEL_DEFFLAGS ),
+ mnBorderColor( AX_SYSCOLOR_WINDOWFRAME ),
+ mnBorderStyle( AX_BORDERSTYLE_NONE ),
+ mnSpecialEffect( AX_SPECIALEFFECT_FLAT ),
+ mnVerticalAlign( XML_Top )
+{
+}
+
+void AxLabelModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_Caption: maCaption = rValue; break;
+ case XML_ForeColor: mnTextColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderColor: mnBorderColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderStyle: mnBorderStyle = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SpecialEffect: mnSpecialEffect = AttributeConversion::decodeInteger( rValue ); break;
+ default: AxFontDataModel::importProperty( nPropId, rValue );
+ }
+}
+
+bool AxLabelModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readStringProperty( maCaption );
+ aReader.skipIntProperty< sal_uInt32 >(); // picture position
+ aReader.readPairProperty( maSize );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+ aReader.readIntProperty< sal_uInt16 >( mnBorderStyle );
+ aReader.readIntProperty< sal_uInt16 >( mnSpecialEffect );
+ aReader.skipPictureProperty(); // picture
+ aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+ aReader.skipPictureProperty(); // mouse icon
+ return aReader.finalizeImport() && AxFontDataModel::importBinaryModel( rInStrm );
+}
+
+void AxLabelModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.writeIntProperty< sal_uInt32 >( mnTextColor );
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ // if mnBackColor == 0 then it's the libreoffice default backcolour is
+ // the MSO Label default which is AX_SYSCOLOR_BUTTONFACE
+ aWriter.writeIntProperty< sal_uInt32 >( AX_SYSCOLOR_WINDOWBACK );
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ aWriter.writeStringProperty( maCaption );
+ aWriter.skipProperty(); // picture position
+ aWriter.writePairProperty( maSize );
+ aWriter.skipProperty(); // mouse pointer
+ aWriter.writeIntProperty< sal_uInt32 >( mnBorderColor );
+ aWriter.writeIntProperty< sal_uInt16 >( mnBorderStyle );
+ aWriter.writeIntProperty< sal_uInt16 >( mnSpecialEffect );
+ aWriter.skipProperty(); // picture
+ aWriter.skipProperty(); // accelerator
+ aWriter.skipProperty(); // mouse icon
+ aWriter.finalizeExport();
+ AxFontDataModel::exportBinaryModel( rOutStrm );
+}
+
+void AxLabelModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ rPropSet.getProperty( maCaption, PROP_Label );
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_Enabled ) )
+ setFlag( mnFlags, AX_FLAGS_ENABLED, bRes );
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) )
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ // VerticalAlign doesn't seem to be read from binary
+
+ // not sure about background color, how do we decide when to set
+ // AX_FLAGS_OPAQUE ?
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+
+ AxFontDataModel::convertFromProperties( rPropSet, rConv );
+}
+
+void AxLabelModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x23, 0x9E, 0x8C, 0x97,
+ 0xB0, 0xD4, 0xCE, 0x11, 0xBF, 0x2D, 0x00, 0xAA,
+ 0x00, 0x3F, 0x40, 0xD0, 0x1A, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x4C, 0x61, 0x62, 0x65,
+ 0x6C, 0x00, 0x10, 0x00, 0x00, 0x00, 0x45, 0x6D,
+ 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x4F,
+ 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x0E, 0x00,
+ 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E,
+ 0x4C, 0x61, 0x62, 0x65, 0x6C, 0x2E, 0x31, 0x00,
+ 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+ApiControlType AxLabelModel::getControlType() const
+{
+ return API_CONTROL_FIXEDTEXT;
+}
+
+void AxLabelModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_WORDWRAP ) );
+ rConv.convertColor( rPropMap, PROP_TextColor, mnTextColor );
+ ControlConverter::convertVerticalAlign( rPropMap, mnVerticalAlign );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxFontDataModel::convertProperties( rPropMap, rConv );
+}
+
+AxImageModel::AxImageModel() :
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnFlags( AX_IMAGE_DEFFLAGS ),
+ mnBorderColor( AX_SYSCOLOR_WINDOWFRAME ),
+ mnBorderStyle( AX_BORDERSTYLE_SINGLE ),
+ mnSpecialEffect( AX_SPECIALEFFECT_FLAT ),
+ mnPicSizeMode( AX_PICSIZE_CLIP ),
+ mnPicAlign( AX_PICALIGN_CENTER ),
+ mbPicTiling( false )
+{
+}
+
+void AxImageModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderColor: mnBorderColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderStyle: mnBorderStyle = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SpecialEffect: mnSpecialEffect = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SizeMode: mnPicSizeMode = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_PictureAlignment: mnPicAlign = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_PictureTiling: mbPicTiling = AttributeConversion::decodeInteger( rValue ) != 0; break;
+ default: AxControlModelBase::importProperty( nPropId, rValue );
+ }
+}
+
+void AxImageModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
+{
+ switch( nPropId )
+ {
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
+ default: AxControlModelBase::importPictureData( nPropId, rInStrm );
+ }
+}
+
+bool AxImageModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.skipUndefinedProperty();
+ aReader.skipUndefinedProperty();
+ aReader.skipBoolProperty(); // auto-size
+ aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt8 >( mnBorderStyle );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readIntProperty< sal_uInt8 >( mnPicSizeMode );
+ aReader.readIntProperty< sal_uInt8 >( mnSpecialEffect );
+ aReader.readPairProperty( maSize );
+ aReader.readPictureProperty( maPictureData );
+ aReader.readIntProperty< sal_uInt8 >( mnPicAlign );
+ aReader.readBoolProperty( mbPicTiling );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.skipPictureProperty(); // mouse icon
+ return aReader.finalizeImport();
+}
+
+void AxImageModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.skipProperty(); //undefined
+ aWriter.skipProperty(); //undefined
+ aWriter.skipProperty(); //auto-size
+ aWriter.writeIntProperty< sal_uInt32 >( mnBorderColor );
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ aWriter.skipProperty(); // default backcolour
+ aWriter.writeIntProperty< sal_uInt8 >( mnBorderStyle );
+ aWriter.skipProperty(); // mouse pointer
+ aWriter.writeIntProperty< sal_uInt8 >( mnPicSizeMode );
+ aWriter.writeIntProperty< sal_uInt8 >( mnSpecialEffect );
+ aWriter.writePairProperty( maSize );
+ aWriter.skipProperty(); //maPictureData );
+ aWriter.writeIntProperty< sal_uInt8 >( mnPicAlign );
+ aWriter.writeBoolProperty( mbPicTiling );
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ aWriter.skipProperty(); // mouse icon
+ aWriter.finalizeExport();
+}
+
+void AxImageModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0x92, 0x59, 0x4C,
+ 0x26, 0x69, 0x1B, 0x10, 0x99, 0x92, 0x00, 0x00,
+ 0x0B, 0x65, 0xC6, 0xF9, 0x1A, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x49, 0x6D, 0x61, 0x67,
+ 0x65, 0x00, 0x10, 0x00, 0x00, 0x00, 0x45, 0x6D,
+ 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x4F,
+ 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x0E, 0x00,
+ 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E,
+ 0x49, 0x6D, 0x61, 0x67, 0x65, 0x2E, 0x31, 0x00,
+ 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+ApiControlType AxImageModel::getControlType() const
+{
+ return API_CONTROL_IMAGE;
+}
+
+void AxImageModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ rConv.convertAxPicture( rPropMap, maPictureData, mnPicSizeMode );
+ AxControlModelBase::convertProperties( rPropMap, rConv );
+}
+
+AxTabStripModel::AxTabStripModel() :
+ mnListIndex( 0 ),
+ mnTabStyle( 0 ),
+ mnTabData( 0 ),
+ mnVariousPropertyBits( 0 )
+{
+}
+
+bool AxTabStripModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ // not worth reading much here, basically we are interested
+ // in whether we have tabs, the width, the height and the
+ // captions, everything else we can pretty much discard ( for now )
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readIntProperty< sal_uInt32 >( mnListIndex ); // ListIndex
+ aReader.skipIntProperty< sal_uInt32 >(); // Backcolor
+ aReader.skipIntProperty< sal_uInt32 >(); // ForeColor
+ aReader.skipUndefinedProperty();
+ aReader.readPairProperty( maSize );
+ aReader.readArrayStringProperty( maItems );
+ aReader.skipIntProperty< sal_uInt8 >(); // MousePointer
+ aReader.skipUndefinedProperty();
+ aReader.skipIntProperty< sal_uInt32 >(); // TabOrientation
+ aReader.readIntProperty< sal_uInt32 >(mnTabStyle); // TabStyle
+ aReader.skipBoolProperty(); // MultiRow
+ aReader.skipIntProperty< sal_uInt32 >(); // TabFixedWidth
+ aReader.skipIntProperty< sal_uInt32 >(); // TabFixedHeight
+ aReader.skipBoolProperty(); // ToolTips
+ aReader.skipUndefinedProperty();
+ aReader.skipArrayStringProperty(); // ToolTip strings
+ aReader.skipUndefinedProperty();
+ aReader.readArrayStringProperty( maTabNames ); // Tab names
+ aReader.readIntProperty< sal_uInt32 >(mnVariousPropertyBits); // VariousPropertyBits
+ aReader.skipBoolProperty();// NewVersion
+ aReader.skipIntProperty< sal_uInt32 >(); // TabsAllocated
+ aReader.skipArrayStringProperty(); // Tags
+ aReader.readIntProperty<sal_uInt32 >(mnTabData); // TabData
+ aReader.skipArrayStringProperty(); // Accelerators
+ aReader.skipPictureProperty(); // Mouse Icon
+ return aReader.finalizeImport() && AxFontDataModel::importBinaryModel( rInStrm );
+}
+
+ApiControlType AxTabStripModel::getControlType() const
+{
+ return API_CONTROL_TABSTRIP;
+}
+
+AxMorphDataModelBase::AxMorphDataModelBase() :
+ mnTextColor( AX_SYSCOLOR_WINDOWTEXT ),
+ mnBackColor( AX_SYSCOLOR_WINDOWBACK ),
+ mnFlags( AX_MORPHDATA_DEFFLAGS ),
+ mnPicturePos( AX_PICPOS_ABOVECENTER ),
+ mnBorderColor( AX_SYSCOLOR_WINDOWFRAME ),
+ mnBorderStyle( AX_BORDERSTYLE_NONE ),
+ mnSpecialEffect( AX_SPECIALEFFECT_SUNKEN ),
+ mnDisplayStyle( AX_DISPLAYSTYLE_TEXT ),
+ mnMultiSelect( AX_SELECTION_SINGLE ),
+ mnScrollBars( AX_SCROLLBAR_NONE ),
+ mnMatchEntry( AX_MATCHENTRY_NONE ),
+ mnShowDropButton( AX_SHOWDROPBUTTON_NEVER ),
+ mnMaxLength( 0 ),
+ mnPasswordChar( 0 ),
+ mnListRows( 8 ),
+ mnVerticalAlign( XML_Center )
+{
+}
+
+void AxMorphDataModelBase::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_Caption: maCaption = rValue; break;
+ case XML_Value: maValue = rValue; break;
+ case XML_GroupName: maGroupName = rValue; break;
+ case XML_ForeColor: mnTextColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_PicturePosition: mnPicturePos = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderColor: mnBorderColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BorderStyle: mnBorderStyle = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SpecialEffect: mnSpecialEffect = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_DisplayStyle: mnDisplayStyle = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_MultiSelect: mnMultiSelect = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_ScrollBars: mnScrollBars = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_MatchEntry: mnMatchEntry = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_ShowDropButtonWhen: mnShowDropButton = AttributeConversion::decodeInteger( rValue );break;
+ case XML_MaxLength: mnMaxLength = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_PasswordChar: mnPasswordChar = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_ListRows: mnListRows = AttributeConversion::decodeInteger( rValue ); break;
+ default: AxFontDataModel::importProperty( nPropId, rValue );
+ }
+}
+
+void AxMorphDataModelBase::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
+{
+ switch( nPropId )
+ {
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
+ default: AxFontDataModel::importPictureData( nPropId, rInStrm );
+ }
+}
+
+bool AxMorphDataModelBase::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm, true );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+ aReader.readIntProperty< sal_Int32 >( mnMaxLength );
+ aReader.readIntProperty< sal_uInt8 >( mnBorderStyle );
+ aReader.readIntProperty< sal_uInt8 >( mnScrollBars );
+ aReader.readIntProperty< sal_uInt8 >( mnDisplayStyle );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readPairProperty( maSize );
+ aReader.readIntProperty< sal_uInt16 >( mnPasswordChar );
+ aReader.skipIntProperty< sal_uInt32 >(); // list width
+ aReader.skipIntProperty< sal_uInt16 >(); // bound column
+ aReader.skipIntProperty< sal_Int16 >(); // text column
+ aReader.skipIntProperty< sal_Int16 >(); // column count
+ aReader.readIntProperty< sal_uInt16 >( mnListRows );
+ aReader.skipIntProperty< sal_uInt16 >(); // column info count
+ aReader.readIntProperty< sal_uInt8 >( mnMatchEntry );
+ aReader.skipIntProperty< sal_uInt8 >(); // list style
+ aReader.readIntProperty< sal_uInt8 >( mnShowDropButton );
+ aReader.skipUndefinedProperty();
+ aReader.skipIntProperty< sal_uInt8 >(); // drop down style
+ aReader.readIntProperty< sal_uInt8 >( mnMultiSelect );
+ aReader.readStringProperty( maValue );
+ aReader.readStringProperty( maCaption );
+ aReader.readIntProperty< sal_uInt32 >( mnPicturePos );
+ aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+ aReader.readIntProperty< sal_uInt32 >( mnSpecialEffect );
+ aReader.skipPictureProperty(); // mouse icon
+ aReader.readPictureProperty( maPictureData );
+ aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+ aReader.skipUndefinedProperty();
+ aReader.skipBoolProperty();
+ aReader.readStringProperty( maGroupName );
+ return aReader.finalizeImport() && AxFontDataModel::importBinaryModel( rInStrm );
+}
+
+void AxMorphDataModelBase::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm, true );
+ if ( mnFlags != AX_MORPHDATA_DEFFLAGS )
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ else
+ aWriter.skipProperty(); //mnFlags
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ aWriter.skipProperty(); // default backcolour
+ aWriter.writeIntProperty< sal_uInt32 >( mnTextColor );
+
+ // only write if different from default
+ if ( ( ( mnDisplayStyle == AX_DISPLAYSTYLE_TEXT ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_COMBOBOX ) ) && mnMaxLength != 0 )
+ aWriter.writeIntProperty< sal_Int32 >( mnMaxLength );
+ else
+ aWriter.skipProperty(); //mnMaxLength
+ if ( ( ( mnDisplayStyle == AX_DISPLAYSTYLE_COMBOBOX ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_LISTBOX ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_TEXT ) ) && mnBorderStyle != AX_BORDERSTYLE_NONE )
+ aWriter.writeIntProperty< sal_uInt8 >( mnBorderStyle );
+ else
+ aWriter.skipProperty(); //mnBorderStyle
+
+ if ( ( mnDisplayStyle == AX_DISPLAYSTYLE_LISTBOX || mnDisplayStyle == AX_DISPLAYSTYLE_TEXT ) && mnScrollBars != AX_SCROLLBAR_NONE )
+ aWriter.writeIntProperty< sal_uInt8 >( mnScrollBars );
+ else
+ aWriter.skipProperty(); //mnScrollBars
+ aWriter.writeIntProperty< sal_uInt8 >( mnDisplayStyle );
+ aWriter.skipProperty(); // mouse pointer
+ aWriter.writePairProperty( maSize );
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_TEXT )
+ aWriter.writeIntProperty< sal_uInt16 >( mnPasswordChar );
+ else
+ aWriter.skipProperty(); // mnPasswordChar
+ aWriter.skipProperty(); // list width
+ aWriter.skipProperty(); // bound column
+ aWriter.skipProperty(); // text column
+ aWriter.skipProperty(); // column count
+ aWriter.skipProperty(); // mnListRows
+ aWriter.skipProperty(); // column info count
+ aWriter.skipProperty(); // mnMatchEntry
+ aWriter.skipProperty(); // list style
+ aWriter.skipProperty(); // mnShowDropButton );
+ aWriter.skipProperty();
+ aWriter.skipProperty(); // drop down style
+ if ( (mnDisplayStyle == AX_DISPLAYSTYLE_LISTBOX || mnDisplayStyle == AX_DISPLAYSTYLE_CHECKBOX) && mnMultiSelect != AX_SELECTION_SINGLE )
+ aWriter.writeIntProperty< sal_uInt8 >( mnMultiSelect );
+ // although CheckBox, ListBox, OptionButton, ToggleButton are also supported
+ // they can only have the fileformat default
+ else
+ aWriter.skipProperty(); //mnMultiSelect
+ aWriter.writeStringProperty( maValue );
+
+ if ( ( mnDisplayStyle == AX_DISPLAYSTYLE_CHECKBOX ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_TOGGLE ) )
+ aWriter.writeStringProperty( maCaption );
+ else
+ aWriter.skipProperty(); // mnCaption
+ aWriter.skipProperty(); // mnPicturePos );
+ if ( ( mnDisplayStyle == AX_DISPLAYSTYLE_COMBOBOX || mnDisplayStyle == AX_DISPLAYSTYLE_LISTBOX || mnDisplayStyle == AX_DISPLAYSTYLE_TEXT ) && mnBorderColor != AX_SYSCOLOR_WINDOWFRAME )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBorderColor );
+ else
+ aWriter.skipProperty(); // mnBorderColor
+ if ( mnSpecialEffect != AX_SPECIALEFFECT_SUNKEN )
+ aWriter.writeIntProperty< sal_uInt32 >( mnSpecialEffect );
+ else
+ aWriter.skipProperty(); //mnSpecialEffect
+ aWriter.skipProperty(); // mouse icon
+ aWriter.skipProperty(); // maPictureData
+ aWriter.skipProperty(); // accelerator
+ aWriter.skipProperty(); // undefined
+ aWriter.writeBoolProperty(true); // must be 1 for morph
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
+ aWriter.writeStringProperty( maGroupName );
+ else
+ aWriter.skipProperty(); //maGroupName
+ aWriter.finalizeExport();
+ AxFontDataModel::exportBinaryModel( rOutStrm );
+}
+
+void AxMorphDataModelBase::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rConv.convertColor( rPropMap, PROP_TextColor, mnTextColor );
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
+ {
+ // If unspecified, radio buttons autoGroup in the same document/sheet
+ // NOTE: form controls should not autoGroup with ActiveX controls - see drawingfragment.cxx
+ OUString sGroupName = !maGroupName.isEmpty() ? maGroupName : "autoGroup_";
+ rPropMap.setProperty( PROP_GroupName, sGroupName );
+ }
+ AxFontDataModel::convertProperties( rPropMap, rConv );
+}
+
+void AxMorphDataModelBase::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
+ rPropSet.getProperty( maGroupName, PROP_GroupName );
+ AxFontDataModel::convertFromProperties( rPropSet, rConv );
+}
+
+AxToggleButtonModel::AxToggleButtonModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_TOGGLE;
+}
+
+ApiControlType AxToggleButtonModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_TOGGLE, "AxToggleButtonModel::getControlType - invalid control type" );
+ return API_CONTROL_BUTTON;
+}
+
+void AxToggleButtonModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ rPropSet.getProperty( maCaption, PROP_Label );
+
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) )
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ // need to process the image if one exists
+ ControlConverter::convertToAxState( rPropSet, maValue, mnMultiSelect, API_DEFAULTSTATE_BOOLEAN );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxToggleButtonModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_WORDWRAP ) );
+ rPropMap.setProperty( PROP_Toggle, true );
+ ControlConverter::convertVerticalAlign( rPropMap, mnVerticalAlign );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::NotSupported );
+ rConv.convertAxPicture( rPropMap, maPictureData, mnPicturePos );
+ ControlConverter::convertAxState( rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_BOOLEAN, mbAwtModel );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxToggleButtonModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x60, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x21, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x54, 0x6F, 0x67, 0x67,
+ 0x6C, 0x65, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x45, 0x6D, 0x62,
+ 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x4F, 0x62,
+ 0x6A, 0x65, 0x63, 0x74, 0x00, 0x15, 0x00, 0x00,
+ 0x00, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E, 0x54,
+ 0x6F, 0x67, 0x67, 0x6C, 0x65, 0x42, 0x75, 0x74,
+ 0x74, 0x6F, 0x6E, 0x2E, 0x31, 0x00, 0xF4, 0x39,
+ 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxCheckBoxModel::AxCheckBoxModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_CHECKBOX;
+}
+
+ApiControlType AxCheckBoxModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_CHECKBOX, "AxCheckBoxModel::getControlType - invalid control type" );
+ return API_CONTROL_CHECKBOX;
+}
+
+void AxCheckBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_WORDWRAP ) );
+ ControlConverter::convertVerticalAlign( rPropMap, mnVerticalAlign );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ ControlConverter::convertAxVisualEffect( rPropMap, mnSpecialEffect );
+ rConv.convertAxPicture( rPropMap, maPictureData, mnPicturePos );
+ ControlConverter::convertAxState( rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_TRISTATE, mbAwtModel );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxCheckBoxModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ rPropSet.getProperty( maCaption, PROP_Label );
+
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) )
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+
+ ControlConverter::convertToAxVisualEffect( rPropSet, mnSpecialEffect );
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ // need to process the image if one exists
+ ControlConverter::convertToAxState( rPropSet, maValue, mnMultiSelect, API_DEFAULTSTATE_TRISTATE );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxCheckBoxModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x40, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x1D, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x43, 0x68, 0x65, 0x63,
+ 0x6B, 0x42, 0x6F, 0x78, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65,
+ 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74,
+ 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x72,
+ 0x6D, 0x73, 0x2E, 0x43, 0x68, 0x65, 0x63, 0x6B,
+ 0x42, 0x6F, 0x78, 0x2E, 0x31, 0x00, 0xF4, 0x39,
+ 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxOptionButtonModel::AxOptionButtonModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_OPTBUTTON;
+}
+
+ApiControlType AxOptionButtonModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON, "AxOptionButtonModel::getControlType - invalid control type" );
+ return API_CONTROL_RADIOBUTTON;
+}
+
+void AxOptionButtonModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_MultiLine, getFlag( mnFlags, AX_FLAGS_WORDWRAP ) );
+ ControlConverter::convertVerticalAlign( rPropMap, mnVerticalAlign );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ ControlConverter::convertAxVisualEffect( rPropMap, mnSpecialEffect );
+ rConv.convertAxPicture( rPropMap, maPictureData, mnPicturePos );
+ ControlConverter::convertAxState( rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_SHORT, mbAwtModel );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxOptionButtonModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ rPropSet.getProperty( maCaption, PROP_Label );
+
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) )
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+
+ ControlConverter::convertToAxVisualEffect( rPropSet, mnSpecialEffect );
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ // need to process the image if one exists
+ ControlConverter::convertToAxState( rPropSet, maValue, mnMultiSelect, API_DEFAULTSTATE_BOOLEAN );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxOptionButtonModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x50, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x21, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x4F, 0x70, 0x74, 0x69,
+ 0x6F, 0x6E, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x45, 0x6D, 0x62,
+ 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x4F, 0x62,
+ 0x6A, 0x65, 0x63, 0x74, 0x00, 0x15, 0x00, 0x00,
+ 0x00, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E, 0x4F,
+ 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x42, 0x75, 0x74,
+ 0x74, 0x6F, 0x6E, 0x2E, 0x31, 0x00, 0xF4, 0x39,
+ 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxTextBoxModel::AxTextBoxModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_TEXT;
+}
+
+ApiControlType AxTextBoxModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_TEXT, "AxTextBoxModel::getControlType - invalid control type" );
+ return API_CONTROL_EDIT;
+}
+
+void AxTextBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ if (getFlag( mnFlags, AX_FLAGS_MULTILINE ) && getFlag( mnFlags, AX_FLAGS_WORDWRAP ))
+ rPropMap.setProperty( PROP_MultiLine, true );
+ else
+ rPropMap.setProperty( PROP_MultiLine, false );
+ rPropMap.setProperty( PROP_HideInactiveSelection, getFlag( mnFlags, AX_FLAGS_HIDESELECTION ) );
+ rPropMap.setProperty( PROP_ReadOnly, getFlag( mnFlags, AX_FLAGS_LOCKED ) );
+ rPropMap.setProperty( mbAwtModel ? PROP_Text : PROP_DefaultText, maValue );
+ rPropMap.setProperty( PROP_MaxTextLen, getLimitedValue< sal_Int16, sal_Int32 >( mnMaxLength, 0, SAL_MAX_INT16 ) );
+ if( (0 < mnPasswordChar) && (mnPasswordChar <= SAL_MAX_INT16) )
+ rPropMap.setProperty( PROP_EchoChar, static_cast< sal_Int16 >( mnPasswordChar ) );
+ rPropMap.setProperty( PROP_HScroll, getFlag( mnScrollBars, AX_SCROLLBAR_HORIZONTAL ) );
+ rPropMap.setProperty( PROP_VScroll, getFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL ) );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxTextBoxModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_MultiLine ) ) {
+ setFlag( mnFlags, AX_FLAGS_WORDWRAP, bRes );
+ setFlag( mnFlags, AX_FLAGS_MULTILINE, bRes );
+ }
+ if ( rPropSet.getProperty( bRes, PROP_HideInactiveSelection ) )
+ setFlag( mnFlags, AX_FLAGS_HIDESELECTION, bRes );
+ if ( rPropSet.getProperty( bRes, PROP_ReadOnly ) )
+ setFlag( mnFlags, AX_FLAGS_LOCKED, bRes );
+ rPropSet.getProperty( maValue, ( mbAwtModel ? PROP_Text : PROP_DefaultText ) );
+ if (maValue.isEmpty() && !mbAwtModel)
+ // No default value? Then try exporting the current one.
+ rPropSet.getProperty( maValue, PROP_Text);
+ sal_Int16 nTmp(0);
+ if ( rPropSet.getProperty( nTmp, PROP_MaxTextLen ) )
+ mnMaxLength = nTmp;
+ if ( rPropSet.getProperty( nTmp, PROP_EchoChar ) )
+ mnPasswordChar = nTmp;
+ if ( rPropSet.getProperty( bRes, PROP_HScroll ) )
+ setFlag( mnScrollBars, AX_SCROLLBAR_HORIZONTAL, bRes );
+ if ( rPropSet.getProperty( bRes, PROP_VScroll ) )
+ setFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL, bRes );
+
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor, 0x80000005L );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+
+ ControlConverter::convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxTextBoxModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x10, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x1C, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x54, 0x65, 0x78, 0x74,
+ 0x42, 0x6F, 0x78, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64,
+ 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D,
+ 0x73, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x42, 0x6F,
+ 0x78, 0x2E, 0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxNumericFieldModel::AxNumericFieldModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_TEXT;
+}
+
+ApiControlType AxNumericFieldModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_TEXT, "AxNumericFieldModel::getControlType - invalid control type" );
+ return API_CONTROL_NUMERIC;
+}
+
+void AxNumericFieldModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_HideInactiveSelection, getFlag( mnFlags, AX_FLAGS_HIDESELECTION ) );
+ // TODO: OUString::toDouble() does not handle local decimal separator
+ rPropMap.setProperty( mbAwtModel ? PROP_Value : PROP_DefaultValue, maValue.toDouble() );
+ rPropMap.setProperty( PROP_Spin, getFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL ) );
+ rPropMap.setProperty( PROP_Repeat, true );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxNumericFieldModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_HideInactiveSelection ) )
+ setFlag( mnFlags, AX_FLAGS_HIDESELECTION, bRes );
+ rPropSet.getProperty( maValue, ( mbAwtModel ? PROP_Text : PROP_DefaultText ) );
+ if ( rPropSet.getProperty( bRes, PROP_Spin ) )
+ setFlag( mnScrollBars, AX_SCROLLBAR_VERTICAL, bRes );
+
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+
+ ControlConverter::convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxNumericFieldModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x10, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x1C, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x54, 0x65, 0x78, 0x74,
+ 0x42, 0x6F, 0x78, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64,
+ 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D,
+ 0x73, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x42, 0x6F,
+ 0x78, 0x2E, 0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxListBoxModel::AxListBoxModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_LISTBOX;
+}
+
+ApiControlType AxListBoxModel::getControlType() const
+{
+ OSL_ENSURE( mnDisplayStyle == AX_DISPLAYSTYLE_LISTBOX, "AxListBoxModel::getControlType - invalid control type" );
+ return API_CONTROL_LISTBOX;
+}
+
+void AxListBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ bool bMultiSelect = (mnMultiSelect == AX_SELECTION_MULTI) || (mnMultiSelect == AX_SELECTION_EXTENDED);
+ rPropMap.setProperty( PROP_MultiSelection, bMultiSelect );
+ rPropMap.setProperty( PROP_Dropdown, false );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxListBoxModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_MultiSelection ) )
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+
+ ControlConverter::convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxListBoxModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x1C, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x4C, 0x69, 0x73, 0x74,
+ 0x42, 0x6F, 0x78, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64,
+ 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x72, 0x6D,
+ 0x73, 0x2E, 0x4C, 0x69, 0x73, 0x74, 0x42, 0x6F,
+ 0x78, 0x2E, 0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxComboBoxModel::AxComboBoxModel()
+{
+ mnDisplayStyle = AX_DISPLAYSTYLE_COMBOBOX;
+ mnFlags = 0x2c80481b;
+}
+
+ApiControlType AxComboBoxModel::getControlType() const
+{
+ OSL_ENSURE( (mnDisplayStyle == AX_DISPLAYSTYLE_COMBOBOX) || (mnDisplayStyle == AX_DISPLAYSTYLE_DROPDOWN), "AxComboBoxModel::getControlType - invalid control type" );
+ return (mnDisplayStyle == AX_DISPLAYSTYLE_DROPDOWN) ? API_CONTROL_LISTBOX : API_CONTROL_COMBOBOX;
+}
+
+void AxComboBoxModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ if( mnDisplayStyle != AX_DISPLAYSTYLE_DROPDOWN )
+ {
+ rPropMap.setProperty( PROP_HideInactiveSelection, getFlag( mnFlags, AX_FLAGS_HIDESELECTION ) );
+ rPropMap.setProperty( mbAwtModel ? PROP_Text : PROP_DefaultText, maValue );
+ rPropMap.setProperty( PROP_MaxTextLen, getLimitedValue< sal_Int16, sal_Int32 >( mnMaxLength, 0, SAL_MAX_INT16 ) );
+ bool bAutoComplete = (mnMatchEntry == AX_MATCHENTRY_FIRSTLETTER) || (mnMatchEntry == AX_MATCHENTRY_COMPLETE);
+ rPropMap.setProperty( PROP_Autocomplete, bAutoComplete );
+ }
+ bool bShowDropdown = (mnShowDropButton == AX_SHOWDROPBUTTON_FOCUS) || (mnShowDropButton == AX_SHOWDROPBUTTON_ALWAYS);
+ rPropMap.setProperty( PROP_Dropdown, bShowDropdown );
+ rPropMap.setProperty( PROP_LineCount, getLimitedValue< sal_Int16, sal_Int32 >( mnListRows, 1, SAL_MAX_INT16 ) );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::Void );
+ rConv.convertAxBorder( rPropMap, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxComboBoxModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ // when would we have mnDisplayStyle = AX_DISPLAYSTYLE_DROPDOWN ?
+ // #TODO check against msocximex
+ mnDisplayStyle = AX_DISPLAYSTYLE_COMBOBOX;
+ bool bRes = false;
+
+ if ( rPropSet.getProperty( bRes, PROP_HideInactiveSelection ) )
+ setFlag( mnFlags, AX_FLAGS_HIDESELECTION, bRes );
+ rPropSet.getProperty( maValue, ( mbAwtModel ? PROP_Text : PROP_DefaultText ) );
+
+ sal_Int16 nTmp(0);
+ if ( rPropSet.getProperty( nTmp, PROP_MaxTextLen ) )
+ mnMaxLength = nTmp;
+ if ( rPropSet.getProperty( bRes, PROP_Autocomplete ) )
+ {
+ // when to choose AX_MATCHENTRY_FIRSTLETTER ?
+ // #TODO check against msocximex
+ if ( bRes )
+ mnMatchEntry = AX_MATCHENTRY_COMPLETE;
+ }
+ if ( rPropSet.getProperty( bRes, PROP_Dropdown ) )
+ {
+ rPropSet.getProperty( mnListRows, PROP_LineCount );
+ if ( !mnListRows )
+ mnListRows = 1;
+ }
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToMSColor( rPropSet, PROP_TextColor, mnTextColor );
+
+ ControlConverter::convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, mnSpecialEffect );
+ AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
+}
+
+void AxComboBoxModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] = {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x30, 0x1D, 0xD2, 0x8B,
+ 0x42, 0xEC, 0xCE, 0x11, 0x9E, 0x0D, 0x00, 0xAA,
+ 0x00, 0x60, 0x02, 0xF3, 0x1D, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x43, 0x6F, 0x6D, 0x62,
+ 0x6F, 0x42, 0x6F, 0x78, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65,
+ 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74,
+ 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x72,
+ 0x6D, 0x73, 0x2E, 0x43, 0x6F, 0x6D, 0x62, 0x6F,
+ 0x42, 0x6F, 0x78, 0x2E, 0x31, 0x00, 0xF4, 0x39,
+ 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxSpinButtonModel::AxSpinButtonModel() :
+ mnArrowColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnFlags( AX_SPINBUTTON_DEFFLAGS ),
+ mnOrientation( AX_ORIENTATION_AUTO ),
+ mnMin( 0 ),
+ mnMax( 100 ),
+ mnPosition( 0 ),
+ mnSmallChange( 1 ),
+ mnDelay( 50 )
+{
+}
+
+ApiControlType AxSpinButtonModel::getControlType() const
+{
+ return API_CONTROL_SPINBUTTON;
+}
+
+void AxSpinButtonModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_ForeColor: mnArrowColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_Orientation: mnOrientation = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Min: mnMin = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Max: mnMax = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Position: mnPosition = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SmallChange: mnSmallChange = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Delay: mnDelay = AttributeConversion::decodeInteger( rValue ); break;
+ default: AxControlModelBase::importProperty( nPropId, rValue );
+ }
+}
+
+bool AxSpinButtonModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readIntProperty< sal_uInt32 >( mnArrowColor );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readPairProperty( maSize );
+ aReader.skipIntProperty< sal_uInt32 >(); // unused
+ aReader.readIntProperty< sal_Int32 >( mnMin );
+ aReader.readIntProperty< sal_Int32 >( mnMax );
+ aReader.readIntProperty< sal_Int32 >( mnPosition );
+ aReader.skipIntProperty< sal_uInt32 >(); // prev enabled
+ aReader.skipIntProperty< sal_uInt32 >(); // next enabled
+ aReader.readIntProperty< sal_Int32 >( mnSmallChange );
+ aReader.readIntProperty< sal_Int32 >( mnOrientation );
+ aReader.readIntProperty< sal_Int32 >( mnDelay );
+ aReader.skipPictureProperty(); // mouse icon
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ return aReader.finalizeImport();
+}
+
+void AxSpinButtonModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.writeIntProperty< sal_uInt32 >( mnArrowColor );
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ aWriter.skipProperty(); // default backcolour
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ aWriter.writePairProperty( maSize );
+ aWriter.skipProperty(); // unused
+ aWriter.writeIntProperty< sal_Int32 >( mnMin );
+ aWriter.writeIntProperty< sal_Int32 >( mnMax );
+ aWriter.writeIntProperty< sal_Int32 >( mnPosition );
+ aWriter.skipProperty(); // prev enabled
+ aWriter.skipProperty(); // next enabled
+ aWriter.writeIntProperty< sal_Int32 >( mnSmallChange );
+ aWriter.writeIntProperty< sal_Int32 >( mnOrientation );
+ aWriter.writeIntProperty< sal_Int32 >( mnDelay );
+ aWriter.skipProperty(); // mouse icon
+ aWriter.skipProperty(); // mouse pointer
+
+ aWriter.finalizeExport();
+}
+
+void AxSpinButtonModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ sal_Int32 nMin = ::std::min( mnMin, mnMax );
+ sal_Int32 nMax = ::std::max( mnMin, mnMax );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rPropMap.setProperty( PROP_SpinValueMin, nMin );
+ rPropMap.setProperty( PROP_SpinValueMax, nMax );
+ rPropMap.setProperty( PROP_SpinIncrement, mnSmallChange );
+ rPropMap.setProperty( mbAwtModel ? PROP_SpinValue : PROP_DefaultSpinValue, mnPosition );
+ rPropMap.setProperty( PROP_Repeat, true );
+ rPropMap.setProperty( PROP_RepeatDelay, mnDelay );
+ rPropMap.setProperty( PROP_Border, API_BORDER_NONE );
+ rConv.convertColor( rPropMap, PROP_SymbolColor, mnArrowColor );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::NotSupported );
+ ControlConverter::convertAxOrientation( rPropMap, maSize, mnOrientation );
+ AxControlModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxSpinButtonModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& )
+{
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_Enabled ) )
+ setFlag( mnFlags, AX_FLAGS_ENABLED, bRes );
+ rPropSet.getProperty( mnMin, PROP_SpinValueMin );
+ rPropSet.getProperty( mnMax, PROP_SpinValueMax );
+ rPropSet.getProperty( mnSmallChange, PROP_SpinIncrement );
+ rPropSet.getProperty( mnPosition, ( mbAwtModel ? PROP_SpinValue : PROP_DefaultSpinValue ) );
+ rPropSet.getProperty( mnDelay, PROP_RepeatDelay );
+ ControlConverter::convertToMSColor( rPropSet, PROP_SymbolColor, mnArrowColor);
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+
+ ControlConverter::convertToAxOrientation( rPropSet, mnOrientation );
+}
+
+void AxSpinButtonModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] =
+ {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x6F, 0x17, 0x79,
+ 0xF2, 0xB7, 0xCE, 0x11, 0x97, 0xEF, 0x00, 0xAA,
+ 0x00, 0x6D, 0x27, 0x76, 0x1F, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x53, 0x70, 0x69, 0x6E,
+ 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64,
+ 0x64, 0x65, 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65,
+ 0x63, 0x74, 0x00, 0x13, 0x00, 0x00, 0x00, 0x46,
+ 0x6F, 0x72, 0x6D, 0x73, 0x2E, 0x53, 0x70, 0x69,
+ 0x6E, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x2E,
+ 0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00
+ };
+
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+AxScrollBarModel::AxScrollBarModel() :
+ mnArrowColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnFlags( AX_SCROLLBAR_DEFFLAGS ),
+ mnOrientation( AX_ORIENTATION_AUTO ),
+ mnPropThumb( AX_PROPTHUMB_ON ),
+ mnMin( 0 ),
+ mnMax( 32767 ),
+ mnPosition( 0 ),
+ mnSmallChange( 1 ),
+ mnLargeChange( 1 ),
+ mnDelay( 50 )
+{
+}
+
+ApiControlType AxScrollBarModel::getControlType() const
+{
+ return API_CONTROL_SCROLLBAR;
+}
+
+void AxScrollBarModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_ForeColor: mnArrowColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_BackColor: mnBackColor = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ case XML_Orientation: mnOrientation = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_ProportionalThumb: mnPropThumb = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Min: mnMin = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Max: mnMax = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Position: mnPosition = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_SmallChange: mnSmallChange = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_LargeChange: mnLargeChange = AttributeConversion::decodeInteger( rValue ); break;
+ case XML_Delay: mnDelay = AttributeConversion::decodeInteger( rValue ); break;
+ default: AxControlModelBase::importProperty( nPropId, rValue );
+ }
+}
+
+bool AxScrollBarModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readIntProperty< sal_uInt32 >( mnArrowColor );
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readPairProperty( maSize );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readIntProperty< sal_Int32 >( mnMin );
+ aReader.readIntProperty< sal_Int32 >( mnMax );
+ aReader.readIntProperty< sal_Int32 >( mnPosition );
+ aReader.skipIntProperty< sal_uInt32 >(); // unused
+ aReader.skipIntProperty< sal_uInt32 >(); // prev enabled
+ aReader.skipIntProperty< sal_uInt32 >(); // next enabled
+ aReader.readIntProperty< sal_Int32 >( mnSmallChange );
+ aReader.readIntProperty< sal_Int32 >( mnLargeChange );
+ aReader.readIntProperty< sal_Int32 >( mnOrientation );
+ aReader.readIntProperty< sal_Int16 >( mnPropThumb );
+ aReader.readIntProperty< sal_Int32 >( mnDelay );
+ aReader.skipPictureProperty(); // mouse icon
+ return aReader.finalizeImport();
+}
+
+void AxScrollBarModel::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.writeIntProperty< sal_uInt32 >( mnArrowColor );
+ if ( mnBackColor )
+ aWriter.writeIntProperty< sal_uInt32 >( mnBackColor );
+ else
+ aWriter.skipProperty(); // default backcolour
+ aWriter.writeIntProperty< sal_uInt32 >( mnFlags );
+ aWriter.writePairProperty( maSize );
+ aWriter.skipProperty(); // mouse pointer
+ aWriter.writeIntProperty< sal_Int32 >( mnMin );
+ aWriter.writeIntProperty< sal_Int32 >( mnMax );
+ aWriter.writeIntProperty< sal_Int32 >( mnPosition );
+ aWriter.skipProperty(); // unused
+ aWriter.skipProperty(); // prev enabled
+ aWriter.skipProperty(); // next enabled
+ aWriter.writeIntProperty< sal_Int32 >( mnSmallChange );
+ aWriter.writeIntProperty< sal_Int32 >( mnLargeChange );
+ aWriter.writeIntProperty< sal_Int32 >( mnOrientation );
+ aWriter.writeIntProperty< sal_Int16 >( mnPropThumb );
+ aWriter.writeIntProperty< sal_Int32 >( mnDelay );
+ aWriter.skipProperty(); // mouse icon
+ aWriter.finalizeExport();
+}
+
+void AxScrollBarModel::exportCompObj( BinaryOutputStream& rOutStream )
+{
+ // should be able to replace this hardcoded foo with
+ // proper export info from MS-OLEDS spec.
+ static sal_uInt8 const aCompObj[] =
+ {
+ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x81, 0xD1, 0xDF,
+ 0x2F, 0x5E, 0xCE, 0x11, 0xA4, 0x49, 0x00, 0xAA,
+ 0x00, 0x4A, 0x80, 0x3D, 0x1E, 0x00, 0x00, 0x00,
+ 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x20,
+ 0x32, 0x2E, 0x30, 0x20, 0x53, 0x63, 0x72, 0x6F,
+ 0x6C, 0x6C, 0x42, 0x61, 0x72, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64,
+ 0x65, 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65, 0x63,
+ 0x74, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x6F,
+ 0x72, 0x6D, 0x73, 0x2E, 0x53, 0x63, 0x72, 0x6F,
+ 0x6C, 0x6C, 0x42, 0x61, 0x72, 0x2E, 0x31, 0x00,
+ 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ rOutStream.writeMemory( aCompObj, sizeof( aCompObj ) );
+}
+
+void AxScrollBarModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
+ rPropMap.setProperty( PROP_RepeatDelay, mnDelay );
+ rPropMap.setProperty( PROP_Border, API_BORDER_NONE );
+ if( (mnPropThumb == AX_PROPTHUMB_ON) && (mnMin != mnMax) && (mnLargeChange > 0) )
+ {
+ // use double to prevent integer overflow in division (fInterval+mnLargeChange may become 0 when performed as int)
+ double fInterval = fabs( static_cast< double >( mnMax - mnMin ) );
+ sal_Int32 nThumbLen = getLimitedValue< sal_Int32, double >( (fInterval * mnLargeChange) / (fInterval + mnLargeChange), 1, SAL_MAX_INT32 );
+ rPropMap.setProperty( PROP_VisibleSize, nThumbLen );
+ }
+ rConv.convertColor( rPropMap, PROP_SymbolColor, mnArrowColor );
+ rConv.convertAxBackground( rPropMap, mnBackColor, mnFlags, ApiTransparencyMode::NotSupported );
+ ControlConverter::convertAxOrientation( rPropMap, maSize, mnOrientation );
+ ControlConverter::convertScrollBar( rPropMap, mnMin, mnMax, mnPosition, mnSmallChange, mnLargeChange, mbAwtModel );
+ AxControlModelBase::convertProperties( rPropMap, rConv );
+}
+
+void AxScrollBarModel::convertFromProperties( PropertySet& rPropSet, const ControlConverter& )
+{
+ bool bRes = false;
+ if ( rPropSet.getProperty( bRes, PROP_Enabled ) )
+ setFlag( mnFlags, AX_FLAGS_ENABLED, bRes );
+ rPropSet.getProperty( mnDelay, PROP_RepeatDelay );
+ mnPropThumb = AX_PROPTHUMB_ON; // default
+ ControlConverter::convertToMSColor( rPropSet, PROP_SymbolColor, mnArrowColor);
+ ControlConverter::convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+ ControlConverter::convertToAxOrientation( rPropSet, mnOrientation );
+
+ rPropSet.getProperty( mnMin, PROP_ScrollValueMin );
+ rPropSet.getProperty( mnMax, PROP_ScrollValueMax );
+ rPropSet.getProperty( mnSmallChange, PROP_LineIncrement );
+ rPropSet.getProperty( mnLargeChange, PROP_BlockIncrement );
+ rPropSet.getProperty( mnPosition, ( mbAwtModel ? PROP_ScrollValue : PROP_DefaultScrollValue ) );
+
+}
+
+AxContainerModelBase::AxContainerModelBase( bool bFontSupport ) :
+ AxFontDataModel( false ), // no support for alignment properties
+ maLogicalSize( AX_CONTAINER_DEFWIDTH, AX_CONTAINER_DEFHEIGHT ),
+ maScrollPos( 0, 0 ),
+ mnBackColor( AX_SYSCOLOR_BUTTONFACE ),
+ mnTextColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnFlags( AX_CONTAINER_DEFFLAGS ),
+ mnBorderColor( AX_SYSCOLOR_BUTTONTEXT ),
+ mnBorderStyle( AX_BORDERSTYLE_NONE ),
+ mnScrollBars( AX_CONTAINER_SCR_NONE ),
+ mnCycleType( AX_CONTAINER_CYCLEALL ),
+ mnSpecialEffect( AX_SPECIALEFFECT_FLAT ),
+ mnPicAlign( AX_PICALIGN_CENTER ),
+ mnPicSizeMode( AX_PICSIZE_CLIP ),
+ mbPicTiling( false ),
+ mbFontSupport( bFontSupport )
+{
+ setAwtModelMode();
+ // different default size for frame
+ maSize = AxPairData( AX_CONTAINER_DEFWIDTH, AX_CONTAINER_DEFHEIGHT );
+}
+
+void AxContainerModelBase::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ if( nPropId == XML_Caption )
+ maCaption = rValue;
+}
+
+bool AxContainerModelBase::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.skipUndefinedProperty();
+ aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+ aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+ aReader.skipIntProperty< sal_uInt32 >(); // next available control ID
+ aReader.skipUndefinedProperty();
+ aReader.skipUndefinedProperty();
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readIntProperty< sal_uInt8 >( mnBorderStyle );
+ aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+ aReader.readIntProperty< sal_uInt8 >( mnScrollBars );
+ aReader.readPairProperty( maSize );
+ aReader.readPairProperty( maLogicalSize );
+ aReader.readPairProperty( maScrollPos );
+ aReader.skipIntProperty< sal_uInt32 >(); // number of control groups
+ aReader.skipUndefinedProperty();
+ aReader.skipPictureProperty(); // mouse icon
+ aReader.readIntProperty< sal_uInt8 >( mnCycleType );
+ aReader.readIntProperty< sal_uInt8 >( mnSpecialEffect );
+ aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+ aReader.readStringProperty( maCaption );
+ aReader.readFontProperty( maFontData );
+ aReader.readPictureProperty( maPictureData );
+ aReader.skipIntProperty< sal_Int32 >(); // zoom
+ aReader.readIntProperty< sal_uInt8 >( mnPicAlign );
+ aReader.readBoolProperty( mbPicTiling );
+ aReader.readIntProperty< sal_uInt8 >( mnPicSizeMode );
+ aReader.skipIntProperty< sal_uInt32 >(); // shape cookie
+ aReader.skipIntProperty< sal_uInt32 >(); // draw buffer size
+ return aReader.finalizeImport();
+}
+
+void AxContainerModelBase::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ if( mbFontSupport )
+ {
+ rConv.convertColor( rPropMap, PROP_TextColor, mnTextColor );
+ AxFontDataModel::convertProperties( rPropMap, rConv );
+ }
+}
+
+bool AxContainerModelBase::importClassTable( BinaryInputStream& rInStrm, AxClassTable& orClassTable )
+{
+ bool bValid = true;
+ orClassTable.clear();
+ if( !getFlag( mnFlags, AX_CONTAINER_NOCLASSTABLE ) )
+ {
+ sal_uInt16 nCount = rInStrm.readuInt16();
+ for( sal_uInt16 nIndex = 0; bValid && (nIndex < nCount); ++nIndex )
+ {
+ orClassTable.emplace_back( );
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readGuidProperty( orClassTable.back() );
+ aReader.skipGuidProperty(); // source interface GUID
+ aReader.skipUndefinedProperty();
+ aReader.skipGuidProperty(); // default interface GUID
+ aReader.skipIntProperty< sal_uInt32 >(); // class table and var flags
+ aReader.skipIntProperty< sal_uInt32 >(); // method count
+ aReader.skipIntProperty< sal_Int32 >(); // IDispatch identifier for linked cell access
+ aReader.skipIntProperty< sal_uInt16 >(); // get function index for linked cell access
+ aReader.skipIntProperty< sal_uInt16 >(); // put function index for linked cell access
+ aReader.skipIntProperty< sal_uInt16 >(); // linked cell access property type
+ aReader.skipIntProperty< sal_uInt16 >(); // get function index of value
+ aReader.skipIntProperty< sal_uInt16 >(); // put function index of value
+ aReader.skipIntProperty< sal_uInt16 >(); // value type
+ aReader.skipIntProperty< sal_Int32 >(); // IDispatch identifier for source range access
+ aReader.skipIntProperty< sal_uInt16 >(); // get function index for source range access
+ bValid = aReader.finalizeImport();
+ }
+ }
+ return bValid;
+}
+
+AxFrameModel::AxFrameModel() :
+ AxContainerModelBase( true )
+{
+}
+
+ApiControlType AxFrameModel::getControlType() const
+{
+ return mbAwtModel ? API_CONTROL_FRAME : API_CONTROL_GROUPBOX;
+}
+
+void AxFrameModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Label, maCaption );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_CONTAINER_ENABLED ) );
+ AxContainerModelBase::convertProperties( rPropMap, rConv );
+}
+
+AxPageModel::AxPageModel()
+{
+}
+
+ApiControlType AxPageModel::getControlType() const
+{
+ return API_CONTROL_PAGE;
+}
+
+void AxPageModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Title, maCaption );
+ rConv.convertColor( rPropMap, PROP_BackgroundColor, mnBackColor );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_CONTAINER_ENABLED ) );
+ AxContainerModelBase::convertProperties( rPropMap, rConv );
+}
+
+AxMultiPageModel::AxMultiPageModel() :
+ mnActiveTab( 0 ),
+ mnTabStyle( AX_TABSTRIP_TABS )
+{
+}
+
+ApiControlType AxMultiPageModel::getControlType() const
+{
+ return API_CONTROL_MULTIPAGE;
+}
+
+void AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages )
+{
+ // PageProperties
+ for ( sal_Int32 nPage = 0; nPage < nPages; ++nPage )
+ {
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.skipUndefinedProperty();
+ aReader.skipIntProperty< sal_uInt32 >(); // TransitionEffect
+ aReader.skipIntProperty< sal_uInt32 >(); // TransitionPeriod
+ }
+ // MultiPageProperties
+ AxBinaryPropertyReader aReader( rInStrm );
+ sal_uInt32 nPageCount = 0;
+ aReader.skipUndefinedProperty();
+ aReader.readIntProperty< sal_uInt32 >(nPageCount); // PageCount
+ aReader.skipIntProperty< sal_uInt32 >(); //ID
+
+ // IDs
+ for ( sal_uInt32 count = 0; count < nPageCount; ++count )
+ {
+ mnIDs.push_back( rInStrm.readInt32() );
+ }
+}
+
+void AxMultiPageModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Title, maCaption );
+ rPropMap.setProperty( PROP_MultiPageValue, mnActiveTab + 1);
+ rConv.convertColor( rPropMap, PROP_BackgroundColor, mnBackColor );
+ rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_CONTAINER_ENABLED ) );
+ rPropMap.setProperty( PROP_Decoration, mnTabStyle != AX_TABSTRIP_NONE );
+
+ AxContainerModelBase::convertProperties( rPropMap, rConv );
+}
+
+AxUserFormModel::AxUserFormModel()
+{
+}
+
+ApiControlType AxUserFormModel::getControlType() const
+{
+ return API_CONTROL_DIALOG;
+}
+
+void AxUserFormModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_Title, maCaption );
+ rConv.convertColor( rPropMap, PROP_BackgroundColor, mnBackColor );
+ rConv.convertAxPicture( rPropMap, maPictureData, AX_PICPOS_CENTER );
+ rConv.convertScrollabilitySettings( rPropMap, maScrollPos, maLogicalSize, mnScrollBars );
+ AxContainerModelBase::convertProperties( rPropMap, rConv );
+}
+
+HtmlSelectModel::HtmlSelectModel()
+{
+}
+
+bool
+HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ if (rInStrm.size()<=0)
+ return true;
+
+ OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
+
+ // replace crlf with lf
+ OUString data = sStringContents.replaceAll( "\x0D\x0A" , "\x0A" );
+
+ std::vector< OUString > listValues;
+ std::vector< sal_Int16 > selectedIndices;
+
+ // Ultra hacky parser for the info
+ sal_Int32 nLineIdx {0};
+ // first line will tell us if multiselect is enabled
+ if (o3tl::getToken(data, 0, '\n', nLineIdx ) == u"<SELECT MULTIPLE")
+ mnMultiSelect = AX_SELECTION_MULTI;
+ // skip first and last lines, no data there
+ if (nLineIdx>0)
+ {
+ for (;;)
+ {
+ std::u16string_view sLine( o3tl::getToken(data, 0, '\n', nLineIdx ) );
+ if (nLineIdx<0)
+ break; // skip last line
+
+ if ( !sLine.empty() )
+ {
+ OUString displayValue( o3tl::getToken(sLine, 1, '>' ) );
+ if ( displayValue.getLength() )
+ {
+ // Really we should be using a proper html parser
+ // escaping some common bits to be escaped
+ displayValue = displayValue.replaceAll( "&lt;", "<" );
+ displayValue = displayValue.replaceAll( "&gt;", ">" );
+ displayValue = displayValue.replaceAll( "&quot;", "\"" );
+ displayValue = displayValue.replaceAll( "&amp;", "&" );
+ listValues.push_back( displayValue );
+ if( sLine.find( u"OPTION SELECTED" ) != std::u16string_view::npos )
+ selectedIndices.push_back( static_cast< sal_Int16 >( listValues.size() ) - 1 );
+ }
+ }
+ }
+ }
+ if ( !listValues.empty() )
+ {
+ msListData.realloc( listValues.size() );
+ auto psListData = msListData.getArray();
+ sal_Int32 index = 0;
+ for (auto const& listValue : listValues)
+ psListData[ index++ ] = listValue;
+ }
+ if ( !selectedIndices.empty() )
+ {
+ msIndices.realloc( selectedIndices.size() );
+ auto psIndices = msIndices.getArray();
+ sal_Int32 index = 0;
+ for (auto const& selectedIndice : selectedIndices)
+ psIndices[ index++ ] = selectedIndice;
+ }
+ return true;
+}
+
+void
+HtmlSelectModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
+{
+ rPropMap.setProperty( PROP_StringItemList, msListData );
+ rPropMap.setProperty( PROP_SelectedItems, msIndices );
+ rPropMap.setProperty( PROP_Dropdown, true );
+ AxListBoxModel::convertProperties( rPropMap, rConv );
+}
+
+HtmlTextBoxModel::HtmlTextBoxModel()
+{
+}
+
+bool
+HtmlTextBoxModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+#ifdef DEBUG
+ OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
+ // in msocximex ( where this is ported from, it appears *nothing* is read
+ // from the control stream ), surely there is some useful info there ?
+ SAL_WARN("oox", "HtmlTextBoxModel::importBinaryModel - string contents of stream: " << sStringContents );
+#else
+ (void) rInStrm;
+#endif
+ return true;
+}
+
+EmbeddedControl::EmbeddedControl( const OUString& rName ) :
+ maName( rName )
+{
+}
+
+ControlModelBase* EmbeddedControl::createModelFromGuid( std::u16string_view rClassId )
+{
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_COMMANDBUTTON ) ) return &createModel< AxCommandButtonModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_LABEL ) ) return &createModel< AxLabelModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_IMAGE ) ) return &createModel< AxImageModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_TOGGLEBUTTON ) ) return &createModel< AxToggleButtonModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_CHECKBOX ) ) return &createModel< AxCheckBoxModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_OPTIONBUTTON ) ) return &createModel< AxOptionButtonModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_TEXTBOX ) ) return &createModel< AxTextBoxModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_LISTBOX ) ) return &createModel< AxListBoxModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_COMBOBOX ) ) return &createModel< AxComboBoxModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_SPINBUTTON ) ) return &createModel< AxSpinButtonModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_SCROLLBAR ) ) return &createModel< AxScrollBarModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" AX_GUID_FRAME ) ) return &createModel< AxFrameModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" COMCTL_GUID_SCROLLBAR_60 ) ) return &createModel< ComCtlScrollBarModel >( COMCTL_VERSION_60 );
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" HTML_GUID_SELECT ) ) return &createModel< HtmlSelectModel >();
+ if( o3tl::equalsIgnoreAsciiCase(rClassId, u"" HTML_GUID_TEXTBOX ) ) return &createModel< HtmlTextBoxModel >();
+
+ mxModel.reset();
+ return nullptr;
+}
+
+OUString EmbeddedControl::getServiceName() const
+{
+ return mxModel ? mxModel->getServiceName() : OUString();
+}
+
+bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv ) const
+{
+ if( mxModel && rxCtrlModel.is() && !maName.isEmpty() )
+ {
+ PropertyMap aPropMap;
+ aPropMap.setProperty( PROP_Name, maName );
+ try
+ {
+ aPropMap.setProperty( PROP_GenerateVbaEvents, true);
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "");
+ }
+ mxModel->convertProperties( aPropMap, rConv );
+ PropertySet aPropSet( rxCtrlModel );
+ aPropSet.setProperties( aPropMap );
+ return true;
+ }
+ return false;
+}
+
+void EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv )
+{
+ if( mxModel && rxCtrlModel.is() && !maName.isEmpty() )
+ {
+ PropertySet aPropSet( rxCtrlModel );
+ aPropSet.getProperty( maName, PROP_Name );
+ mxModel->convertFromProperties( aPropSet, rConv );
+ }
+}
+
+EmbeddedForm::EmbeddedForm( const Reference< XModel >& rxDocModel,
+ const Reference< XDrawPage >& rxDrawPage, const GraphicHelper& rGraphicHelper ) :
+ maControlConv( rxDocModel, rGraphicHelper, true/*bDefaultColorBgr*/ ),
+ mxModelFactory( rxDocModel, UNO_QUERY ),
+ mxFormsSupp( rxDrawPage, UNO_QUERY )
+{
+ OSL_ENSURE( mxModelFactory.is(), "EmbeddedForm::EmbeddedForm - missing service factory" );
+}
+
+Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl& rControl, sal_Int32& rnCtrlIndex )
+{
+ Reference< XControlModel > xRet;
+ if( mxModelFactory.is() && rControl.hasModel() ) try
+ {
+ // create the UNO control model
+ OUString aServiceName = rControl.getServiceName();
+ Reference< XFormComponent > xFormComp( mxModelFactory->createInstance( aServiceName ), UNO_QUERY_THROW );
+ Reference< XControlModel > xCtrlModel( xFormComp, UNO_QUERY_THROW );
+
+ // convert the control properties
+ if( rControl.convertProperties( xCtrlModel, maControlConv ) )
+ xRet = xCtrlModel;
+ // insert the control into the form
+ Reference< XIndexContainer > xFormIC( createXForm(), UNO_SET_THROW );
+ rnCtrlIndex = xFormIC->getCount();
+ xFormIC->insertByIndex( rnCtrlIndex, Any( xFormComp ) );
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "exception creating Control");
+ }
+ return xRet;
+}
+
+Reference< XIndexContainer > const & EmbeddedForm::createXForm()
+{
+ if( mxFormsSupp.is() )
+ {
+ try
+ {
+ Reference< XNameContainer > xFormsNC( mxFormsSupp->getForms(), UNO_SET_THROW );
+ OUString aFormName = "Standard";
+ if( xFormsNC->hasByName( aFormName ) )
+ {
+ mxFormIC.set( xFormsNC->getByName( aFormName ), UNO_QUERY_THROW );
+ }
+ else if( mxModelFactory.is() )
+ {
+ Reference< XForm > xForm( mxModelFactory->createInstance( "com.sun.star.form.component.Form" ), UNO_QUERY_THROW );
+ xFormsNC->insertByName( aFormName, Any( xForm ) );
+ mxFormIC.set( xForm, UNO_QUERY_THROW );
+ }
+ }
+ catch (const Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "exception creating Form");
+ }
+ // always clear the forms supplier to not try to create the form again
+ mxFormsSupp.clear();
+ }
+ return mxFormIC;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx
new file mode 100644
index 000000000..a0f0b1096
--- /dev/null
+++ b/oox/source/ole/axcontrolfragment.cxx
@@ -0,0 +1,167 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/axcontrolfragment.hxx>
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/ole/axcontrol.hxx>
+#include <oox/ole/olehelper.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <osl/diagnose.h>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::ContextHandler2;
+using ::oox::core::ContextHandlerRef;
+using ::oox::core::FragmentHandler2;
+using ::oox::core::XmlFilterBase;
+
+AxControlPropertyContext::AxControlPropertyContext( FragmentHandler2 const & rFragment, ControlModelBase& rModel ) :
+ ContextHandler2( rFragment ),
+ mrModel( rModel ),
+ mnPropId( XML_TOKEN_INVALID )
+{
+}
+
+ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case AX_TOKEN( ocx ):
+ if( nElement == AX_TOKEN( ocxPr ) )
+ {
+ mnPropId = rAttribs.getToken( AX_TOKEN( name ), XML_TOKEN_INVALID );
+ switch( mnPropId )
+ {
+ case XML_TOKEN_INVALID:
+ return nullptr;
+ case XML_Picture:
+ case XML_MouseIcon:
+ return this; // import picture path from ax:picture child element
+ default:
+ mrModel.importProperty( mnPropId, rAttribs.getString( AX_TOKEN( value ), OUString() ) );
+ }
+ }
+ break;
+
+ case AX_TOKEN( ocxPr ):
+ if( nElement == AX_TOKEN( picture ) )
+ {
+ OUString aPicturePath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ if( !aPicturePath.isEmpty() )
+ {
+ BinaryXInputStream aInStrm( getFilter().openInputStream( aPicturePath ), true );
+ mrModel.importPictureData( mnPropId, aInStrm );
+ }
+ }
+ break;
+ }
+ return nullptr;
+}
+
+AxControlFragment::AxControlFragment( XmlFilterBase& rFilter, const OUString& rFragmentPath, EmbeddedControl& rControl ) :
+ FragmentHandler2( rFilter, rFragmentPath, true ),
+ mrControl( rControl )
+{
+}
+
+ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() && (nElement == AX_TOKEN( ocx )) )
+ {
+ OUString aClassId = rAttribs.getString( AX_TOKEN( classid ), OUString() );
+ switch( rAttribs.getToken( AX_TOKEN( persistence ), XML_TOKEN_INVALID ) )
+ {
+ case XML_persistPropertyBag:
+ if( ControlModelBase* pModel = mrControl.createModelFromGuid( aClassId ) )
+ return new AxControlPropertyContext( *this, *pModel );
+ break;
+
+ case XML_persistStreamInit:
+ {
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ if( !aFragmentPath.isEmpty() )
+ {
+ BinaryXInputStream aInStrm( getFilter().openInputStream( aFragmentPath ), true );
+ if( !aInStrm.isEof() )
+ {
+ // binary stream contains a copy of the class ID, must be equal to attribute value
+ OUString aStrmClassId = OleHelper::importGuid( aInStrm );
+ OSL_ENSURE( aClassId.equalsIgnoreAsciiCase( aStrmClassId ),
+ "AxControlFragment::importBinaryControl - form control class ID mismatch" );
+ if( ControlModelBase* pModel = mrControl.createModelFromGuid( aStrmClassId ) )
+ pModel->importBinaryModel( aInStrm );
+ }
+ }
+ }
+ break;
+
+ case XML_persistStorage:
+ {
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ if( !aFragmentPath.isEmpty() )
+ {
+ Reference< XInputStream > xStrgStrm = getFilter().openInputStream( aFragmentPath );
+ if( xStrgStrm.is() )
+ {
+ // Try to import as a parent control
+ bool bImportedAsParent = false;
+ OleStorage aStorage( getFilter().getComponentContext(), xStrgStrm, false );
+ BinaryXInputStream aInStrm( aStorage.openInputStream( "f" ), true );
+ if( !aInStrm.isEof() )
+ {
+ if( AxContainerModelBase* pModel = dynamic_cast< AxContainerModelBase* >( mrControl.createModelFromGuid( aClassId ) ) )
+ {
+ pModel->importBinaryModel( aInStrm );
+ bImportedAsParent = true;
+ }
+ }
+ // Import it as a non-parent control
+ if(!bImportedAsParent)
+ {
+ BinaryXInputStream aInStrm2(aStorage.openInputStream("contents"), true);
+ if (!aInStrm2.isEof())
+ {
+ if (ControlModelBase* pModel = mrControl.createModelFromGuid(aClassId))
+ {
+ pModel->importBinaryModel(aInStrm2);
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
+ return nullptr;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/axfontdata.cxx b/oox/source/ole/axfontdata.cxx
new file mode 100644
index 000000000..2505168bc
--- /dev/null
+++ b/oox/source/ole/axfontdata.cxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/axfontdata.hxx>
+#include <oox/ole/olehelper.hxx>
+#include <oox/ole/axbinaryreader.hxx>
+#include <oox/ole/axbinarywriter.hxx>
+
+namespace oox::ole {
+
+AxFontData::AxFontData() :
+ mnFontEffects( AxFontFlags::NONE ),
+ mnFontHeight( 160 ),
+ mnFontCharSet( WINDOWS_CHARSET_DEFAULT ),
+ mnHorAlign( AxHorizontalAlign::Left ),
+ mbDblUnderline( false )
+{
+}
+
+sal_Int16 AxFontData::getHeightPoints() const
+{
+ /* MSO uses weird font sizes:
+ 1pt->30, 2pt->45, 3pt->60, 4pt->75, 5pt->105, 6pt->120, 7pt->135,
+ 8pt->165, 9pt->180, 10pt->195, 11pt->225, ... */
+ return getLimitedValue< sal_Int16, sal_Int32 >( (mnFontHeight + 10) / 20, 1, SAL_MAX_INT16 );
+}
+
+void AxFontData::setHeightPoints( sal_Int16 nPoints )
+{
+ mnFontHeight = getLimitedValue< sal_Int32, sal_Int32 >( ((nPoints * 4 + 1) / 3) * 15, 30, 4294967 );
+}
+
+bool AxFontData::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readStringProperty( maFontName );
+ sal_uInt32 nTmp32 = 0;
+ aReader.readIntProperty< sal_uInt32 >( nTmp32 );
+ mnFontEffects = static_cast<AxFontFlags>(nTmp32);
+ aReader.readIntProperty< sal_Int32 >( mnFontHeight );
+ aReader.skipIntProperty< sal_Int32 >(); // font offset
+ aReader.readIntProperty< sal_uInt8 >( mnFontCharSet );
+ aReader.skipIntProperty< sal_uInt8 >(); // font pitch/family
+ sal_uInt8 nTmp = static_cast<sal_uInt8>(AxHorizontalAlign::Left);
+ aReader.readIntProperty< sal_uInt8 >( nTmp );
+ mnHorAlign = static_cast<AxHorizontalAlign>(nTmp);
+ aReader.skipIntProperty< sal_uInt16 >(); // font weight
+ mbDblUnderline = false;
+ return aReader.finalizeImport();
+}
+
+void AxFontData::exportBinaryModel( BinaryOutputStream& rOutStrm )
+{
+ AxBinaryPropertyWriter aWriter( rOutStrm );
+ aWriter.writeStringProperty( maFontName );
+ aWriter.writeIntProperty< sal_uInt32 >( static_cast<sal_uInt32>(mnFontEffects) );
+ aWriter.writeIntProperty< sal_Int32 >( mnFontHeight );
+ aWriter.skipProperty(); // font offset
+ // TODO make AxFontDataModel::convertFromProperties convert the textencoding
+ aWriter.writeIntProperty< sal_uInt8 >( mnFontCharSet );
+ aWriter.skipProperty(); // font pitch/family
+
+ aWriter.writeIntProperty< sal_uInt8 >( static_cast<sal_uInt8>(mnHorAlign) );
+ aWriter.skipProperty(); // font weight
+ aWriter.finalizeExport();
+}
+
+bool AxFontData::importStdFont( BinaryInputStream& rInStrm )
+{
+ StdFontInfo aFontInfo;
+ if( OleHelper::importStdFont( aFontInfo, rInStrm, false ) )
+ {
+ maFontName = aFontInfo.maName;
+ mnFontEffects = AxFontFlags::NONE;
+ setFlag( mnFontEffects, AxFontFlags::Bold, aFontInfo.mnWeight >= OLE_STDFONT_BOLD );
+ setFlag( mnFontEffects, AxFontFlags::Italic, getFlag( aFontInfo.mnFlags, OLE_STDFONT_ITALIC ) );
+ setFlag( mnFontEffects, AxFontFlags::Underline, getFlag( aFontInfo.mnFlags, OLE_STDFONT_UNDERLINE ) );
+ setFlag( mnFontEffects, AxFontFlags::Strikeout, getFlag( aFontInfo.mnFlags,OLE_STDFONT_STRIKE ) );
+ mbDblUnderline = false;
+ // StdFont stores font height in 1/10,000 of points
+ setHeightPoints( getLimitedValue< sal_Int16, sal_Int32 >( aFontInfo.mnHeight / 10000, 0, SAL_MAX_INT16 ) );
+ mnFontCharSet = aFontInfo.mnCharSet;
+ mnHorAlign = AxHorizontalAlign::Left;
+ return true;
+ }
+ return false;
+}
+
+bool AxFontData::importGuidAndFont( BinaryInputStream& rInStrm )
+{
+ OUString aGuid = OleHelper::importGuid( rInStrm );
+ if( aGuid == "{AFC20920-DA4E-11CE-B943-00AA006887B4}" )
+ return importBinaryModel( rInStrm );
+ if ( aGuid == OLE_GUID_STDFONT )
+ return importStdFont( rInStrm );
+ return false;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
new file mode 100644
index 000000000..41ab34feb
--- /dev/null
+++ b/oox/source/ole/olehelper.cxx
@@ -0,0 +1,571 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/olehelper.hxx>
+
+#include <rtl/ustrbuf.hxx>
+#include <sot/storage.hxx>
+#include <osl/diagnose.h>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/ole/axcontrol.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/helper/propertyset.hxx>
+
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <tools/globname.hxx>
+#include <unotools/streamwrap.hxx>
+#include <comphelper/processfactory.hxx>
+
+namespace oox::ole {
+
+using ::com::sun::star::form::XFormComponent;
+using ::com::sun::star::awt::XControlModel;
+using ::com::sun::star::awt::Size;
+using ::com::sun::star::frame::XModel;
+using ::com::sun::star::io::XOutputStream;
+using ::com::sun::star::io::XInputStream;
+using ::com::sun::star::beans::XPropertySet;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::XComponentContext;
+using ::com::sun::star::lang::XServiceInfo;
+
+using namespace ::com::sun::star::form;
+
+namespace {
+
+const sal_uInt32 OLE_COLORTYPE_MASK = 0xFF000000;
+const sal_uInt32 OLE_COLORTYPE_CLIENT = 0x00000000;
+const sal_uInt32 OLE_COLORTYPE_PALETTE = 0x01000000;
+const sal_uInt32 OLE_COLORTYPE_BGR = 0x02000000;
+const sal_uInt32 OLE_COLORTYPE_SYSCOLOR = 0x80000000;
+
+const sal_uInt32 OLE_PALETTECOLOR_MASK = 0x0000FFFF;
+const sal_uInt32 OLE_SYSTEMCOLOR_MASK = 0x0000FFFF;
+
+/** Swaps the red and blue component of the passed color. */
+sal_uInt32 lclSwapRedBlue( sal_uInt32 nColor )
+{
+ return static_cast< sal_uInt32 >( (nColor & 0xFF00FF00) | ((nColor & 0x0000FF) << 16) | ((nColor & 0xFF0000) >> 16) );
+}
+
+/** Returns the UNO RGB color from the passed encoded OLE BGR color. */
+::Color lclDecodeBgrColor( sal_uInt32 nOleColor )
+{
+ return ::Color( ColorTransparency, lclSwapRedBlue( nOleColor ) & 0xFFFFFF );
+}
+
+const sal_uInt32 OLE_STDPIC_ID = 0x0000746C;
+
+struct GUIDCNamePair
+{
+ const char* sGUID;
+ const char* sName;
+};
+
+struct IdCntrlData
+{
+ sal_Int16 nId;
+ GUIDCNamePair aData;
+};
+
+const sal_Int16 TOGGLEBUTTON = -1;
+const sal_Int16 FORMULAFIELD = -2;
+
+typedef std::map< sal_Int16, GUIDCNamePair > GUIDCNamePairMap;
+class classIdToGUIDCNamePairMap
+{
+ GUIDCNamePairMap mnIdToGUIDCNamePairMap;
+ classIdToGUIDCNamePairMap();
+public:
+ static GUIDCNamePairMap& get();
+};
+
+classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
+{
+ static IdCntrlData const initialCntrlData[] =
+ {
+ // Command button MUST be at index 0
+ { FormComponentType::COMMANDBUTTON,
+ { AX_GUID_COMMANDBUTTON, "CommandButton"} ,
+ },
+ // Toggle button MUST be at index 1
+ { TOGGLEBUTTON,
+ { AX_GUID_TOGGLEBUTTON, "ToggleButton"},
+ },
+ { FormComponentType::FIXEDTEXT,
+ { AX_GUID_LABEL, "Label"},
+ },
+ { FormComponentType::TEXTFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::LISTBOX,
+ { AX_GUID_LISTBOX, "ListBox"},
+ },
+ { FormComponentType::COMBOBOX,
+ { AX_GUID_COMBOBOX, "ComboBox"},
+ },
+ { FormComponentType::CHECKBOX,
+ { AX_GUID_CHECKBOX, "CheckBox"},
+ },
+ { FormComponentType::RADIOBUTTON,
+ { AX_GUID_OPTIONBUTTON, "OptionButton"},
+ },
+ { FormComponentType::IMAGECONTROL,
+ { AX_GUID_IMAGE, "Image"},
+ },
+ { FormComponentType::DATEFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::TIMEFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::NUMERICFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::CURRENCYFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::PATTERNFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FORMULAFIELD,
+ { AX_GUID_TEXTBOX, "TextBox"},
+ },
+ { FormComponentType::IMAGEBUTTON,
+ { AX_GUID_COMMANDBUTTON, "CommandButton"},
+ },
+ { FormComponentType::SPINBUTTON,
+ { AX_GUID_SPINBUTTON, "SpinButton"},
+ },
+ { FormComponentType::SCROLLBAR,
+ { AX_GUID_SCROLLBAR, "ScrollBar"},
+ }
+ };
+ int const length = SAL_N_ELEMENTS( initialCntrlData );
+ IdCntrlData const * pData = initialCntrlData;
+ for ( int index = 0; index < length; ++index, ++pData )
+ mnIdToGUIDCNamePairMap[ pData->nId ] = pData->aData;
+};
+
+GUIDCNamePairMap& classIdToGUIDCNamePairMap::get()
+{
+ static classIdToGUIDCNamePairMap theInst;
+ return theInst.mnIdToGUIDCNamePairMap;
+}
+
+template< typename Type >
+void lclAppendHex( OUStringBuffer& orBuffer, Type nValue )
+{
+ const sal_Int32 nWidth = 2 * sizeof( Type );
+ static const sal_Unicode spcHexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+ orBuffer.setLength( orBuffer.getLength() + nWidth );
+ for( sal_Int32 nCharIdx = orBuffer.getLength() - 1, nCharEnd = nCharIdx - nWidth; nCharIdx > nCharEnd; --nCharIdx, nValue >>= 4 )
+ orBuffer[nCharIdx] = spcHexChars[ nValue & 0xF ];
+}
+
+} // namespace
+
+StdFontInfo::StdFontInfo() :
+ mnHeight( 0 ),
+ mnWeight( OLE_STDFONT_NORMAL ),
+ mnCharSet( WINDOWS_CHARSET_ANSI ),
+ mnFlags( 0 )
+{
+}
+
+StdFontInfo::StdFontInfo( const OUString& rName, sal_uInt32 nHeight ) :
+ maName( rName ),
+ mnHeight( nHeight ),
+ mnWeight( OLE_STDFONT_NORMAL ),
+ mnCharSet( WINDOWS_CHARSET_ANSI ),
+ mnFlags( 0 )
+{
+}
+
+::Color OleHelper::decodeOleColor(
+ const GraphicHelper& rGraphicHelper, sal_uInt32 nOleColor, bool bDefaultColorBgr )
+{
+ static const sal_Int32 spnSystemColors[] =
+ {
+ XML_scrollBar, XML_background, XML_activeCaption, XML_inactiveCaption,
+ XML_menu, XML_window, XML_windowFrame, XML_menuText,
+ XML_windowText, XML_captionText, XML_activeBorder, XML_inactiveBorder,
+ XML_appWorkspace, XML_highlight, XML_highlightText, XML_btnFace,
+ XML_btnShadow, XML_grayText, XML_btnText, XML_inactiveCaptionText,
+ XML_btnHighlight, XML_3dDkShadow, XML_3dLight, XML_infoText,
+ XML_infoBk
+ };
+
+ switch( nOleColor & OLE_COLORTYPE_MASK )
+ {
+ case OLE_COLORTYPE_CLIENT:
+ return bDefaultColorBgr ? lclDecodeBgrColor( nOleColor ) : rGraphicHelper.getPaletteColor( nOleColor & OLE_PALETTECOLOR_MASK );
+
+ case OLE_COLORTYPE_PALETTE:
+ return rGraphicHelper.getPaletteColor( nOleColor & OLE_PALETTECOLOR_MASK );
+
+ case OLE_COLORTYPE_BGR:
+ return lclDecodeBgrColor( nOleColor );
+
+ case OLE_COLORTYPE_SYSCOLOR:
+ return rGraphicHelper.getSystemColor( STATIC_ARRAY_SELECT( spnSystemColors, nOleColor & OLE_SYSTEMCOLOR_MASK, XML_TOKEN_INVALID ), API_RGB_WHITE );
+ }
+ OSL_FAIL( "OleHelper::decodeOleColor - unknown color type" );
+ return API_RGB_BLACK;
+}
+
+sal_uInt32 OleHelper::encodeOleColor( sal_Int32 nRgbColor )
+{
+ return OLE_COLORTYPE_BGR | lclSwapRedBlue( static_cast< sal_uInt32 >( nRgbColor & 0xFFFFFF ) );
+}
+
+void OleHelper::exportGuid( BinaryOutputStream& rOStr, const SvGlobalName& rId )
+{
+ rOStr.WriteUInt32( rId.GetCLSID().Data1 );
+ rOStr.WriteUInt16( rId.GetCLSID().Data2 );
+ rOStr.WriteUInt16( rId.GetCLSID().Data3 );
+ rOStr.writeArray( rId.GetCLSID().Data4, 8 );
+}
+
+OUString OleHelper::importGuid( BinaryInputStream& rInStrm )
+{
+ OUStringBuffer aBuffer(40);
+ aBuffer.append( '{' );
+ lclAppendHex( aBuffer, rInStrm.readuInt32() );
+ aBuffer.append( '-' );
+ lclAppendHex( aBuffer, rInStrm.readuInt16() );
+ aBuffer.append( '-' );
+ lclAppendHex( aBuffer, rInStrm.readuInt16() );
+ aBuffer.append( '-' );
+ lclAppendHex( aBuffer, rInStrm.readuInt8() );
+ lclAppendHex( aBuffer, rInStrm.readuInt8() );
+ aBuffer.append( '-' );
+ for( int nIndex = 0; nIndex < 6; ++nIndex )
+ lclAppendHex( aBuffer, rInStrm.readuInt8() );
+ aBuffer.append( '}' );
+ return aBuffer.makeStringAndClear();
+}
+
+bool OleHelper::importStdFont( StdFontInfo& orFontInfo, BinaryInputStream& rInStrm, bool bWithGuid )
+{
+ if( bWithGuid )
+ {
+ bool bIsStdFont = importGuid( rInStrm ) == OLE_GUID_STDFONT;
+ OSL_ENSURE( bIsStdFont, "OleHelper::importStdFont - unexpected header GUID, expected StdFont" );
+ if( !bIsStdFont )
+ return false;
+ }
+
+ sal_uInt8 nVersion, nNameLen;
+ nVersion = rInStrm.readuChar();
+ orFontInfo.mnCharSet = rInStrm.readuInt16();
+ orFontInfo.mnFlags = rInStrm.readuChar();
+ orFontInfo.mnWeight = rInStrm.readuInt16();
+ orFontInfo.mnHeight = rInStrm.readuInt32();
+ nNameLen = rInStrm.readuChar();
+ // according to spec the name is ASCII
+ orFontInfo.maName = rInStrm.readCharArrayUC( nNameLen, RTL_TEXTENCODING_ASCII_US );
+ OSL_ENSURE( nVersion <= 1, "OleHelper::importStdFont - wrong version" );
+ return !rInStrm.isEof() && (nVersion <= 1);
+}
+
+bool OleHelper::importStdPic( StreamDataSequence& orGraphicData, BinaryInputStream& rInStrm )
+{
+ bool bIsStdPic = importGuid( rInStrm ) == OLE_GUID_STDPIC;
+ OSL_ENSURE( bIsStdPic, "OleHelper::importStdPic - unexpected header GUID, expected StdPic" );
+ if( !bIsStdPic )
+ return false;
+
+ sal_uInt32 nStdPicId;
+ sal_Int32 nBytes;
+ nStdPicId = rInStrm.readuInt32();
+ nBytes = rInStrm.readInt32();
+ OSL_ENSURE( nStdPicId == OLE_STDPIC_ID, "OleHelper::importStdPic - unexpected header version" );
+ return !rInStrm.isEof() && (nStdPicId == OLE_STDPIC_ID) && (nBytes > 0) && (rInStrm.readData( orGraphicData, nBytes ) == nBytes);
+}
+
+static Reference< css::frame::XFrame > lcl_getFrame( const Reference< css::frame::XModel >& rxModel )
+{
+ Reference< css::frame::XFrame > xFrame;
+ if ( rxModel.is() )
+ {
+ Reference< css::frame::XController > xController = rxModel->getCurrentController();
+ xFrame = xController.is() ? xController->getFrame() : nullptr;
+ }
+ return xFrame;
+}
+
+OleFormCtrlExportHelper::OleFormCtrlExportHelper( const Reference< XComponentContext >& rxCtx, const Reference< XModel >& rxDocModel, const Reference< XControlModel >& xCntrlModel ) : mpModel( nullptr ), maGrfHelper( rxCtx, lcl_getFrame( rxDocModel ), StorageRef() ), mxDocModel( rxDocModel ), mxControlModel( xCntrlModel )
+{
+ // try to get the guid
+ Reference< css::beans::XPropertySet > xProps( xCntrlModel, UNO_QUERY );
+ if ( !xProps.is() )
+ return;
+
+ sal_Int16 nClassId = 0;
+ PropertySet aPropSet( mxControlModel );
+ if ( !aPropSet.getProperty( nClassId, PROP_ClassId ) )
+ return;
+
+ /* pseudo ripped from legacy msocximex:
+ "There is a truly horrible thing with EditControls and FormattedField
+ Controls, they both pretend to have an EDITBOX ClassId for compatibility
+ reasons, at some stage in the future hopefully there will be a proper
+ FormulaField ClassId rather than this piggybacking two controls onto the
+ same ClassId, cmc." - when fixed the fake FORMULAFIELD id entry
+ and definition above can be removed/replaced
+ */
+ if ( nClassId == FormComponentType::TEXTFIELD)
+ {
+ Reference< XServiceInfo > xInfo( xCntrlModel,
+ UNO_QUERY);
+ if (xInfo->
+ supportsService( "com.sun.star.form.component.FormattedField" ) )
+ nClassId = FORMULAFIELD;
+ }
+ else if ( nClassId == FormComponentType::COMMANDBUTTON )
+ {
+ bool bToggle = false;
+ if ( aPropSet.getProperty( bToggle, PROP_Toggle ) && bToggle )
+ nClassId = TOGGLEBUTTON;
+ }
+ else if ( nClassId == FormComponentType::CONTROL )
+ {
+ Reference< XServiceInfo > xInfo( xCntrlModel,
+ UNO_QUERY);
+ if (xInfo->supportsService("com.sun.star.form.component.ImageControl" ) )
+ nClassId = FormComponentType::IMAGECONTROL;
+ }
+
+ GUIDCNamePairMap& cntrlMap = classIdToGUIDCNamePairMap::get();
+ GUIDCNamePairMap::iterator it = cntrlMap.find( nClassId );
+ if ( it != cntrlMap.end() )
+ {
+ aPropSet.getProperty(maName, PROP_Name );
+ maTypeName = OUString::createFromAscii( it->second.sName );
+ maFullName = "Microsoft Forms 2.0 " + maTypeName;
+ mpControl.reset(new EmbeddedControl( maName ));
+ maGUID = OUString::createFromAscii( it->second.sGUID );
+ mpModel = mpControl->createModelFromGuid( maGUID );
+ }
+}
+
+OleFormCtrlExportHelper::~OleFormCtrlExportHelper()
+{
+}
+
+void OleFormCtrlExportHelper::exportName( const Reference< XOutputStream >& rxOut )
+{
+ oox::BinaryXOutputStream aOut( rxOut, false );
+ aOut.writeUnicodeArray( maName );
+ aOut.WriteInt32(0);
+}
+
+void OleFormCtrlExportHelper::exportCompObj( const Reference< XOutputStream >& rxOut )
+{
+ oox::BinaryXOutputStream aOut( rxOut, false );
+ if ( mpModel )
+ mpModel->exportCompObj( aOut );
+}
+
+void OleFormCtrlExportHelper::exportControl( const Reference< XOutputStream >& rxOut, const Size& rSize, bool bAutoClose )
+{
+ oox::BinaryXOutputStream aOut( rxOut, bAutoClose );
+ if ( mpModel )
+ {
+ ::oox::ole::ControlConverter aConv( mxDocModel, maGrfHelper );
+ if(mpControl)
+ mpControl->convertFromProperties( mxControlModel, aConv );
+ mpModel->maSize.first = rSize.Width;
+ mpModel->maSize.second = rSize.Height;
+ mpModel->exportBinaryModel( aOut );
+ }
+}
+
+MSConvertOCXControls::MSConvertOCXControls( const Reference< css::frame::XModel >& rxModel ) : SvxMSConvertOCXControls( rxModel ), mxCtx( comphelper::getProcessComponentContext() ), maGrfHelper( mxCtx, lcl_getFrame( rxModel ), StorageRef() )
+{
+}
+
+MSConvertOCXControls::~MSConvertOCXControls()
+{
+}
+
+bool
+MSConvertOCXControls::importControlFromStream( ::oox::BinaryInputStream& rInStrm, Reference< XFormComponent >& rxFormComp, std::u16string_view rGuidString )
+{
+ ::oox::ole::EmbeddedControl aControl( "Unknown" );
+ if( ::oox::ole::ControlModelBase* pModel = aControl.createModelFromGuid( rGuidString ) )
+ {
+ pModel->importBinaryModel( rInStrm );
+ rxFormComp.set( mxCtx->getServiceManager()->createInstanceWithContext( pModel->getServiceName(), mxCtx ), UNO_QUERY );
+ Reference< XControlModel > xCtlModel( rxFormComp, UNO_QUERY );
+ ::oox::ole::ControlConverter aConv( mxModel, maGrfHelper );
+ aControl.convertProperties( xCtlModel, aConv );
+ }
+ return rxFormComp.is();
+}
+
+bool
+MSConvertOCXControls::ReadOCXCtlsStream( tools::SvRef<SotStorageStream> const & rSrc1, Reference< XFormComponent > & rxFormComp,
+ sal_Int32 nPos,
+ sal_Int32 nStreamSize)
+{
+ if ( rSrc1.is() )
+ {
+ BinaryXInputStream aCtlsStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *rSrc1 ) ), true );
+ aCtlsStrm.seek( nPos );
+ OUString aStrmClassId = ::oox::ole::OleHelper::importGuid( aCtlsStrm );
+ return importControlFromStream( aCtlsStrm, rxFormComp, aStrmClassId, nStreamSize );
+ }
+ return false;
+}
+
+bool MSConvertOCXControls::importControlFromStream( ::oox::BinaryInputStream& rInStrm, Reference< XFormComponent >& rxFormComp, const OUString& rStrmClassId,
+ sal_Int32 nStreamSize)
+{
+ if ( !rInStrm.isEof() )
+ {
+ // Special processing for those html controls
+ bool bOneOfHtmlControls = false;
+ if ( rStrmClassId.toAsciiUpperCase() == HTML_GUID_SELECT
+ || rStrmClassId.toAsciiUpperCase() == HTML_GUID_TEXTBOX )
+ bOneOfHtmlControls = true;
+
+ if ( bOneOfHtmlControls )
+ {
+ // html controls don't seem have a handy record length following the GUID
+ // in the binary stream.
+ // Given the control stream length create a stream of nStreamSize bytes starting from
+ // nPos ( offset by the guid already read in )
+ if ( !nStreamSize )
+ return false;
+ const int nGuidSize = 0x10;
+ StreamDataSequence aDataSeq;
+ sal_Int32 nBytesToRead = nStreamSize - nGuidSize;
+ while ( nBytesToRead )
+ nBytesToRead -= rInStrm.readData( aDataSeq, nBytesToRead );
+ SequenceInputStream aInSeqStream( aDataSeq );
+ importControlFromStream( aInSeqStream, rxFormComp, rStrmClassId );
+ }
+ else
+ {
+ importControlFromStream( rInStrm, rxFormComp, rStrmClassId );
+ }
+ }
+ return rxFormComp.is();
+}
+
+bool MSConvertOCXControls::ReadOCXStorage( tools::SvRef<SotStorage> const & xOleStg,
+ Reference< XFormComponent > & rxFormComp )
+{
+ if ( xOleStg.is() )
+ {
+ tools::SvRef<SotStorageStream> pNameStream = xOleStg->OpenSotStream("\3OCXNAME", StreamMode::READ);
+ BinaryXInputStream aNameStream( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pNameStream ) ), true );
+
+ tools::SvRef<SotStorageStream> pContents = xOleStg->OpenSotStream("contents", StreamMode::READ);
+ BinaryXInputStream aInStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pContents ) ), true );
+
+ tools::SvRef<SotStorageStream> pClsStrm = xOleStg->OpenSotStream("\1CompObj", StreamMode::READ);
+ BinaryXInputStream aClsStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper(*pClsStrm ) ), true );
+ aClsStrm.skip(12);
+
+ OUString aStrmClassId = ::oox::ole::OleHelper::importGuid( aClsStrm );
+ if ( importControlFromStream( aInStrm, rxFormComp, aStrmClassId, aInStrm.size() ) )
+ {
+ OUString aName = aNameStream.readNulUnicodeArray();
+ Reference< XControlModel > xCtlModel( rxFormComp, UNO_QUERY );
+ if ( !aName.isEmpty() && xCtlModel.is() )
+ {
+ PropertyMap aPropMap;
+ aPropMap.setProperty( PROP_Name, aName );
+ PropertySet aPropSet( xCtlModel );
+ aPropSet.setProperties( aPropMap );
+ }
+ return rxFormComp.is();
+ }
+ }
+ return false;
+}
+
+bool MSConvertOCXControls::WriteOCXExcelKludgeStream( const css::uno::Reference< css::frame::XModel >& rxModel, const css::uno::Reference< css::io::XOutputStream >& xOutStrm, const css::uno::Reference< css::awt::XControlModel > &rxControlModel, const css::awt::Size& rSize,OUString &rName )
+{
+ OleFormCtrlExportHelper exportHelper( comphelper::getProcessComponentContext(), rxModel, rxControlModel );
+ if ( !exportHelper.isValid() )
+ return false;
+ rName = exportHelper.getTypeName();
+ SvGlobalName aName;
+ aName.MakeId(exportHelper.getGUID());
+ BinaryXOutputStream aOut( xOutStrm, false );
+ OleHelper::exportGuid( aOut, aName );
+ exportHelper.exportControl( xOutStrm, rSize );
+ return true;
+}
+
+bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, tools::SvRef<SotStorage> const &xOleStg,
+ const Reference< XControlModel > &rxControlModel,
+ const css::awt::Size& rSize, OUString &rName)
+{
+ SvGlobalName aName;
+
+ OleFormCtrlExportHelper exportHelper( comphelper::getProcessComponentContext(), rxModel, rxControlModel );
+
+ if ( !exportHelper.isValid() )
+ return false;
+
+ aName.MakeId(exportHelper.getGUID());
+
+ OUString sFullName = exportHelper.getFullName();
+ rName = exportHelper.getTypeName();
+ xOleStg->SetClass( aName, SotClipboardFormatId::EMBEDDED_OBJ_OLE, sFullName);
+ {
+ tools::SvRef<SotStorageStream> pNameStream = xOleStg->OpenSotStream("\3OCXNAME");
+ Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pNameStream );
+ exportHelper.exportName( xOut );
+ }
+ {
+ tools::SvRef<SotStorageStream> pObjStream = xOleStg->OpenSotStream("\1CompObj");
+ Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pObjStream );
+ exportHelper.exportCompObj( xOut );
+ }
+ {
+ tools::SvRef<SotStorageStream> pContents = xOleStg->OpenSotStream("contents");
+ Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pContents );
+ exportHelper.exportControl( xOut, rSize );
+ }
+ return true;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
new file mode 100644
index 000000000..9282e2944
--- /dev/null
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/oleobjecthelper.hxx>
+
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <osl/diagnose.h>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/token/properties.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+OleObjectInfo::OleObjectInfo() :
+ mbLinked( false ),
+ mbShowAsIcon( false ),
+ mbAutoUpdate( false ),
+ mbHasPicture( false )
+{
+}
+
+const char g_aEmbeddedObjScheme[] = "vnd.sun.star.EmbeddedObject:";
+
+OleObjectHelper::OleObjectHelper(
+ const Reference< XMultiServiceFactory >& rxModelFactory,
+ uno::Reference<frame::XModel> const& xModel)
+ : m_xModel(xModel)
+ , mnObjectId( 100 )
+{
+ assert(m_xModel.is());
+ if( rxModelFactory.is() ) try
+ {
+ mxResolver.set( rxModelFactory->createInstance( "com.sun.star.document.ImportEmbeddedObjectResolver" ), UNO_QUERY );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+OleObjectHelper::~OleObjectHelper()
+{
+ try
+ {
+ Reference< XComponent > xResolverComp( mxResolver, UNO_QUERY_THROW );
+ xResolverComp->dispose();
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+// TODO: this is probably a sub-optimal approach: ideally the media type
+// of the stream from [Content_Types].xml should be stored somewhere for this
+// purpose, but currently the media type of all OLE streams in the storage is
+// just "application/vnd.sun.star.oleobject"
+void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
+ OUString const& rObjectName, OUString const*const pOldObjectName,
+ OUString const& rProgId)
+{
+ static constexpr OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
+
+ // get interop grab bag from document
+ uno::Reference<beans::XPropertySet> const xDocProps(xModel, uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue("InteropGrabBag"));
+
+ // get EmbeddedObjects property inside grab bag
+ comphelper::SequenceAsHashMap objectsList;
+ if (aGrabBag.find(sEmbeddingsPropName) != aGrabBag.end())
+ objectsList << aGrabBag[sEmbeddingsPropName];
+
+ uno::Sequence< beans::PropertyValue > aGrabBagAttribute{ comphelper::makePropertyValue("ProgID",
+ rProgId) };
+
+ // If we got an "old name", erase that first.
+ if (pOldObjectName)
+ {
+ comphelper::SequenceAsHashMap::iterator it = objectsList.find(*pOldObjectName);
+ if (it != objectsList.end())
+ objectsList.erase(it);
+ }
+
+ objectsList[rObjectName] <<= aGrabBagAttribute;
+
+ // put objects list back into the grab bag
+ aGrabBag[sEmbeddingsPropName] <<= objectsList.getAsConstPropertyValueList();
+
+ // put grab bag back into the document
+ xDocProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList()));
+}
+
+bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInfo& rOleObject, const awt::Size& rObjSize )
+{
+ bool bRet = false;
+
+ if( rOleObject.mbLinked )
+ {
+ // linked OLE object - set target URL
+ if( !rOleObject.maTargetLink.isEmpty() )
+ {
+ rPropMap.setProperty( PROP_LinkURL, rOleObject.maTargetLink);
+ bRet = true;
+ }
+ }
+ else
+ {
+ // embedded OLE object - import the embedded data
+ if( rOleObject.maEmbeddedData.hasElements() && mxResolver.is() ) try
+ {
+ OUString aObjectId = "Obj" + OUString::number( mnObjectId++ );
+
+ Reference< XNameAccess > xResolverNA( mxResolver, UNO_QUERY_THROW );
+ Reference< XOutputStream > xOutStrm( xResolverNA->getByName( aObjectId ), UNO_QUERY_THROW );
+ xOutStrm->writeBytes( rOleObject.maEmbeddedData );
+ xOutStrm->closeOutput();
+
+ SaveInteropProperties(m_xModel, aObjectId, nullptr, rOleObject.maProgId);
+
+ OUString aUrl = mxResolver->resolveEmbeddedObjectURL( aObjectId );
+ OSL_ENSURE( aUrl.match( g_aEmbeddedObjScheme ), "OleObjectHelper::importOleObject - unexpected URL scheme" );
+ OUString aPersistName = aUrl.copy( strlen(g_aEmbeddedObjScheme) );
+ if( !aPersistName.isEmpty() )
+ {
+ rPropMap.setProperty( PROP_PersistName, aPersistName);
+ bRet = true;
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+ }
+
+ if( bRet )
+ {
+ rPropMap.setProperty( PROP_Aspect, (rOleObject.mbShowAsIcon ? Aspects::MSOLE_ICON : Aspects::MSOLE_CONTENT));
+ rPropMap.setProperty( PROP_VisualArea, awt::Rectangle( 0, 0, rObjSize.Width, rObjSize.Height ));
+ }
+ return bRet;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
new file mode 100644
index 000000000..4b20e20f8
--- /dev/null
+++ b/oox/source/ole/olestorage.cxx
@@ -0,0 +1,376 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/olestorage.hxx>
+
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/io/NotConnectedException.hpp>
+#include <com/sun/star/io/TempFile.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <osl/diagnose.h>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/binaryoutputstream.hxx>
+#include <oox/helper/containerhelper.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+/** Implementation of an OLE storage output stream that inserts itself into the
+ storage when it is closed.
+ */
+class OleOutputStream : public ::cppu::WeakImplHelper< XSeekable, XOutputStream >
+{
+public:
+ explicit OleOutputStream(
+ const Reference< XComponentContext >& rxContext,
+ const Reference< XNameContainer >& rxStorage,
+ const OUString& rElementName );
+
+ virtual void SAL_CALL seek( sal_Int64 nPos ) override;
+ virtual sal_Int64 SAL_CALL getPosition() override;
+ virtual sal_Int64 SAL_CALL getLength() override;
+
+ virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& rData ) override;
+ virtual void SAL_CALL flush() override;
+ virtual void SAL_CALL closeOutput() override;
+
+private:
+ /// @throws IOException
+ void ensureSeekable() const;
+ /// @throws NotConnectedException
+ void ensureConnected() const;
+
+private:
+ Reference< XNameContainer > mxStorage;
+ Reference< XStream > mxTempFile;
+ Reference< XOutputStream > mxOutStrm;
+ Reference< XSeekable > mxSeekable;
+ OUString maElementName;
+};
+
+OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContext,
+ const Reference< XNameContainer >& rxStorage, const OUString& rElementName ) :
+ mxStorage( rxStorage ),
+ maElementName( rElementName )
+{
+ try
+ {
+ mxTempFile.set( TempFile::create(rxContext), UNO_QUERY_THROW );
+ mxOutStrm = mxTempFile->getOutputStream();
+ mxSeekable.set( mxOutStrm, UNO_QUERY );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+void SAL_CALL OleOutputStream::seek( sal_Int64 nPos )
+{
+ ensureSeekable();
+ mxSeekable->seek( nPos );
+}
+
+sal_Int64 SAL_CALL OleOutputStream::getPosition()
+{
+ ensureSeekable();
+ return mxSeekable->getPosition();
+}
+
+sal_Int64 SAL_CALL OleOutputStream::getLength()
+{
+ ensureSeekable();
+ return mxSeekable->getLength();
+}
+
+void SAL_CALL OleOutputStream::writeBytes( const Sequence< sal_Int8 >& rData )
+{
+ ensureConnected();
+ mxOutStrm->writeBytes( rData );
+}
+
+void SAL_CALL OleOutputStream::flush()
+{
+ ensureConnected();
+ mxOutStrm->flush();
+}
+
+void SAL_CALL OleOutputStream::closeOutput()
+{
+ ensureConnected();
+ ensureSeekable();
+ // remember the class members
+ Reference< XOutputStream > xOutStrm = mxOutStrm;
+ Reference< XSeekable > xSeekable = mxSeekable;
+ // reset all class members
+ mxOutStrm.clear();
+ mxSeekable.clear();
+ // close stream (and let it throw something if needed)
+ xOutStrm->closeOutput();
+ // on success, insert the stream into the OLE storage (must be seek-ed back before)
+ xSeekable->seek( 0 );
+ if( !ContainerHelper::insertByName( mxStorage, maElementName, Any( mxTempFile ) ) )
+ throw IOException();
+}
+
+void OleOutputStream::ensureSeekable() const
+{
+ if( !mxSeekable.is() )
+ throw IOException();
+}
+
+void OleOutputStream::ensureConnected() const
+{
+ if( !mxOutStrm.is() )
+ throw NotConnectedException();
+}
+
+} // namespace
+
+OleStorage::OleStorage( const Reference< XComponentContext >& rxContext,
+ const Reference< XInputStream >& rxInStream, bool bBaseStreamAccess ) :
+ StorageBase( rxInStream, bBaseStreamAccess ),
+ mxContext( rxContext ),
+ mpParentStorage( nullptr )
+{
+ OSL_ENSURE( mxContext.is(), "OleStorage::OleStorage - missing component context" );
+ initStorage( rxInStream );
+}
+
+OleStorage::OleStorage( const Reference< XComponentContext >& rxContext,
+ const Reference< XStream >& rxOutStream, bool bBaseStreamAccess ) :
+ StorageBase( rxOutStream, bBaseStreamAccess ),
+ mxContext( rxContext ),
+ mpParentStorage( nullptr )
+{
+ OSL_ENSURE( mxContext.is(), "OleStorage::OleStorage - missing component context" );
+ initStorage( rxOutStream );
+}
+
+OleStorage::OleStorage( const OleStorage& rParentStorage,
+ const Reference< XNameContainer >& rxStorage, const OUString& rElementName, bool bReadOnly ) :
+ StorageBase( rParentStorage, rElementName, bReadOnly ),
+ mxContext( rParentStorage.mxContext ),
+ mxStorage( rxStorage ),
+ mpParentStorage( &rParentStorage )
+{
+ OSL_ENSURE( mxStorage.is(), "OleStorage::OleStorage - missing substorage elements" );
+}
+
+OleStorage::OleStorage( const OleStorage& rParentStorage,
+ const Reference< XStream >& rxOutStream, const OUString& rElementName ) :
+ StorageBase( rParentStorage, rElementName, false ),
+ mxContext( rParentStorage.mxContext ),
+ mpParentStorage( &rParentStorage )
+{
+ initStorage( rxOutStream );
+}
+
+OleStorage::~OleStorage()
+{
+}
+
+void OleStorage::initStorage( const Reference< XInputStream >& rxInStream )
+{
+ // if stream is not seekable, create temporary copy
+ Reference< XInputStream > xInStrm = rxInStream;
+ if( !Reference< XSeekable >( xInStrm, UNO_QUERY ).is() ) try
+ {
+ Reference< XStream > xTempFile( TempFile::create(mxContext), UNO_QUERY_THROW );
+ {
+ Reference< XOutputStream > xOutStrm( xTempFile->getOutputStream(), UNO_SET_THROW );
+ /* Pass false to both binary stream objects to keep the UNO
+ streams alive. Life time of these streams is controlled by the
+ tempfile implementation. */
+ BinaryXOutputStream aOutStrm( xOutStrm, false );
+ BinaryXInputStream aInStrm( xInStrm, false );
+ aInStrm.copyToStream( aOutStrm );
+ } // scope closes output stream of tempfile
+ xInStrm = xTempFile->getInputStream();
+ }
+ catch(const Exception& )
+ {
+ OSL_FAIL( "OleStorage::initStorage - cannot create temporary copy of input stream" );
+ }
+
+ // create base storage object
+ if( xInStrm.is() ) try
+ {
+ Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY_THROW );
+ Sequence< Any > aArgs{ Any(xInStrm),
+ Any(true) };// true = do not create a copy of the input stream
+ mxStorage.set( xFactory->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", aArgs ), UNO_QUERY_THROW );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+void OleStorage::initStorage( const Reference< XStream >& rxOutStream )
+{
+ // create base storage object
+ if( rxOutStream.is() ) try
+ {
+ Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY_THROW );
+ Sequence< Any > aArgs{ Any(rxOutStream),
+ Any(true) }; // true = do not create a copy of the stream
+ mxStorage.set( xFactory->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", aArgs ), UNO_QUERY_THROW );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+// StorageBase interface ------------------------------------------------------
+
+bool OleStorage::implIsStorage() const
+{
+ if( mxStorage.is() ) try
+ {
+ /* If this is not an OLE storage, hasElements() of the OLESimpleStorage
+ implementation throws an exception. But we do not return the result
+ of hasElements(), because an empty storage is a valid storage too. */
+ (void)mxStorage->hasElements();
+ return true;
+ }
+ catch(const Exception& )
+ {
+ }
+ return false;
+}
+
+Reference< XStorage > OleStorage::implGetXStorage() const
+{
+ OSL_FAIL( "OleStorage::getXStorage - not implemented" );
+ return Reference< XStorage >();
+}
+
+void OleStorage::implGetElementNames( ::std::vector< OUString >& orElementNames ) const
+{
+ if( mxStorage.is() ) try
+ {
+ const Sequence<OUString> aNames = mxStorage->getElementNames();
+ if( aNames.hasElements() )
+ orElementNames.insert( orElementNames.end(), aNames.begin(), aNames.end() );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+StorageRef OleStorage::implOpenSubStorage( const OUString& rElementName, bool bCreateMissing )
+{
+ StorageRef xSubStorage;
+ if( mxStorage.is() && !rElementName.isEmpty() )
+ {
+ try
+ {
+ Reference< XNameContainer > xSubElements( mxStorage->getByName( rElementName ), UNO_QUERY_THROW );
+ xSubStorage.reset( new OleStorage( *this, xSubElements, rElementName, true ) );
+ }
+ catch(const Exception& )
+ {
+ }
+
+ /* The OLESimpleStorage API implementation seems to be buggy in the
+ area of writable inplace substorage (sometimes it overwrites other
+ unrelated streams with zero bytes). We go the save way and create a
+ new OLE storage based on a temporary file. All operations are
+ performed on this clean storage. On committing, the storage will be
+ completely re-inserted into the parent storage. */
+ if( !isReadOnly() && (bCreateMissing || xSubStorage) ) try
+ {
+ // create new storage based on a temp file
+ Reference< XStream > xTempFile( TempFile::create(mxContext), UNO_QUERY_THROW );
+ StorageRef xTempStorage( new OleStorage( *this, xTempFile, rElementName ) );
+ // copy existing substorage into temp storage
+ if( xSubStorage )
+ xSubStorage->copyStorageToStorage( *xTempStorage );
+ // return the temp storage to caller
+ xSubStorage = xTempStorage;
+ }
+ catch(const Exception& )
+ {
+ }
+ }
+ return xSubStorage;
+}
+
+Reference< XInputStream > OleStorage::implOpenInputStream( const OUString& rElementName )
+{
+ Reference< XInputStream > xInStream;
+ if( mxStorage.is() ) try
+ {
+ xInStream.set( mxStorage->getByName( rElementName ), UNO_QUERY );
+ }
+ catch(const Exception& )
+ {
+ }
+ return xInStream;
+}
+
+Reference< XOutputStream > OleStorage::implOpenOutputStream( const OUString& rElementName )
+{
+ Reference< XOutputStream > xOutStream;
+ if( mxStorage.is() && !rElementName.isEmpty() )
+ xOutStream.set( new OleOutputStream( mxContext, mxStorage, rElementName ) );
+ return xOutStream;
+}
+
+void OleStorage::implCommit() const
+{
+ try
+ {
+ // commit this storage (finalizes the file this storage is based on)
+ Reference< XTransactedObject >( mxStorage, UNO_QUERY_THROW )->commit();
+ // re-insert this storage into the parent storage
+ if( mpParentStorage )
+ {
+ if( mpParentStorage->mxStorage->hasByName( getName() ) )
+ {
+ // replaceByName() does not work (#i109539#)
+ mpParentStorage->mxStorage->removeByName( getName() );
+ Reference< XTransactedObject >( mpParentStorage->mxStorage, UNO_QUERY_THROW )->commit();
+ }
+ mpParentStorage->mxStorage->insertByName( getName(), Any( mxStorage ) );
+ // this requires another commit(), which will be performed by the parent storage
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
new file mode 100644
index 000000000..9c2a30163
--- /dev/null
+++ b/oox/source/ole/vbacontrol.cxx
@@ -0,0 +1,874 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/vbacontrol.hxx>
+
+#include <algorithm>
+#include <set>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/io/XInputStreamProvider.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <osl/diagnose.h>
+#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
+#include <tools/UnitConversion.hxx>
+#include <xmlscript/xmldlg_imexp.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/helper/storagebase.hxx>
+#include <oox/helper/textinputstream.hxx>
+#include <oox/ole/vbahelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <unordered_map>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const sal_uInt16 VBA_SITE_CLASSIDINDEX = 0x8000;
+const sal_uInt16 VBA_SITE_INDEXMASK = 0x7FFF;
+const sal_uInt16 VBA_SITE_FORM = 7;
+const sal_uInt16 VBA_SITE_IMAGE = 12;
+const sal_uInt16 VBA_SITE_FRAME = 14;
+const sal_uInt16 VBA_SITE_SPINBUTTON = 16;
+const sal_uInt16 VBA_SITE_COMMANDBUTTON = 17;
+const sal_uInt16 VBA_SITE_TABSTRIP = 18;
+const sal_uInt16 VBA_SITE_LABEL = 21;
+const sal_uInt16 VBA_SITE_TEXTBOX = 23;
+const sal_uInt16 VBA_SITE_LISTBOX = 24;
+const sal_uInt16 VBA_SITE_COMBOBOX = 25;
+const sal_uInt16 VBA_SITE_CHECKBOX = 26;
+const sal_uInt16 VBA_SITE_OPTIONBUTTON = 27;
+const sal_uInt16 VBA_SITE_TOGGLEBUTTON = 28;
+const sal_uInt16 VBA_SITE_SCROLLBAR = 47;
+const sal_uInt16 VBA_SITE_MULTIPAGE = 57;
+const sal_uInt16 VBA_SITE_UNKNOWN = 0x7FFF;
+
+const sal_uInt32 VBA_SITE_TABSTOP = 0x00000001;
+const sal_uInt32 VBA_SITE_VISIBLE = 0x00000002;
+const sal_uInt32 VBA_SITE_OSTREAM = 0x00000010;
+const sal_uInt32 VBA_SITE_DEFFLAGS = 0x00000033;
+
+const sal_uInt8 VBA_SITEINFO_COUNT = 0x80;
+const sal_uInt8 VBA_SITEINFO_MASK = 0x7F;
+
+/** Collects names of all controls in a user form or container control. Allows
+ to generate unused names for dummy controls separating option groups.
+ */
+class VbaControlNamesSet
+{
+public:
+ explicit VbaControlNamesSet();
+
+ /** Inserts the name of the passed control. */
+ void insertName( const VbaFormControl& rControl );
+ /** Returns a name that is not contained in this set. */
+ OUString generateDummyName();
+
+private:
+ ::std::set< OUString >
+ maCtrlNames;
+ sal_Int32 mnIndex;
+};
+
+constexpr OUStringLiteral gaDummyBaseName( u"DummyGroupSep" );
+
+VbaControlNamesSet::VbaControlNamesSet() :
+ mnIndex( 0 )
+{
+}
+
+void VbaControlNamesSet::insertName( const VbaFormControl& rControl )
+{
+ OUString aName = rControl.getControlName();
+ if( !aName.isEmpty() )
+ maCtrlNames.insert( aName );
+}
+
+OUString VbaControlNamesSet::generateDummyName()
+{
+ OUString aCtrlName;
+ do
+ {
+ aCtrlName = gaDummyBaseName + OUString::number( ++mnIndex );
+ }
+ while( maCtrlNames.count( aCtrlName ) > 0 );
+ maCtrlNames.insert( aCtrlName );
+ return aCtrlName;
+}
+
+/** Functor that inserts the name of a control into a VbaControlNamesSet. */
+struct VbaControlNameInserter
+{
+public:
+ VbaControlNamesSet& mrCtrlNames;
+ explicit VbaControlNameInserter( VbaControlNamesSet& rCtrlNames ) : mrCtrlNames( rCtrlNames ) {}
+ void operator()( const VbaFormControl& rControl ) { mrCtrlNames.insertName( rControl ); }
+};
+
+/** A dummy invisible form control (fixed label without text) that is used to
+ separate two groups of option buttons.
+ */
+class VbaDummyFormControl : public VbaFormControl
+{
+public:
+ explicit VbaDummyFormControl( const OUString& rName );
+};
+
+VbaDummyFormControl::VbaDummyFormControl( const OUString& rName )
+{
+ mxSiteModel = std::make_shared<VbaSiteModel>();
+ mxSiteModel->importProperty( XML_Name, rName );
+ mxSiteModel->importProperty( XML_VariousPropertyBits, OUString( '0' ) );
+
+ mxCtrlModel = std::make_shared<AxLabelModel>();
+ mxCtrlModel->setAwtModelMode();
+ mxCtrlModel->importProperty( XML_Size, "10;10" );
+}
+
+} // namespace
+
+VbaSiteModel::VbaSiteModel() :
+ maPos( 0, 0 ),
+ mnId( 0 ),
+ mnHelpContextId( 0 ),
+ mnFlags( VBA_SITE_DEFFLAGS ),
+ mnStreamLen( 0 ),
+ mnTabIndex( -1 ),
+ mnClassIdOrCache( VBA_SITE_UNKNOWN ),
+ mnGroupId( 0 )
+{
+}
+
+VbaSiteModel::~VbaSiteModel()
+{
+}
+
+void VbaSiteModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
+{
+ switch( nPropId )
+ {
+ case XML_Name: maName = rValue; break;
+ case XML_Tag: maTag = rValue; break;
+ case XML_VariousPropertyBits: mnFlags = AttributeConversion::decodeUnsigned( rValue ); break;
+ }
+}
+
+bool VbaSiteModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+ AxBinaryPropertyReader aReader( rInStrm );
+ aReader.readStringProperty( maName );
+ aReader.readStringProperty( maTag );
+ aReader.readIntProperty< sal_Int32 >( mnId );
+ aReader.readIntProperty< sal_Int32 >( mnHelpContextId );
+ aReader.readIntProperty< sal_uInt32 >( mnFlags );
+ aReader.readIntProperty< sal_uInt32 >( mnStreamLen );
+ aReader.readIntProperty< sal_Int16 >( mnTabIndex );
+ aReader.readIntProperty< sal_uInt16 >( mnClassIdOrCache );
+ aReader.readPairProperty( maPos );
+ aReader.readIntProperty< sal_uInt16 >( mnGroupId );
+ aReader.skipUndefinedProperty();
+ aReader.readStringProperty( maToolTip );
+ aReader.skipStringProperty(); // license key
+ aReader.readStringProperty( maControlSource );
+ aReader.readStringProperty( maRowSource );
+ return aReader.finalizeImport();
+}
+
+void VbaSiteModel::moveRelative( const AxPairData& rDistance )
+{
+ maPos.first += rDistance.first;
+ maPos.second += rDistance.second;
+}
+
+bool VbaSiteModel::isContainer() const
+{
+ return !getFlag( mnFlags, VBA_SITE_OSTREAM );
+}
+
+sal_uInt32 VbaSiteModel::getStreamLength() const
+{
+ return isContainer() ? 0 : mnStreamLen;
+}
+
+OUString VbaSiteModel::getSubStorageName() const
+{
+ if( mnId >= 0 )
+ {
+ OUStringBuffer aBuffer;
+ aBuffer.append( 'i' );
+ if( mnId < 10 )
+ aBuffer.append( '0' );
+ aBuffer.append( mnId );
+ return aBuffer.makeStringAndClear();
+ }
+ return OUString();
+}
+
+ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTable ) const
+{
+ ControlModelRef xCtrlModel;
+
+ sal_Int32 nTypeIndex = static_cast< sal_Int32 >( mnClassIdOrCache & VBA_SITE_INDEXMASK );
+ if( !getFlag( mnClassIdOrCache, VBA_SITE_CLASSIDINDEX ) )
+ {
+ switch( nTypeIndex )
+ {
+ case VBA_SITE_COMMANDBUTTON: xCtrlModel= std::make_shared<AxCommandButtonModel>(); break;
+ case VBA_SITE_LABEL: xCtrlModel= std::make_shared<AxLabelModel>(); break;
+ case VBA_SITE_IMAGE: xCtrlModel= std::make_shared<AxImageModel>(); break;
+ case VBA_SITE_TOGGLEBUTTON: xCtrlModel= std::make_shared<AxToggleButtonModel>(); break;
+ case VBA_SITE_CHECKBOX: xCtrlModel= std::make_shared<AxCheckBoxModel>(); break;
+ case VBA_SITE_OPTIONBUTTON: xCtrlModel= std::make_shared<AxOptionButtonModel>(); break;
+ case VBA_SITE_TEXTBOX: xCtrlModel= std::make_shared<AxTextBoxModel>(); break;
+ case VBA_SITE_LISTBOX: xCtrlModel= std::make_shared<AxListBoxModel>(); break;
+ case VBA_SITE_COMBOBOX: xCtrlModel= std::make_shared<AxComboBoxModel>(); break;
+ case VBA_SITE_SPINBUTTON: xCtrlModel= std::make_shared<AxSpinButtonModel>(); break;
+ case VBA_SITE_SCROLLBAR: xCtrlModel= std::make_shared<AxScrollBarModel>(); break;
+ case VBA_SITE_TABSTRIP: xCtrlModel= std::make_shared<AxTabStripModel>();
+ break;
+ case VBA_SITE_FRAME: xCtrlModel= std::make_shared<AxFrameModel>(); break;
+ case VBA_SITE_MULTIPAGE: xCtrlModel= std::make_shared<AxMultiPageModel>();
+ break;
+ case VBA_SITE_FORM: xCtrlModel= std::make_shared<AxPageModel>();
+ break;
+ default: OSL_FAIL( "VbaSiteModel::createControlModel - unknown type index" );
+ }
+ }
+ else
+ {
+ const OUString* pGuid = ContainerHelper::getVectorElement( rClassTable, nTypeIndex );
+ OSL_ENSURE( pGuid, "VbaSiteModel::createControlModel - invalid class table index" );
+ if( pGuid )
+ {
+ if( *pGuid == COMCTL_GUID_SCROLLBAR_60 )
+ xCtrlModel = std::make_shared<ComCtlScrollBarModel>( 6 );
+ else if( *pGuid == COMCTL_GUID_PROGRESSBAR_50 )
+ xCtrlModel = std::make_shared<ComCtlProgressBarModel>( 5 );
+ else if( *pGuid == COMCTL_GUID_PROGRESSBAR_60 )
+ xCtrlModel = std::make_shared<ComCtlProgressBarModel>( 6 );
+ }
+ }
+
+ if( xCtrlModel )
+ {
+ // user form controls are AWT models
+ xCtrlModel->setAwtModelMode();
+
+ // check that container model matches container flag in site data
+ bool bModelIsContainer = dynamic_cast< const AxContainerModelBase* >( xCtrlModel.get() ) != nullptr;
+ bool bTypeMatch = bModelIsContainer == isContainer();
+ OSL_ENSURE( bTypeMatch, "VbaSiteModel::createControlModel - container type does not match container flag" );
+ if( !bTypeMatch )
+ xCtrlModel.reset();
+ }
+ return xCtrlModel;
+}
+
+void VbaSiteModel::convertProperties( PropertyMap& rPropMap,
+ const ControlConverter& rConv, ApiControlType eCtrlType, sal_Int32 nCtrlIndex ) const
+{
+ rPropMap.setProperty( PROP_Name, maName );
+ rPropMap.setProperty( PROP_Tag, maTag );
+
+ if( eCtrlType != API_CONTROL_DIALOG )
+ {
+ rPropMap.setProperty( PROP_HelpText, maToolTip );
+ rPropMap.setProperty( PROP_EnableVisible, getFlag( mnFlags, VBA_SITE_VISIBLE ) );
+ // we need to set the passed control index to make option button groups work
+ if( (0 <= nCtrlIndex) && (nCtrlIndex <= SAL_MAX_INT16) )
+ rPropMap.setProperty( PROP_TabIndex, static_cast< sal_Int16 >( nCtrlIndex ) );
+ // progress bar and group box support TabIndex, but not Tabstop...
+ if( (eCtrlType != API_CONTROL_PROGRESSBAR) && (eCtrlType != API_CONTROL_GROUPBOX) && (eCtrlType != API_CONTROL_FRAME) && (eCtrlType != API_CONTROL_PAGE) )
+ rPropMap.setProperty( PROP_Tabstop, getFlag( mnFlags, VBA_SITE_TABSTOP ) );
+ rConv.convertPosition( rPropMap, maPos );
+ }
+}
+
+VbaFormControl::VbaFormControl()
+{
+}
+
+VbaFormControl::~VbaFormControl()
+{
+}
+
+void VbaFormControl::importModelOrStorage( BinaryInputStream& rInStrm, StorageBase& rStrg, const AxClassTable& rClassTable )
+{
+ if( !mxSiteModel )
+ return;
+
+ if( mxSiteModel->isContainer() )
+ {
+ StorageRef xSubStrg = rStrg.openSubStorage( mxSiteModel->getSubStorageName(), false );
+ OSL_ENSURE( xSubStrg, "VbaFormControl::importModelOrStorage - cannot find storage for embedded control" );
+ if( xSubStrg )
+ importStorage( *xSubStrg, rClassTable );
+ }
+ else if( !rInStrm.isEof() )
+ {
+ sal_Int64 nNextStrmPos = rInStrm.tell() + mxSiteModel->getStreamLength();
+ importControlModel( rInStrm, rClassTable );
+ rInStrm.seek( nNextStrmPos );
+ }
+}
+
+OUString VbaFormControl::getControlName() const
+{
+ return mxSiteModel ? mxSiteModel->getName() : OUString();
+}
+
+void VbaFormControl::createAndConvert( sal_Int32 nCtrlIndex,
+ const Reference< XNameContainer >& rxParentNC, const ControlConverter& rConv ) const
+{
+ if( !(rxParentNC.is() && mxSiteModel && mxCtrlModel) )
+ return;
+
+ try
+ {
+ // create the control model
+ OUString aServiceName = mxCtrlModel->getServiceName();
+ Reference< XMultiServiceFactory > xModelFactory( rxParentNC, UNO_QUERY_THROW );
+ Reference< XControlModel > xCtrlModel( xModelFactory->createInstance( aServiceName ), UNO_QUERY_THROW );
+
+ // convert all properties and embedded controls
+ if( convertProperties( xCtrlModel, rConv, nCtrlIndex ) )
+ {
+ // insert into parent container
+ const OUString& rCtrlName = mxSiteModel->getName();
+ OSL_ENSURE( !rxParentNC->hasByName( rCtrlName ), "VbaFormControl::createAndConvert - multiple controls with equal name" );
+ ContainerHelper::insertByName( rxParentNC, rCtrlName, Any( xCtrlModel ) );
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+// protected ------------------------------------------------------------------
+
+void VbaFormControl::importControlModel( BinaryInputStream& rInStrm, const AxClassTable& rClassTable )
+{
+ createControlModel( rClassTable );
+ if( mxCtrlModel )
+ mxCtrlModel->importBinaryModel( rInStrm );
+}
+
+void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rClassTable )
+{
+ createControlModel( rClassTable );
+ AxContainerModelBase* pContainerModel = dynamic_cast< AxContainerModelBase* >( mxCtrlModel.get() );
+ OSL_ENSURE( pContainerModel, "VbaFormControl::importStorage - missing container control model" );
+ if( !pContainerModel )
+ return;
+
+ /* Open the 'f' stream containing the model of this control and a list
+ of site models for all child controls. */
+ BinaryXInputStream aFStrm( rStrg.openInputStream( "f" ), true );
+ OSL_ENSURE( !aFStrm.isEof(), "VbaFormControl::importStorage - missing 'f' stream" );
+
+ /* Read the properties of this container control and the class table
+ (into the maClassTable vector) containing a list of GUIDs for
+ exotic embedded controls. */
+ if( !(!aFStrm.isEof() && pContainerModel->importBinaryModel( aFStrm ) && pContainerModel->importClassTable( aFStrm, maClassTable )) )
+ return;
+
+ /* Read the site models of all embedded controls (this fills the
+ maControls vector). Ignore failure of importSiteModels() but
+ try to import as much controls as possible. */
+ importEmbeddedSiteModels( aFStrm );
+ /* Open the 'o' stream containing models of embedded simple
+ controls. Stream may be empty or missing, if this control
+ contains no controls or only container controls. */
+ BinaryXInputStream aOStrm( rStrg.openInputStream( "o" ), true );
+
+ /* Iterate over all embedded controls, import model from 'o'
+ stream (for embedded simple controls) or from the substorage
+ (for embedded container controls). */
+ maControls.forEachMem( &VbaFormControl::importModelOrStorage,
+ ::std::ref( aOStrm ), ::std::ref( rStrg ), ::std::cref( maClassTable ) );
+
+ // Special handling for multi-page which has non-standard
+ // containment and additionally needs to re-order Page children
+ if ( pContainerModel->getControlType() == API_CONTROL_MULTIPAGE )
+ {
+ AxMultiPageModel* pMultiPage = dynamic_cast< AxMultiPageModel* >( pContainerModel );
+ assert(pMultiPage);
+ {
+ BinaryXInputStream aXStrm( rStrg.openInputStream( "x" ), true );
+ pMultiPage->importPageAndMultiPageProperties( aXStrm, maControls.size() );
+ }
+ typedef std::unordered_map< sal_uInt32, std::shared_ptr< VbaFormControl > > IdToPageMap;
+ IdToPageMap idToPage;
+ AxArrayString sCaptions;
+
+ for (auto const& control : maControls)
+ {
+ auto& elem = control->mxCtrlModel;
+ if (!elem)
+ {
+ SAL_WARN("oox", "empty control model");
+ continue;
+ }
+ if (elem->getControlType() == API_CONTROL_PAGE)
+ {
+ VbaSiteModelRef xPageSiteRef = control->mxSiteModel;
+ if ( xPageSiteRef )
+ idToPage[ xPageSiteRef->getId() ] = control;
+ }
+ else if (elem->getControlType() == API_CONTROL_TABSTRIP)
+ {
+ AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*>(elem.get());
+ sCaptions = pTabStrip->maItems;
+ pMultiPage->mnActiveTab = pTabStrip->mnListIndex;
+ pMultiPage->mnTabStyle = pTabStrip->mnTabStyle;
+ }
+ else
+ {
+ SAL_WARN("oox", "unexpected control type " << elem->getControlType());
+ }
+ }
+ // apply caption/titles to pages
+
+ maControls.clear();
+ // need to sort the controls according to the order of the ids
+ if ( sCaptions.size() == idToPage.size() )
+ {
+ AxArrayString::iterator itCaption = sCaptions.begin();
+ for ( const auto& rCtrlId : pMultiPage->mnIDs )
+ {
+ IdToPageMap::iterator iter = idToPage.find( rCtrlId );
+ if ( iter != idToPage.end() )
+ {
+ AxPageModel* pPage = static_cast<AxPageModel*> ( iter->second->mxCtrlModel.get() );
+
+ pPage->importProperty( XML_Caption, *itCaption );
+ maControls.push_back( iter->second );
+ }
+ ++itCaption;
+ }
+ }
+ }
+ /* Reorder the controls (sorts all option buttons of an option
+ group together), and move all children of all embedded frames
+ (group boxes) to this control (UNO group boxes cannot contain
+ other controls). */
+ finalizeEmbeddedControls();
+}
+
+bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrlModel,
+ const ControlConverter& rConv, sal_Int32 nCtrlIndex ) const
+{
+ if( rxCtrlModel.is() && mxSiteModel && mxCtrlModel )
+ {
+ const OUString& rCtrlName = mxSiteModel->getName();
+ OSL_ENSURE( !rCtrlName.isEmpty(), "VbaFormControl::convertProperties - control without name" );
+ if( !rCtrlName.isEmpty() )
+ {
+ // convert all properties
+ PropertyMap aPropMap;
+ mxSiteModel->convertProperties( aPropMap, rConv, mxCtrlModel->getControlType(), nCtrlIndex );
+ rConv.bindToSources( rxCtrlModel, mxSiteModel->getControlSource(), mxSiteModel->getRowSource() );
+ mxCtrlModel->convertProperties( aPropMap, rConv );
+ mxCtrlModel->convertSize( aPropMap, rConv );
+ PropertySet aPropSet( rxCtrlModel );
+ aPropSet.setProperties( aPropMap );
+
+ // create and convert all embedded controls
+ if( !maControls.empty() ) try
+ {
+ Reference< XNameContainer > xCtrlModelNC( rxCtrlModel, UNO_QUERY_THROW );
+ /* Call conversion for all controls. Pass vector index as new
+ tab order to make option button groups work correctly. */
+ maControls.forEachMemWithIndex( &VbaFormControl::createAndConvert,
+ ::std::cref( xCtrlModelNC ), ::std::cref( rConv ) );
+ }
+ catch(const Exception& )
+ {
+ OSL_FAIL( "VbaFormControl::convertProperties - cannot get control container interface" );
+ }
+
+ return true;
+ }
+ }
+ return false;
+}
+
+// private --------------------------------------------------------------------
+
+void VbaFormControl::createControlModel( const AxClassTable& rClassTable )
+{
+ // derived classes may have created their own control model
+ if( !mxCtrlModel && mxSiteModel )
+ mxCtrlModel = mxSiteModel->createControlModel( rClassTable );
+}
+
+bool VbaFormControl::importSiteModel( BinaryInputStream& rInStrm )
+{
+ mxSiteModel = std::make_shared<VbaSiteModel>();
+ return mxSiteModel->importBinaryModel( rInStrm );
+}
+
+void VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm )
+{
+ sal_uInt64 nAnchorPos = rInStrm.tell();
+ sal_uInt32 nSiteCount, nSiteDataSize;
+ nSiteCount = rInStrm.readuInt32();
+ nSiteDataSize = rInStrm.readuInt32();
+ sal_Int64 nSiteEndPos = rInStrm.tell() + nSiteDataSize;
+
+ // skip the site info structure
+ sal_uInt32 nSiteIndex = 0;
+ while( !rInStrm.isEof() && (nSiteIndex < nSiteCount) )
+ {
+ rInStrm.skip( 1 ); // site depth
+ sal_uInt8 nTypeCount = rInStrm.readuInt8(); // 'type-or-count' byte
+ if( getFlag( nTypeCount, VBA_SITEINFO_COUNT ) )
+ {
+ /* Count flag is set: the 'type-or-count' byte contains the number
+ of controls in the lower bits, the type specifier follows in
+ the next byte. The type specifier should always be 1 according
+ to the specification. */
+ rInStrm.skip( 1 );
+ nSiteIndex += (nTypeCount & VBA_SITEINFO_MASK);
+ }
+ else
+ {
+ /* Count flag is not set: the 'type-or-count' byte contains the
+ type specifier of *one* control in the lower bits (this type
+ should be 1, see above). */
+ ++nSiteIndex;
+ }
+ }
+ // align the stream to 32bit, relative to start of entire site info
+ rInStrm.alignToBlock( 4, nAnchorPos );
+
+ // import the site models for all embedded controls
+ maControls.clear();
+ bool bValid = !rInStrm.isEof();
+ for( nSiteIndex = 0; bValid && (nSiteIndex < nSiteCount); ++nSiteIndex )
+ {
+ VbaFormControlRef xControl = std::make_shared<VbaFormControl>();
+ maControls.push_back( xControl );
+ bValid = xControl->importSiteModel( rInStrm );
+ }
+
+ rInStrm.seek( nSiteEndPos );
+}
+
+void VbaFormControl::finalizeEmbeddedControls()
+{
+ /* This function performs two tasks:
+
+ 1) Reorder the controls appropriately (sort all option buttons of an
+ option group together to make grouping work).
+ 2) Move all children of all embedded frames (group boxes) to this
+ control (UNO group boxes cannot contain other controls).
+ */
+
+ // first, sort all controls by original tab index
+ ::std::sort( maControls.begin(), maControls.end(), &compareByTabIndex );
+
+ /* Collect the programmatical names of all embedded controls (needed to be
+ able to set unused names to new dummy controls created below). Also
+ collect the names of all children of embedded frames (group boxes).
+ Luckily, names of controls must be unique in the entire form, not just
+ in the current container. */
+ VbaControlNamesSet aControlNames;
+ VbaControlNameInserter aInserter( aControlNames );
+ maControls.forEach( aInserter );
+ for (auto const& control : maControls)
+ if( control->mxCtrlModel && (control->mxCtrlModel->getControlType() == API_CONTROL_GROUPBOX) )
+ control->maControls.forEach( aInserter );
+
+ /* Reprocess the sorted list and collect all option button controls that
+ are part of the same option group (determined by group name). All
+ controls will be stored in a vector of vectors, that collects every
+ option button group in one vector element, and other controls between
+ these option groups (or leading or trailing controls) in other vector
+ elements. If an option button group follows another group, a dummy
+ separator control has to be inserted. */
+ typedef RefVector< VbaFormControlVector > VbaFormControlVectorVector;
+ VbaFormControlVectorVector aControlGroups;
+
+ typedef RefMap< OUString, VbaFormControlVector > VbaFormControlVectorMap;
+ VbaFormControlVectorMap aOptionGroups;
+
+ typedef VbaFormControlVectorMap::mapped_type VbaFormControlVectorRef;
+ bool bLastWasOptionButton = false;
+ for (auto const& control : maControls)
+ {
+ const ControlModelBase* pCtrlModel = control->mxCtrlModel.get();
+
+ if( const AxOptionButtonModel* pOptButtonModel = dynamic_cast< const AxOptionButtonModel* >( pCtrlModel ) )
+ {
+ // check if a new option group needs to be created
+ const OUString& rGroupName = pOptButtonModel->getGroupName();
+ VbaFormControlVectorRef& rxOptionGroup = aOptionGroups[ rGroupName ];
+ if( !rxOptionGroup )
+ {
+ /* If last control was an option button too, we have two
+ option groups following each other, so a dummy separator
+ control is needed. */
+ if( bLastWasOptionButton )
+ {
+ VbaFormControlVectorRef xDummyGroup = std::make_shared<VbaFormControlVector>();
+ aControlGroups.push_back( xDummyGroup );
+ OUString aName = aControlNames.generateDummyName();
+ VbaFormControlRef xDummyControl = std::make_shared<VbaDummyFormControl>( aName );
+ xDummyGroup->push_back( xDummyControl );
+ }
+ rxOptionGroup = std::make_shared<VbaFormControlVector>();
+ aControlGroups.push_back( rxOptionGroup );
+ }
+ /* Append the option button to the control group (which is now
+ referred by the vector aControlGroups and by the map
+ aOptionGroups). */
+ rxOptionGroup->push_back(control);
+ bLastWasOptionButton = true;
+ }
+ else
+ {
+ // open a new control group, if the last group is an option group
+ if( bLastWasOptionButton || aControlGroups.empty() )
+ {
+ VbaFormControlVectorRef xControlGroup = std::make_shared<VbaFormControlVector>();
+ aControlGroups.push_back( xControlGroup );
+ }
+ // append the control to the last control group
+ VbaFormControlVector& rLastGroup = *aControlGroups.back();
+ rLastGroup.push_back(control);
+ bLastWasOptionButton = false;
+
+ // if control is a group box, move all its children to this control
+ if( pCtrlModel && (pCtrlModel->getControlType() == API_CONTROL_GROUPBOX) )
+ {
+ /* Move all embedded controls of the group box relative to the
+ position of the group box. */
+ control->moveEmbeddedToAbsoluteParent();
+ /* Insert all children of the group box into the last control
+ group (following the group box). */
+ rLastGroup.insert( rLastGroup.end(), control->maControls.begin(), control->maControls.end() );
+ control->maControls.clear();
+ // check if last control of the group box is an option button
+ bLastWasOptionButton = dynamic_cast< const AxOptionButtonModel* >( rLastGroup.back()->mxCtrlModel.get() ) != nullptr;
+ }
+ }
+ }
+
+ // flatten the vector of vectors of form controls to a single vector
+ maControls.clear();
+ for (auto const& controlGroup : aControlGroups)
+ maControls.insert( maControls.end(), controlGroup->begin(), controlGroup->end() );
+}
+
+void VbaFormControl::moveRelative( const AxPairData& rDistance )
+{
+ if( mxSiteModel )
+ mxSiteModel->moveRelative( rDistance );
+}
+
+void VbaFormControl::moveEmbeddedToAbsoluteParent()
+{
+ if( !mxSiteModel || maControls.empty() )
+ return;
+
+ // distance to move is equal to position of this control in its parent
+ AxPairData aDistance = mxSiteModel->getPosition();
+
+ /* For group boxes: add half of the font height to Y position (VBA
+ positions relative to frame border line, not to 'top' of frame). */
+ const AxFontDataModel* pFontModel = dynamic_cast< const AxFontDataModel* >( mxCtrlModel.get() );
+ if( pFontModel && (pFontModel->getControlType() == API_CONTROL_GROUPBOX) )
+ {
+ sal_Int32 nFontHeight = convertPointToMm100(pFontModel->getFontHeight());
+ aDistance.second += nFontHeight / 2;
+ }
+
+ // move the embedded controls
+ maControls.forEachMem( &VbaFormControl::moveRelative, ::std::cref( aDistance ) );
+}
+
+bool VbaFormControl::compareByTabIndex( const VbaFormControlRef& rxLeft, const VbaFormControlRef& rxRight )
+{
+ // sort controls without model to the end
+ sal_Int32 nLeftTabIndex = rxLeft->mxSiteModel ? rxLeft->mxSiteModel->getTabIndex() : SAL_MAX_INT32;
+ sal_Int32 nRightTabIndex = rxRight->mxSiteModel ? rxRight->mxSiteModel->getTabIndex() : SAL_MAX_INT32;
+ return nLeftTabIndex < nRightTabIndex;
+}
+
+namespace {
+
+OUString lclGetQuotedString( const OUString& rCodeLine )
+{
+ OUStringBuffer aBuffer;
+ sal_Int32 nLen = rCodeLine.getLength();
+ if( (nLen > 0) && (rCodeLine[ 0 ] == '"') )
+ {
+ bool bExitLoop = false;
+ for( sal_Int32 nIndex = 1; !bExitLoop && (nIndex < nLen); ++nIndex )
+ {
+ sal_Unicode cChar = rCodeLine[ nIndex ];
+ // exit on closing quote char (but check on double quote chars)
+ bExitLoop = (cChar == '"') && ((nIndex + 1 == nLen) || (rCodeLine[ nIndex + 1 ] != '"'));
+ if( !bExitLoop )
+ {
+ aBuffer.append( cChar );
+ // skip second quote char
+ if( cChar == '"' )
+ ++nIndex;
+ }
+ }
+ }
+ return aBuffer.makeStringAndClear();
+}
+
+bool lclEatWhitespace( OUString& rCodeLine )
+{
+ sal_Int32 nIndex = 0;
+ while( (nIndex < rCodeLine.getLength()) && ((rCodeLine[ nIndex ] == ' ') || (rCodeLine[ nIndex ] == '\t')) )
+ ++nIndex;
+ if( nIndex > 0 )
+ {
+ rCodeLine = rCodeLine.copy( nIndex );
+ return true;
+ }
+ return false;
+}
+
+bool lclEatKeyword( OUString& rCodeLine, const OUString& rKeyword )
+{
+ if( rCodeLine.matchIgnoreAsciiCase( rKeyword ) )
+ {
+ rCodeLine = rCodeLine.copy( rKeyword.getLength() );
+ // success, if code line ends after keyword, or if whitespace follows
+ return rCodeLine.isEmpty() || lclEatWhitespace( rCodeLine );
+ }
+ return false;
+}
+
+} // namespace
+
+VbaUserForm::VbaUserForm( const Reference< XComponentContext >& rxContext,
+ const Reference< XModel >& rxDocModel, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) :
+ mxContext( rxContext ),
+ mxDocModel( rxDocModel ),
+ maConverter( rxDocModel, rGraphicHelper, bDefaultColorBgr )
+{
+ OSL_ENSURE( mxContext.is(), "VbaUserForm::VbaUserForm - missing component context" );
+ OSL_ENSURE( mxDocModel.is(), "VbaUserForm::VbaUserForm - missing document model" );
+}
+
+void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
+ StorageBase& rVbaFormStrg, const OUString& rModuleName, rtl_TextEncoding eTextEnc )
+{
+ OSL_ENSURE( rxDialogLib.is(), "VbaUserForm::importForm - missing dialog library" );
+ if( !mxContext.is() || !mxDocModel.is() || !rxDialogLib.is() )
+ return;
+
+ // check that the '03VBFrame' stream exists, this is required for forms
+ BinaryXInputStream aInStrm( rVbaFormStrg.openInputStream( "\003VBFrame" ), true );
+ OSL_ENSURE( !aInStrm.isEof(), "VbaUserForm::importForm - missing \\003VBFrame stream" );
+ if( aInStrm.isEof() )
+ return;
+
+ // scan for the line 'Begin {GUID} <FormName>'
+ TextInputStream aFrameTextStrm( mxContext, aInStrm, eTextEnc );
+ static const OUStringLiteral aBegin = u"Begin";
+ OUString aLine;
+ bool bBeginFound = false;
+ while( !bBeginFound && !aFrameTextStrm.isEof() )
+ {
+ aLine = aFrameTextStrm.readLine().trim();
+ bBeginFound = lclEatKeyword( aLine, aBegin );
+ }
+ // check for the specific GUID that represents VBA forms
+ if( !bBeginFound || !lclEatKeyword( aLine, "{C62A69F0-16DC-11CE-9E98-00AA00574A4F}" ) )
+ return;
+
+ // remaining line is the form name
+ OUString aFormName = aLine.trim();
+ OSL_ENSURE( !aFormName.isEmpty(), "VbaUserForm::importForm - missing form name" );
+ OSL_ENSURE( rModuleName.equalsIgnoreAsciiCase( aFormName ), "VbaUserForm::importFrameStream - form and module name mismatch" );
+ if( aFormName.isEmpty() )
+ aFormName = rModuleName;
+ if( aFormName.isEmpty() )
+ return;
+ mxSiteModel = std::make_shared<VbaSiteModel>();
+ mxSiteModel->importProperty( XML_Name, aFormName );
+
+ // read the form properties (caption is contained in this '03VBFrame' stream, not in the 'f' stream)
+ mxCtrlModel = std::make_shared<AxUserFormModel>();
+ OUString aKey, aValue;
+ bool bExitLoop = false;
+ while( !bExitLoop && !aFrameTextStrm.isEof() )
+ {
+ aLine = aFrameTextStrm.readLine().trim();
+ bExitLoop = aLine.equalsIgnoreAsciiCase( "End" );
+ if( !bExitLoop && VbaHelper::extractKeyValue( aKey, aValue, aLine ) )
+ {
+ if( aKey.equalsIgnoreAsciiCase( "Caption" ) )
+ mxCtrlModel->importProperty( XML_Caption, lclGetQuotedString( aValue ) );
+ else if( aKey.equalsIgnoreAsciiCase( "Tag" ) )
+ mxSiteModel->importProperty( XML_Tag, lclGetQuotedString( aValue ) );
+ }
+ }
+
+ // use generic container control functionality to import the embedded controls
+ importStorage( rVbaFormStrg, AxClassTable() );
+
+ try
+ {
+ // create the dialog model
+ OUString aServiceName = mxCtrlModel->getServiceName();
+ Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY_THROW );
+ Reference< XControlModel > xDialogModel( xFactory->createInstance( aServiceName ), UNO_QUERY_THROW );
+ Reference< XNameContainer > xDialogNC( xDialogModel, UNO_QUERY_THROW );
+
+ // convert properties and embedded controls
+ if( convertProperties( xDialogModel, maConverter, 0 ) )
+ {
+ // export the dialog to XML and insert it into the dialog library
+ Reference< XInputStreamProvider > xDialogSource( ::xmlscript::exportDialogModel( xDialogNC, mxContext, mxDocModel ), UNO_SET_THROW );
+ OSL_ENSURE( !rxDialogLib->hasByName( aFormName ), "VbaUserForm::importForm - multiple dialogs with equal name" );
+ ContainerHelper::insertByName( rxDialogLib, aFormName, Any( xDialogSource ) );
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
new file mode 100644
index 000000000..01eaff558
--- /dev/null
+++ b/oox/source/ole/vbaexport.cxx
@@ -0,0 +1,1193 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <cassert>
+#include <random>
+#include <string_view>
+
+#include <oox/ole/vbaexport.hxx>
+
+#include <tools/stream.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+#include <ooo/vba/excel/XWorkbook.hpp>
+
+#include <oox/helper/propertyset.hxx>
+#include <oox/token/properties.hxx>
+
+#include <sot/storage.hxx>
+
+#include <comphelper/xmltools.hxx>
+#include <rtl/tencinfo.h>
+#include <osl/thread.h>
+
+#define VBA_EXPORT_DEBUG 0
+#define VBA_USE_ORIGINAL_WM_STREAM 0
+#define VBA_USE_ORIGINAL_DIR_STREAM 0
+#define VBA_USE_ORIGINAL_PROJECT_STREAM 0
+#define VBA_USE_ORIGINAL_VBA_PROJECT 0
+
+/* Enable to see VBA Encryption work. For now the input data and length values
+ * for encryption correspond to the case when the VBA macro is not protected.
+ */
+#define VBA_ENCRYPTION 1
+
+namespace {
+
+void exportString(SvStream& rStrm, std::u16string_view rString,
+ const rtl_TextEncoding eTextEncoding)
+{
+ OString aStringCorrectCodepage = OUStringToOString(rString, eTextEncoding);
+ rStrm.WriteOString(aStringCorrectCodepage);
+}
+
+void exportUTF16String(SvStream& rStrm, const OUString& rString)
+{
+ sal_Int32 n = rString.getLength();
+ const sal_Unicode* pString = rString.getStr();
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ sal_Unicode character = pString[i];
+ rStrm.WriteUnicode(character);
+ }
+}
+
+bool isWorkbook(const css::uno::Reference<css::uno::XInterface>& xInterface)
+{
+ css::uno::Reference<ooo::vba::excel::XWorkbook> xWorkbook(xInterface, css::uno::UNO_QUERY);
+ return xWorkbook.is();
+}
+
+OUString createHexStringFromDigit(sal_uInt8 nDigit)
+{
+ OUString aString = OUString::number( nDigit, 16 );
+ if(aString.getLength() == 1)
+ aString = OUString::number(0) + aString;
+ return aString.toAsciiUpperCase();
+}
+
+}
+
+VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, std::size_t nChunkSize)
+ : mrCompressedStream(rCompressedStream)
+ , mpUncompressedData(pData)
+ , mpCompressedChunkStream(nullptr)
+ , mnChunkSize(nChunkSize)
+ , mnCompressedCurrent(0)
+ , mnCompressedEnd(0)
+ , mnDecompressedCurrent(0)
+ , mnDecompressedEnd(0)
+{
+}
+
+static void setUInt16(sal_uInt8* pBuffer, size_t nPos, sal_uInt16 nVal)
+{
+ pBuffer[nPos] = nVal & 0xFF;
+ pBuffer[nPos+1] = (nVal & 0xFF00) >> 8;
+}
+
+sal_uInt16 VBACompressionChunk::handleHeader(bool bCompressed)
+{
+ // handle header bytes
+ size_t nSize = mnCompressedCurrent;
+ sal_uInt16 nHeader = 0;
+ PackCompressedChunkSize(nSize, nHeader);
+ PackCompressedChunkFlag(bCompressed, nHeader);
+ PackCompressedChunkSignature(nHeader);
+
+ return nHeader;
+}
+
+// section 2.4.1.3.7
+void VBACompressionChunk::write()
+{
+
+ mnDecompressedCurrent = 0;
+ mnCompressedCurrent = 2;
+ mnCompressedEnd = 4098;
+ mnDecompressedEnd = std::min<sal_uInt64>(4096, mnChunkSize);
+
+ // if that stream becomes larger than 4096 bytes then
+ // we use the uncompressed stream
+ sal_uInt8 pCompressedChunkStream[4098];
+ mpCompressedChunkStream = pCompressedChunkStream;
+
+ while (mnDecompressedCurrent < mnDecompressedEnd
+ && mnCompressedCurrent < mnCompressedEnd)
+ {
+ // compress token sequence
+ compressTokenSequence();
+ }
+
+ if (mnDecompressedCurrent < mnDecompressedEnd)
+ {
+ sal_uInt64 nChunkStart = mrCompressedStream.Tell();
+ mrCompressedStream.WriteUInt16(0);
+ writeRawChunk();
+ mrCompressedStream.Seek(nChunkStart);
+ sal_uInt16 nHeader = handleHeader(false);
+ mrCompressedStream.WriteUInt16(nHeader);
+ }
+ else
+ {
+ sal_uInt16 nHeader = handleHeader(true);
+ setUInt16(pCompressedChunkStream, 0, nHeader);
+ // copy the compressed stream to our output stream
+ mrCompressedStream.WriteBytes(pCompressedChunkStream, mnCompressedCurrent);
+ }
+}
+
+// section 2.4.1.3.13
+void VBACompressionChunk::PackCompressedChunkSize(size_t nSize, sal_uInt16& rHeader)
+{
+ sal_uInt16 nTemp1 = rHeader & 0xF000;
+ sal_uInt16 nTemp2 = nSize - 3;
+ rHeader = nTemp1 | nTemp2;
+}
+
+// section 2.4.1.3.16
+void VBACompressionChunk::PackCompressedChunkFlag(bool bCompressed, sal_uInt16& rHeader)
+{
+ sal_uInt16 nTemp1 = rHeader & 0x7FFF;
+ sal_uInt16 nTemp2 = static_cast<sal_uInt16>(bCompressed) << 15;
+ rHeader = nTemp1 | nTemp2;
+}
+
+// section 2.4.1.3.14
+void VBACompressionChunk::PackCompressedChunkSignature(sal_uInt16& rHeader)
+{
+ sal_Int32 nTemp = rHeader & 0x8FFFF;
+ rHeader = nTemp | 0x3000;
+}
+
+// section 2.4.1.3.8
+void VBACompressionChunk::compressTokenSequence()
+{
+ sal_uInt64 nFlagByteIndex = mnCompressedCurrent;
+ sal_uInt8 nFlagByte = 0;
+ ++mnCompressedCurrent;
+ for (size_t index = 0; index <= 7; ++index)
+ {
+ if (mnDecompressedCurrent < mnDecompressedEnd
+ && mnCompressedCurrent < mnCompressedEnd)
+ {
+ compressToken(index, nFlagByte);
+ }
+ }
+ mpCompressedChunkStream[nFlagByteIndex] = nFlagByte;
+}
+
+// section 2.4.1.3.9
+void VBACompressionChunk::compressToken(size_t index, sal_uInt8& nFlagByte)
+{
+ size_t nLength = 0;
+ size_t nOffset = 0;
+ match(nLength, nOffset);
+ if (nOffset != 0)
+ {
+ if (mnCompressedCurrent + 1 < mnCompressedEnd)
+ {
+ sal_uInt16 nToken = CopyToken(nLength, nOffset);
+ setUInt16(mpCompressedChunkStream, mnCompressedCurrent, nToken);
+ SetFlagBit(index, true, nFlagByte);
+ mnCompressedCurrent += 2;
+ mnDecompressedCurrent += nLength;
+ }
+ else
+ {
+ mnCompressedCurrent = mnCompressedEnd;
+ }
+ }
+ else
+ {
+ if (mnCompressedCurrent + 1 < mnCompressedEnd)
+ {
+ mpCompressedChunkStream[mnCompressedCurrent] = mpUncompressedData[mnDecompressedCurrent];
+ ++mnCompressedCurrent;
+ ++mnDecompressedCurrent;
+ }
+ else
+ {
+ mnCompressedCurrent = mnCompressedEnd;
+ }
+ }
+}
+
+// section 2.4.1.3.18
+void VBACompressionChunk::SetFlagBit(size_t index, bool bVal, sal_uInt8& rFlag)
+{
+ size_t nTemp1 = static_cast<int>(bVal) << index;
+ sal_uInt8 nTemp2 = rFlag & (~nTemp1);
+ rFlag = nTemp2 | nTemp1;
+}
+
+// section 2.4.1.3.19.3
+sal_uInt16 VBACompressionChunk::CopyToken(size_t nLength, size_t nOffset)
+{
+ sal_uInt16 nLengthMask = 0;
+ sal_uInt16 nOffsetMask = 0;
+ sal_uInt16 nBitCount = 0;
+ sal_uInt16 nMaxLength;
+ CopyTokenHelp(nLengthMask, nOffsetMask, nBitCount, nMaxLength);
+ sal_uInt16 nTemp1 = nOffset -1;
+ sal_uInt16 nTemp2 = 16 - nBitCount;
+ sal_uInt16 nTemp3 = nLength - 3;
+ sal_uInt16 nToken = (nTemp1 << nTemp2) | nTemp3;
+ return nToken;
+}
+
+// section 2.4.1.3.19.4
+void VBACompressionChunk::match(size_t& rLength, size_t& rOffset)
+{
+ size_t nBestLen = 0;
+ sal_Int32 nCandidate = mnDecompressedCurrent - 1;
+ sal_Int32 nBestCandidate = nCandidate;
+ while (nCandidate >= 0)
+ {
+ sal_Int32 nC = nCandidate;
+ sal_Int32 nD = mnDecompressedCurrent;
+ size_t nLen = 0;
+ while (nD < static_cast<sal_Int32>(mnChunkSize) // TODO: check if this needs to be including a minus -1
+ && mpUncompressedData[nC] == mpUncompressedData[nD])
+ {
+ ++nLen;
+ ++nC;
+ ++nD;
+ }
+ if (nLen > nBestLen)
+ {
+ nBestLen = nLen;
+ nBestCandidate = nCandidate;
+ }
+ --nCandidate;
+ }
+
+ if (nBestLen >= 3)
+ {
+ sal_uInt16 nMaximumLength = 0;
+ sal_uInt16 nLengthMask, nOffsetMask, nBitCount;
+ CopyTokenHelp(nLengthMask, nOffsetMask, nBitCount, nMaximumLength);
+ rLength = std::min<sal_uInt16>(nMaximumLength, nBestLen);
+ rOffset = mnDecompressedCurrent - nBestCandidate;
+ }
+ else
+ {
+ rLength = 0;
+ rOffset = 0;
+ }
+}
+
+// section 2.4.1.3.19.1
+void VBACompressionChunk::CopyTokenHelp(sal_uInt16& rLengthMask, sal_uInt16& rOffsetMask,
+ sal_uInt16& rBitCount, sal_uInt16& rMaximumLength)
+{
+ sal_uInt16 nDifference = mnDecompressedCurrent;
+ assert(nDifference <= 4096);
+ assert(nDifference >= 1);
+ if (nDifference >= 2049)
+ rBitCount = 12;
+ else if (nDifference >= 1025)
+ rBitCount = 11;
+ else if (nDifference >= 513)
+ rBitCount = 10;
+ else if (nDifference >= 257)
+ rBitCount = 9;
+ else if (nDifference >= 129)
+ rBitCount = 8;
+ else if (nDifference >= 65)
+ rBitCount = 7;
+ else if (nDifference >= 33)
+ rBitCount = 6;
+ else if (nDifference >= 17)
+ rBitCount = 5;
+ else
+ rBitCount = 4;
+ rLengthMask = 0xffff >> rBitCount;
+ rOffsetMask = ~rLengthMask;
+ rMaximumLength = rLengthMask + 3;
+}
+
+// section 2.4.1.3.10
+void VBACompressionChunk::writeRawChunk()
+{
+ // we need to use up to 4096 bytes of the original stream
+ // and fill the rest with padding
+ mrCompressedStream.WriteBytes(mpUncompressedData, mnChunkSize);
+ std::size_t nPadding = 4096 - mnChunkSize;
+ for (size_t i = 0; i < nPadding; ++i)
+ {
+ mrCompressedStream.WriteUInt8(0);
+ }
+}
+
+VBACompression::VBACompression(SvStream& rCompressedStream,
+ SvMemoryStream& rUncompressedStream):
+ mrCompressedStream(rCompressedStream),
+ mrUncompressedStream(rUncompressedStream)
+{
+}
+
+// section 2.4.1.3.6
+void VBACompression::write()
+{
+ // section 2.4.1.1.1
+ mrCompressedStream.WriteUInt8(0x01); // signature byte of a compressed container
+ bool bStreamNotEnded = true;
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>(mrUncompressedStream.GetData());
+ std::size_t nSize = mrUncompressedStream.GetEndOfData();
+ std::size_t nRemainingSize = nSize;
+ while(bStreamNotEnded)
+ {
+ std::size_t nChunkSize = std::min<size_t>(nRemainingSize, 4096);
+ VBACompressionChunk aChunk(mrCompressedStream, &pData[nSize - nRemainingSize], nChunkSize);
+ aChunk.write();
+
+ // update the uncompressed chunk start marker
+ nRemainingSize -= nChunkSize;
+ bStreamNotEnded = nRemainingSize != 0;
+ }
+}
+
+// section 2.4.3
+#if VBA_ENCRYPTION
+
+VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length,
+ SvStream& rEncryptedData, sal_uInt8 nProjKey,
+ const rtl_TextEncoding eTextEncoding)
+ :mpData(pData)
+ ,mnLength(length)
+ ,mrEncryptedData(rEncryptedData)
+ ,mnUnencryptedByte1(0)
+ ,mnEncryptedByte1(0)
+ ,mnEncryptedByte2(0)
+ ,mnProjKey(nProjKey)
+ ,mnIgnoredLength(0)
+ ,mnSeed(0x00)
+ ,mnVersionEnc(0)
+ ,meTextEncoding(eTextEncoding)
+{
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_int_distribution<> dis(0, 255);
+ mnSeed = dis(gen);
+}
+
+void VBAEncryption::writeSeed()
+{
+ exportString(mrEncryptedData, createHexStringFromDigit(mnSeed), meTextEncoding);
+}
+
+void VBAEncryption::writeVersionEnc()
+{
+ static const sal_uInt8 mnVersion = 2; // the encrypted version
+ mnVersionEnc = mnSeed ^ mnVersion;
+ exportString(mrEncryptedData, createHexStringFromDigit(mnVersionEnc), meTextEncoding);
+}
+
+sal_uInt8 VBAEncryption::calculateProjKey(const OUString& rProjectKey)
+{
+ sal_uInt8 nProjKey = 0;
+ sal_Int32 n = rProjectKey.getLength();
+ const sal_Unicode* pString = rProjectKey.getStr();
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ sal_Unicode character = pString[i];
+ nProjKey += character;
+ }
+
+ return nProjKey;
+}
+
+void VBAEncryption::writeProjKeyEnc()
+{
+ sal_uInt8 nProjKeyEnc = mnSeed ^ mnProjKey;
+ exportString(mrEncryptedData, createHexStringFromDigit(nProjKeyEnc), meTextEncoding);
+ mnUnencryptedByte1 = mnProjKey;
+ mnEncryptedByte1 = nProjKeyEnc; // ProjKeyEnc
+ mnEncryptedByte2 = mnVersionEnc; // VersionEnc
+}
+
+void VBAEncryption::writeIgnoredEnc()
+{
+ mnIgnoredLength = (mnSeed & 6) / 2;
+ for(sal_Int32 i = 1; i <= mnIgnoredLength; ++i)
+ {
+ sal_uInt8 nTempValue = 0xBE; // Any value can be assigned here
+ sal_uInt8 nByteEnc = nTempValue ^ (mnEncryptedByte2 + mnUnencryptedByte1);
+ exportString(mrEncryptedData, createHexStringFromDigit(nByteEnc), meTextEncoding);
+ mnEncryptedByte2 = mnEncryptedByte1;
+ mnEncryptedByte1 = nByteEnc;
+ mnUnencryptedByte1 = nTempValue;
+ }
+}
+
+void VBAEncryption::writeDataLengthEnc()
+{
+ sal_uInt16 temp = mnLength;
+ for(sal_Int8 i = 0; i < 4; ++i)
+ {
+ sal_uInt8 nByte = temp & 0xFF;
+ sal_uInt8 nByteEnc = nByte ^ (mnEncryptedByte2 + mnUnencryptedByte1);
+ exportString(mrEncryptedData, createHexStringFromDigit(nByteEnc), meTextEncoding);
+ mnEncryptedByte2 = mnEncryptedByte1;
+ mnEncryptedByte1 = nByteEnc;
+ mnUnencryptedByte1 = nByte;
+ temp >>= 8;
+ }
+}
+
+void VBAEncryption::writeDataEnc()
+{
+ for(sal_Int16 i = 0; i < mnLength; i++)
+ {
+ sal_uInt8 nByteEnc = mpData[i] ^ (mnEncryptedByte2 + mnUnencryptedByte1);
+ exportString(mrEncryptedData, createHexStringFromDigit(nByteEnc), meTextEncoding);
+ mnEncryptedByte2 = mnEncryptedByte1;
+ mnEncryptedByte1 = nByteEnc;
+ mnUnencryptedByte1 = mpData[i];
+ }
+}
+
+void VBAEncryption::write()
+{
+ writeSeed();
+ writeVersionEnc();
+ writeProjKeyEnc();
+ writeIgnoredEnc();
+ writeDataLengthEnc();
+ writeDataEnc();
+}
+
+#endif
+
+VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> const & xModel):
+ mxModel(xModel)
+{
+}
+
+namespace {
+
+// section 2.3.4.2.1.1
+void writePROJECTSYSKIND(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0001); // id
+ rStrm.WriteUInt32(0x00000004); // size
+ rStrm.WriteUInt32(0x00000001); // SysKind, hard coded to 32-bin windows for now
+}
+
+// section 2.3.4.2.1.2
+void writePROJECTLCID(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0002); // id
+ rStrm.WriteUInt32(0x00000004); // size
+ rStrm.WriteUInt32(0x00000409); // Lcid
+}
+
+// section 2.3.4.2.1.3
+void writePROJECTLCIDINVOKE(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0014); // id
+ rStrm.WriteUInt32(0x00000004); // size
+ rStrm.WriteUInt32(0x00000409); // LcidInvoke
+}
+
+// section 2.3.4.2.1.4
+void writePROJECTCODEPAGE(SvStream& rStrm, const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x0003); // id
+ rStrm.WriteUInt32(0x00000002); // size
+ rStrm.WriteUInt16(rtl_getWindowsCodePageFromTextEncoding(eTextEncoding)); // CodePage
+}
+
+//section 2.3.4.2.1.5
+void writePROJECTNAME(SvStream& rStrm, const OUString& name, const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x0004); // id
+ sal_uInt32 sizeOfProjectName = name.getLength();
+ rStrm.WriteUInt32(sizeOfProjectName); // sizeOfProjectName
+ exportString(rStrm, name, eTextEncoding); // ProjectName
+}
+
+//section 2.3.4.2.1.6
+void writePROJECTDOCSTRING(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0005); // id
+ rStrm.WriteUInt32(0x00000000); // sizeOfDocString
+ rStrm.WriteUInt16(0x0040); // Reserved
+ rStrm.WriteUInt32(0x00000000); // sizeOfDocStringUnicode, MUST be even
+}
+
+//section 2.3.4.2.1.7
+void writePROJECTHELPFILEPATH(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0006); // id
+ rStrm.WriteUInt32(0x00000000); // sizeOfHelpFile1
+ rStrm.WriteUInt16(0x003D); // Reserved
+ rStrm.WriteUInt32(0x00000000); // sizeOfHelpFile2
+}
+
+//section 2.3.4.2.1.8
+void writePROJECTHELPCONTEXT(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0007); // id
+ rStrm.WriteUInt32(0x00000004); // size
+ rStrm.WriteUInt32(0x00000000); // HelpContext
+}
+
+//section 2.3.4.2.1.9
+void writePROJECTLIBFLAGS(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0008); // id
+ rStrm.WriteUInt32(0x00000004); // size
+ rStrm.WriteUInt32(0x00000000); // ProjectLibFlags
+}
+
+//section 2.3.4.2.1.10
+void writePROJECTVERSION(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0009); // id
+ rStrm.WriteUInt32(0x00000004); // Reserved
+ rStrm.WriteUInt32(1467127224); // VersionMajor // TODO: where is this magic number coming from
+ rStrm.WriteUInt16(5); // VersionMinor // TODO: where is this magic number coming from
+}
+
+//section 2.3.4.2.1.11
+void writePROJECTCONSTANTS(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x000C); // id
+ rStrm.WriteUInt32(0x00000000); // sizeOfConstants
+ rStrm.WriteUInt16(0x003C); // Reserved
+ rStrm.WriteUInt32(0x00000000); // sizeOfConstantsUnicode
+}
+
+// section 2.3.4.2.1
+void writePROJECTINFORMATION(SvStream& rStrm, const OUString& projectName,
+ const rtl_TextEncoding eTextEncoding)
+{
+ writePROJECTSYSKIND(rStrm);
+ writePROJECTLCID(rStrm);
+ writePROJECTLCIDINVOKE(rStrm);
+ writePROJECTCODEPAGE(rStrm, eTextEncoding);
+ writePROJECTNAME(rStrm, projectName, eTextEncoding);
+ writePROJECTDOCSTRING(rStrm);
+ writePROJECTHELPFILEPATH(rStrm);
+ writePROJECTHELPCONTEXT(rStrm);
+ writePROJECTLIBFLAGS(rStrm);
+ writePROJECTVERSION(rStrm);
+ writePROJECTCONSTANTS(rStrm);
+}
+
+// section 2.3.4.2.2.2
+void writeREFERENCENAME(SvStream& rStrm, const OUString& name, const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x0016); // id
+ sal_Int32 size = name.getLength();
+ rStrm.WriteUInt32(size); // sizeOfName
+ exportString(rStrm, name, eTextEncoding); // name
+ rStrm.WriteUInt16(0x003E); // reserved
+ sal_Int32 unicodesize = size * 2;
+ rStrm.WriteUInt32(unicodesize); // sizeOfNameUnicode
+ exportUTF16String(rStrm, name); // nameUnicode
+}
+
+// section 2.3.4.2.2.5
+void writeREFERENCEREGISTERED(SvStream& rStrm, const OUString& libid,
+ const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x000D); // id
+ sal_Int32 sizeOfLibid = libid.getLength();
+ sal_Int32 size = sizeOfLibid + 10; // size of Libid, sizeOfLibid(4 bytes), reserved 1(4 bytes) and reserved 2(2 bytes)
+ rStrm.WriteUInt32(size); // size
+ rStrm.WriteUInt32(sizeOfLibid); // sizeOfLibid
+ exportString(rStrm, libid, eTextEncoding); // Libid
+ rStrm.WriteUInt32(0x00000000); // reserved 1
+ rStrm.WriteUInt16(0x0000); // reserved 2
+}
+
+// section 2.3.4.2.2.1
+void writeREFERENCE(SvStream& rStrm, const OUString& name, const OUString& libid,
+ const rtl_TextEncoding eTextEncoding)
+{
+ writeREFERENCENAME(rStrm, name, eTextEncoding);
+ writeREFERENCEREGISTERED(rStrm, libid, eTextEncoding);
+}
+
+// section 2.3.4.2.2
+void writePROJECTREFERENCES(SvStream& rStrm, const rtl_TextEncoding eTextEncoding)
+{
+ // TODO: find out where these references are coming from
+ writeREFERENCE(rStrm, "stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\SysWOW64\\stdole2.tlb#OLE Automation", eTextEncoding);
+ writeREFERENCE(rStrm, "Office", "*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE14\\MSO.DLL#Microsoft Office 14.0 Object Library", eTextEncoding);
+}
+
+// section 2.3.4.2.3.1
+void writePROJECTCOOKIE(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0013); // id
+ rStrm.WriteUInt32(0x00000002); // size
+ rStrm.WriteUInt16(0xFFFF); // cookie
+}
+
+// section 2.3.4.2.3.2.1
+void writeMODULENAME(SvStream& rStrm, const OUString& name, const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x0019); // id
+ sal_Int32 n = name.getLength(); // sizeOfModuleName
+ rStrm.WriteUInt32(n);
+ exportString(rStrm, name, eTextEncoding); // ModuleName
+}
+
+// section 2.3.4.2.3.2.2
+void writeMODULENAMEUNICODE(SvStream& rStrm, const OUString& name)
+{
+ rStrm.WriteUInt16(0x0047); // id
+ sal_Int32 n = name.getLength() * 2; // sizeOfModuleNameUnicode // TODO: better calculation for unicode string length
+ rStrm.WriteUInt32(n);
+ exportUTF16String(rStrm, name); // ModuleNameUnicode
+}
+
+// section 2.3.4.2.3.2.3
+void writeMODULESTREAMNAME(SvStream& rStrm, const OUString& streamName,
+ const rtl_TextEncoding eTextEncoding)
+{
+ rStrm.WriteUInt16(0x001A); // id
+ sal_Int32 n = streamName.getLength(); // sizeOfStreamName
+ rStrm.WriteUInt32(n);
+ exportString(rStrm, streamName, eTextEncoding); // StreamName
+ rStrm.WriteUInt16(0x0032); // reserved
+ rStrm.WriteUInt32(n * 2); // sizeOfStreamNameUnicode // TODO: better calculation for unicode string length
+ exportUTF16String(rStrm, streamName); // StreamNameUnicode
+}
+
+// section 2.3.4.2.3.2.4
+void writeMODULEDOCSTRING(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x001C); // id
+ rStrm.WriteUInt32(0x00000000); // sizeOfDocString
+ rStrm.WriteUInt16(0x0048); // reserved
+ rStrm.WriteUInt32(0x00000000); // sizeOfDocStringUnicode
+}
+
+// section 2.3.4.2.3.2.5
+void writeMODULEOFFSET(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x0031); // id
+ rStrm.WriteUInt32(0x00000004); // sizeOfTextOffset
+ rStrm.WriteUInt32(0x00000000); // TextOffset
+}
+
+// section 2.3.4.2.3.2.6
+void writeMODULEHELPCONTEXT(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x001E); // id
+ rStrm.WriteUInt32(0x00000004); // sizeOfHelpContext
+ rStrm.WriteUInt32(0x00000000); // HelpContext
+}
+
+// section 2.3.4.2.3.2.7
+void writeMODULECOOKIE(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x002C); // id
+ rStrm.WriteUInt32(0x00000002); // sizeOfHelpContext
+ rStrm.WriteUInt16(0xFFFF); // HelpContext
+}
+
+// section 2.3.4.2.3.2.8
+void writeMODULETYPE(SvStream& rStrm, const sal_uInt16 type)
+{
+ if(type == 1)
+ rStrm.WriteUInt16(0x0021); // id for a procedural module
+ else
+ rStrm.WriteUInt16(0x0022); // id for document, class or design module
+ rStrm.WriteUInt32(0x00000000); // reserved
+}
+
+// section 2.3.4.2.3.2
+void writePROJECTMODULE(SvStream& rStrm, const OUString& name, const sal_uInt16 type,
+ const rtl_TextEncoding eTextEncoding)
+{
+ writeMODULENAME(rStrm, name, eTextEncoding);
+ writeMODULENAMEUNICODE(rStrm, name);
+ writeMODULESTREAMNAME(rStrm, name, eTextEncoding);
+ writeMODULEDOCSTRING(rStrm);
+ writeMODULEOFFSET(rStrm);
+ writeMODULEHELPCONTEXT(rStrm);
+ writeMODULECOOKIE(rStrm);
+ writeMODULETYPE(rStrm, type);
+ rStrm.WriteUInt16(0x002B); // terminator
+ rStrm.WriteUInt32(0x00000000); // reserved
+}
+
+// section 2.3.4.2.3
+void writePROJECTMODULES(SvStream& rStrm,
+ const css::uno::Reference<css::container::XNameContainer>& xNameContainer,
+ const std::vector<sal_Int32>& rLibraryMap,
+ const rtl_TextEncoding eTextEncoding)
+{
+ const css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
+ sal_Int32 n = aElementNames.getLength();
+ css::uno::Reference<css::script::vba::XVBAModuleInfo> xModuleInfo(xNameContainer, css::uno::UNO_QUERY);
+ assert(xModuleInfo.is());
+
+ // TODO: this whole part is document specific
+ rStrm.WriteUInt16(0x000F); // id
+ rStrm.WriteUInt32(0x00000002); // size of Count
+ sal_Int16 count = n; // Number of modules // TODO: this is dependent on the document
+ rStrm.WriteUInt16(count); // Count
+ writePROJECTCOOKIE(rStrm);
+
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ const OUString& rModuleName = aElementNames[rLibraryMap[i]];
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(rModuleName);
+ writePROJECTMODULE(rStrm, rModuleName, aModuleInfo.ModuleType, eTextEncoding);
+ }
+}
+
+// section 2.3.4.2
+void exportDirStream(SvStream& rStrm,
+ const css::uno::Reference<css::container::XNameContainer>& xNameContainer,
+ const std::vector<sal_Int32>& rLibraryMap, const OUString& projectName,
+ const rtl_TextEncoding eTextEncoding)
+{
+ SvMemoryStream aDirStream(4096, 4096);
+
+ writePROJECTINFORMATION(aDirStream, projectName, eTextEncoding);
+ writePROJECTREFERENCES(aDirStream, eTextEncoding);
+ writePROJECTMODULES(aDirStream, xNameContainer, rLibraryMap, eTextEncoding);
+ aDirStream.WriteUInt16(0x0010); // terminator
+ aDirStream.WriteUInt32(0x00000000); // reserved
+
+#if VBA_EXPORT_DEBUG
+ static const OUStringLiteral aDirFileName(u"/tmp/vba_dir_out.bin");
+ SvFileStream aDirStreamDebug(aDirFileName, StreamMode::READWRITE);
+ aDirStream.Seek(0);
+ aDirStreamDebug.WriteStream(aDirStream);
+#endif
+
+ VBACompression aCompression(rStrm, aDirStream);
+ aCompression.write();
+}
+
+// section 2.3.4.3 Module Stream
+void exportModuleStream(SvStream& rStrm, const OUString& rSourceCode, const OUString& aElementName,
+ css::script::ModuleInfo const& rInfo, const rtl_TextEncoding eTextEncoding)
+{
+ SvMemoryStream aModuleStream(4096, 4096);
+
+ exportString(aModuleStream, OUStringConcatenation("Attribute VB_Name = \"" + aElementName + "\"\r\n"), eTextEncoding);
+ if (rInfo.ModuleType == 4)
+ {
+ if (isWorkbook(rInfo.ModuleObject))
+ exportString(aModuleStream, u"Attribute VB_Base = \"0{00020819-0000-0000-C000-000000000046}\"\r\n", eTextEncoding);
+ else
+ exportString(aModuleStream, u"Attribute VB_Base = \"0{00020820-0000-0000-C000-000000000046}\"\r\n", eTextEncoding);
+
+ exportString(aModuleStream, u"Attribute VB_GlobalNameSpace = False\r\n", eTextEncoding);
+ exportString(aModuleStream, u"Attribute VB_Creatable = False\r\n", eTextEncoding);
+ exportString(aModuleStream, u"Attribute VB_PredeclaredId = True\r\n", eTextEncoding);
+ exportString(aModuleStream, u"Attribute VB_Exposed = True\r\n", eTextEncoding);
+ exportString(aModuleStream, u"Attribute VB_TemplateDerived = False\r\n", eTextEncoding);
+ exportString(aModuleStream, u"Attribute VB_Customizable = True\r\n", eTextEncoding);
+ }
+ OUString aSourceCode = rSourceCode.replaceFirst("Option VBASupport 1\n", "");
+ const sal_Int32 nPos = aSourceCode.indexOf("Rem Attribute VBA_ModuleType=");
+ const sal_Int32 nEndPos = nPos != -1 ? aSourceCode.indexOf("\n", nPos) : -1;
+ if (nPos != -1 && nEndPos != -1)
+ aSourceCode = aSourceCode.replaceAt(nPos, nEndPos - nPos+1, u"");
+ aSourceCode = aSourceCode.replaceAll("\n", "\r\n");
+ exportString(aModuleStream, aSourceCode, eTextEncoding);
+
+#if VBA_EXPORT_DEBUG
+ OUString aModuleFileName("/tmp/vba_" + aElementName + "_out.bin");
+ SvFileStream aModuleStreamDebug(aModuleFileName, StreamMode::READWRITE);
+ aModuleStream.Seek(0);
+ aModuleStreamDebug.WriteStream(aModuleStream);
+#endif
+
+ VBACompression aCompression(rStrm, aModuleStream);
+ aCompression.write();
+}
+
+// section 2.3.4.1 _VBA_PROJECT Stream
+void exportVBAProjectStream(SvStream& rStrm)
+{
+ rStrm.WriteUInt16(0x61CC); // Reserved1
+ rStrm.WriteUInt16(0xFFFF); // Version
+ rStrm.WriteUInt8(0x00); // Reserved2
+ rStrm.WriteUInt16(0x0000); // Undefined
+}
+
+// section 2.3.1 PROJECT Stream
+void exportPROJECTStream(SvStream& rStrm,
+ const css::uno::Reference<css::container::XNameContainer>& xNameContainer,
+ const OUString& projectName, const std::vector<sal_Int32>& rLibraryMap,
+ const rtl_TextEncoding eTextEncoding)
+{
+ const css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
+ sal_Int32 n = aElementNames.getLength();
+ css::uno::Reference<css::script::vba::XVBAModuleInfo> xModuleInfo(xNameContainer, css::uno::UNO_QUERY);
+ assert(xModuleInfo.is());
+
+ // section 2.3.1.1ProjectProperties
+
+ // section 2.3.1.2 ProjectId
+ exportString(rStrm, u"ID=\"", eTextEncoding);
+ OUString aProjectID
+ = OStringToOUString(comphelper::xml::generateGUIDString(), RTL_TEXTENCODING_UTF8);
+ exportString(rStrm, aProjectID, eTextEncoding);
+ exportString(rStrm, u"\"\r\n", eTextEncoding);
+
+ // section 2.3.1.3 ProjectModule
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ const OUString& rModuleName = aElementNames[rLibraryMap[i]];
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(rModuleName);
+ if(aModuleInfo.ModuleType == 1)
+ {
+ exportString(rStrm, OUStringConcatenation("Module=" + rModuleName + "\r\n"),
+ eTextEncoding);
+ }
+ else if(aModuleInfo.ModuleType == 4)
+ {
+ exportString(rStrm,
+ OUStringConcatenation("Document=" + rModuleName + "/&H00000000\r\n"),
+ eTextEncoding);
+ }
+ }
+
+ // section 2.3.1.11 ProjectName
+ exportString(rStrm, OUStringConcatenation("Name=\"" + projectName + "\"\r\n"), eTextEncoding);
+
+ // section 2.3.1.12 ProjectHelpId
+ exportString(rStrm, u"HelpContextID=\"0\"\r\n", eTextEncoding);
+
+ // section 2.3.1.14 ProjectVersionCompat32
+ exportString(rStrm, u"VersionCompatible32=\"393222000\"\r\n", eTextEncoding);
+
+ // section 2.3.1.15 ProjectProtectionState
+#if VBA_ENCRYPTION
+ exportString(rStrm, u"CMG=\"", eTextEncoding);
+ SvMemoryStream aProtectedStream(4096, 4096);
+ aProtectedStream.WriteUInt32(0x00000000);
+ const sal_uInt8* pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
+ sal_uInt8 nProjKey = VBAEncryption::calculateProjKey(aProjectID);
+ VBAEncryption aProtectionState(pData, 4, rStrm, nProjKey, eTextEncoding);
+ aProtectionState.write();
+ exportString(rStrm, u"\"\r\n", eTextEncoding);
+#else
+ exportString(rStrm, "CMG=\"BEBC9256EEAAA8AEA8AEA8AEA8AE\"\r\n", eTextEncoding);
+#endif
+
+ // section 2.3.1.16 ProjectPassword
+#if VBA_ENCRYPTION
+ exportString(rStrm, u"DPB=\"", eTextEncoding);
+ aProtectedStream.Seek(0);
+ aProtectedStream.WriteUInt8(0x00);
+ pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
+ VBAEncryption aProjectPassword(pData, 1, rStrm, nProjKey, eTextEncoding);
+ aProjectPassword.write();
+ exportString(rStrm, u"\"\r\n", eTextEncoding);
+#else
+ exportString(rStrm, "DPB=\"7C7E5014B0D3B1D3B1D3\"\r\n", eTextEncoding);
+#endif
+
+ // section 2.3.1.17 ProjectVisibilityState
+#if VBA_ENCRYPTION
+ exportString(rStrm, u"GC=\"", eTextEncoding);
+ aProtectedStream.Seek(0);
+ aProtectedStream.WriteUInt8(0xFF);
+ pData = static_cast<const sal_uInt8*>(aProtectedStream.GetData());
+ VBAEncryption aVisibilityState(pData, 1, rStrm, nProjKey, eTextEncoding);
+ aVisibilityState.write();
+ exportString(rStrm, u"\"\r\n\r\n", eTextEncoding);
+#else
+ exportString(rStrm, "GC=\"3A3816DAD5DBD5DB2A\"\r\n\r\n", eTextEncoding);
+#endif
+
+ // section 2.3.1.18 HostExtenders
+ exportString(rStrm,
+ u"[Host Extender Info]\r\n"
+ "&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000\r\n\r\n",
+ eTextEncoding);
+
+ // section 2.3.1.19 ProjectWorkspace
+ exportString(rStrm, u"[Workspace]\r\n", eTextEncoding);
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ const OUString& rModuleName = aElementNames[rLibraryMap[i]];
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(rModuleName);
+ if(aModuleInfo.ModuleType == 1)
+ {
+ exportString(rStrm, OUStringConcatenation(rModuleName + "=25, 25, 1439, 639, \r\n"),
+ eTextEncoding);
+ }
+ else
+ {
+ exportString(rStrm, OUStringConcatenation(rModuleName + "=0, 0, 0, 0, C\r\n"),
+ eTextEncoding);
+ }
+ }
+}
+
+// section 2.3.3.1 NAMEMAP
+void writeNAMEMAP(SvStream& rStrm, const css::uno::Sequence<OUString>& rElementNames,
+ const std::vector<sal_Int32>& rLibraryMap, const rtl_TextEncoding eTextEncoding)
+{
+ int n = rElementNames.getLength();
+ for(sal_Int32 i = 0; i < n; ++i)
+ {
+ const OUString& rModuleName = rElementNames[rLibraryMap[i]];
+ exportString(rStrm, rModuleName, eTextEncoding);
+ rStrm.WriteUInt8(0x00); // terminator
+ exportUTF16String(rStrm, rModuleName);
+ rStrm.WriteUInt16(0x0000); // terminator
+ }
+}
+
+// section 2.3.3 PROJECTwm Stream
+void exportPROJECTwmStream(SvStream& rStrm, const css::uno::Sequence<OUString>& rElementNames,
+ const std::vector<sal_Int32>& rLibraryMap, const rtl_TextEncoding eTextEncoding)
+{
+ writeNAMEMAP(rStrm, rElementNames, rLibraryMap, eTextEncoding);
+ rStrm.WriteUInt16(0x0000); // terminator
+}
+
+void getCorrectExportOrder(const css::uno::Reference<css::container::XNameContainer>& xNameContainer, std::vector<sal_Int32>& rLibraryMap)
+{
+ const css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
+ sal_Int32 n = aElementNames.getLength();
+ css::uno::Reference<css::script::vba::XVBAModuleInfo> xModuleInfo(xNameContainer, css::uno::UNO_QUERY);
+
+ sal_Int32 nCurrentId = 0;
+ // first all the non-document modules
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(aElementNames[i]);
+ if (aModuleInfo.ModuleType != 4)
+ {
+ rLibraryMap[nCurrentId] = i;
+ ++nCurrentId;
+ }
+ }
+
+ sal_Int32 nWorkbookIndex = -1;
+ // then possibly the workbook module
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(aElementNames[i]);
+ bool bWorkbook = isWorkbook(aModuleInfo.ModuleObject);
+ if (bWorkbook)
+ {
+ nWorkbookIndex = i;
+ rLibraryMap[nCurrentId] = i;
+ ++nCurrentId;
+ }
+ }
+
+ // then the remaining modules
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ if (i == nWorkbookIndex)
+ continue;
+
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(aElementNames[i]);
+ if (aModuleInfo.ModuleType == 4)
+ {
+ rLibraryMap[nCurrentId] = i;
+ ++nCurrentId;
+ }
+ }
+}
+
+}
+
+#if VBA_USE_ORIGINAL_WM_STREAM || VBA_USE_ORIGINAL_DIR_STREAM \
+ || VBA_USE_ORIGINAL_PROJECT_STREAM || VBA_USE_ORIGINAL_VBA_PROJECT \
+ || VBA_USE_ORIGINAL_DIR_STREAM
+void addFileStreamToSotStream(const OUString& rPath, SotStorageStream& rStream)
+{
+ SvFileStream aFileStream(rPath, StreamMode::READWRITE);
+ rStream.WriteStream(aFileStream);
+}
+#endif
+
+void VbaExport::exportVBA(SotStorage* pRootStorage)
+{
+ css::uno::Reference<css::container::XNameContainer> xNameContainer = getBasicLibrary();
+ if (!xNameContainer.is()) {
+ return;
+ }
+ const css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
+ sal_Int32 n = aElementNames.getLength(); // get the number of modules
+ // export the elements in the order MSO expects them
+ // we store the index of the
+ std::vector<sal_Int32> aLibraryMap(n, 0);
+ getCorrectExportOrder(xNameContainer, aLibraryMap);
+
+ // start here with the VBA export
+ tools::SvRef<SotStorage> xVBAStream = pRootStorage->OpenSotStorage("VBA", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pDirStream = xVBAStream->OpenSotStream("dir", StreamMode::READWRITE);
+
+ tools::SvRef<SotStorageStream> pVBAProjectStream = xVBAStream->OpenSotStream("_VBA_PROJECT", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pPROJECTStream = pRootStorage->OpenSotStream("PROJECT", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pPROJECTwmStream = pRootStorage->OpenSotStream("PROJECTwm", StreamMode::READWRITE);
+
+ const rtl_TextEncoding eTextEncoding = getVBATextEncoding();
+
+#if VBA_USE_ORIGINAL_WM_STREAM
+ OUString aProjectwmPath = "/home/moggi/Documents/testfiles/vba/PROJECTwm";
+ addFileStreamToSotStream(aProjectwmPath, *pPROJECTwmStream);
+#else
+ exportPROJECTwmStream(*pPROJECTwmStream, aElementNames, aLibraryMap, eTextEncoding);
+#endif
+
+#if VBA_USE_ORIGINAL_DIR_STREAM
+ OUString aDirPath = "/home/moggi/Documents/testfiles/vba/VBA/dir";
+ addFileStreamToSotStream(aDirPath, *pDirStream);
+#else
+ exportDirStream(*pDirStream, xNameContainer, aLibraryMap, getProjectName(), eTextEncoding);
+#endif
+
+#if VBA_USE_ORIGINAL_PROJECT_STREAM
+ OUString aProjectPath = "/home/moggi/Documents/testfiles/vba/PROJECT";
+ addFileStreamToSotStream(aProjectPath, *pPROJECTStream);
+#else
+ exportPROJECTStream(*pPROJECTStream, xNameContainer, getProjectName(), aLibraryMap,
+ eTextEncoding);
+#endif
+
+#if VBA_USE_ORIGINAL_VBA_PROJECT
+ OUString a_VBA_ProjectPath = "/home/moggi/Documents/testfiles/vba/VBA/_VBA_PROJECT";
+ addFileStreamToSotStream(a_VBA_ProjectPath, *pVBAProjectStream);
+#else
+ exportVBAProjectStream(*pVBAProjectStream);
+#endif
+
+#if VBA_USE_ORIGINAL_DIR_STREAM
+ OUString aModule1Path = "/home/moggi/Documents/testfiles/vba/VBA/Module1";
+ OUString aSheet1Path = "/home/moggi/Documents/testfiles/vba/VBA/Sheet1";
+ OUString aSheet2Path = "/home/moggi/Documents/testfiles/vba/VBA/Sheet2";
+ OUString aSheet3Path = "/home/moggi/Documents/testfiles/vba/VBA/Sheet3";
+ OUString aWorkbookPath = "/home/moggi/Documents/testfiles/vba/VBA/ThisWorkbook";
+ tools::SvRef<SotStorageStream> pModule1Stream = xVBAStream->OpenSotStream("Module1", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pSheet1Stream = xVBAStream->OpenSotStream("Sheet1", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pSheet2Stream = xVBAStream->OpenSotStream("Sheet2", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pSheet3Stream = xVBAStream->OpenSotStream("Sheet3", StreamMode::READWRITE);
+ tools::SvRef<SotStorageStream> pWorkbookStream = xVBAStream->OpenSotStream("ThisWorkbook", StreamMode::READWRITE);
+ addFileStreamToSotStream(aModule1Path, *pModule1Stream);
+ addFileStreamToSotStream(aSheet1Path, *pSheet1Stream);
+ addFileStreamToSotStream(aSheet2Path, *pSheet2Stream);
+ addFileStreamToSotStream(aSheet3Path, *pSheet3Stream);
+ addFileStreamToSotStream(aWorkbookPath, *pWorkbookStream);
+
+ pModule1Stream->Commit();
+ pSheet1Stream->Commit();
+ pSheet2Stream->Commit();
+ pSheet3Stream->Commit();
+ pWorkbookStream->Commit();
+#else
+
+ css::uno::Reference<css::script::vba::XVBAModuleInfo> xModuleInfo(xNameContainer, css::uno::UNO_QUERY);
+ for (sal_Int32 i = 0; i < n; ++i)
+ {
+ const OUString& rModuleName = aElementNames[aLibraryMap[i]];
+ tools::SvRef<SotStorageStream> pModuleStream = xVBAStream->OpenSotStream(rModuleName, StreamMode::READWRITE);
+ css::uno::Any aCode = xNameContainer->getByName(rModuleName);
+ css::script::ModuleInfo aModuleInfo = xModuleInfo->getModuleInfo(rModuleName);
+ OUString aSourceCode;
+ aCode >>= aSourceCode;
+ exportModuleStream(*pModuleStream, aSourceCode, rModuleName, aModuleInfo, eTextEncoding);
+ pModuleStream->Commit();
+ }
+
+#endif
+
+ pVBAProjectStream->Commit();
+
+ pDirStream->Commit();
+ xVBAStream->Commit();
+ pPROJECTStream->Commit();
+ pPROJECTwmStream->Commit();
+ pRootStorage->Commit();
+}
+
+css::uno::Reference<css::script::XLibraryContainer> VbaExport::getLibraryContainer() const
+{
+ oox::PropertySet aDocProp(mxModel);
+ css::uno::Reference<css::script::XLibraryContainer> xLibContainer(aDocProp.getAnyProperty(oox::PROP_BasicLibraries), css::uno::UNO_QUERY);
+
+ return xLibContainer;
+}
+
+css::uno::Reference<css::container::XNameContainer> VbaExport::getBasicLibrary() const
+{
+ css::uno::Reference<css::container::XNameContainer> xLibrary;
+ try
+ {
+ css::uno::Reference<css::script::XLibraryContainer> xLibContainer = getLibraryContainer();
+ OUString aProjectName = getProjectName();
+ xLibrary.set( xLibContainer->getByName(aProjectName), css::uno::UNO_QUERY_THROW );
+ }
+ catch(...)
+ {
+ }
+
+ return xLibrary;
+}
+
+bool VbaExport::containsVBAProject()
+{
+ css::uno::Reference<css::script::XLibraryContainer> xLibContainer = getLibraryContainer();
+ if (!xLibContainer.is())
+ return false;
+
+ css::uno::Reference<css::script::vba::XVBACompatibility> xVbaCompatibility (xLibContainer, css::uno::UNO_QUERY);
+ if (!xVbaCompatibility.is())
+ return false;
+
+ bool bVBACompatibility = xVbaCompatibility->getVBACompatibilityMode();
+
+ return bVBACompatibility;
+}
+
+OUString VbaExport::getProjectName() const
+{
+ css::uno::Reference<css::script::vba::XVBACompatibility> xVbaCompatibility(getLibraryContainer(), css::uno::UNO_QUERY);
+ if (xVbaCompatibility.is())
+ return xVbaCompatibility->getProjectName();
+
+ return OUString();
+}
+
+rtl_TextEncoding VbaExport::getVBATextEncoding() const
+{
+ rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding();
+ css::uno::Reference<css::beans::XPropertySet> xProps(getLibraryContainer(),
+ css::uno::UNO_QUERY);
+ if (xProps.is())
+ try
+ {
+ xProps->getPropertyValue("VBATextEncoding") >>= aTextEncoding;
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
+
+ return aTextEncoding;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbahelper.cxx b/oox/source/ole/vbahelper.cxx
new file mode 100644
index 000000000..e5377568a
--- /dev/null
+++ b/oox/source/ole/vbahelper.cxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/vbahelper.hxx>
+#include <osl/diagnose.h>
+#include <o3tl/string_view.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star::uno;
+
+bool VbaHelper::readDirRecord( sal_uInt16& rnRecId, StreamDataSequence& rRecData, BinaryInputStream& rInStrm )
+{
+ // read the record header
+ sal_Int32 nRecSize;
+ rnRecId = rInStrm.readuInt16();
+ nRecSize = rInStrm.readInt32();
+ // for no obvious reason, PROJECTVERSION record contains size field of 4, but is 6 bytes long
+ if( rnRecId == VBA_ID_PROJECTVERSION )
+ {
+ OSL_ENSURE( nRecSize == 4, "VbaHelper::readDirRecord - unexpected record size for PROJECTVERSION" );
+ nRecSize = 6;
+ }
+ // read the record contents into the passed sequence
+ return !rInStrm.isEof() && (rInStrm.readData( rRecData, nRecSize ) == nRecSize);
+}
+
+bool VbaHelper::extractKeyValue( OUString& rKey, OUString& rValue, std::u16string_view rKeyValue )
+{
+ size_t nEqSignPos = rKeyValue.find( '=' );
+ if( nEqSignPos > 0 && nEqSignPos != std::u16string_view::npos )
+ {
+ rKey = o3tl::trim(rKeyValue.substr( 0, nEqSignPos ));
+ rValue = o3tl::trim(rKeyValue.substr( nEqSignPos + 1 ));
+ return !rKey.isEmpty() && !rValue.isEmpty();
+ }
+ return false;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx
new file mode 100644
index 000000000..fc795d30d
--- /dev/null
+++ b/oox/source/ole/vbainputstream.cxx
@@ -0,0 +1,208 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/vbainputstream.hxx>
+#include <osl/diagnose.h>
+
+namespace oox::ole {
+
+namespace {
+
+const sal_uInt8 VBASTREAM_SIGNATURE = 1;
+
+const sal_uInt16 VBACHUNK_SIGMASK = 0x7000;
+const sal_uInt16 VBACHUNK_SIG = 0x3000;
+const sal_uInt16 VBACHUNK_COMPRESSED = 0x8000;
+const sal_uInt16 VBACHUNK_LENMASK = 0x0FFF;
+
+} // namespace
+
+VbaInputStream::VbaInputStream( BinaryInputStream& rInStrm ) :
+ BinaryStreamBase( false ),
+ mpInStrm( &rInStrm ),
+ mnChunkPos( 0 )
+{
+ maChunk.reserve( 4096 );
+
+ sal_uInt8 nSig = rInStrm.readuInt8();
+ OSL_ENSURE( nSig == VBASTREAM_SIGNATURE, "VbaInputStream::VbaInputStream - wrong signature" );
+ mbEof = mbEof || rInStrm.isEof() || (nSig != VBASTREAM_SIGNATURE);
+}
+
+sal_Int64 VbaInputStream::size() const
+{
+ return -1;
+}
+
+sal_Int64 VbaInputStream::tell() const
+{
+ return -1;
+}
+
+void VbaInputStream::seek( sal_Int64 )
+{
+}
+
+void VbaInputStream::close()
+{
+ mpInStrm = nullptr;
+ mbEof = true;
+}
+
+sal_Int32 VbaInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize )
+{
+ sal_Int32 nRet = 0;
+ if( !mbEof )
+ {
+ orData.realloc( ::std::max< sal_Int32 >( nBytes, 0 ) );
+ if( nBytes > 0 )
+ {
+ nRet = readMemory( orData.getArray(), nBytes, nAtomSize );
+ if( nRet < nBytes )
+ orData.realloc( nRet );
+ }
+ }
+ return nRet;
+}
+
+sal_Int32 VbaInputStream::readMemory( void* opMem, sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ sal_Int32 nRet = 0;
+ sal_uInt8* opnMem = static_cast< sal_uInt8* >( opMem );
+ while( (nBytes > 0) && updateChunk() )
+ {
+ sal_Int32 nChunkLeft = static_cast< sal_Int32 >( maChunk.size() - mnChunkPos );
+ sal_Int32 nReadBytes = ::std::min( nBytes, nChunkLeft );
+ memcpy( opnMem, &*(maChunk.begin() + mnChunkPos), nReadBytes );
+ opnMem += nReadBytes;
+ mnChunkPos += static_cast< size_t >( nReadBytes );
+ nBytes -= nReadBytes;
+ nRet += nReadBytes;
+ }
+ return nRet;
+}
+
+void VbaInputStream::skip( sal_Int32 nBytes, size_t /*nAtomSize*/ )
+{
+ while( (nBytes > 0) && updateChunk() )
+ {
+ sal_Int32 nChunkLeft = static_cast< sal_Int32 >( maChunk.size() - mnChunkPos );
+ sal_Int32 nSkipBytes = ::std::min( nBytes, nChunkLeft );
+ mnChunkPos += static_cast< size_t >( nSkipBytes );
+ nBytes -= nSkipBytes;
+ }
+}
+
+// private --------------------------------------------------------------------
+
+bool VbaInputStream::updateChunk()
+{
+ if( mbEof || (mnChunkPos < maChunk.size()) ) return !mbEof;
+ // try to read next chunk header, this may trigger EOF
+ sal_uInt16 nHeader = mpInStrm->readuInt16();
+
+ mbEof = mpInStrm->isEof();
+ if( mbEof ) return false;
+
+ // check header signature
+ bool bIgnoreBrokenSig = ( (nHeader & VBACHUNK_SIGMASK) != VBACHUNK_SIG );
+
+ // decode length of chunk data and compression flag
+ bool bCompressed = getFlag( nHeader, VBACHUNK_COMPRESSED );
+ sal_uInt16 nChunkLen = (nHeader & VBACHUNK_LENMASK) + 1;
+ OSL_ENSURE( bCompressed || (nChunkLen == 4096), "VbaInputStream::updateChunk - invalid uncompressed chunk size" );
+
+ // From the amazing bit detective work of Valek Filippov<frob@gnome.org>
+ // this tweak and the one at the bottom of the method to seek to the
+ // start of the next chunk we can read those strange broken
+ // ( I guess from a MSO bug ) compressed streams > 4k
+
+ if ( bIgnoreBrokenSig )
+ {
+ bCompressed = true;
+ nChunkLen = 4094;
+ }
+
+ sal_Int64 target = mpInStrm->tell() + nChunkLen;
+ if( bCompressed )
+ {
+ maChunk.clear();
+ sal_uInt8 nBitCount = 4;
+ sal_uInt16 nChunkPos = 0;
+ while( !mbEof && !mpInStrm->isEof() && (nChunkPos < nChunkLen) )
+ {
+ sal_uInt8 nTokenFlags = mpInStrm->readuInt8();
+ ++nChunkPos;
+ for( int nBit = 0; !mbEof && !mpInStrm->isEof() && (nBit < 8) && (nChunkPos < nChunkLen); ++nBit, nTokenFlags >>= 1 )
+ {
+ if( nTokenFlags & 1 )
+ {
+ sal_uInt16 nCopyToken = mpInStrm->readuInt16();
+ nChunkPos = nChunkPos + 2;
+ // update bit count used for offset/length in the token
+ while( ( static_cast<size_t>(1) << nBitCount ) < maChunk.size() ) ++nBitCount;
+ // extract length from lower (16-nBitCount) bits, plus 3
+ sal_uInt16 nLength = extractValue< sal_uInt16 >( nCopyToken, 0, 16 - nBitCount ) + 3;
+ // extract offset from high nBitCount bits, plus 1
+ sal_uInt16 nOffset = extractValue< sal_uInt16 >( nCopyToken, 16 - nBitCount, nBitCount ) + 1;
+ mbEof = (nOffset > maChunk.size()) || (maChunk.size() + nLength > 4096);
+ OSL_ENSURE( !mbEof, "VbaInputStream::updateChunk - invalid offset or size in copy token" );
+ if( !mbEof )
+ {
+ // append data to buffer
+ maChunk.resize( maChunk.size() + nLength );
+ sal_uInt8* pnTo = &*(maChunk.end() - nLength);
+ const sal_uInt8* pnEnd = pnTo + nLength;
+ const sal_uInt8* pnFrom = pnTo - nOffset;
+ // offset may be less than length, effectively duplicating source data several times
+ size_t nRunLen = ::std::min< size_t >( nLength, nOffset );
+ while( pnTo < pnEnd )
+ {
+ size_t nStepLen = ::std::min< size_t >( nRunLen, pnEnd - pnTo );
+ memcpy( pnTo, pnFrom, nStepLen );
+ pnTo += nStepLen;
+ }
+ }
+ }
+ // we suspect this will never be called
+ else
+ {
+ maChunk.emplace_back();
+ maChunk.back() = mpInStrm->readuChar();
+ ++nChunkPos;
+ }
+ }
+ }
+ }
+ else
+ {
+ maChunk.resize( nChunkLen );
+ mpInStrm->readMemory(maChunk.data(), nChunkLen);
+ }
+ // decompression sometimes leaves the stream pos offset 1 place ( at
+ // least ) past or before the expected stream pos.
+ // here we make sure we are on the chunk boundary
+ mpInStrm->seek( target );
+ mnChunkPos = 0;
+ return !mbEof;
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
new file mode 100644
index 000000000..207a76e83
--- /dev/null
+++ b/oox/source/ole/vbamodule.cxx
@@ -0,0 +1,347 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/vbamodule.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/script/ModuleInfo.hpp>
+#include <com/sun/star/script/ModuleType.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
+#include <com/sun/star/awt/KeyEvent.hpp>
+#include <osl/diagnose.h>
+#include <rtl/character.hxx>
+#include <o3tl/string_view.hxx>
+#include <filter/msfilter/msvbahelper.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/storagebase.hxx>
+#include <oox/helper/textinputstream.hxx>
+#include <oox/ole/vbahelper.hxx>
+#include <oox/ole/vbainputstream.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::script::vba;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+
+using ::com::sun::star::awt::KeyEvent;
+
+VbaModule::VbaModule( const Reference< XComponentContext >& rxContext,
+ const Reference< frame::XModel >& rxDocModel,
+ const OUString& rName, rtl_TextEncoding eTextEnc, bool bExecutable ) :
+ mxContext( rxContext ),
+ mxDocModel( rxDocModel ),
+ maName( rName ),
+ meTextEnc( eTextEnc ),
+ mnType( script::ModuleType::UNKNOWN ),
+ mnOffset( SAL_MAX_UINT32 ),
+ mbReadOnly( false ),
+ mbPrivate( false ),
+ mbExecutable( bExecutable )
+{
+}
+
+void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
+{
+ sal_uInt16 nRecId = 0;
+ StreamDataSequence aRecData;
+ while( VbaHelper::readDirRecord( nRecId, aRecData, rDirStrm ) && (nRecId != VBA_ID_MODULEEND) )
+ {
+ SequenceInputStream aRecStrm( aRecData );
+ sal_Int32 nRecSize = aRecData.getLength();
+ switch( nRecId )
+ {
+#define OOX_ENSURE_RECORDSIZE( cond ) OSL_ENSURE( cond, "VbaModule::importDirRecords - invalid record size" )
+ case VBA_ID_MODULENAME:
+ OSL_FAIL( "VbaModule::importDirRecords - unexpected MODULENAME record" );
+ maName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
+ break;
+ case VBA_ID_MODULENAMEUNICODE:
+ break;
+ case VBA_ID_MODULESTREAMNAME:
+ maStreamName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
+ // Actually the stream name seems the best name to use
+ // the VBA_ID_MODULENAME name can sometimes be the wrong case
+ maName = maStreamName;
+ break;
+ case VBA_ID_MODULESTREAMNAMEUNICODE:
+ break;
+ case VBA_ID_MODULEDOCSTRING:
+ maDocString = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
+ break;
+ case VBA_ID_MODULEDOCSTRINGUNICODE:
+ break;
+ case VBA_ID_MODULEOFFSET:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 4 );
+ mnOffset = aRecStrm.readuInt32();
+ break;
+ case VBA_ID_MODULEHELPCONTEXT:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 4 );
+ break;
+ case VBA_ID_MODULECOOKIE:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 2 );
+ break;
+ case VBA_ID_MODULETYPEPROCEDURAL:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
+ OSL_ENSURE( mnType == script::ModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
+ mnType = script::ModuleType::NORMAL;
+ break;
+ case VBA_ID_MODULETYPEDOCUMENT:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
+ OSL_ENSURE( mnType == script::ModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
+ mnType = script::ModuleType::DOCUMENT;
+ break;
+ case VBA_ID_MODULEREADONLY:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
+ mbReadOnly = true;
+ break;
+ case VBA_ID_MODULEPRIVATE:
+ OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
+ mbPrivate = true;
+ break;
+ default:
+ OSL_FAIL( "VbaModule::importDirRecords - unknown module record" );
+#undef OOX_ENSURE_RECORDSIZE
+ }
+ }
+ OSL_ENSURE( !maName.isEmpty(), "VbaModule::importDirRecords - missing module name" );
+ OSL_ENSURE( !maStreamName.isEmpty(), "VbaModule::importDirRecords - missing module stream name" );
+ OSL_ENSURE( mnType != script::ModuleType::UNKNOWN, "VbaModule::importDirRecords - missing module type" );
+ OSL_ENSURE( mnOffset < SAL_MAX_UINT32, "VbaModule::importDirRecords - missing module stream offset" );
+}
+
+void VbaModule::createAndImportModule( StorageBase& rVbaStrg,
+ const Reference< container::XNameContainer >& rxBasicLib,
+ const Reference< container::XNameAccess >& rxDocObjectNA )
+{
+ OUString aVBASourceCode = readSourceCode( rVbaStrg );
+ createModule( aVBASourceCode, rxBasicLib, rxDocObjectNA );
+ registerShortcutKeys();
+}
+
+void VbaModule::registerShortcutKeys()
+{
+ for (VbaMacroKeyAndMethodBinding const& rKeyBinding : maKeyBindings)
+ {
+ try
+ {
+ KeyEvent aKeyEvent = ooo::vba::parseKeyEvent(rKeyBinding.msApiKey);
+ ooo::vba::applyShortCutKeyBinding(mxDocModel, aKeyEvent, rKeyBinding.msMethodName);
+ }
+ catch (const Exception&)
+ {
+ }
+ }
+}
+
+void VbaModule::createEmptyModule( const Reference< container::XNameContainer >& rxBasicLib,
+ const Reference< container::XNameAccess >& rxDocObjectNA ) const
+{
+ createModule( u"", rxBasicLib, rxDocObjectNA );
+}
+
+OUString VbaModule::readSourceCode( StorageBase& rVbaStrg )
+{
+ OUStringBuffer aSourceCode(512);
+ static const char sUnmatchedRemovedTag[] = "Rem removed unmatched Sub/End: ";
+ if( !maStreamName.isEmpty() && (mnOffset != SAL_MAX_UINT32) )
+ {
+ BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), true );
+ OSL_ENSURE( !aInStrm.isEof(), "VbaModule::readSourceCode - cannot open module stream" );
+ // skip the 'performance cache' stored before the actual source code
+ aInStrm.seek( mnOffset );
+ // if stream is still valid, load the source code
+ if( !aInStrm.isEof() )
+ {
+ // decompression starts at current stream position of aInStrm
+ VbaInputStream aVbaStrm( aInStrm );
+ // load the source code line-by-line, with some more processing
+ TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc );
+
+ struct ProcedurePair
+ {
+ bool bInProcedure;
+ sal_uInt32 nPos;
+ ProcedurePair() : bInProcedure( false ), nPos( 0 ) {};
+ } procInfo;
+
+ while( !aVbaTextStrm.isEof() )
+ {
+ OUString aCodeLine = aVbaTextStrm.readLine();
+ if( aCodeLine.match( "Attribute " ) )
+ {
+ // attribute
+ int index = aCodeLine.indexOf( ".VB_ProcData.VB_Invoke_Func = " );
+ if ( index != -1 )
+ {
+ // format is
+ // 'Attribute Procedure.VB_ProcData.VB_Invoke_Func = "*\n14"'
+ // where 'Procedure' is the procedure name and '*' is the shortcut key
+ // note: his is only relevant for Excel, seems that
+ // word doesn't store the shortcut in the module
+ // attributes
+ int nSpaceIndex = aCodeLine.indexOf(' ');
+ OUString sProc = aCodeLine.copy( nSpaceIndex + 1, index - nSpaceIndex - 1);
+ // for Excel short cut key seems limited to cntrl+'a-z, A-Z'
+ std::u16string_view sKey = aCodeLine.subView( aCodeLine.lastIndexOf("= ") + 3, 1 );
+ // only alpha key valid for key shortcut, however the api will accept other keys
+ if ( rtl::isAsciiAlpha( sKey[ 0 ] ) )
+ {
+ // cntrl modifier is explicit ( but could be cntrl+shift ), parseKeyEvent
+ // will handle and uppercase letter appropriately
+ OUString sApiKey = OUString::Concat("^") + sKey;
+ maKeyBindings.push_back({sApiKey, sProc});
+ }
+ }
+ }
+ else
+ {
+ // Hack here to weed out any unmatched End Sub / Sub Foo statements.
+ // The behaviour of the vba ide practically guarantees the case and
+ // spacing of Sub statement(s). However, indentation can be arbitrary hence
+ // the trim.
+ OUString trimLine( aCodeLine.trim() );
+ if ( mbExecutable && (
+ trimLine.match("Sub ") ||
+ trimLine.match("Public Sub ") ||
+ trimLine.match("Private Sub ") ||
+ trimLine.match("Static Sub ") ) )
+ {
+ // this should never happen, basic doesn't support nested procedures
+ // first Sub Foo must be bogus
+ if ( procInfo.bInProcedure )
+ {
+ // comment out the line
+ aSourceCode.insert( procInfo.nPos, sUnmatchedRemovedTag );
+ // mark location of this Sub
+ procInfo.nPos = aSourceCode.getLength();
+ }
+ else
+ {
+ procInfo.bInProcedure = true;
+ procInfo.nPos = aSourceCode.getLength();
+ }
+ }
+ else if ( mbExecutable && o3tl::starts_with(o3tl::trim(aCodeLine), u"End Sub") )
+ {
+ // un-matched End Sub
+ if ( !procInfo.bInProcedure )
+ {
+ aSourceCode.append( sUnmatchedRemovedTag );
+ }
+ else
+ {
+ procInfo.bInProcedure = false;
+ procInfo.nPos = 0;
+ }
+ }
+ // normal source code line
+ if( !mbExecutable )
+ aSourceCode.append( "Rem " );
+ aSourceCode.append( aCodeLine ).append( '\n' );
+ }
+ }
+ }
+ }
+ return aSourceCode.makeStringAndClear();
+}
+
+void VbaModule::createModule( std::u16string_view rVBASourceCode,
+ const Reference< container::XNameContainer >& rxBasicLib,
+ const Reference< container::XNameAccess >& rxDocObjectNA ) const
+{
+ if( maName.isEmpty() )
+ return;
+
+ // prepare the Basic module
+ script::ModuleInfo aModuleInfo;
+ aModuleInfo.ModuleType = mnType;
+ OUStringBuffer aSourceCode(512);
+ aSourceCode.append( "Rem Attribute VBA_ModuleType=" );
+ switch( mnType )
+ {
+ case script::ModuleType::NORMAL:
+ aSourceCode.append( "VBAModule" );
+ break;
+ case script::ModuleType::CLASS:
+ aSourceCode.append( "VBAClassModule" );
+ break;
+ case script::ModuleType::FORM:
+ aSourceCode.append( "VBAFormModule" );
+ // hack from old filter, document Basic should know the XModel, but it doesn't
+ aModuleInfo.ModuleObject.set( mxDocModel, UNO_QUERY );
+ break;
+ case script::ModuleType::DOCUMENT:
+ aSourceCode.append( "VBADocumentModule" );
+ // get the VBA implementation object associated to the document module
+ if( rxDocObjectNA.is() ) try
+ {
+ aModuleInfo.ModuleObject.set( rxDocObjectNA->getByName( maName ), UNO_QUERY );
+ }
+ catch (const Exception&)
+ {
+ }
+ break;
+ default:
+ aSourceCode.append( "VBAUnknown" );
+ }
+ aSourceCode.append( '\n' );
+ if( mbExecutable )
+ {
+ aSourceCode.append( "Option VBASupport 1\n" );
+ if( mnType == script::ModuleType::CLASS )
+ aSourceCode.append( "Option ClassModule\n" );
+ }
+ else
+ {
+ // add a subroutine named after the module itself
+ aSourceCode.append( "Sub " + maName.replace( ' ', '_' ) + "\n" );
+ }
+
+ // append passed VBA source code
+ aSourceCode.append( rVBASourceCode );
+
+ // close the subroutine named after the module
+ if( !mbExecutable )
+ aSourceCode.append( "End Sub\n" );
+
+ // insert extended module info
+ try
+ {
+ Reference< XVBAModuleInfo > xVBAModuleInfo( rxBasicLib, UNO_QUERY_THROW );
+ xVBAModuleInfo->insertModuleInfo( maName, aModuleInfo );
+ }
+ catch (const Exception&)
+ {
+ }
+
+ // insert the module into the passed Basic library
+ try
+ {
+ rxBasicLib->insertByName( maName, Any( aSourceCode.makeStringAndClear() ) );
+ }
+ catch (const Exception&)
+ {
+ OSL_FAIL( "VbaModule::createModule - cannot insert module into library" );
+ }
+}
+
+} // namespace oox::ole
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
new file mode 100644
index 000000000..c868d83b6
--- /dev/null
+++ b/oox/source/ole/vbaproject.cxx
@@ -0,0 +1,564 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ole/vbaproject.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/script/ModuleType.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAMacroResolver.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <comphelper/configurationhelper.hxx>
+#include <comphelper/documentinfo.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <osl/diagnose.h>
+#include <rtl/tencinfo.h>
+#include <sal/log.hxx>
+#include <oox/helper/binaryinputstream.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/helper/textinputstream.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/ole/vbacontrol.hxx>
+#include <oox/ole/vbahelper.hxx>
+#include <oox/ole/vbainputstream.hxx>
+#include <oox/ole/vbamodule.hxx>
+#include <oox/token/properties.hxx>
+
+namespace oox::ole {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::script;
+using namespace ::com::sun::star::script::vba;
+using namespace ::com::sun::star::uno;
+
+using ::comphelper::ConfigurationHelper;
+
+namespace {
+
+bool lclReadConfigItem( const Reference< XInterface >& rxConfigAccess, const OUString& rItemName )
+{
+ // some applications do not support all configuration items, assume 'false' in this case
+ try
+ {
+ Any aItem = ConfigurationHelper::readRelativeKey( rxConfigAccess, "Filter/Import/VBA", rItemName );
+ return aItem.has< bool >() && aItem.get< bool >();
+ }
+ catch(const Exception& )
+ {
+ }
+ return false;
+}
+
+} // namespace
+
+VbaFilterConfig::VbaFilterConfig( const Reference< XComponentContext >& rxContext, std::u16string_view rConfigCompName )
+{
+ OSL_ENSURE( rxContext.is(), "VbaFilterConfig::VbaFilterConfig - missing component context" );
+ if( rxContext.is() ) try
+ {
+ OSL_ENSURE( !rConfigCompName.empty(), "VbaFilterConfig::VbaFilterConfig - invalid configuration component name" );
+ OUString aConfigPackage = OUString::Concat("org.openoffice.Office.") + rConfigCompName;
+ mxConfigAccess = ConfigurationHelper::openConfig( rxContext, aConfigPackage, comphelper::EConfigurationModes::ReadOnly );
+ }
+ catch(const Exception& )
+ {
+ }
+ OSL_ENSURE( mxConfigAccess.is(), "VbaFilterConfig::VbaFilterConfig - cannot open configuration" );
+}
+
+VbaFilterConfig::~VbaFilterConfig()
+{
+}
+
+bool VbaFilterConfig::isImportVba() const
+{
+ return lclReadConfigItem( mxConfigAccess, "Load" );
+}
+
+bool VbaFilterConfig::isImportVbaExecutable() const
+{
+ return lclReadConfigItem( mxConfigAccess, "Executable" );
+}
+
+bool VbaFilterConfig::isExportVba() const
+{
+ return lclReadConfigItem( mxConfigAccess, "Save" );
+}
+
+VbaMacroAttacherBase::VbaMacroAttacherBase( const OUString& rMacroName ) :
+ maMacroName( rMacroName )
+{
+ OSL_ENSURE( !maMacroName.isEmpty(), "VbaMacroAttacherBase::VbaMacroAttacherBase - empty macro name" );
+}
+
+VbaMacroAttacherBase::~VbaMacroAttacherBase()
+{
+}
+
+void VbaMacroAttacherBase::resolveAndAttachMacro( const Reference< XVBAMacroResolver >& rxResolver )
+{
+ try
+ {
+ attachMacro( rxResolver->resolveVBAMacroToScriptURL( maMacroName ) );
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+VbaProject::VbaProject( const Reference< XComponentContext >& rxContext,
+ const Reference< XModel >& rxDocModel, std::u16string_view rConfigCompName ) :
+ VbaFilterConfig( rxContext, rConfigCompName ),
+ mxContext( rxContext ),
+ mxDocModel( rxDocModel ),
+ maPrjName( "Standard" )
+{
+ OSL_ENSURE( mxContext.is(), "VbaProject::VbaProject - missing component context" );
+ OSL_ENSURE( mxDocModel.is(), "VbaProject::VbaProject - missing document model" );
+}
+
+VbaProject::~VbaProject()
+{
+}
+
+bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg )
+{
+ // create GraphicHelper
+ Reference< css::frame::XFrame > xFrame;
+ if ( mxDocModel.is() )
+ {
+ Reference< css::frame::XController > xController = mxDocModel->getCurrentController();
+ xFrame = xController.is() ? xController->getFrame() : nullptr;
+ }
+ StorageRef noStorage;
+ // if the GraphicHelper tries to use noStorage it will of course crash
+ // but... this shouldn't happen as there is no reason for GraphicHelper
+ // to do that when importing VBA projects
+ GraphicHelper grfHlp( mxContext, xFrame, noStorage );
+ importVbaProject( rVbaPrjStrg, grfHlp );
+ // return true if something has been imported
+ return (mxBasicLib.is() && mxBasicLib->hasElements()) ||
+ (mxDialogLib.is() && mxDialogLib->hasElements());
+}
+
+void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
+{
+ if( rVbaPrjStrg.isStorage() )
+ {
+ // load the code modules and forms
+ if( isImportVba() )
+ importVba( rVbaPrjStrg, rGraphicHelper );
+ // copy entire storage into model
+ if( isExportVba() )
+ copyStorage( rVbaPrjStrg );
+ }
+}
+
+void VbaProject::importVbaData(const uno::Reference<io::XInputStream>& xInputStream)
+{
+ uno::Reference<document::XStorageBasedDocument> xStorageBasedDoc(mxDocModel, uno::UNO_QUERY);
+ uno::Reference<embed::XStorage> xDocStorage = xStorageBasedDoc->getDocumentStorage();
+ {
+ const sal_Int32 nOpenMode = ElementModes::SEEKABLE | ElementModes::WRITE | ElementModes::TRUNCATE;
+ uno::Reference<io::XOutputStream> xDocStream(xDocStorage->openStreamElement("_MS_VBA_Macros_XML", nOpenMode), uno::UNO_QUERY);
+ comphelper::OStorageHelper::CopyInputToOutput(xInputStream, xDocStream);
+ }
+ uno::Reference<embed::XTransactedObject>(xDocStorage, uno::UNO_QUERY_THROW)->commit();
+}
+
+void VbaProject::registerMacroAttacher( const VbaMacroAttacherRef& rxAttacher )
+{
+ OSL_ENSURE( rxAttacher, "VbaProject::registerMacroAttacher - unexpected empty reference" );
+ maMacroAttachers.push_back( rxAttacher );
+}
+
+// protected ------------------------------------------------------------------
+
+void VbaProject::addDummyModule( const OUString& rName, sal_Int32 nType )
+{
+ OSL_ENSURE( !rName.isEmpty(), "VbaProject::addDummyModule - missing module name" );
+ maDummyModules[ rName ] = nType;
+}
+
+void VbaProject::prepareImport()
+{
+}
+
+// private --------------------------------------------------------------------
+
+Reference< XLibraryContainer > VbaProject::getLibraryContainer( sal_Int32 nPropId )
+{
+ PropertySet aDocProp( mxDocModel );
+ Reference< XLibraryContainer > xLibContainer( aDocProp.getAnyProperty( nPropId ), UNO_QUERY );
+ return xLibContainer;
+}
+
+Reference< XNameContainer > VbaProject::openLibrary( sal_Int32 nPropId )
+{
+ Reference< XNameContainer > xLibrary;
+ try
+ {
+ Reference< XLibraryContainer > xLibContainer( getLibraryContainer( nPropId ), UNO_SET_THROW );
+ if( !xLibContainer->hasByName( maPrjName ) )
+ xLibContainer->createLibrary( maPrjName );
+ xLibrary.set( xLibContainer->getByName( maPrjName ), UNO_QUERY_THROW );
+ }
+ catch(const Exception& )
+ {
+ }
+ OSL_ENSURE( xLibrary.is(), "VbaProject::openLibrary - cannot create library" );
+ return xLibrary;
+}
+
+Reference< XNameContainer > const & VbaProject::createBasicLibrary()
+{
+ if( !mxBasicLib.is() )
+ mxBasicLib = openLibrary( PROP_BasicLibraries );
+ return mxBasicLib;
+}
+
+Reference< XNameContainer > const & VbaProject::createDialogLibrary()
+{
+ if( !mxDialogLib.is() )
+ mxDialogLib = openLibrary( PROP_DialogLibraries );
+ return mxDialogLib;
+}
+
+void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
+{
+ readVbaModules( rVbaPrjStrg );
+ importModulesAndForms(rVbaPrjStrg, rGraphicHelper );
+ // attach macros to registered objects
+ attachMacros();
+}
+
+void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
+{
+ StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( "VBA", false );
+ OSL_ENSURE( xVbaStrg, "VbaProject::readVbaModules - cannot open 'VBA' substorage" );
+ if( !xVbaStrg )
+ return;
+
+ /* Read the 'VBA/dir' stream which contains general settings of the VBA
+ project such as the text encoding used throughout several streams, and
+ a list of all code modules.
+ */
+ BinaryXInputStream aInStrm( xVbaStrg->openInputStream( "dir" ), true );
+ // VbaInputStream implements decompression
+ VbaInputStream aDirStrm( aInStrm );
+ OSL_ENSURE( !aDirStrm.isEof(), "VbaProject::importVba - cannot open 'dir' stream" );
+ if( aDirStrm.isEof() )
+ return;
+
+ // virtual call, derived classes may do some preparations
+ prepareImport();
+
+ // read all records of the directory
+ rtl_TextEncoding eTextEnc = RTL_TEXTENCODING_MS_1252;
+ sal_uInt16 nModuleCount = 0;
+ bool bExecutable = isImportVbaExecutable();
+
+ sal_uInt16 nRecId = 0;
+ StreamDataSequence aRecData;
+ while( VbaHelper::readDirRecord( nRecId, aRecData, aDirStrm ) && (nRecId != VBA_ID_PROJECTEND) )
+ {
+ // create record stream object from imported record data
+ SequenceInputStream aRecStrm( aRecData );
+ sal_Int32 nRecSize = aRecData.getLength();
+ switch( nRecId )
+ {
+ case VBA_ID_PROJECTCODEPAGE:
+ {
+ OSL_ENSURE( nRecSize == 2, "VbaProject::importVba - invalid record size" );
+ OSL_ENSURE( maModules.empty(), "VbaProject::importVba - unexpected PROJECTCODEPAGE record" );
+ rtl_TextEncoding eNewTextEnc = rtl_getTextEncodingFromWindowsCodePage( aRecStrm.readuInt16() );
+ OSL_ENSURE( eNewTextEnc != RTL_TEXTENCODING_DONTKNOW, "VbaProject::importVba - unknown text encoding" );
+ if( eNewTextEnc != RTL_TEXTENCODING_DONTKNOW )
+ eTextEnc = eNewTextEnc;
+ }
+ break;
+ case VBA_ID_PROJECTNAME:
+ {
+ OUString aPrjName = aRecStrm.readCharArrayUC( nRecSize, eTextEnc );
+ OSL_ENSURE( !aPrjName.isEmpty(), "VbaProject::importVba - invalid project name" );
+ if( !aPrjName.isEmpty() )
+ maPrjName = aPrjName;
+ }
+ break;
+ case VBA_ID_PROJECTMODULES:
+ OSL_ENSURE( nRecSize == 2, "VbaProject::importVba - invalid record size" );
+ OSL_ENSURE( maModules.empty(), "VbaProject::importVba - unexpected PROJECTMODULES record" );
+ nModuleCount = aRecStrm.readuInt16();
+ break;
+ case VBA_ID_MODULENAME:
+ {
+ OUString aName = aRecStrm.readCharArrayUC( nRecSize, eTextEnc );
+ OSL_ENSURE( !aName.isEmpty(), "VbaProject::importVba - invalid module name" );
+ OSL_ENSURE( !maModules.has( aName ), "VbaProject::importVba - multiple modules with the same name" );
+ VbaModuleMap::mapped_type& rxModule = maModules[ aName ];
+ rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, aName, eTextEnc, bExecutable );
+ // read all remaining records until the MODULEEND record
+ rxModule->importDirRecords( aDirStrm );
+ OSL_ENSURE( !maModulesByStrm.has( rxModule->getStreamName() ), "VbaProject::importVba - multiple modules with the same stream name" );
+ maModulesByStrm[ rxModule->getStreamName() ] = rxModule;
+ }
+ break;
+ }
+ }
+ SAL_WARN_IF( nModuleCount != maModules.size(), "oox", "VbaProject::importVba - invalid module count" );
+
+ /* The directory does not contain the real type of the modules, it
+ distinguishes only between 'procedural' and 'document' (the latter
+ includes class and form modules). Now, the exact type of all modules
+ will be read from the 'PROJECT' stream. It consists of text lines in
+ 'key=value' format which list the code modules by type.
+
+ - The line 'document=<modulename>/&HXXXXXXXX' declares document
+ modules. These are attached to the Word document (usually called
+ 'ThisDocument'), the Excel workbook (usually called
+ 'ThisWorkbook'), or single Excel worksheets or chartsheets (usually
+ called 'SheetX' or 'ChartX', X being a decimal number). Of course,
+ users may rename all these modules. The slash character separates
+ an automation server version number (hexadecimal 'XXXXXXXX') from
+ the module name.
+ - The line 'Module=<modulename>' declares common procedural code
+ modules.
+ - The line 'Class=<modulename>' declares a class module.
+ - The line 'BaseClass=<modulename>' declares a code module attached
+ to a user form with the same name.
+ */
+ BinaryXInputStream aPrjStrm( rVbaPrjStrg.openInputStream( "PROJECT" ), true );
+ OSL_ENSURE( !aPrjStrm.isEof(), "VbaProject::importVba - cannot open 'PROJECT' stream" );
+ // do not exit if this stream does not exist, but proceed to load the modules below
+ if( !aPrjStrm.isEof() )
+ {
+ TextInputStream aPrjTextStrm( mxContext, aPrjStrm, eTextEnc );
+ OUString aKey, aValue;
+ bool bExitLoop = false;
+ while( !bExitLoop && !aPrjTextStrm.isEof() )
+ {
+ // read a text line from the stream
+ OUString aLine = aPrjTextStrm.readLine().trim();
+ sal_Int32 nLineLen = aLine.getLength();
+ // exit if a subsection starts (section name is given in brackets)
+ bExitLoop = (nLineLen >= 2) && (aLine[ 0 ] == '[') && (aLine[ nLineLen - 1 ] == ']');
+ if( !bExitLoop && VbaHelper::extractKeyValue( aKey, aValue, aLine ) )
+ {
+ sal_Int32 nType = ModuleType::UNKNOWN;
+ if( aKey.equalsIgnoreAsciiCase( "Document" ) )
+ {
+ nType = ModuleType::DOCUMENT;
+ // strip automation server version from module names
+ sal_Int32 nSlashPos = aValue.indexOf( '/' );
+ if( nSlashPos >= 0 )
+ aValue = aValue.copy( 0, nSlashPos );
+ }
+ else if( aKey.equalsIgnoreAsciiCase( "Module" ) )
+ nType = ModuleType::NORMAL;
+ else if( aKey.equalsIgnoreAsciiCase( "Class" ) )
+ nType = ModuleType::CLASS;
+ else if( aKey.equalsIgnoreAsciiCase( "BaseClass" ) )
+ nType = ModuleType::FORM;
+
+ if( (nType != ModuleType::UNKNOWN) && !aValue.isEmpty() )
+ {
+ OSL_ENSURE( maModules.has( aValue ), "VbaProject::importVba - module not found" );
+ if( VbaModule* pModule = maModules.get( aValue ).get() )
+ pModule->setType( nType );
+ }
+ }
+ }
+ }
+
+ if( maModules.empty() )
+ return;
+
+ try
+ {
+ /* Set library container to VBA compatibility mode. This will create
+ the VBA Globals object and store it in the Basic manager of the
+ document. */
+ try
+ {
+ Reference< XVBACompatibility > xVBACompat( getLibraryContainer( PROP_BasicLibraries ), UNO_QUERY_THROW );
+ xVBACompat->setVBACompatibilityMode( true );
+ xVBACompat->setProjectName( maPrjName );
+
+ uno::Reference<beans::XPropertySet> xProps(xVBACompat, uno::UNO_QUERY_THROW);
+ xProps->setPropertyValue("VBATextEncoding", uno::Any(eTextEnc));
+ }
+ catch(const Exception& )
+ {
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
+{
+ StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( "VBA", false );
+ OSL_ENSURE( xVbaStrg, "VbaProject::importModulesAndForms - cannot open 'VBA' substorage" );
+ if( !xVbaStrg )
+ return;
+ rtl_TextEncoding eTextEnc = RTL_TEXTENCODING_MS_1252;
+ bool bExecutable = isImportVbaExecutable();
+
+ // create empty dummy modules
+ VbaModuleMap aDummyModules;
+ for (auto const& dummyModule : maDummyModules)
+ {
+ OSL_ENSURE( !maModules.has( dummyModule.first ) && !aDummyModules.has( dummyModule.first ), "VbaProject::importVba - multiple modules with the same name" );
+ VbaModuleMap::mapped_type& rxModule = aDummyModules[ dummyModule.first ];
+ rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, dummyModule.first, eTextEnc, bExecutable );
+ rxModule->setType( dummyModule.second );
+ }
+
+ /* Now it is time to load the source code. All modules will be inserted
+ into the Basic library of the document specified by the 'maPrjName'
+ member. Do not create the Basic library, if there are no modules
+ specified. */
+ if( !maModules.empty() || !aDummyModules.empty() ) try
+ {
+ // get the model factory and the basic library
+ Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
+ Reference< XNameContainer > xBasicLib( createBasicLibrary(), UNO_SET_THROW );
+
+ // try to get access to document objects related to code modules
+ Reference< XNameAccess > xDocObjectNA;
+ try
+ {
+ xDocObjectNA.set( xModelFactory->createInstance( "ooo.vba.VBAObjectModuleObjectProvider" ), UNO_QUERY );
+ }
+ catch(const Exception& )
+ {
+ // not all documents support this
+ }
+
+ if( xBasicLib.is() )
+ {
+ // #TODO cater for mxOleOverridesSink, like I used to before
+ // call Basic source code import for each module, std::[c]ref enforces pass-by-ref
+ maModules.forEachMem( &VbaModule::createAndImportModule,
+ ::std::ref( *xVbaStrg ), ::std::cref( xBasicLib ),
+ ::std::cref( xDocObjectNA ) );
+
+ // create empty dummy modules
+ aDummyModules.forEachMem( &VbaModule::createEmptyModule,
+ ::std::cref( xBasicLib ), ::std::cref( xDocObjectNA ) );
+ }
+ }
+ catch(const Exception& )
+ {
+ }
+
+ /* Load the forms. The file format specification requires that a module
+ must exist for every form. We are a bit more tolerant and scan the
+ project storage for all form substorages. This may 'repair' broken VBA
+ storages that misses to mention a module for an existing form. */
+ ::std::vector< OUString > aElements;
+ rVbaPrjStrg.getElementNames( aElements );
+ for (auto const& elem : aElements)
+ {
+ // try to open the element as storage
+ if( elem != "VBA" )
+ {
+ StorageRef xSubStrg = rVbaPrjStrg.openSubStorage( elem, false );
+ if( xSubStrg ) try
+ {
+ // resolve module name from storage name (which equals the module stream name)
+ VbaModule* pModule = maModulesByStrm.get( elem ).get();
+ OSL_ENSURE( pModule && (pModule->getType() == ModuleType::FORM),
+ "VbaProject::importVba - form substorage without form module" );
+ OUString aModuleName;
+ if( pModule )
+ aModuleName = pModule->getName();
+
+ // create and import the form
+ Reference< XNameContainer > xDialogLib( createDialogLibrary(), UNO_SET_THROW );
+ VbaUserForm aForm( mxContext, mxDocModel, rGraphicHelper, true/*bDefaultColorBgr*/ );
+ aForm.importForm( xDialogLib, *xSubStrg, aModuleName, eTextEnc );
+ }
+ catch(const Exception& )
+ {
+ }
+ }
+ }
+}
+
+void VbaProject::attachMacros()
+{
+ if( maMacroAttachers.empty() || !mxContext.is() )
+ return;
+
+ try
+ {
+ comphelper::DocumentInfo::notifyMacroEventRead(mxDocModel);
+
+ Reference< XMultiComponentFactory > xFactory( mxContext->getServiceManager(), UNO_SET_THROW );
+ Sequence< Any > aArgs{ Any(mxDocModel), Any(maPrjName) };
+ Reference< XVBAMacroResolver > xResolver( xFactory->createInstanceWithArgumentsAndContext(
+ "com.sun.star.script.vba.VBAMacroResolver", aArgs, mxContext ), UNO_QUERY_THROW );
+ maMacroAttachers.forEachMem( &VbaMacroAttacherBase::resolveAndAttachMacro, ::std::cref( xResolver ) );
+
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+void VbaProject::copyStorage( StorageBase& rVbaPrjStrg )
+{
+ if( !mxContext.is() )
+ return;
+
+ try
+ {
+ Reference< XStorageBasedDocument > xStorageBasedDoc( mxDocModel, UNO_QUERY_THROW );
+ Reference< XStorage > xDocStorage( xStorageBasedDoc->getDocumentStorage(), UNO_SET_THROW );
+ {
+ const sal_Int32 nOpenMode = ElementModes::SEEKABLE | ElementModes::WRITE | ElementModes::TRUNCATE;
+ Reference< XStream > xDocStream( xDocStorage->openStreamElement( "_MS_VBA_Macros", nOpenMode ), UNO_SET_THROW );
+ OleStorage aDestStorage( mxContext, xDocStream, false );
+ rVbaPrjStrg.copyStorageToStorage( aDestStorage );
+ aDestStorage.commit();
+ }
+ Reference< XTransactedObject >( xDocStorage, UNO_QUERY_THROW )->commit();
+ }
+ catch(const Exception& )
+ {
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx
new file mode 100644
index 000000000..450e3da00
--- /dev/null
+++ b/oox/source/ppt/animationspersist.cxx
@@ -0,0 +1,220 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/animationspersist.hxx>
+
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/presentation/ParagraphTarget.hpp>
+#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
+#include <com/sun/star/animations/Event.hpp>
+#include <com/sun/star/animations/XAnimationNode.hpp>
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/helper/addtosequence.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::presentation;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::text;
+
+namespace oox
+{
+
+Any addToSequence( const Any& rOldValue, const Any& rNewValue )
+{
+ if( !rNewValue.hasValue() )
+ {
+ return rOldValue;
+ }
+ else if( !rOldValue.hasValue() )
+ {
+ return rNewValue;
+ }
+ else
+ {
+ Sequence< Any > aNewSeq;
+ if( rOldValue >>= aNewSeq )
+ {
+ sal_Int32 nSize = aNewSeq.getLength();
+ aNewSeq.realloc(nSize+1);
+ aNewSeq.getArray()[nSize] = rNewValue;
+ }
+ else
+ {
+ aNewSeq = { rOldValue, rNewValue };
+ }
+ return Any( aNewSeq );
+ }
+}
+
+} // namespace oox
+
+namespace oox::ppt {
+
+ void ShapeTargetElement::convert( css::uno::Any & rTarget, sal_Int16 & rSubType ) const
+ {
+ switch(mnType)
+ {
+ case XML_subSp:
+ rSubType = ShapeAnimationSubType::AS_WHOLE;
+ break;
+ case XML_bg:
+ rSubType = ShapeAnimationSubType::ONLY_BACKGROUND;
+ break;
+ case XML_txEl:
+ {
+ ParagraphTarget aParaTarget;
+ Reference< XShape > xShape;
+ rTarget >>= xShape;
+ aParaTarget.Shape = xShape;
+ rSubType = ShapeAnimationSubType::ONLY_TEXT;
+
+ Reference< XText > xText( xShape, UNO_QUERY );
+ if( xText.is() )
+ {
+ switch(mnRangeType)
+ {
+ case XML_charRg:
+ // TODO calculate the corresponding paragraph for the text range...
+ SAL_INFO("oox.ppt", "OOX: TODO calculate the corresponding paragraph for the text range..." );
+ break;
+ case XML_pRg:
+ aParaTarget.Paragraph = static_cast< sal_Int16 >( maRange.start );
+ // TODO what to do with more than one.
+ SAL_INFO("oox.ppt", "OOX: TODO what to do with more than one" );
+ break;
+ }
+ rTarget <<= aParaTarget;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ Any AnimTargetElement::convert(const SlidePersistPtr & pSlide, sal_Int16 & nSubType) const
+ {
+ Any aTarget;
+ // see sd/source/files/ppt/pptinanimations.cxx:3191 (in importTargetElementContainer())
+ switch(mnType)
+ {
+ case XML_inkTgt:
+ // TODO
+ SAL_INFO("oox.ppt", "OOX: TODO inkTgt" );
+ break;
+ case XML_sldTgt:
+ // TODO
+ SAL_INFO("oox.ppt", "OOX: TODO sldTgt" );
+ break;
+ case XML_sndTgt:
+ aTarget <<= msValue;
+ break;
+ case XML_spTgt:
+ {
+ OUString sShapeName = msValue;
+
+ // bnc#705982 - catch referenced diagram fallback shapes
+ if( maShapeTarget.mnType == XML_dgm )
+ sShapeName = maShapeTarget.msSubShapeId;
+
+ Any rTarget;
+ ::oox::drawingml::ShapePtr pShape = pSlide->getShape( sShapeName );
+ SAL_WARN_IF( !pShape, "oox.ppt", "failed to locate Shape" );
+
+ if( !pShape && maShapeTarget.mnType == XML_dgm )
+ {
+ pShape = pSlide->getShape( msValue );
+ }
+
+ if( pShape )
+ {
+ Reference< XShape > xShape( pShape->getXShape() );
+ SAL_WARN_IF( !xShape.is(), "oox.ppt", "fail to get XShape from shape" );
+ if( xShape.is() )
+ {
+ rTarget <<= xShape;
+ maShapeTarget.convert(rTarget, nSubType);
+ aTarget = rTarget;
+ }
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return aTarget;
+ }
+
+ // Convert a time node condition to XAnimation.Begin or XAnimation.End
+ Any AnimationCondition::convert(const SlidePersistPtr & pSlide) const
+ {
+ Any aAny;
+ Event aEvent;
+ if(mpTarget && (maValue >>= aEvent))
+ {
+ sal_Int16 nSubType;
+ aAny = mpTarget->convert( pSlide, nSubType );
+ aEvent.Source = aAny;
+ aAny <<= aEvent;
+ }
+ else if (mnType == PPT_TOKEN(tn) && (maValue >>= aEvent))
+ {
+ OUString sId;
+ aEvent.Source >>= sId;
+ css::uno::Reference<XAnimationNode> xNode = pSlide->getAnimationNode(sId);
+ if (xNode.is())
+ {
+ aEvent.Source <<= xNode;
+ }
+ else
+ aEvent.Source.clear();
+ aAny <<= aEvent;
+ }
+ else
+ {
+ aAny = maValue;
+ }
+ return aAny;
+ }
+
+ Any AnimationCondition::convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l)
+ {
+ Any aAny;
+
+ if (l.size() == 1)
+ return l[0].convert(pSlide);
+
+ for (auto const& elem : l)
+ {
+ aAny = addToSequence( aAny, elem.convert(pSlide) );
+ }
+ return aAny;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animationtypes.cxx b/oox/source/ppt/animationtypes.cxx
new file mode 100644
index 000000000..c6b49b3e8
--- /dev/null
+++ b/oox/source/ppt/animationtypes.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "animationtypes.hxx"
+
+#include <com/sun/star/animations/Timing.hpp>
+
+#include <oox/helper/attributelist.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt
+{
+// ST_TLTime
+Any GetTime(const OUString& val)
+{
+ Any aDuration;
+ if (val == "indefinite")
+ {
+ aDuration <<= Timing_INDEFINITE;
+ }
+ else
+ {
+ aDuration <<= val.toFloat() / 1000.0;
+ }
+ return aDuration;
+}
+
+// ST_TLTimeAnimateValueTime
+Any GetTimeAnimateValueTime(const OUString& val)
+{
+ Any aPercent;
+ if (val == "indefinite")
+ {
+ aPercent <<= Timing_INDEFINITE;
+ }
+ else
+ {
+ aPercent <<= val.toFloat() / 100000.0;
+ }
+ return aPercent;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animationtypes.hxx b/oox/source/ppt/animationtypes.hxx
new file mode 100644
index 000000000..92652978f
--- /dev/null
+++ b/oox/source/ppt/animationtypes.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_ANIMATIONTYPES_HXX
+#define INCLUDED_OOX_SOURCE_PPT_ANIMATIONTYPES_HXX
+
+#include <com/sun/star/uno/Any.hxx>
+
+namespace oox::ppt
+{
+// ST_TLTime
+css::uno::Any GetTime(const OUString& val);
+// ST_TLTimeAnimateValueTime
+css::uno::Any GetTimeAnimateValueTime(const OUString& val);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animvariantcontext.cxx b/oox/source/ppt/animvariantcontext.cxx
new file mode 100644
index 000000000..5f2faf799
--- /dev/null
+++ b/oox/source/ppt/animvariantcontext.cxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "animvariantcontext.hxx"
+
+#include <com/sun/star/uno/Any.hxx>
+#include <rtl/ustring.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+ AnimVariantContext::AnimVariantContext( FragmentHandler2 const & rParent, sal_Int32 aElement, Any & aValue )
+ : FragmentHandler2( rParent )
+ , mnElement( aElement )
+ , maValue( aValue )
+ {
+ }
+
+ AnimVariantContext::~AnimVariantContext( ) noexcept
+ {
+ }
+
+ void AnimVariantContext::onEndElement()
+ {
+ if( isCurrentElement( mnElement ) && maColor.isUsed() )
+ {
+ maValue <<= maColor.getColor( getFilter().getGraphicHelper() );
+ }
+ }
+
+ ContextHandlerRef AnimVariantContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( boolVal ):
+ {
+ bool val = rAttribs.getBool( XML_val, false );
+ maValue <<= val;
+ return this;
+ }
+ case PPT_TOKEN( clrVal ):
+ return new ::oox::drawingml::ColorContext( *this, maColor );
+ // we'll defer setting the Any until the end.
+ case PPT_TOKEN( fltVal ):
+ {
+ double val = rAttribs.getDouble( XML_val, 0.0 );
+ maValue <<= val;
+ return this;
+ }
+ case PPT_TOKEN( intVal ):
+ {
+ sal_Int32 val = rAttribs.getInteger( XML_val, 0 );
+ maValue <<= val;
+ return this;
+ }
+ case PPT_TOKEN( strVal ):
+ {
+ OUString val = rAttribs.getString( XML_val, OUString() );
+ maValue <<= val;
+ return this;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/animvariantcontext.hxx b/oox/source/ppt/animvariantcontext.hxx
new file mode 100644
index 000000000..8830e0e6a
--- /dev/null
+++ b/oox/source/ppt/animvariantcontext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_ANIMVARIANTCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_ANIMVARIANTCONTEXT_HXX
+
+#include <com/sun/star/uno/Any.hxx>
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/color.hxx>
+
+namespace oox::ppt {
+
+ /** context CT_TLAnimVariant */
+ class AnimVariantContext
+ : public ::oox::core::FragmentHandler2
+ {
+ public:
+ AnimVariantContext( ::oox::core::FragmentHandler2 const & rParent, ::sal_Int32 aElement, css::uno::Any & aValue );
+ virtual ~AnimVariantContext( ) noexcept override;
+ virtual void onEndElement() override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ ::sal_Int32 mnElement;
+ css::uno::Any& maValue;
+ ::oox::drawingml::Color maColor;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/backgroundproperties.cxx b/oox/source/ppt/backgroundproperties.cxx
new file mode 100644
index 000000000..9fe256612
--- /dev/null
+++ b/oox/source/ppt/backgroundproperties.cxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/backgroundproperties.hxx>
+#include <drawingml/misccontexts.hxx>
+#include <oox/core/contexthandler2.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+BackgroundPropertiesContext::BackgroundPropertiesContext( FragmentHandler2 const & rParent, ::oox::drawingml::FillProperties& rFillProperties )
+: FragmentHandler2( rParent )
+, mrFillProperties( rFillProperties )
+{
+}
+
+::oox::core::ContextHandlerRef BackgroundPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( fill ): // a:CT_FillEffect
+ return this;
+ }
+
+ return ::oox::drawingml::FillPropertiesContext::createFillContext( *this, aElementToken, rAttribs, mrFillProperties );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/buildlistcontext.cxx b/oox/source/ppt/buildlistcontext.cxx
new file mode 100644
index 000000000..011d30346
--- /dev/null
+++ b/oox/source/ppt/buildlistcontext.cxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "buildlistcontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+
+namespace oox::ppt {
+
+ BuildListContext::BuildListContext( FragmentHandler2 const & rParent )
+ : FragmentHandler2( rParent )
+ , mbInBldGraphic( false )
+ , mbBuildAsOne( false )
+ {
+ }
+
+ BuildListContext::~BuildListContext( )
+ {
+ }
+
+ void BuildListContext::onEndElement()
+ {
+ switch( getCurrentElement() )
+ {
+ case PPT_TOKEN( bldGraphic ):
+ mbInBldGraphic = false;
+ break;
+ default:
+ break;
+ }
+ }
+
+ ::oox::core::ContextHandlerRef BuildListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ )
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( bldAsOne ):
+ if( mbInBldGraphic )
+ {
+ mbBuildAsOne = true;
+ }
+ return this;
+ case PPT_TOKEN( bldSub ):
+ return this;
+ case PPT_TOKEN( bldGraphic ):
+ {
+ mbInBldGraphic = true;
+// OUString sShapeId = rAttribs.getString( XML_spid, OUString() );
+// TODO
+// bool uiExpand = rAttribs.getBool( XML_uiExpand, true );
+ /* this is unsigned */
+// sal_uInt32 nGroupId = rAttribs.getUnsignedInteger( XML_grpId, 0 );
+ return this;
+ }
+ case A_TOKEN( bldDgm ):
+ case A_TOKEN( bldOleChart ):
+ case A_TOKEN( bldP ):
+ return this;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/buildlistcontext.hxx b/oox/source/ppt/buildlistcontext.hxx
new file mode 100644
index 000000000..a95e464e9
--- /dev/null
+++ b/oox/source/ppt/buildlistcontext.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_BUILDLISTCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_BUILDLISTCONTEXT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::ppt {
+
+ /** CT_BuildList */
+ class BuildListContext
+ : public ::oox::core::FragmentHandler2
+ {
+ public:
+ explicit BuildListContext( ::oox::core::FragmentHandler2 const & rParent );
+
+ virtual ~BuildListContext( ) override;
+
+ virtual void onEndElement() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+ private:
+ bool mbInBldGraphic;
+ bool mbBuildAsOne;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx
new file mode 100644
index 000000000..c38397fca
--- /dev/null
+++ b/oox/source/ppt/comments.cxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <oox/ppt/comments.hxx>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <rtl/math.h>
+#include <rtl/math.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox::ppt
+{
+void CommentAuthorList::setValues(const CommentAuthorList& list)
+{
+ for (auto const& author : list.cmAuthorLst)
+ {
+ CommentAuthor temp;
+ // TODO JNA : why not doing push_back at the end instead of using back()?
+ cmAuthorLst.push_back(temp);
+ cmAuthorLst.back().clrIdx = author.clrIdx;
+ cmAuthorLst.back().id = author.id;
+ cmAuthorLst.back().initials = author.initials;
+ cmAuthorLst.back().lastIdx = author.lastIdx;
+ cmAuthorLst.back().name = author.name;
+ }
+}
+
+//DateTime is saved as : 2013-01-10T15:53:26.000
+void Comment::setDateTime(const OUString& sDateTime)
+{
+ sal_Int32 nIdx{ 0 };
+ aDateTime.Year = o3tl::toInt32(o3tl::getToken(sDateTime, 0, '-', nIdx));
+ aDateTime.Month = o3tl::toUInt32(o3tl::getToken(sDateTime, 0, '-', nIdx));
+ aDateTime.Day = o3tl::toUInt32(o3tl::getToken(sDateTime, 0, 'T', nIdx));
+ aDateTime.Hours = o3tl::toUInt32(o3tl::getToken(sDateTime, 0, ':', nIdx));
+ aDateTime.Minutes = o3tl::toUInt32(o3tl::getToken(sDateTime, 0, ':', nIdx));
+ double seconds = rtl_math_uStringToDouble(sDateTime.getStr() + nIdx,
+ sDateTime.getStr() + sDateTime.getLength(), '.', 0,
+ nullptr, nullptr);
+ aDateTime.Seconds = floor(seconds);
+ seconds -= aDateTime.Seconds;
+ aDateTime.NanoSeconds = ::rtl::math::round(seconds * 1000000000);
+ const int secondsOverflow = (aDateTime.Seconds == 60) ? 61 : 60;
+ // normalise time part of aDateTime
+ if (aDateTime.NanoSeconds == 1000000000)
+ {
+ aDateTime.NanoSeconds = 0;
+ ++aDateTime.Seconds;
+ }
+ if (aDateTime.Seconds == secondsOverflow)
+ {
+ aDateTime.Seconds = 0;
+ ++aDateTime.Minutes;
+ }
+ if (aDateTime.Minutes == 60)
+ {
+ aDateTime.Minutes = 0;
+ ++aDateTime.Hours;
+ }
+ // if overflow goes into date, I give up
+}
+
+OUString Comment::getAuthor(const CommentAuthorList& list)
+{
+ const sal_Int32 nId = authorId.toInt32();
+ for (auto const& author : list.cmAuthorLst)
+ {
+ if (author.id.toInt32() == nId)
+ return author.name;
+ }
+ return "Anonymous";
+}
+
+const Comment& CommentList::getCommentAtIndex(int index)
+{
+ if (index < 0 || o3tl::make_unsigned(index) >= cmLst.size())
+ throw css::lang::IllegalArgumentException();
+
+ return cmLst.at(index);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx
new file mode 100644
index 000000000..4ba40925a
--- /dev/null
+++ b/oox/source/ppt/commonbehaviorcontext.cxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+
+#include "commonbehaviorcontext.hxx"
+#include "commontimenodecontext.hxx"
+#include "timetargetelementcontext.hxx"
+
+#include <string.h>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+ CommonBehaviorContext::CommonBehaviorContext( FragmentHandler2 const & rParent,
+ const TimeNodePtr & pNode)
+ : FragmentHandler2(rParent)
+ , mbInAttrList( false )
+ , mbIsInAttrName( false )
+ , mpNode(pNode)
+ {
+ }
+
+ CommonBehaviorContext::~CommonBehaviorContext( ) noexcept
+ {
+ }
+
+ void CommonBehaviorContext::onEndElement()
+ {
+ switch( getCurrentElement() )
+ {
+ case PPT_TOKEN( cBhvr ):
+ {
+ if( !maAttributes.empty() )
+ {
+ OUStringBuffer sAttributes;
+ for (auto const& attribute : maAttributes)
+ {
+ if( !sAttributes.isEmpty() )
+ {
+ sAttributes.append( ";" );
+ }
+ sAttributes.append( attribute.name );
+ }
+ OUString sTmp( sAttributes.makeStringAndClear() );
+ mpNode->getNodeProperties()[ NP_ATTRIBUTENAME ] <<= sTmp;
+ }
+ break;
+ }
+ case PPT_TOKEN( attrNameLst ):
+ mbInAttrList = false;
+ break;
+ case PPT_TOKEN( attrName ):
+ if( mbIsInAttrName )
+ {
+ const ImplAttributeNameConversion *attrConv = getAttributeConversionList();
+ while( attrConv->mpMSName != nullptr )
+ {
+ if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) )
+ {
+ Attribute attr;
+ attr.name = OUString::intern( attrConv->mpAPIName,
+ strlen(attrConv->mpAPIName),
+ RTL_TEXTENCODING_ASCII_US );
+ attr.type = attrConv->meAttribute;
+ maAttributes.push_back( attr );
+ SAL_INFO("oox.ppt", "OOX: attrName is " << msCurrentAttribute << " -> " << attrConv->mpAPIName );
+ break;
+ }
+ attrConv++;
+ }
+ mbIsInAttrName = false;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void CommonBehaviorContext::onCharacters( const OUString& aChars )
+ {
+ if( mbIsInAttrName )
+ {
+ msCurrentAttribute += aChars;
+ }
+ }
+
+ ::oox::core::ContextHandlerRef CommonBehaviorContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cTn ):
+ return new CommonTimeNodeContext( *this, aElementToken, rAttribs.getFastAttributeList(), mpNode );
+ case PPT_TOKEN( tgtEl ):
+ return new TimeTargetElementContext( *this, mpNode->getTarget() );
+ case PPT_TOKEN( attrNameLst ):
+ mbInAttrList = true;
+ return this;
+ case PPT_TOKEN( attrName ):
+ {
+ if( mbInAttrList )
+ {
+ mbIsInAttrName = true;
+ msCurrentAttribute.clear();
+ }
+ else
+ {
+ SAL_INFO("oox.ppt", "OOX: Attribute Name outside an Attribute List" );
+ }
+ return this;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/commonbehaviorcontext.hxx b/oox/source/ppt/commonbehaviorcontext.hxx
new file mode 100644
index 000000000..eb6bc28fc
--- /dev/null
+++ b/oox/source/ppt/commonbehaviorcontext.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_COMMONBEHAVIORCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_COMMONBEHAVIORCONTEXT_HXX
+
+#include <rtl/ustring.hxx>
+#include <oox/core/contexthandler.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+#include <oox/ppt/timenode.hxx>
+
+namespace oox::ppt {
+
+ struct Attribute
+ {
+ OUString name;
+ AnimationAttributeEnum type;
+ };
+
+ /** CT_TLCommonBehaviorData */
+ class CommonBehaviorContext
+ : public ::oox::core::FragmentHandler2
+ {
+ public:
+ CommonBehaviorContext( ::oox::core::FragmentHandler2 const & rParent,
+ const TimeNodePtr & pNode );
+ virtual ~CommonBehaviorContext( )
+ noexcept override;
+
+ virtual void onEndElement() override;
+
+ virtual void onCharacters( const OUString& aChars ) override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ bool mbInAttrList;
+ bool mbIsInAttrName;
+ std::vector< Attribute > maAttributes;
+ OUString msCurrentAttribute;
+ const TimeNodePtr& mpNode;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx
new file mode 100644
index 000000000..e7d1cf1dc
--- /dev/null
+++ b/oox/source/ppt/commontimenodecontext.cxx
@@ -0,0 +1,666 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "commontimenodecontext.hxx"
+#include "conditioncontext.hxx"
+
+#include <com/sun/star/animations/AnimationFill.hpp>
+#include <com/sun/star/animations/AnimationRestart.hpp>
+#include <com/sun/star/presentation/TextAnimationType.hpp>
+#include <com/sun/star/presentation/EffectPresetClass.hpp>
+#include <com/sun/star/presentation/EffectNodeType.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include "animationtypes.hxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::presentation;
+using namespace ::com::sun::star::xml::sax;
+
+
+namespace oox::ppt {
+
+const convert_subtype* convert_subtype::getList()
+{
+ static const convert_subtype aList[] =
+ {
+ // fly in
+ { 1, "from-top" },
+ { 2, "from-right" },
+ { 3, "from-top-right" },
+ { 4, "from-bottom" },
+ { 5, "horizontal" },
+ { 6, "from-bottom-right" },
+ { 8, "from-left" },
+ { 9, "from-top-left" },
+ { 10, "vertical" },
+ { 12, "from-bottom-left" },
+ { 16, "in" },
+ { 21, "vertical-in" },
+ { 26, "horizontal-in" },
+ { 32, "out" },
+ { 36, "out-from-screen-center" },
+ { 37, "vertical-out" },
+ { 42, "horizontal-out" },
+ { 272, "in-slightly" },
+ { 288, "out-slightly" },
+ { 528, "in-from-screen-center" },
+ { 0, nullptr }
+ };
+
+ return aList;
+}
+
+const preset_mapping* preset_mapping::getList()
+{
+
+ static const preset_mapping aList[] =
+ {
+ { css::presentation::EffectPresetClass::ENTRANCE, 1 ,"ooo-entrance-appear" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 2 ,"ooo-entrance-fly-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 3 ,"ooo-entrance-venetian-blinds" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 4 ,"ooo-entrance-box" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 5 ,"ooo-entrance-checkerboard" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 6 ,"ooo-entrance-circle" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 7 ,"ooo-entrance-fly-in-slow" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 8 ,"ooo-entrance-diamond" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 9 ,"ooo-entrance-dissolve-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 10 ,"ooo-entrance-fade-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 11 ,"ooo-entrance-flash-once" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 12 ,"ooo-entrance-peek-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 13 ,"ooo-entrance-plus" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 14 ,"ooo-entrance-random-bars" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 15 ,"ooo-entrance-spiral-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 16 ,"ooo-entrance-split" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 17 ,"ooo-entrance-stretchy" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 18 ,"ooo-entrance-diagonal-squares" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 19 ,"ooo-entrance-swivel" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 20 ,"ooo-entrance-wedge" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 21 ,"ooo-entrance-wheel" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 22 ,"ooo-entrance-wipe" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 23 ,"ooo-entrance-zoom" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 24 ,"ooo-entrance-random" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 25 ,"ooo-entrance-boomerang" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 26 ,"ooo-entrance-bounce" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 27 ,"ooo-entrance-colored-lettering" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 28 ,"ooo-entrance-movie-credits" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 29 ,"ooo-entrance-ease-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 30 ,"ooo-entrance-float" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 31 ,"ooo-entrance-turn-and-grow" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 34 ,"ooo-entrance-breaks" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 35 ,"ooo-entrance-pinwheel" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 37 ,"ooo-entrance-rise-up" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 38 ,"ooo-entrance-falling-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 39 ,"ooo-entrance-thread" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 40 ,"ooo-entrance-unfold" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 41 ,"ooo-entrance-whip" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 42 ,"ooo-entrance-ascend" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 43 ,"ooo-entrance-center-revolve" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 45 ,"ooo-entrance-fade-in-and-swivel" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 47 ,"ooo-entrance-descend" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 48 ,"ooo-entrance-sling" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 49 ,"ooo-entrance-spin-in" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 50 ,"ooo-entrance-compress" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 51 ,"ooo-entrance-magnify" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 52 ,"ooo-entrance-curve-up" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 53 ,"ooo-entrance-fade-in-and-zoom" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 54 ,"ooo-entrance-glide" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 55 ,"ooo-entrance-expand" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 56 ,"ooo-entrance-flip" },
+ { css::presentation::EffectPresetClass::ENTRANCE, 58 ,"ooo-entrance-fold" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 1 ,"ooo-emphasis-fill-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 2 ,"ooo-emphasis-font" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 3 ,"ooo-emphasis-font-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 4 ,"ooo-emphasis-font-size" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 5 ,"ooo-emphasis-font-style" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 6 ,"ooo-emphasis-grow-and-shrink" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 7 ,"ooo-emphasis-line-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 8 ,"ooo-emphasis-spin" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 9 ,"ooo-emphasis-transparency" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 10 ,"ooo-emphasis-bold-flash" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 14 ,"ooo-emphasis-blast" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 15 ,"ooo-emphasis-bold-reveal" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 16 ,"ooo-emphasis-color-over-by-word" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 18 ,"ooo-emphasis-reveal-underline" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 19 ,"ooo-emphasis-color-blend" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 20 ,"ooo-emphasis-color-over-by-letter" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 21 ,"ooo-emphasis-complementary-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 22 ,"ooo-emphasis-complementary-color-2" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 23 ,"ooo-emphasis-contrasting-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 24 ,"ooo-emphasis-darken" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 25 ,"ooo-emphasis-desaturate" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 26 ,"ooo-emphasis-flash-bulb" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 27 ,"ooo-emphasis-flicker" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 28 ,"ooo-emphasis-grow-with-color" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 30 ,"ooo-emphasis-lighten" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 31 ,"ooo-emphasis-style-emphasis" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 32 ,"ooo-emphasis-teeter" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 33 ,"ooo-emphasis-vertical-highlight" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 34 ,"ooo-emphasis-wave" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 35 ,"ooo-emphasis-blink" },
+ { css::presentation::EffectPresetClass::EMPHASIS, 36 ,"ooo-emphasis-shimmer" },
+ { css::presentation::EffectPresetClass::EXIT, 1 ,"ooo-exit-disappear" },
+ { css::presentation::EffectPresetClass::EXIT, 2 ,"ooo-exit-fly-out" },
+ { css::presentation::EffectPresetClass::EXIT, 3 ,"ooo-exit-venetian-blinds" },
+ { css::presentation::EffectPresetClass::EXIT, 4 ,"ooo-exit-box" },
+ { css::presentation::EffectPresetClass::EXIT, 5 ,"ooo-exit-checkerboard" },
+ { css::presentation::EffectPresetClass::EXIT, 6 ,"ooo-exit-circle" },
+ { css::presentation::EffectPresetClass::EXIT, 7 ,"ooo-exit-crawl-out" },
+ { css::presentation::EffectPresetClass::EXIT, 8 ,"ooo-exit-diamond" },
+ { css::presentation::EffectPresetClass::EXIT, 9 ,"ooo-exit-dissolve" },
+ { css::presentation::EffectPresetClass::EXIT, 10 ,"ooo-exit-fade-out" },
+ { css::presentation::EffectPresetClass::EXIT, 11 ,"ooo-exit-flash-once" },
+ { css::presentation::EffectPresetClass::EXIT, 12 ,"ooo-exit-peek-out" },
+ { css::presentation::EffectPresetClass::EXIT, 13 ,"ooo-exit-plus" },
+ { css::presentation::EffectPresetClass::EXIT, 14 ,"ooo-exit-random-bars" },
+ { css::presentation::EffectPresetClass::EXIT, 15 ,"ooo-exit-spiral-out" },
+ { css::presentation::EffectPresetClass::EXIT, 16 ,"ooo-exit-split" },
+ { css::presentation::EffectPresetClass::EXIT, 17 ,"ooo-exit-collapse" },
+ { css::presentation::EffectPresetClass::EXIT, 18 ,"ooo-exit-diagonal-squares" },
+ { css::presentation::EffectPresetClass::EXIT, 19 ,"ooo-exit-swivel" },
+ { css::presentation::EffectPresetClass::EXIT, 20 ,"ooo-exit-wedge" },
+ { css::presentation::EffectPresetClass::EXIT, 21 ,"ooo-exit-wheel" },
+ { css::presentation::EffectPresetClass::EXIT, 22 ,"ooo-exit-wipe" },
+ { css::presentation::EffectPresetClass::EXIT, 23 ,"ooo-exit-zoom" },
+ { css::presentation::EffectPresetClass::EXIT, 24 ,"ooo-exit-random" },
+ { css::presentation::EffectPresetClass::EXIT, 25 ,"ooo-exit-boomerang" },
+ { css::presentation::EffectPresetClass::EXIT, 26 ,"ooo-exit-bounce" },
+ { css::presentation::EffectPresetClass::EXIT, 27 ,"ooo-exit-colored-lettering" },
+ { css::presentation::EffectPresetClass::EXIT, 28 ,"ooo-exit-movie-credits" },
+ { css::presentation::EffectPresetClass::EXIT, 29 ,"ooo-exit-ease-out" },
+ { css::presentation::EffectPresetClass::EXIT, 30 ,"ooo-exit-float" },
+ { css::presentation::EffectPresetClass::EXIT, 31 ,"ooo-exit-turn-and-grow" },
+ { css::presentation::EffectPresetClass::EXIT, 34 ,"ooo-exit-breaks" },
+ { css::presentation::EffectPresetClass::EXIT, 35 ,"ooo-exit-pinwheel" },
+ { css::presentation::EffectPresetClass::EXIT, 37 ,"ooo-exit-sink-down" },
+ { css::presentation::EffectPresetClass::EXIT, 38 ,"ooo-exit-swish" },
+ { css::presentation::EffectPresetClass::EXIT, 39 ,"ooo-exit-thread" },
+ { css::presentation::EffectPresetClass::EXIT, 40 ,"ooo-exit-unfold" },
+ { css::presentation::EffectPresetClass::EXIT, 41 ,"ooo-exit-whip" },
+ { css::presentation::EffectPresetClass::EXIT, 42 ,"ooo-exit-descend" },
+ { css::presentation::EffectPresetClass::EXIT, 43 ,"ooo-exit-center-revolve" },
+ { css::presentation::EffectPresetClass::EXIT, 45 ,"ooo-exit-fade-out-and-swivel" },
+ { css::presentation::EffectPresetClass::EXIT, 47 ,"ooo-exit-ascend" },
+ { css::presentation::EffectPresetClass::EXIT, 48 ,"ooo-exit-sling" },
+ { css::presentation::EffectPresetClass::EXIT, 53 ,"ooo-exit-fade-out-and-zoom" },
+ { css::presentation::EffectPresetClass::EXIT, 55 ,"ooo-exit-contract" },
+ { css::presentation::EffectPresetClass::EXIT, 49 ,"ooo-exit-spin-out" },
+ { css::presentation::EffectPresetClass::EXIT, 50 ,"ooo-exit-stretchy" },
+ { css::presentation::EffectPresetClass::EXIT, 51 ,"ooo-exit-magnify" },
+ { css::presentation::EffectPresetClass::EXIT, 52 ,"ooo-exit-curve-down" },
+ { css::presentation::EffectPresetClass::EXIT, 54 ,"ooo-exit-glide" },
+ { css::presentation::EffectPresetClass::EXIT, 56 ,"ooo-exit-flip" },
+ { css::presentation::EffectPresetClass::EXIT, 58 ,"ooo-exit-fold" },
+
+ { css::presentation::EffectPresetClass::MOTIONPATH, 16 ,"ooo-motionpath-4-point-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 5 ,"ooo-motionpath-5-point-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 11 ,"ooo-motionpath-6-point-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 17 ,"ooo-motionpath-8-point-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 1 ,"ooo-motionpath-circle" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 6 ,"ooo-motionpath-crescent-moon" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 3 ,"ooo-motionpath-diamond" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 13 ,"ooo-motionpath-equal-triangle" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 12 ,"ooo-motionpath-oval" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 9 ,"ooo-motionpath-heart" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 4 ,"ooo-motionpath-hexagon" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 10 ,"ooo-motionpath-octagon" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 14 ,"ooo-motionpath-parallelogram" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 15 ,"ooo-motionpath-pentagon" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 2 ,"ooo-motionpath-right-triangle" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 7 ,"ooo-motionpath-square" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 18 ,"ooo-motionpath-teardrop" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 8 ,"ooo-motionpath-trapezoid" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 37 ,"ooo-motionpath-arc-down" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 51 ,"ooo-motionpath-arc-left" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 58 ,"ooo-motionpath-arc-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 44 ,"ooo-motionpath-arc-up" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 41 ,"ooo-motionpath-bounce-left" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 54 ,"ooo-motionpath-bounce-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 48 ,"ooo-motionpath-curvy-left" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 61 ,"ooo-motionpath-curvy-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 60 ,"ooo-motionpath-decaying-wave" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 49 ,"ooo-motionpath-diagonal-down-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 56 ,"ooo-motionpath-diagonal-up-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 42 ,"ooo-motionpath-down" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 52 ,"ooo-motionpath-funnel" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 53 ,"ooo-motionpath-spring" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 62 ,"ooo-motionpath-stairs-down" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 50 ,"ooo-motionpath-turn-down" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 36 ,"ooo-motionpath-turn-down-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 43 ,"ooo-motionpath-turn-up" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 57 ,"ooo-motionpath-turn-up-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 64 ,"ooo-motionpath-up" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 47 ,"ooo-motionpath-wave" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 38 ,"ooo-motionpath-zigzag" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 31 ,"ooo-motionpath-bean" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 25 ,"ooo-motionpath-buzz-saw" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 20 ,"ooo-motionpath-curved-square" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 21 ,"ooo-motionpath-curved-x" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 23 ,"ooo-motionpath-curvy-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 28 ,"ooo-motionpath-figure-8-four" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 26 ,"ooo-motionpath-horizontal-figure-8" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 34 ,"ooo-motionpath-inverted-square" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 33 ,"ooo-motionpath-inverted-triangle" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 24 ,"ooo-motionpath-loop-de-loop" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 29 ,"ooo-motionpath-neutron" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 27 ,"ooo-motionpath-peanut" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 32 ,"ooo-motionpath-clover" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 19 ,"ooo-motionpath-pointy-star" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 30 ,"ooo-motionpath-swoosh" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 22 ,"ooo-motionpath-vertical-figure-8" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 35 ,"ooo-motionpath-left" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 63 ,"ooo-motionpath-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 55 ,"ooo-motionpath-spiral-left" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 46 ,"ooo-motionpath-spiral-right" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 40 ,"ooo-motionpath-sine-wave" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 59 ,"ooo-motionpath-s-curve-1" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 39 ,"ooo-motionpath-s-curve-2" },
+ { css::presentation::EffectPresetClass::MOTIONPATH, 45 ,"ooo-motionpath-heartbeat" },
+
+ { 0,0,nullptr }
+ };
+
+ return aList;
+};
+
+OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType )
+{
+ const char* pStr = nullptr;
+
+ if( (nPresetClass == EffectPresetClass::ENTRANCE) || (nPresetClass == EffectPresetClass::EXIT) )
+ {
+ // skip wheel effect
+ if( nPresetId != 21 )
+ {
+ if( nPresetId == 5 )
+ {
+ // checkerboard
+ switch( nPresetSubType )
+ {
+ case 5: pStr = "downward"; break;
+ case 10: pStr = "across"; break;
+ }
+ }
+ else if( nPresetId == 17 )
+ {
+ // stretch
+ if( nPresetSubType == 10 )
+ pStr = "across";
+ }
+ else if( nPresetId == 18 )
+ {
+ // strips
+ switch( nPresetSubType )
+ {
+ case 3: pStr = "right-to-top"; break;
+ case 6: pStr = "right-to-bottom"; break;
+ case 9: pStr = "left-to-top"; break;
+ case 12: pStr = "left-to-bottom"; break;
+ }
+ }
+
+ if( pStr == nullptr )
+ {
+ const convert_subtype* p = convert_subtype::getList();
+
+ while( p->mpStrSubType )
+ {
+ if( p->mnID == nPresetSubType )
+ {
+ pStr = p->mpStrSubType;
+ break;
+ }
+ p++;
+ }
+ }
+ }
+ }
+
+ if( pStr )
+ return OUString::createFromAscii( pStr );
+ else
+ return OUString::number( nPresetSubType );
+}
+
+ CommonTimeNodeContext::CommonTimeNodeContext(
+ FragmentHandler2 const & rParent,
+ sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ , mbIterate( false )
+ {
+ AttributeList attribs( xAttribs );
+ sal_Int32 nInt; // some temporary int value for float conversions
+
+ NodePropertyMap & aProps = pNode->getNodeProperties();
+ TimeNode::UserDataMap & aUserData = pNode->getUserData();
+
+ if( attribs.hasAttribute( XML_accel ) )
+ {
+ double dPercent = ::oox::drawingml::GetPositiveFixedPercentage( xAttribs->getOptionalValue( XML_accel ) );
+ aProps[ NP_ACCELERATION ] <<= dPercent;
+ }
+
+ if( attribs.hasAttribute( XML_afterEffect ) )
+ {
+ aUserData[ "after-effect" ]
+ <<= attribs.getBool( XML_afterEffect, false );
+ }
+ aProps[ NP_AUTOREVERSE ] <<= attribs.getBool( XML_autoRev, false );
+
+ // TODO
+ if( attribs.hasAttribute( XML_bldLvl ) )
+ {
+ attribs.getInteger( XML_bldLvl, 0 );
+ }
+ if( attribs.hasAttribute( XML_decel ) )
+ {
+ double dPercent = ::oox::drawingml::GetPositiveFixedPercentage( xAttribs->getOptionalValue( XML_decel ) );
+ aProps[ NP_DECELERATE ] <<= dPercent;
+ }
+ // TODO
+ if( attribs.hasAttribute( XML_display ) )
+ {
+ aProps[ NP_DISPLAY ] <<= attribs.getBool( XML_display, true );
+ }
+ if( attribs.hasAttribute( XML_dur ) )
+ {
+ aProps[ NP_DURATION ] = GetTime( xAttribs->getOptionalValue( XML_dur) );
+ }
+ // TODO
+ if( attribs.hasAttribute( XML_evtFilter ) )
+ {
+ xAttribs->getOptionalValue( XML_evtFilter );
+ }
+ // ST_TLTimeNodeFillType
+ if( attribs.hasAttribute( XML_fill ) )
+ {
+ nInt = xAttribs->getOptionalValueToken( XML_fill, 0 );
+ if( nInt != 0 )
+ {
+ sal_Int16 nEnum;
+ switch( nInt )
+ {
+ case XML_remove:
+ nEnum = AnimationFill::REMOVE;
+ break;
+ case XML_freeze:
+ nEnum = AnimationFill::FREEZE;
+ break;
+ case XML_hold:
+ nEnum = AnimationFill::HOLD;
+ break;
+ case XML_transition:
+ nEnum = AnimationFill::TRANSITION;
+ break;
+ default:
+ nEnum = AnimationFill::DEFAULT;
+ break;
+ }
+ aProps[ NP_FILL ] <<= nEnum;
+ }
+ }
+ if( attribs.hasAttribute( XML_grpId ) )
+ {
+ attribs.getUnsigned( XML_grpId, 0 );
+ }
+ // ST_TLTimeNodeID
+ if( attribs.hasAttribute( XML_id ) )
+ {
+ sal_uInt32 nId = attribs.getUnsigned( XML_id, 0 );
+ pNode->setId( nId );
+ }
+ // ST_TLTimeNodeMasterRelation
+ nInt = xAttribs->getOptionalValueToken( XML_masterRel, 0 );
+ if( nInt )
+ {
+ // TODO
+ switch(nInt)
+ {
+ case XML_sameClick:
+ case XML_lastClick:
+ case XML_nextClick:
+ break;
+ }
+ }
+
+ // TODO
+ if( attribs.hasAttribute( XML_nodePh ) )
+ {
+ attribs.getBool( XML_nodePh, false );
+ }
+ // ST_TLTimeNodeType
+ nInt = xAttribs->getOptionalValueToken( XML_nodeType, 0 );
+ if( nInt != 0 )
+ {
+ sal_Int16 nEnum;
+ switch( nInt )
+ {
+ case XML_clickEffect:
+ case XML_clickPar:
+ nEnum = EffectNodeType::ON_CLICK;
+ break;
+ case XML_withEffect:
+ case XML_withGroup:
+ nEnum = EffectNodeType::WITH_PREVIOUS;
+ break;
+ case XML_mainSeq:
+ nEnum = EffectNodeType::MAIN_SEQUENCE;
+ break;
+ case XML_interactiveSeq:
+ nEnum = EffectNodeType::INTERACTIVE_SEQUENCE;
+ break;
+ case XML_afterGroup:
+ case XML_afterEffect:
+ nEnum = EffectNodeType::AFTER_PREVIOUS;
+ break;
+ case XML_tmRoot:
+ nEnum = EffectNodeType::TIMING_ROOT;
+ break;
+ default:
+ nEnum = EffectNodeType::DEFAULT;
+ break;
+ }
+ aUserData[ "node-type" ] <<= nEnum;
+ }
+
+ // ST_TLTimeNodePresetClassType
+ nInt = xAttribs->getOptionalValueToken( XML_presetClass, 0 );
+ if( nInt != 0 )
+ {
+ sal_Int16 nEffectPresetClass = 0;
+ // TODO put that in a function
+ switch( nInt )
+ {
+ case XML_entr:
+ nEffectPresetClass = EffectPresetClass::ENTRANCE;
+ break;
+ case XML_exit:
+ nEffectPresetClass = EffectPresetClass::EXIT;
+ break;
+ case XML_emph:
+ nEffectPresetClass = EffectPresetClass::EMPHASIS;
+ break;
+ case XML_path:
+ nEffectPresetClass = EffectPresetClass::MOTIONPATH;
+ break;
+ case XML_verb:
+ // TODO check that the value below is correct
+ nEffectPresetClass = EffectPresetClass::OLEACTION;
+ break;
+ case XML_mediacall:
+ nEffectPresetClass = EffectPresetClass::MEDIACALL;
+ break;
+ default:
+ nEffectPresetClass = 0;
+ break;
+ }
+ aUserData[ "preset-class" ] <<= nEffectPresetClass;
+ if( attribs.hasAttribute( XML_presetID ) )
+ {
+ sal_Int32 nPresetId = attribs.getInteger( XML_presetID, 0 );
+ const preset_mapping* p = preset_mapping::getList();
+ while( p->mpStrPresetId && ((p->mnPresetClass != nEffectPresetClass) || (p->mnPresetId != nPresetId )) )
+ p++;
+
+ aUserData[ "preset-id" ]
+ <<= OUString::createFromAscii( p->mpStrPresetId );
+ sal_Int32 nPresetSubType = attribs.getInteger( XML_presetSubtype, 0 );
+ if( nPresetSubType )
+ {
+ aUserData[ "preset-sub-type" ] <<= getConvertedSubType( nEffectPresetClass, nPresetId, nPresetSubType );
+ }
+ }
+ }
+ if( attribs.hasAttribute( XML_repeatCount ) )
+ {
+ aProps[ NP_REPEATCOUNT ] = GetTime( xAttribs->getOptionalValue( XML_repeatCount ) );
+ }
+ /* see pptinanimation */
+// aProps[ NP_REPEATCOUNT ] <<= (fCount < ((float)3.40282346638528860e+38)) ? makeAny( (double)fCount ) : makeAny( Timing_INDEFINITE );
+ if( attribs.hasAttribute( XML_repeatDur ) )
+ {
+ aProps[ NP_REPEATDURATION ] = GetTime( xAttribs->getOptionalValue( XML_repeatDur ) );
+ }
+ // TODO repeatDur is otherwise the same as dur. What shall we do? -- Hub
+
+ // ST_TLTimeNodeRestartType
+ nInt = xAttribs->getOptionalValueToken( XML_restart, 0 );
+ if( nInt != 0 )
+ {
+ // TODO put that in a function
+ sal_Int16 nEnum;
+ switch( nInt )
+ {
+ case XML_always:
+ nEnum = AnimationRestart::ALWAYS;
+ break;
+ case XML_whenNotActive:
+ nEnum = AnimationRestart::WHEN_NOT_ACTIVE;
+ break;
+ case XML_never:
+ nEnum = AnimationRestart::NEVER;
+ break;
+ default:
+ nEnum = AnimationRestart::DEFAULT;
+ break;
+ }
+ aProps[ NP_RESTART ] <<= nEnum;
+ }
+ // ST_Percentage TODO
+ xAttribs->getOptionalValue( XML_spd /*"10000" */ );
+ // ST_TLTimeNodeSyncType TODO
+ xAttribs->getOptionalValue( XML_syncBehavior );
+ // TODO (string)
+ xAttribs->getOptionalValue( XML_tmFilter );
+ }
+
+ CommonTimeNodeContext::~CommonTimeNodeContext( ) noexcept
+ {
+ }
+
+ void CommonTimeNodeContext::onEndElement()
+ {
+ if( isCurrentElement( PPT_TOKEN( iterate ) ) )
+ {
+ mbIterate = false;
+ }
+ }
+
+ ::oox::core::ContextHandlerRef CommonTimeNodeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( childTnLst ):
+ case PPT_TOKEN( subTnLst ):
+ return new TimeNodeListContext( *this, mpNode->getChildren() );
+
+ case PPT_TOKEN( stCondLst ):
+ return new CondListContext( *this, aElementToken, mpNode, mpNode->getStartCondition() );
+ case PPT_TOKEN( endCondLst ):
+ return new CondListContext( *this, aElementToken, mpNode, mpNode->getEndCondition() );
+
+ case PPT_TOKEN( endSync ):
+ return new CondContext( *this, rAttribs.getFastAttributeList(), mpNode, mpNode->getEndSyncValue() );
+ case PPT_TOKEN( iterate ):
+ {
+ sal_Int32 nVal = rAttribs.getToken( XML_type, XML_el );
+ if( nVal != 0 )
+ {
+ // TODO put that in a function
+ sal_Int16 nEnum;
+ switch( nVal )
+ {
+ case XML_el:
+ nEnum = TextAnimationType::BY_PARAGRAPH;
+ break;
+ case XML_lt:
+ nEnum = TextAnimationType::BY_LETTER;
+ break;
+ case XML_wd:
+ nEnum = TextAnimationType::BY_WORD;
+ break;
+ default:
+ // default is BY_WORD. See Ppt97Animation::GetTextAnimationType()
+ // in sd/source/filter/ppt/ppt97animations.cxx:297
+ nEnum = TextAnimationType::BY_WORD;
+ break;
+ }
+ mpNode->getNodeProperties()[ NP_ITERATETYPE ] <<= nEnum;
+ }
+ // in case of exception we ignore the whole tag.
+ // TODO what to do with this
+ /*bool bBackwards =*/ rAttribs.getBool( XML_backwards, false );
+ mbIterate = true;
+ return this;
+ }
+ case PPT_TOKEN( tmAbs ):
+ if( mbIterate )
+ {
+ double fTime = rAttribs.getUnsigned( XML_val, 0 ) / 1000.0; // convert ms. to second.
+ mpNode->getNodeProperties()[NP_ITERATEINTERVAL] <<= fTime;
+ }
+ return this;
+ case PPT_TOKEN( tmPct ):
+ if( mbIterate )
+ {
+ // TODO: should use duration to get iterate interval in second.
+ double fPercent = static_cast<double>(rAttribs.getUnsigned( XML_val, 0 )) / 100000.0;
+ mpNode->getNodeProperties()[ NP_ITERATEINTERVAL ] <<= fPercent;
+ }
+ return this;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/commontimenodecontext.hxx b/oox/source/ppt/commontimenodecontext.hxx
new file mode 100644
index 000000000..80ca74926
--- /dev/null
+++ b/oox/source/ppt/commontimenodecontext.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_COMMONTIMENODECONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_COMMONTIMENODECONTEXT_HXX
+
+#include <oox/ppt/timenode.hxx>
+#include <oox/ppt/timenodelistcontext.hxx>
+
+namespace oox::ppt {
+
+ /** CT_TLCommonTimeNodeData */
+ class CommonTimeNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ CommonTimeNodeContext( ::oox::core::FragmentHandler2 const & rParent, sal_Int32 aElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttribs, const TimeNodePtr & pNode);
+ virtual ~CommonTimeNodeContext( ) noexcept override;
+
+ virtual void onEndElement() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ bool mbIterate;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/conditioncontext.cxx b/oox/source/ppt/conditioncontext.cxx
new file mode 100644
index 000000000..650d7ef9c
--- /dev/null
+++ b/oox/source/ppt/conditioncontext.cxx
@@ -0,0 +1,182 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "conditioncontext.hxx"
+
+#include <com/sun/star/animations/AnimationEndSync.hpp>
+#include <com/sun/star/animations/EventTrigger.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/animationspersist.hxx>
+#include "animationtypes.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include "timetargetelementcontext.hxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::animations;
+
+namespace oox::ppt {
+
+ CondContext::CondContext( FragmentHandler2 const & rParent, const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode, AnimationCondition & aValue )
+ : TimeNodeContext( rParent, PPT_TOKEN( cond ), pNode )
+ , maCond( aValue )
+ {
+ maEvent.Trigger = EventTrigger::NONE;
+ maEvent.Repeat = 0;
+
+ AttributeList attribs( xAttribs );
+ if( attribs.hasAttribute( XML_evt ) )
+ {
+ sal_Int32 nEvent = xAttribs->getOptionalValueToken( XML_evt, 0 );
+ switch( nEvent )
+ {
+ case XML_onBegin:
+ maEvent.Trigger = EventTrigger::ON_BEGIN;
+ break;
+ case XML_onEnd:
+ maEvent.Trigger = EventTrigger::ON_END;
+ break;
+ case XML_begin:
+ maEvent.Trigger = EventTrigger::BEGIN_EVENT;
+ break;
+ case XML_end:
+ maEvent.Trigger = EventTrigger::END_EVENT;
+ break;
+ case XML_onClick:
+ maEvent.Trigger = EventTrigger::ON_CLICK;
+ break;
+ case XML_onDblClick:
+ maEvent.Trigger = EventTrigger::ON_DBL_CLICK;
+ break;
+ case XML_onMouseOver:
+ maEvent.Trigger = EventTrigger::ON_MOUSE_ENTER;
+ break;
+ case XML_onMouseOut:
+ maEvent.Trigger = EventTrigger::ON_MOUSE_LEAVE;
+ break;
+ case XML_onNext:
+ maEvent.Trigger = EventTrigger::ON_NEXT;
+ break;
+ case XML_onPrev:
+ maEvent.Trigger = EventTrigger::ON_PREV;
+ break;
+ case XML_onStopAudio:
+ maEvent.Trigger = EventTrigger::ON_STOP_AUDIO;
+ break;
+ default:
+ break;
+ }
+ }
+ if( attribs.hasAttribute( XML_delay ) || ( maEvent.Trigger == EventTrigger::NONE ) )
+ {
+ maEvent.Offset = GetTime( xAttribs->getOptionalValue( XML_delay ) );
+ }
+ }
+
+ CondContext::~CondContext( ) noexcept
+ {
+ if( maCond.mnType == 0 || maCond.mnType == PPT_TOKEN(tn))
+ {
+ maCond.maValue = (maEvent.Trigger == EventTrigger::NONE) ? maEvent.Offset : Any( maEvent );
+ }
+ }
+
+ ::oox::core::ContextHandlerRef CondContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( rtn ):
+ {
+ // ST_TLTriggerRuntimeNode { first, last, all }
+ sal_Int32 aTok;
+ sal_Int16 nEnum;
+ aTok = rAttribs.getToken( XML_val, XML_first );
+ switch( aTok )
+ {
+ case XML_first:
+ nEnum = AnimationEndSync::FIRST;
+ break;
+ case XML_last:
+ nEnum = AnimationEndSync::LAST;
+ break;
+ case XML_all:
+ nEnum = AnimationEndSync::ALL;
+ break;
+ default:
+ break;
+ }
+ maCond.mnType = aElementToken;
+ maCond.maValue <<= nEnum;
+ return this;
+ }
+ case PPT_TOKEN( tn ):
+ {
+ maCond.mnType = aElementToken;
+ // Convert the node id string to XAnimationNode later
+ maEvent.Source <<= rAttribs.getString(XML_val, OUString());
+ return this;
+ }
+ case PPT_TOKEN( tgtEl ):
+ // CT_TLTimeTargetElement
+ return new TimeTargetElementContext( *this, maCond.getTarget() );
+ default:
+ break;
+ }
+
+ return this;
+
+ }
+
+ /** CT_TLTimeConditionList */
+ CondListContext::CondListContext(
+ FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const TimeNodePtr & pNode,
+ AnimationConditionList & aCond )
+ : TimeNodeContext( rParent, aElement, pNode )
+ , maConditions( aCond )
+ {
+ }
+
+ CondListContext::~CondListContext( )
+ noexcept
+ {
+ }
+
+ ::oox::core::ContextHandlerRef CondListContext::onCreateContext( sal_Int32 aElement, const AttributeList& rAttribs )
+ {
+ switch( aElement )
+ {
+ case PPT_TOKEN( cond ):
+ // add a condition to the list
+ maConditions.emplace_back( );
+ return new CondContext( *this, rAttribs.getFastAttributeList(), mpNode, maConditions.back() );
+ default:
+ break;
+ }
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/conditioncontext.hxx b/oox/source/ppt/conditioncontext.hxx
new file mode 100644
index 000000000..fd8d4dd10
--- /dev/null
+++ b/oox/source/ppt/conditioncontext.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_CONDITIONCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_CONDITIONCONTEXT_HXX
+
+#include <com/sun/star/animations/Event.hpp>
+
+#include <oox/ppt/timenode.hxx>
+#include <oox/ppt/timenodelistcontext.hxx>
+#include <oox/ppt/animationspersist.hxx>
+
+namespace oox::ppt {
+
+ /** CT_TLTimeCondition */
+ class CondContext
+ : public TimeNodeContext
+ {
+ public:
+ CondContext( ::oox::core::FragmentHandler2 const & rParent,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode, AnimationCondition & aCond );
+ virtual ~CondContext( ) noexcept override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ css::animations::Event maEvent;
+ AnimationCondition & maCond;
+ };
+
+ /** CT_TLTimeConditionList */
+ class CondListContext
+ : public TimeNodeContext
+ {
+ public:
+ CondListContext( ::oox::core::FragmentHandler2 const & rParent,
+ sal_Int32 aElement,
+ const TimeNodePtr & pNode, AnimationConditionList & aCondList );
+ virtual ~CondListContext( ) noexcept override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ AnimationConditionList & maConditions;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/customshowlistcontext.cxx b/oox/source/ppt/customshowlistcontext.cxx
new file mode 100644
index 000000000..1e6befd63
--- /dev/null
+++ b/oox/source/ppt/customshowlistcontext.cxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/customshowlistcontext.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+namespace {
+
+class CustomShowContext : public ::oox::core::FragmentHandler2
+{
+ std::vector< CustomShow >& mrCustomShowList;
+
+public:
+ CustomShowContext( ::oox::core::FragmentHandler2 const & rParent,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttribs,
+ std::vector< CustomShow >& rCustomShowList );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+};
+
+}
+
+CustomShowContext::CustomShowContext( FragmentHandler2 const & rParent,
+ const Reference< XFastAttributeList >& rxAttribs,
+ std::vector< CustomShow >& rCustomShowList )
+: FragmentHandler2( rParent )
+, mrCustomShowList( rCustomShowList )
+{
+ CustomShow aCustomShow;
+ aCustomShow.maCustomShowName = rxAttribs->getOptionalValue( XML_name );
+ aCustomShow.mnId = rxAttribs->getOptionalValue( XML_id );
+ mrCustomShowList.push_back(aCustomShow);
+}
+
+::oox::core::ContextHandlerRef CustomShowContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( sld ) :
+ mrCustomShowList.back().maSldLst.push_back(
+ getRelations()
+ .getRelationFromRelId(rAttribs.getString(R_TOKEN(id), OUString()))
+ ->maTarget);
+ return this;
+ default:
+ break;
+ }
+
+ return this;
+}
+
+CustomShowListContext::CustomShowListContext( FragmentHandler2 const & rParent,
+ std::vector< CustomShow >& rCustomShowList )
+: FragmentHandler2( rParent )
+, mrCustomShowList( rCustomShowList )
+{
+}
+
+CustomShowListContext::~CustomShowListContext( )
+{
+}
+
+::oox::core::ContextHandlerRef CustomShowListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( custShow ) :
+ {
+ return new CustomShowContext( *this, rAttribs.getFastAttributeList(), mrCustomShowList );
+ }
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx
new file mode 100644
index 000000000..9aad170c1
--- /dev/null
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "extdrawingfragmenthandler.hxx"
+
+#include <oox/ppt/pptshapegroupcontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+
+namespace oox::ppt {
+
+ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ const oox::ppt::ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr const & pGroupShapePtr,
+ oox::drawingml::ShapePtr const & pShapePtr)
+ : FragmentHandler2( rFilter, rFragmentPath ),
+ mpSlidePersistPtr (rSlidePersistPtr ),
+ meShapeLocation( eShapeLocation ),
+ mpGroupShapePtr( pGroupShapePtr ),
+ mpShapePtr( pShapePtr )
+{
+}
+
+ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) noexcept
+{
+ // Empty DrawingML fallback, need to warn the user at the end.
+ if (mpShapePtr && mpShapePtr->getChildren().empty())
+ getFilter().setMissingExtDrawing();
+}
+
+ContextHandlerRef
+ExtDrawingFragmentHandler::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& )
+{
+ switch( aElement )
+ {
+ case DSP_TOKEN( drawing ):
+ break;
+ case DSP_TOKEN( spTree ):
+ return new PPTShapeGroupContext(
+ *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr,
+ mpShapePtr );
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx
new file mode 100644
index 000000000..22406f3d9
--- /dev/null
+++ b/oox/source/ppt/extdrawingfragmenthandler.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_EXTDRAWINGFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_SOURCE_PPT_EXTDRAWINGFRAGMENTHANDLER_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/ppt/slidepersist.hxx>
+
+namespace oox::ppt {
+
+class ExtDrawingFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ ExtDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath,
+ const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ const oox::ppt::ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr const & pGroupShapePtr,
+ oox::drawingml::ShapePtr const & pShapePtr );
+ virtual ~ExtDrawingFragmentHandler() noexcept override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override;
+
+private:
+ const oox::ppt::SlidePersistPtr mpSlidePersistPtr;
+ const oox::ppt::ShapeLocation meShapeLocation;
+ oox::drawingml::ShapePtr mpGroupShapePtr;
+ oox::drawingml::ShapePtr mpShapePtr;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/headerfootercontext.cxx b/oox/source/ppt/headerfootercontext.cxx
new file mode 100644
index 000000000..2a51fdafd
--- /dev/null
+++ b/oox/source/ppt/headerfootercontext.cxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "headerfootercontext.hxx"
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+ HeaderFooterContext::HeaderFooterContext( FragmentHandler2 const & rParent,
+ const AttributeList& rAttribs, HeaderFooter& rHeaderFooter )
+ : FragmentHandler2( rParent )
+ {
+ if ( rAttribs.hasAttribute( XML_sldNum ) )
+ {
+ rHeaderFooter.mbSlideNumber = rAttribs.getBool( XML_sldNum, true );
+ }
+ if ( rAttribs.hasAttribute( XML_hdr ) )
+ {
+ rHeaderFooter.mbHeader = rAttribs.getBool( XML_hdr, true );
+ }
+ if ( rAttribs.hasAttribute( XML_ftr ) )
+ {
+ rHeaderFooter.mbFooter = rAttribs.getBool( XML_ftr, true );
+ }
+ if ( rAttribs.hasAttribute( XML_dt ) )
+ {
+ rHeaderFooter.mbDateTime = rAttribs.getBool( XML_dt, true );
+ }
+ }
+
+ HeaderFooterContext::~HeaderFooterContext( )
+ {
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/headerfootercontext.hxx b/oox/source/ppt/headerfootercontext.hxx
new file mode 100644
index 000000000..9b93fb5f1
--- /dev/null
+++ b/oox/source/ppt/headerfootercontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_HEADERFOOTERCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_HEADERFOOTERCONTEXT_HXX
+
+#include <oox/ppt/headerfooter.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::ppt {
+
+ /** CT_HeaderFooter */
+ class HeaderFooterContext : public ::oox::core::FragmentHandler2
+ {
+ public:
+ HeaderFooterContext( ::oox::core::FragmentHandler2 const & rParent,
+ const AttributeList& rAttribs, HeaderFooter& rHeaderFooter );
+
+ virtual ~HeaderFooterContext( ) override;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx
new file mode 100644
index 000000000..9d95b6ecc
--- /dev/null
+++ b/oox/source/ppt/layoutfragmenthandler.cxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "headerfootercontext.hxx"
+#include <oox/ppt/layoutfragmenthandler.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <utility>
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+// CT_SlideLayout
+
+LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath,
+ const SlidePersistPtr& pMasterPersistPtr)
+ : SlideFragmentHandler(rFilter, rFragmentPath, pMasterPersistPtr, Layout)
+{
+}
+
+LayoutFragmentHandler::~LayoutFragmentHandler()
+{
+
+}
+
+ContextHandlerRef LayoutFragmentHandler::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( sldLayout ): // CT_SlideLayout
+ {
+ mpSlidePersistPtr->setLayoutValueToken( rAttribs.getToken( XML_type, 0 ) ); // CT_SlideLayoutType
+
+ OptValue< bool > aShowMasterShapes = rAttribs.getBool( XML_showMasterSp );
+ if( aShowMasterShapes.has() && !aShowMasterShapes.get() ) {
+ mpSlidePersistPtr->hideShapesAsMasterShapes();
+ }
+ break;
+ }
+ case PPT_TOKEN( hf ): // CT_HeaderFooter
+ return new HeaderFooterContext( *this, rAttribs, mpSlidePersistPtr->getHeaderFooter() );
+ default:
+ return SlideFragmentHandler::onCreateContext( aElementToken, rAttribs );
+ }
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx
new file mode 100644
index 000000000..054bf6260
--- /dev/null
+++ b/oox/source/ppt/pptfilterhelpers.cxx
@@ -0,0 +1,422 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/animations/TransitionType.hpp>
+#include <com/sun/star/animations/TransitionSubType.hpp>
+#include <com/sun/star/animations/ValuePair.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+#include <tools/color.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace {
+ int lcl_gethex(int nChar)
+ {
+ if (nChar >= '0' && nChar <= '9')
+ return nChar - '0';
+ else if (nChar >= 'a' && nChar <= 'f')
+ return nChar - 'a' + 10;
+ else if (nChar >= 'A' && nChar <= 'F')
+ return nChar - 'A' + 10;
+ else
+ return 0;
+ }
+}
+
+namespace oox::ppt {
+
+ const ImplAttributeNameConversion *getAttributeConversionList()
+ {
+ static const ImplAttributeNameConversion aList[] =
+ {
+ { AnimationAttributeEnum::PPT_X, "ppt_x", "X" },
+ { AnimationAttributeEnum::PPT_Y, "ppt_y", "Y" },
+ { AnimationAttributeEnum::PPT_W, "ppt_w", "Width" },
+ { AnimationAttributeEnum::PPT_H, "ppt_h", "Height" },
+ { AnimationAttributeEnum::PPT_C, "ppt_c", "DimColor" },
+ { AnimationAttributeEnum::R, "r", "Rotate" },
+ { AnimationAttributeEnum::XSHEAR, "xshear", "SkewX" },
+ { AnimationAttributeEnum::FILLCOLOR, "fillcolor", "FillColor" },
+ { AnimationAttributeEnum::FILLCOLOR, "fillColor", "FillColor" },
+ { AnimationAttributeEnum::FILLTYPE, "fill.type", "FillStyle" },
+ { AnimationAttributeEnum::FILLON, "fill.on", "FillOn" },
+ { AnimationAttributeEnum::STROKECOLOR, "stroke.color", "LineColor" },
+ { AnimationAttributeEnum::STROKEON, "stroke.on", "LineStyle" },
+ { AnimationAttributeEnum::STYLECOLOR, "style.color", "CharColor" },
+ { AnimationAttributeEnum::STYLEROTATION, "style.rotation", "Rotate" },
+ { AnimationAttributeEnum::FONTWEIGHT, "style.fontWeight", "CharWeight" },
+ { AnimationAttributeEnum::STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" },
+ { AnimationAttributeEnum::STYLEFONTFAMILY, "style.fontFamily", "CharFontName" },
+ { AnimationAttributeEnum::STYLEFONTSIZE, "style.fontSize", "CharHeight" },
+ { AnimationAttributeEnum::STYLEFONTSTYLE, "style.fontStyle", "CharPosture" },
+ { AnimationAttributeEnum::STYLEVISIBILITY, "style.visibility", "Visibility" },
+ { AnimationAttributeEnum::STYLEOPACITY, "style.opacity", "Opacity" },
+ { AnimationAttributeEnum::UNKNOWN, nullptr, nullptr }
+ };
+
+ return aList;
+ }
+
+ const transition* transition::getList()
+ {
+ static const transition aList[] =
+ {
+ { "wipe(up)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true },
+ { "wipe(right)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false },
+ { "wipe(left)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true },
+ { "wipe(down)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false },
+ { "wheel(1)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::ONEBLADE, true },
+ { "wheel(2)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::TWOBLADEVERTICAL, true },
+ { "wheel(3)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::THREEBLADE, true },
+ { "wheel(4)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::FOURBLADE, true },
+ { "wheel(8)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::EIGHTBLADE, true },
+ { "strips(downLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, true },
+ { "strips(upLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, false },
+ { "strips(downRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, true },
+ { "strips(upRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, false },
+ { "barn(inVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, false },
+ { "barn(outVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, true },
+ { "barn(inHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, false },
+ { "barn(outHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
+ { "randombar(vertical)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::VERTICAL, true},
+ { "randombar(horizontal)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
+ { "checkerboard(down)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::DOWN, true},
+ { "checkerboard(across)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::ACROSS, true },
+ { "plus(out)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, false },
+ { "plus(in)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, true },
+ { "diamond(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, true },
+ { "diamond(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, false },
+ { "circle(out)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
+ { "circle(in)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, false },
+ { "box(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, true },
+ { "box(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, false },
+ { "wedge", css::animations::TransitionType::FANWIPE, css::animations::TransitionSubType::CENTERTOP, true },
+ { "blinds(vertical)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::VERTICAL, true },
+ { "blinds(horizontal)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
+ { "fade", css::animations::TransitionType::FADE, css::animations::TransitionSubType::CROSSFADE, true },
+ { "slide(fromTop)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMTOP, true },
+ { "slide(fromRight)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMRIGHT, true },
+ { "slide(fromLeft)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMLEFT, true },
+ { "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true },
+ { "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true },
+ { "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO
+ { nullptr, 0, 0, false }
+ };
+
+ return aList;
+ }
+
+ const transition* transition::find( std::u16string_view rName )
+ {
+ const transition* p = transition::getList();
+
+ while( p->mpName )
+ {
+ if( o3tl::equalsAscii( rName, p->mpName ) )
+ return p;
+
+ p++;
+ }
+
+ return nullptr;
+ }
+
+ bool convertMeasure(OUString& rString)
+ {
+ bool bRet = false;
+
+ const char* pSource[] = { "ppt_x", "ppt_y", "ppt_w", "ppt_h", nullptr };
+ const char* pDest[] = { "x", "y", "width", "height", nullptr };
+
+ /* here we want to substitute all occurrences of
+ * [#]ppt_[xyhw] with
+ * x,y,height and width respectively
+ */
+ sal_Int32 nIndex = 0;
+
+ const char** ps = pSource;
+ const char** pd = pDest;
+
+ while (*ps)
+ {
+ const OUString aSearch(OUString::createFromAscii(*ps));
+ while ((nIndex = rString.indexOf(aSearch, nIndex)) != -1)
+ {
+ sal_Int32 nLength = aSearch.getLength();
+ if (nIndex && (rString[nIndex - 1] == '#'))
+ {
+ nIndex--;
+ nLength++;
+ }
+
+ const OUString aNew(OUString::createFromAscii(*pd));
+ rString = rString.replaceAt(nIndex, nLength, aNew);
+ nIndex += aNew.getLength();
+ bRet = true;
+ }
+ ps++;
+ pd++;
+ }
+
+ return bRet;
+ }
+
+ bool convertAnimationValue(AnimationAttributeEnum eAttribute, css::uno::Any& rValue)
+ {
+ using css::animations::ValuePair;
+ bool bRet = false;
+ switch (eAttribute)
+ {
+ case AnimationAttributeEnum::PPT_X:
+ case AnimationAttributeEnum::PPT_Y:
+ case AnimationAttributeEnum::PPT_W:
+ case AnimationAttributeEnum::PPT_H:
+ {
+ OUString aString;
+
+ if (rValue.getValueType() == cppu::UnoType<ValuePair>::get())
+ {
+ ValuePair aValuePair;
+ if (rValue >>= aValuePair)
+ {
+ if (aValuePair.First >>= aString)
+ {
+ if (convertMeasure(aString))
+ {
+ aValuePair.First <<= aString;
+ bRet = true;
+ }
+ }
+
+ if (aValuePair.Second >>= aString)
+ {
+ if (convertMeasure(aString))
+ {
+ aValuePair.Second <<= aString;
+ bRet = true;
+ }
+ }
+ }
+ }
+ else if (rValue.getValueType() == cppu::UnoType<OUString>::get())
+ {
+ if (rValue >>= aString)
+ {
+ bRet = convertMeasure(aString);
+
+ if (bRet)
+ rValue <<= aString;
+ }
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::XSHEAR:
+ case AnimationAttributeEnum::R:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString.toDouble();
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STYLEROTATION:
+ {
+ if (rValue.getValueType() == cppu::UnoType<OUString>::get())
+ {
+ OUString aString;
+ rValue >>= aString;
+ rValue <<= static_cast<sal_Int16>(aString.toDouble());
+ bRet = true;
+ }
+ else if (rValue.getValueType() == cppu::UnoType<double>::get())
+ {
+ double fValue = 0.0;
+ rValue >>= fValue;
+ rValue <<= static_cast<sal_Int16>(fValue);
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::FILLCOLOR:
+ case AnimationAttributeEnum::STROKECOLOR:
+ case AnimationAttributeEnum::STYLECOLOR:
+ case AnimationAttributeEnum::PPT_C:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ if (aString.getLength() >= 7 && aString[0] == '#')
+ {
+ Color aColor;
+ aColor.SetRed(static_cast<sal_uInt8>(lcl_gethex(aString[1]) * 16
+ + lcl_gethex(aString[2])));
+ aColor.SetGreen(static_cast<sal_uInt8>(lcl_gethex(aString[3]) * 16
+ + lcl_gethex(aString[4])));
+ aColor.SetBlue(static_cast<sal_uInt8>(lcl_gethex(aString[5]) * 16
+ + lcl_gethex(aString[6])));
+ rValue <<= aColor;
+ bRet = true;
+ }
+ else if (aString.startsWith("rgb("))
+ {
+ aString = aString.copy(4, aString.getLength() - 5);
+ Color aColor;
+ sal_Int32 index = 0;
+ aColor.SetRed(
+ static_cast<sal_uInt8>(o3tl::toInt32(o3tl::getToken(aString, 0, ',', index))));
+ aColor.SetGreen(
+ static_cast<sal_uInt8>(o3tl::toInt32(o3tl::getToken(aString, 0, ',', index))));
+ aColor.SetRed(
+ static_cast<sal_uInt8>(o3tl::toInt32(o3tl::getToken(aString, 0, ',', index))));
+ rValue <<= aColor;
+ bRet = true;
+ }
+ else if (aString.startsWith("hsl("))
+ {
+ sal_Int32 index = 0;
+ sal_Int32 nA = o3tl::toInt32(o3tl::getToken(aString, 0, ',', index));
+ sal_Int32 nB = o3tl::toInt32(o3tl::getToken(aString, 0, ',', index));
+ sal_Int32 nC = o3tl::toInt32(o3tl::getToken(aString, 0, ',', index));
+ css::uno::Sequence<double> aHSL
+ {
+ nA * 360.0 / 255.0,
+ nB / 255.0,
+ nC / 255.0
+ };
+ rValue <<= aHSL;
+ bRet = true;
+ }
+ }
+ }
+ break;
+ case AnimationAttributeEnum::FILLON:
+ {
+ // Slideshow doesn't support FillOn, but we need to convert the value type
+ // so it can be written out again.
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "true";
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::FILLTYPE:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "solid" ? css::drawing::FillStyle_SOLID
+ : css::drawing::FillStyle_NONE;
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STROKEON:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "true" ? css::drawing::LineStyle_SOLID
+ : css::drawing::LineStyle_NONE;
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::FONTWEIGHT:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "bold" ? css::awt::FontWeight::BOLD
+ : css::awt::FontWeight::NORMAL;
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STYLEFONTSTYLE:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue
+ <<= aString == "italic" ? css::awt::FontSlant_ITALIC : css::awt::FontSlant_NONE;
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STYLEUNDERLINE:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "true" ? css::awt::FontUnderline::SINGLE
+ : css::awt::FontUnderline::NONE;
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STYLEOPACITY:
+ case AnimationAttributeEnum::STYLEFONTSIZE:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= static_cast<float>(aString.toDouble());
+ bRet = true;
+ }
+ }
+ break;
+
+ case AnimationAttributeEnum::STYLEVISIBILITY:
+ {
+ OUString aString;
+ if (rValue >>= aString)
+ {
+ rValue <<= aString == "visible";
+ bRet = true;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return bRet;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
new file mode 100644
index 000000000..254f44809
--- /dev/null
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/pptgraphicshapecontext.hxx>
+#include <oox/ppt/pptshapepropertiescontext.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#include <drawingml/shapestylecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/token/properties.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+
+namespace oox::ppt {
+
+// CT_Shape
+PPTGraphicShapeContext::PPTGraphicShapeContext( ContextHandler2Helper const & rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
+: oox::drawingml::GraphicShapeContext( rParent, pMasterShapePtr, pShapePtr )
+, mpSlidePersistPtr( rSlidePersistPtr )
+{
+}
+
+ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ // nvSpPr CT_ShapeNonVisual begin
+// case NMSP_PPT|XML_drElemPr:
+// break;
+ case PPT_TOKEN(cNvPr):
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
+ break;
+ case PPT_TOKEN(ph):
+ {
+ sal_Int32 nSubType( rAttribs.getToken( XML_type, XML_obj ) );
+ mpShapePtr->setSubType( nSubType );
+ OUString sIdx( rAttribs.getString( XML_idx ).get() );
+ bool bHasIdx = !sIdx.isEmpty();
+ sal_Int32 nIdx = sIdx.toInt32();
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpShapePtr->setSubTypeIndex( nIdx );
+
+ if ( nSubType || bHasIdx )
+ {
+ PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
+ if ( pPPTShapePtr )
+ {
+ oox::ppt::ShapeLocation eShapeLocation = pPPTShapePtr->getShapeLocation();
+ oox::drawingml::ShapePtr pPlaceholder;
+
+ if ( bHasIdx && eShapeLocation == Slide )
+ {
+ // TODO: use id to shape map
+ SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
+ if ( pMasterPersist && rAttribs.hasAttribute( XML_idx ) )
+ pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
+ }
+ if ( !pPlaceholder && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
+ {
+ // inheriting properties from placeholder objects by cloning shape
+
+ sal_Int32 nFirstPlaceholder = 0;
+ sal_Int32 nSecondPlaceholder = 0;
+ switch( nSubType )
+ {
+ case XML_ctrTitle : // slide/layout
+ nFirstPlaceholder = XML_ctrTitle;
+ nSecondPlaceholder = XML_title;
+ break;
+ case XML_subTitle : // slide/layout
+ nFirstPlaceholder = XML_subTitle;
+ nSecondPlaceholder = XML_title;
+ break;
+ case XML_obj : // slide/layout
+ nFirstPlaceholder = XML_body;
+ break;
+ case XML_dt : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_sldNum : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_ftr : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_hdr : // notes/notesmaster/handoutmaster
+ case XML_body : // slide/layout/master/notes/notesmaster
+ case XML_title : // slide/layout/master/
+ case XML_chart : // slide/layout
+ case XML_tbl : // slide/layout
+ case XML_clipArt : // slide/layout
+ case XML_dgm : // slide/layout
+ case XML_media : // slide/layout
+ case XML_sldImg : // notes/notesmaster
+ case XML_pic : // slide/layout
+ nFirstPlaceholder = nSubType;
+ break;
+ default:
+ break;
+ }
+ if ( nFirstPlaceholder )
+ {
+ if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+ pPPTShapePtr->getSubTypeIndex(), mpSlidePersistPtr->getShapes()->getChildren(), true );
+ else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
+ {
+ SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
+ if ( pMasterPersist )
+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+ pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+ }
+ }
+ }
+ if ( pPlaceholder )
+ {
+ bool bUseText = true;
+ switch( pPlaceholder->getSubType() )
+ {
+ case XML_title :
+ case XML_body :
+ case XML_ctrTitle :
+ case XML_subTitle :
+ case XML_dt :
+ case XML_sldNum :
+ case XML_ftr :
+ case XML_hdr :
+ case XML_obj :
+ case XML_chart :
+ case XML_tbl :
+ case XML_clipArt :
+ case XML_dgm :
+ case XML_media :
+ case XML_sldImg :
+ case XML_pic :
+ bUseText = false;
+ }
+ pPlaceholder->getShapeProperties().setAnyProperty(
+ PROP_URL, mpShapePtr->getShapeProperties().getProperty(PROP_URL));
+ mpShapePtr->applyShapeReference( *pPlaceholder, bUseText );
+ PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
+ if ( pPPTShape )
+ pPPTShape->setReferenced( true );
+ pPPTShapePtr->setPlaceholder( pPlaceholder );
+ }
+ }
+ }
+ break;
+ }
+ // nvSpPr CT_ShapeNonVisual end
+
+ case PPT_TOKEN(spPr):
+ return new PPTShapePropertiesContext( *this, *mpShapePtr );
+
+ case PPT_TOKEN(style):
+ return new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
+
+ case PPT_TOKEN(txBody):
+ {
+ oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>();
+ mpShapePtr->setTextBody( xTextBody );
+ return new oox::drawingml::TextBodyContext( *this, *xTextBody );
+ }
+ }
+
+ return GraphicShapeContext::onCreateContext( aElementToken, rAttribs );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
new file mode 100644
index 000000000..55e094db6
--- /dev/null
+++ b/oox/source/ppt/pptimport.cxx
@@ -0,0 +1,309 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_wasm_strip.h>
+
+#include <sal/config.h>
+#include <sal/log.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/document/XUndoManager.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
+#include <svtools/sfxecode.hxx>
+#include <svtools/ehdl.hxx>
+#include <tools/urlobj.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/strings.hrc>
+#include <oox/ppt/pptimport.hxx>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <oox/dump/pptxdumper.hxx>
+#include <drawingml/table/tablestylelistfragmenthandler.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/ole/vbaproject.hxx>
+#include <oox/ppt/presentationfragmenthandler.hxx>
+#include <oox/ppt/presPropsfragmenthandler.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace oox::core;
+
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::lang::XComponent;
+
+namespace oox::ppt {
+
+#if OSL_DEBUG_LEVEL > 0
+XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr;
+#endif
+
+PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) :
+ XmlFilterBase( rxContext ),
+#if ENABLE_WASM_STRIP_CHART
+ // WASM_CHART change
+ mxChartConv( )
+#else
+ mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
+#endif
+{
+#if OSL_DEBUG_LEVEL > 0
+ mpDebugFilterBase = this;
+#endif
+}
+
+PowerPointImport::~PowerPointImport()
+{
+}
+
+bool PowerPointImport::importDocument()
+{
+ /* to activate the PPTX dumper, define the environment variable
+ OOO_PPTXDUMPER and insert the full path to the file
+ file:///<path-to-oox-module>/source/dump/pptxdumper.ini. */
+ OOX_DUMP_FILE( ::oox::dump::pptx::Dumper );
+
+ uno::Reference< document::XUndoManagerSupplier > xUndoManagerSupplier (getModel(), UNO_QUERY );
+ uno::Reference< util::XLockable > xUndoManager;
+ bool bWasUnLocked = true;
+ if(xUndoManagerSupplier.is())
+ {
+ xUndoManager = xUndoManagerSupplier->getUndoManager();
+ if(xUndoManager.is())
+ {
+ bWasUnLocked = !xUndoManager->isLocked();
+ xUndoManager->lock();
+ }
+ }
+
+ importDocumentProperties();
+
+ OUString aFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
+ FragmentHandlerRef xPresentationFragmentHandler( new PresentationFragmentHandler( *this, aFragmentPath ) );
+ maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"tableStyles" );
+ const OUString sPresPropsPath
+ = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc(u"presProps");
+
+ bool bRet = importFragment(xPresentationFragmentHandler);
+ if (bRet && !sPresPropsPath.isEmpty())
+ {
+ FragmentHandlerRef xPresPropsFragmentHandler(
+ new PresPropsFragmentHandler(*this, sPresPropsPath));
+ importFragment(xPresPropsFragmentHandler);
+ }
+
+ static bool bNoSmartartWarning = getenv("OOX_NO_SMARTART_WARNING");
+ if (!bNoSmartartWarning && mbMissingExtDrawing)
+ {
+ // Construct a warning message.
+ INetURLObject aURL(getFileUrl());
+ SfxErrorContext aContext(ERRCTX_SFX_OPENDOC, aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset), nullptr, RID_ERRCTX);
+ OUString aWarning;
+ aContext.GetString(ERRCODE_NONE.MakeWarning(), aWarning);
+ aWarning += ":\n" + SvxResId(RID_SVXSTR_WARN_MISSING_SMARTART);
+
+ // Show it.
+ std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Warning, VclButtonsType::Ok,
+ aWarning));
+ xWarn->run();
+ }
+
+ if(xUndoManager.is() && bWasUnLocked)
+ xUndoManager->unlock();
+
+ return bRet;
+
+}
+
+bool PowerPointImport::exportDocument() noexcept
+{
+ return false;
+}
+
+::Color PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
+{
+ ::Color nColor;
+ if ( mpActualSlidePersist )
+ {
+ bool bColorMapped = false;
+ oox::drawingml::ClrMapPtr pClrMapPtr( mpActualSlidePersist->getClrMap() );
+ if ( pClrMapPtr )
+ bColorMapped = pClrMapPtr->getColorMap( nToken );
+
+ if ( !bColorMapped ) // try masterpage mapping
+ {
+ SlidePersistPtr pMasterPersist = mpActualSlidePersist->getMasterPersist();
+ if ( pMasterPersist )
+ {
+ pClrMapPtr = pMasterPersist->getClrMap();
+ if ( pClrMapPtr )
+ pClrMapPtr->getColorMap( nToken );
+ }
+ }
+
+ ::oox::drawingml::ThemePtr pTheme = mpActualSlidePersist->getTheme();
+ if( pTheme )
+ {
+ pTheme->getClrScheme().getColor( nToken, nColor );
+ }
+ else
+ {
+ SAL_WARN("oox", "OOX: PowerPointImport::mpThemePtr is NULL");
+ }
+ }
+ return nColor;
+}
+
+const ::oox::drawingml::Theme* PowerPointImport::getCurrentTheme() const
+{
+ return mpActualSlidePersist ? mpActualSlidePersist->getTheme().get() : nullptr;
+}
+
+std::shared_ptr<::oox::drawingml::Theme> PowerPointImport::getCurrentThemePtr() const
+{
+ return mpActualSlidePersist ? mpActualSlidePersist->getTheme() : std::shared_ptr<::oox::drawingml::Theme>();
+}
+
+sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDescriptor )
+{
+ if( XmlFilterBase::filter( rDescriptor ) )
+ return true;
+
+ if (isExportFilter())
+ {
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {"IsPPTM", uno::Any(exportVBA())},
+ {"IsTemplate", uno::Any(isExportTemplate())},
+ }));
+
+ Reference<css::lang::XMultiServiceFactory> aFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW);
+ Reference< XExporter > xExporter(aFactory->createInstanceWithArguments("com.sun.star.comp.Impress.oox.PowerPointExport", aArguments), UNO_QUERY);
+
+ if (Reference<XFilter> xFilter{ xExporter, UNO_QUERY })
+ {
+ Reference<util::XLockable> xUndoManager;
+ bool bWasUnLocked = true;
+ if (Reference<document::XUndoManagerSupplier> xUMS{ getModel(), UNO_QUERY })
+ {
+ xUndoManager = xUMS->getUndoManager();
+ if (xUndoManager.is())
+ {
+ bWasUnLocked = !xUndoManager->isLocked();
+ xUndoManager->lock();
+ }
+ }
+ comphelper::ScopeGuard aGuard([xUndoManager, bWasUnLocked] {
+ if (xUndoManager && bWasUnLocked)
+ xUndoManager->unlock();
+ });
+
+ Reference< XComponent > xDocument = getModel();
+ xExporter->setSourceDocument(xDocument);
+ if (xFilter->filter(rDescriptor))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+::oox::vml::Drawing* PowerPointImport::getVmlDrawing()
+{
+ return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : nullptr;
+}
+
+oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles()
+{
+ if ( !mpTableStyleList && !maTableStyleListPath.isEmpty() )
+ {
+ mpTableStyleList = std::make_shared<oox::drawingml::table::TableStyleList>( );
+ importFragment( new oox::drawingml::table::TableStyleListFragmentHandler(
+ *this, maTableStyleListPath, *mpTableStyleList ) );
+ }
+ return mpTableStyleList;
+}
+
+::oox::drawingml::chart::ChartConverter* PowerPointImport::getChartConverter()
+{
+ return mxChartConv.get();
+}
+
+namespace {
+
+class PptGraphicHelper : public GraphicHelper
+{
+public:
+ explicit PptGraphicHelper( const PowerPointImport& rFilter );
+ virtual ::Color getSchemeColor( sal_Int32 nToken ) const override;
+ virtual sal_Int32 getDefaultChartAreaFillStyle() const override;
+private:
+ const PowerPointImport& mrFilter;
+};
+
+PptGraphicHelper::PptGraphicHelper( const PowerPointImport& rFilter ) :
+ GraphicHelper( rFilter.getComponentContext(), rFilter.getTargetFrame(), rFilter.getStorage() ),
+ mrFilter( rFilter )
+{
+}
+
+::Color PptGraphicHelper::getSchemeColor( sal_Int32 nToken ) const
+{
+ return mrFilter.getSchemeColor( nToken );
+}
+
+sal_Int32 PptGraphicHelper::getDefaultChartAreaFillStyle() const
+{
+ return XML_noFill;
+}
+
+} // namespace
+
+GraphicHelper* PowerPointImport::implCreateGraphicHelper() const
+{
+ return new PptGraphicHelper( *this );
+}
+
+::oox::ole::VbaProject* PowerPointImport::implCreateVbaProject() const
+{
+ return new ::oox::ole::VbaProject( getComponentContext(), getModel(), u"Impress" );
+}
+
+OUString PowerPointImport::getImplementationName()
+{
+ return "com.sun.star.comp.oox.ppt.PowerPointImport";
+}
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::ppt::PowerPointImport(pCtx));
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
new file mode 100644
index 000000000..2ec4a3fbe
--- /dev/null
+++ b/oox/source/ppt/pptshape.cxx
@@ -0,0 +1,809 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/pptshape.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textfield.hxx>
+#include <editeng/flditem.hxx>
+
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/presentation/ClickAction.hpp>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <sal/log.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/token/properties.hxx>
+#include <o3tl/string_view.hxx>
+
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::presentation;
+
+namespace oox::ppt {
+
+PPTShape::PPTShape( const oox::ppt::ShapeLocation eShapeLocation, const char* pServiceName )
+: Shape( pServiceName )
+, meShapeLocation( eShapeLocation )
+, mbReferenced( false )
+, mbHasNoninheritedShapeProperties( false )
+{
+}
+
+PPTShape::~PPTShape()
+{
+}
+
+static const char* lclDebugSubType( sal_Int32 nType )
+{
+ switch (nType) {
+ case XML_ctrTitle :
+ return "ctrTitle";
+ case XML_title :
+ return "title";
+ case XML_subTitle :
+ return "subTitle";
+ case XML_obj :
+ return "obj";
+ case XML_body :
+ return "body";
+ case XML_dt :
+ return "dt";
+ case XML_hdr :
+ return "hdr";
+ case XML_ftr :
+ return "frt";
+ case XML_sldNum :
+ return "sldNum";
+ case XML_sldImg :
+ return "sldImg";
+ }
+
+ return "unknown - please extend lclDebugSubType";
+}
+
+namespace
+{
+bool ShapeHasNoVisualPropertiesOnImport(const oox::ppt::PPTShape& rPPTShape)
+{
+ return !rPPTShape.hasNonInheritedShapeProperties()
+ && !rPPTShape.hasShapeStyleRefs()
+ && !rPPTShape.getTextBody()->hasVisualRunProperties()
+ && !rPPTShape.getTextBody()->hasNoninheritedBodyProperties()
+ && !rPPTShape.getTextBody()->hasListStyleOnImport()
+ && !rPPTShape.getTextBody()->hasParagraphProperties();
+}
+}
+
+oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlidePersist& rSlidePersist, sal_Int32 nSubType )
+{
+ oox::drawingml::TextListStylePtr pTextListStyle;
+
+ SAL_INFO("oox.ppt", "subtype style: " << lclDebugSubType( nSubType ) );
+
+ switch( nSubType )
+ {
+ case XML_ctrTitle :
+ case XML_title :
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
+ break;
+ case XML_subTitle :
+ case XML_obj :
+ case XML_body :
+ if ( rSlidePersist.isNotesPage() )
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
+ else
+ pTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ break;
+ }
+
+ return pTextListStyle;
+}
+
+bool PPTShape::IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const
+{
+ if (meShapeLocation != Slide)
+ return false;
+ if (rSlidePersist.isNotesPage())
+ return false;
+ auto pTextBody = getTextBody();
+ if (!pTextBody)
+ return false;
+ auto rParagraphs = pTextBody->getParagraphs();
+ if (rParagraphs.size() != 1)
+ return false;
+ if (rParagraphs.front()->getRuns().size() != 1)
+ return false;
+ // If the placeholder has a shape other than rectangle,
+ // we have to place it in the slide as a CustomShape.
+ if (!mpCustomShapePropertiesPtr->representsDefaultShape())
+ return false;
+ return ShapeHasNoVisualPropertiesOnImport(*this);
+}
+
+void PPTShape::addShape(
+ oox::core::XmlFilterBase& rFilterBase,
+ const SlidePersist& rSlidePersist,
+ const oox::drawingml::Theme* pTheme,
+ const Reference< XShapes >& rxShapes,
+ basegfx::B2DHomMatrix& aTransformation,
+ ::oox::drawingml::ShapeIdMap* pShapeMap )
+{
+ SAL_INFO("oox.ppt","add shape id: " << msId << " location: " << ((meShapeLocation == Master) ? "master" : ((meShapeLocation == Slide) ? "slide" : ((meShapeLocation == Layout) ? "layout" : "other"))) << " subtype: " << mnSubType << " service: " << msServiceName);
+ // only placeholder from layout are being inserted
+ if ( mnSubType && ( meShapeLocation == Master ) )
+ return;
+
+ OUString sServiceName( msServiceName );
+ if (sServiceName.isEmpty())
+ return;
+ try
+ {
+ oox::drawingml::TextListStylePtr aMasterTextListStyle;
+ Reference<lang::XMultiServiceFactory> xServiceFact(rFilterBase.getModel(), UNO_QUERY_THROW);
+ bool bClearText = false;
+
+ if (sServiceName != "com.sun.star.drawing.GraphicObjectShape" &&
+ sServiceName != "com.sun.star.drawing.OLE2Shape")
+ {
+ static const OUStringLiteral sOutlinerShapeService(u"com.sun.star.presentation.OutlinerShape");
+ SAL_INFO("oox.ppt","has master: " << std::hex << rSlidePersist.getMasterPersist().get());
+ switch (mnSubType)
+ {
+ case XML_ctrTitle :
+ case XML_title :
+ {
+ sServiceName = "com.sun.star.presentation.TitleTextShape";
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
+ }
+ break;
+ case XML_subTitle :
+ {
+ if ((meShapeLocation == Master) || (meShapeLocation == Layout))
+ sServiceName = OUString();
+ else {
+ sServiceName = "com.sun.star.presentation.SubtitleShape";
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ }
+ }
+ break;
+ case XML_obj :
+ {
+ sServiceName = sOutlinerShapeService;
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ }
+ break;
+ case XML_body :
+ {
+ if (rSlidePersist.isNotesPage())
+ {
+ sServiceName = "com.sun.star.presentation.NotesShape";
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getNotesTextStyle() : rSlidePersist.getNotesTextStyle();
+ }
+ else
+ {
+ sServiceName = sOutlinerShapeService;
+ aMasterTextListStyle = rSlidePersist.getMasterPersist() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle();
+ }
+ }
+ break;
+ case XML_dt :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front();
+ oox::drawingml::TextField* pTextField = dynamic_cast<oox::drawingml::TextField*>(pTextRun.get());
+ if (pTextField)
+ {
+ OUString aType = pTextField->getType();
+ if ( aType.startsWith("datetime") )
+ {
+ SvxDateFormat eDateFormat = drawingml::TextField::getLODateFormat(aType);
+ SvxTimeFormat eTimeFormat = drawingml::TextField::getLOTimeFormat(aType);
+ Reference< XPropertySet > xPropertySet( rSlidePersist.getPage(), UNO_QUERY );
+
+ if( eDateFormat != SvxDateFormat::AppDefault
+ || eTimeFormat != SvxTimeFormat::AppDefault )
+ {
+ // DateTimeFormat property looks for the date in 4 LSBs
+ // and looks for time format in the 4 bits after that
+ sal_Int32 nDateTimeFormat = static_cast<sal_Int32>(eDateFormat) |
+ static_cast<sal_Int32>(eTimeFormat) << 4;
+ xPropertySet->setPropertyValue( "IsDateTimeVisible", Any(true) );
+ xPropertySet->setPropertyValue( "IsDateTimeFixed", Any(false) );
+ xPropertySet->setPropertyValue( "DateTimeFormat", Any(nDateTimeFormat) );
+ return;
+ }
+ }
+ }
+ }
+ sServiceName = "com.sun.star.presentation.DateTimeShape";
+ bClearText = true;
+ break;
+ case XML_hdr :
+ sServiceName = "com.sun.star.presentation.HeaderShape";
+ bClearText = true;
+ break;
+ case XML_ftr :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ const OUString& rFooterText = getTextBody()->toString();
+
+ if( !rFooterText.isEmpty() )
+ {
+ // if it is possible to get the footer as a property the LO way,
+ // get it and discard the shape
+ Reference< XPropertySet > xPropertySet( rSlidePersist.getPage(), UNO_QUERY );
+ xPropertySet->setPropertyValue( "IsFooterVisible", Any( true ) );
+ xPropertySet->setPropertyValue( "FooterText", Any(rFooterText) );
+ return;
+ }
+ }
+ sServiceName = "com.sun.star.presentation.FooterShape";
+ bClearText = true;
+ break;
+ case XML_sldNum :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ TextRunPtr& pTextRun
+ = getTextBody()->getParagraphs().front()->getRuns().front();
+ oox::drawingml::TextField* pTextField
+ = dynamic_cast<oox::drawingml::TextField*>(pTextRun.get());
+ if (pTextField && pTextField->getType() == "slidenum")
+ {
+ // if it is possible to get the slidenum placeholder as a property
+ // do that and discard the shape
+ Reference<XPropertySet> xPropertySet(rSlidePersist.getPage(),
+ UNO_QUERY);
+ xPropertySet->setPropertyValue("IsPageNumberVisible", Any(true));
+ return;
+ }
+ }
+ sServiceName = "com.sun.star.presentation.SlideNumberShape";
+ bClearText = true;
+ break;
+ case XML_sldImg :
+ sServiceName = "com.sun.star.presentation.PageShape";
+ break;
+ case XML_chart :
+ if (meShapeLocation == Layout)
+ sServiceName = sOutlinerShapeService;
+ else
+ sServiceName = "com.sun.star.presentation.ChartShape";
+ break;
+ case XML_tbl :
+ if (meShapeLocation == Layout)
+ sServiceName = sOutlinerShapeService;
+ else
+ sServiceName = "com.sun.star.presentation.TableShape";
+ break;
+ case XML_pic :
+ if (meShapeLocation == Layout)
+ sServiceName = sOutlinerShapeService;
+ else
+ sServiceName = "com.sun.star.presentation.GraphicObjectShape";
+ break;
+ case XML_media :
+ if (meShapeLocation == Layout)
+ sServiceName = sOutlinerShapeService;
+ else
+ sServiceName = "com.sun.star.presentation.MediaShape";
+ break;
+ default:
+ if (mnSubType && meShapeLocation == Layout)
+ sServiceName = sOutlinerShapeService;
+ break;
+ }
+ }
+
+ // Since it is not possible to represent custom shaped placeholders in Impress
+ // Need to use service name css.drawing.CustomShape if they have a non default shape.
+ // This workaround has the drawback of them not really being processed as placeholders
+ // so it is only done for slide footers...
+ if ((mnSubType == XML_sldNum || mnSubType == XML_dt || mnSubType == XML_ftr)
+ && meShapeLocation == Slide && !mpCustomShapePropertiesPtr->representsDefaultShape())
+ {
+ sServiceName = "com.sun.star.drawing.CustomShape";
+ }
+
+ SAL_INFO("oox.ppt","shape service: " << sServiceName);
+
+ if (mnSubType && getSubTypeIndex().has() && meShapeLocation == Layout)
+ {
+ oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex().get(), rSlidePersist.getShapes()->getChildren(), true );
+ if (!pPlaceholder)
+ pPlaceholder = PPTShape::findPlaceholder( mnSubType, 0, getSubTypeIndex(), rSlidePersist.getShapes()->getChildren(), true );
+
+ if (pPlaceholder) {
+ if (maSize.Width == 0 || maSize.Height == 0) {
+ awt::Size aSize = maSize;
+ if (maSize.Width == 0)
+ aSize.Width = pPlaceholder->getSize().Width;
+ if (maSize.Height == 0)
+ aSize.Height = pPlaceholder->getSize().Height;
+ setSize( aSize );
+ if (maPosition.X == 0 || maPosition.Y == 0) {
+ awt::Point aPosition = maPosition;
+ if (maPosition.X == 0)
+ aPosition.X = pPlaceholder->getPosition().X;
+ if (maPosition.Y == 0)
+ aPosition.Y = pPlaceholder->getPosition().Y;
+ setPosition( aPosition );
+ }
+ }
+ }
+ }
+
+ // use placeholder index if possible
+ if (mnSubType && getSubTypeIndex().has() && rSlidePersist.getMasterPersist())
+ {
+ oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex(getSubTypeIndex().get(), rSlidePersist.getMasterPersist()->getShapes()->getChildren());
+ // TODO: Check if this is required for non-notes slides as well...
+ if (rSlidePersist.isNotesPage() && pPlaceholder && pPlaceholder->getSubType() != getSubType())
+ pPlaceholder.reset();
+
+ if (pPlaceholder) {
+ SAL_INFO("oox.ppt","found placeholder with index: " << getSubTypeIndex().get() << " and type: " << lclDebugSubType( mnSubType ));
+ PPTShape* pPPTPlaceholder = dynamic_cast< PPTShape* >( pPlaceholder.get() );
+ TextListStylePtr pNewTextListStyle = std::make_shared<TextListStyle>();
+
+ if (pPlaceholder->getTextBody()) {
+
+ pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() );
+ if (pPlaceholder->getMasterTextListStyle())
+ pNewTextListStyle->apply( *pPlaceholder->getMasterTextListStyle() );
+
+ // SAL_INFO("oox.ppt","placeholder body style");
+ // pPlaceholder->getTextBody()->getTextListStyle().dump();
+ // SAL_INFO("oox.ppt","master text list style");
+ // pPlaceholder->getMasterTextListStyle()->dump();
+
+ aMasterTextListStyle = pNewTextListStyle;
+ // SAL_INFO("oox.ppt","combined master text list style");
+ // aMasterTextListStyle->dump();
+ }
+ if (pPPTPlaceholder && pPPTPlaceholder->mpPlaceholder) {
+ SAL_INFO("oox.ppt","placeholder has parent placeholder: " << pPPTPlaceholder->mpPlaceholder->getId() << " type: " << lclDebugSubType( pPPTPlaceholder->mpPlaceholder->getSubType() ) << " index: " << pPPTPlaceholder->mpPlaceholder->getSubTypeIndex().get() );
+ SAL_INFO("oox.ppt","has textbody " << (pPPTPlaceholder->mpPlaceholder->getTextBody() != nullptr) );
+ TextListStylePtr pPlaceholderStyle = getSubTypeTextListStyle( rSlidePersist, pPPTPlaceholder->mpPlaceholder->getSubType() );
+ if (pPPTPlaceholder->mpPlaceholder->getTextBody())
+ pNewTextListStyle->apply( pPPTPlaceholder->mpPlaceholder->getTextBody()->getTextListStyle() );
+ if (pPlaceholderStyle) {
+ pNewTextListStyle->apply( *pPlaceholderStyle );
+ //pPlaceholderStyle->dump();
+ }
+ }
+ } else if (!mpPlaceholder) {
+ aMasterTextListStyle.reset();
+ }
+ SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder ? pPlaceholder->getId() : "not found"));
+ }
+
+ if (!sServiceName.isEmpty())
+ {
+ if (!aMasterTextListStyle)
+ {
+ bool isOther = !getTextBody() && sServiceName != "com.sun.star.drawing.GroupShape";
+ TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle();
+ // Combine from MasterSlide details as well.
+ if (rSlidePersist.getMasterPersist())
+ {
+ aMasterTextListStyle = isOther ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getMasterPersist()->getDefaultTextStyle();
+ if (aSlideStyle)
+ aMasterTextListStyle->apply( *aSlideStyle );
+ }
+ else
+ {
+ aMasterTextListStyle = aSlideStyle;
+ }
+ }
+
+ if( aMasterTextListStyle && getTextBody() ) {
+ TextListStylePtr aCombinedTextListStyle = std::make_shared<TextListStyle>();
+
+ aCombinedTextListStyle->apply( *aMasterTextListStyle );
+
+ if( mpPlaceholder && mpPlaceholder->getTextBody() )
+ aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() );
+ aCombinedTextListStyle->apply( getTextBody()->getTextListStyle() );
+
+ setMasterTextListStyle( aCombinedTextListStyle );
+ } else
+ setMasterTextListStyle( aMasterTextListStyle );
+
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, bool(mpPlaceholder), aTransformation, getFillProperties() ) );
+ // if exists and not duplicated, try to use the title text as slide name to help its re-use on UI
+ if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && (mnSubType == XML_title || mnSubType == XML_ctrTitle))
+ {
+ try
+ {
+ sal_Int32 nCount = 1;
+ OUString aTitleText;
+ Reference<XTextRange> xText(xShape, UNO_QUERY_THROW);
+ aTitleText = xText->getString();
+ Reference<drawing::XDrawPagesSupplier> xDPS(rFilterBase.getModel(), uno::UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW);
+ sal_uInt32 nMaxPages = xDrawPages->getCount();
+ // just a magic value but we don't want to drop out slide names which are too long
+ if (aTitleText.getLength() > 63)
+ aTitleText = aTitleText.copy(0, 63);
+ bool bUseTitleAsSlideName = !aTitleText.isEmpty();
+ // check duplicated title name
+ if (bUseTitleAsSlideName)
+ {
+ for (sal_uInt32 nPage = 0; nPage < nMaxPages; ++nPage)
+ {
+ Reference<XDrawPage> xDrawPage(xDrawPages->getByIndex(nPage), uno::UNO_QUERY);
+ Reference<container::XNamed> xNamed(xDrawPage, UNO_QUERY_THROW);
+ OUString sRest;
+ if (xNamed->getName().startsWith(aTitleText, &sRest)
+ && (sRest.isEmpty()
+ || (sRest.startsWith(" (") && sRest.endsWith(")")
+ && o3tl::toInt32(sRest.subView(2, sRest.getLength() - 3)) > 0)))
+ nCount++;
+ }
+ Reference<container::XNamed> xName(rSlidePersist.getPage(), UNO_QUERY_THROW);
+ xName->setName(
+ aTitleText
+ + (nCount == 1 ? OUString("") : " (" + OUString::number(nCount) + ")"));
+ }
+ }
+ catch (uno::Exception&)
+ {
+
+ }
+ }
+
+ // Apply text properties on placeholder text inside this placeholder shape
+ if (meShapeLocation == Slide && mpPlaceholder && getTextBody() && getTextBody()->isEmpty())
+ {
+ Reference < XText > xText(mxShape, UNO_QUERY);
+ if (xText.is())
+ {
+ TextCharacterProperties aCharStyleProperties;
+ getTextBody()->ApplyStyleEmpty(rFilterBase, xText, aCharStyleProperties, mpMasterTextListStyle);
+ }
+ }
+ if (pShapeMap)
+ {
+ // bnc#705982 - if optional model id reference is
+ // there, use that to obtain target shape
+ if (!msModelId.isEmpty())
+ {
+ (*pShapeMap)[ msModelId ] = shared_from_this();
+ }
+ else if (!msId.isEmpty())
+ {
+ (*pShapeMap)[ msId ] = shared_from_this();
+ }
+ }
+
+ // we will be losing whatever information there is in the footer placeholder on master/layout slides
+ // since they should have the "<footer>" textfield in them in order to make LibreOffice process them as expected
+ // likewise DateTime placeholder data on master/layout slides will be lost and replaced
+ if( (mnSubType == XML_ftr || mnSubType == XML_dt) && meShapeLocation != Slide )
+ {
+ OUString aFieldType;
+ if( mnSubType == XML_ftr )
+ aFieldType = "com.sun.star.presentation.TextField.Footer";
+ else
+ aFieldType = "com.sun.star.presentation.TextField.DateTime";
+ Reference < XTextField > xField( xServiceFact->createInstance( aFieldType ), UNO_QUERY );
+ Reference < XText > xText(mxShape, UNO_QUERY);
+ if(xText.is())
+ {
+ xText->setString("");
+ Reference < XTextCursor > xTextCursor = xText->createTextCursor();
+ xText->insertTextContent( xTextCursor, xField, false);
+ }
+ }
+
+ OUString sURL;
+ std::vector<std::pair<OUString, Reference<XShape>>> aURLShapes;
+ // if this is a group shape, we have to add also each child shape
+ Reference<XShapes> xShapes(xShape, UNO_QUERY);
+ if (xShapes.is())
+ {
+ // temporarily remember setting
+ NamedShapePairs* pDiagramFontHeights(rFilterBase.getDiagramFontHeights());
+
+ // for shapes unequal to FRAMETYPE_DIAGRAM do
+ // disable DiagramFontHeights recording
+ if (meFrameType != FRAMETYPE_DIAGRAM)
+ rFilterBase.setDiagramFontHeights(nullptr);
+
+ addChildren( rFilterBase, *this, pTheme, xShapes, pShapeMap, aTransformation );
+
+ // restore remembered setting
+ rFilterBase.setDiagramFontHeights(pDiagramFontHeights);
+
+ for (size_t i = 0; i < this->getChildren().size(); i++)
+ {
+ this->getChildren()[i]->getShapeProperties().getProperty(PROP_URL) >>= sURL;
+ if (!sURL.isEmpty())
+ {
+ Reference<XShape> xChild = this->getChildren()[i]->getXShape();
+ aURLShapes.push_back({ sURL, xChild });
+ }
+ }
+ }
+
+ if (meFrameType == FRAMETYPE_DIAGRAM)
+ {
+ keepDiagramCompatibilityInfo();
+ }
+
+ // Support advanced DiagramHelper
+ if (FRAMETYPE_DIAGRAM == meFrameType)
+ {
+ propagateDiagramHelper();
+ }
+
+ getShapeProperties().getProperty(PROP_URL) >>= sURL;
+ if (!sURL.isEmpty() && !xShapes.is())
+ aURLShapes.push_back({ sURL, xShape });
+
+ if (!aURLShapes.empty())
+ {
+ for (auto const& URLShape : aURLShapes)
+ {
+ Reference<XEventsSupplier> xEventsSupplier(URLShape.second, UNO_QUERY);
+ if (!xEventsSupplier.is())
+ return;
+
+ Reference<XNameReplace> xEvents(xEventsSupplier->getEvents());
+ if (!xEvents.is())
+ return;
+
+ OUString sAPIEventName;
+ sal_Int32 nPropertyCount = 2;
+ css::presentation::ClickAction meClickAction;
+ uno::Sequence<beans::PropertyValue> aProperties;
+
+ std::map<OUString, css::presentation::ClickAction> ActionMap = {
+ { "#action?jump=nextslide", ClickAction_NEXTPAGE },
+ { "#action?jump=previousslide", ClickAction_PREVPAGE },
+ { "#action?jump=firstslide", ClickAction_FIRSTPAGE },
+ { "#action?jump=lastslide", ClickAction_LASTPAGE },
+ { "#action?jump=endshow", ClickAction_STOPPRESENTATION },
+ };
+
+ sURL = URLShape.first;
+ std::map<OUString, css::presentation::ClickAction>::const_iterator aIt
+ = ActionMap.find(sURL);
+ aIt != ActionMap.end() ? meClickAction = aIt->second
+ : meClickAction = ClickAction_BOOKMARK;
+
+ // ClickAction_BOOKMARK and ClickAction_DOCUMENT share the same event
+ // so check here if it's a bookmark or a document
+ if (meClickAction == ClickAction_BOOKMARK)
+ {
+ sal_Int32 nSplitPos;
+ if (!sURL.startsWith("#"))
+ meClickAction = ClickAction_DOCUMENT;
+ else if (-1 != (nSplitPos = sURL.indexOf( ' ' )))
+ {
+ setBookmark(true);
+ // reuse slide number from '#Slide [Num]' or "#Notes [Num]"
+ sURL = OUString::Concat("#page") + sURL.subView(nSplitPos);
+ }
+ nPropertyCount += 1;
+ }
+
+ aProperties.realloc(nPropertyCount);
+ beans::PropertyValue* pProperties = aProperties.getArray();
+
+ pProperties->Name = "EventType";
+ pProperties->Handle = -1;
+ pProperties->Value <<= OUString("Presentation");
+ pProperties->State = beans::PropertyState_DIRECT_VALUE;
+ pProperties++;
+
+ pProperties->Name = "ClickAction";
+ pProperties->Handle = -1;
+ pProperties->Value <<= meClickAction;
+ pProperties->State = beans::PropertyState_DIRECT_VALUE;
+ pProperties++;
+
+ switch (meClickAction)
+ {
+ case ClickAction_BOOKMARK:
+ case ClickAction_DOCUMENT:
+ pProperties->Name = "Bookmark";
+ pProperties->Handle = -1;
+ pProperties->Value <<= sURL;
+ pProperties->State = beans::PropertyState_DIRECT_VALUE;
+ break;
+ default:
+ break;
+ }
+
+ sAPIEventName = "OnClick";
+ xEvents->replaceByName(sAPIEventName, uno::Any(aProperties));
+ }
+ }
+ }
+ }
+ catch (const Exception&)
+ {
+ }
+}
+
+namespace
+{
+ bool ShapeLocationIsMaster(oox::drawingml::Shape *pInShape)
+ {
+ PPTShape* pShape = dynamic_cast<PPTShape*>(pInShape);
+ return pShape && pShape->getShapeLocation() == Master;
+ }
+}
+
+// Function to find placeholder (ph) for a shape. No idea how MSO implements this, but
+// this order seems to work quite well
+// (probably it's unnecessary complicated / wrong. i.e. tdf#104202):
+// 1. ph with nFirstSubType and the same oSubTypeIndex
+// 2. ph with nFirstSubType
+// 3. ph with nSecondSubType and the same oSubTypeIndex
+// 4. ph with nSecondSubType
+// 5. ph with the same oSubTypeIndex
+
+oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal_Int32 nSecondSubType,
+ const OptValue< sal_Int32 >& oSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly )
+{
+ class Placeholders
+ {
+ public:
+ Placeholders()
+ : aChoice(5) // resize to 5
+ {
+ }
+
+ void add(const oox::drawingml::ShapePtr& aShape, sal_Int32 nFirstSubType, sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex)
+ {
+ if (!aShape)
+ return;
+
+ // get flags
+ const bool bSameFirstSubType = aShape->getSubType() == nFirstSubType;
+ const bool bSameSecondSubType = aShape->getSubType() == nSecondSubType;
+ const bool bSameIndex = aShape->getSubTypeIndex() == oSubTypeIndex;
+
+ // get prio
+ int aPrioIndex = -1;
+ if (bSameIndex && bSameFirstSubType)
+ aPrioIndex = 0;
+ else if (!bSameIndex && bSameFirstSubType)
+ aPrioIndex = 1;
+ else if (bSameIndex && bSameSecondSubType)
+ aPrioIndex = 2;
+ else if (!bSameIndex && bSameSecondSubType)
+ aPrioIndex = 3;
+ else if (bSameIndex)
+ aPrioIndex = 4;
+
+ // add
+ if (aPrioIndex != -1)
+ {
+ if (!aChoice.at(aPrioIndex))
+ {
+ aChoice.at(aPrioIndex) = aShape;
+ }
+ }
+ }
+
+ // return according to prio
+ oox::drawingml::ShapePtr getByPrio() const
+ {
+ for (const oox::drawingml::ShapePtr& aShape : aChoice)
+ {
+ if (aShape)
+ {
+ return aShape;
+ }
+ }
+
+ return oox::drawingml::ShapePtr();
+ }
+
+ bool hasByPrio(size_t aIndex) const
+ {
+ return bool(aChoice.at(aIndex));
+ }
+
+ private:
+ std::vector< oox::drawingml::ShapePtr > aChoice;
+
+ } aPlaceholders;
+
+ // check all shapes
+ std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
+ for (; aRevIter != rShapes.rend(); ++aRevIter)
+ {
+ // check shape
+ if (!bMasterOnly || ShapeLocationIsMaster((*aRevIter).get()))
+ {
+ const oox::drawingml::ShapePtr& aShape = *aRevIter;
+ aPlaceholders.add(aShape, nFirstSubType, nSecondSubType, oSubTypeIndex);
+ }
+
+ // check children
+ std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
+ if (!rChildren.empty())
+ {
+ const oox::drawingml::ShapePtr aShape = findPlaceholder( nFirstSubType, nSecondSubType, oSubTypeIndex, rChildren, bMasterOnly );
+ if (aShape)
+ {
+ aPlaceholders.add(aShape, nFirstSubType, nSecondSubType, oSubTypeIndex);
+ }
+ }
+
+ if (aPlaceholders.hasByPrio(0))
+ {
+ break;
+ }
+ }
+
+ // return something according to prio
+ return aPlaceholders.getByPrio();
+}
+
+oox::drawingml::ShapePtr PPTShape::findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly )
+{
+ oox::drawingml::ShapePtr aShapePtr;
+
+ std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
+ while( aRevIter != rShapes.rend() )
+ {
+ if ( (*aRevIter)->getSubTypeIndex().has() && (*aRevIter)->getSubTypeIndex().get() == nIdx &&
+ ( !bMasterOnly || ShapeLocationIsMaster((*aRevIter).get()) ) )
+ {
+ aShapePtr = *aRevIter;
+ break;
+ }
+ std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
+ aShapePtr = findPlaceholderByIndex( nIdx, rChildren, bMasterOnly );
+ if ( aShapePtr )
+ break;
+ ++aRevIter;
+ }
+ return aShapePtr;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
new file mode 100644
index 000000000..d7f3d90f2
--- /dev/null
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -0,0 +1,195 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/log.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/pptshapecontext.hxx>
+#include <oox/ppt/pptshapepropertiescontext.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#include <drawingml/shapestylecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbodycontext.hxx>
+#include <drawingml/transform2dcontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+
+namespace oox::ppt {
+
+// CT_Shape
+PPTShapeContext::PPTShapeContext( ContextHandler2Helper const & rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
+: oox::drawingml::ShapeContext( rParent, pMasterShapePtr, pShapePtr )
+, mpSlidePersistPtr( rSlidePersistPtr )
+{
+}
+
+ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if( getNamespace( aElementToken ) == NMSP_dsp )
+ aElementToken = NMSP_ppt | getBaseToken( aElementToken );
+
+ switch( aElementToken )
+ {
+ // nvSpPr CT_ShapeNonVisual begin
+ // case PPT_TOKEN( drElemPr ):
+ // break;
+ case PPT_TOKEN( cNvPr ):
+ {
+ mpShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
+ break;
+ }
+ case PPT_TOKEN( ph ):
+ {
+ SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
+ OptValue< sal_Int32 > oSubType( rAttribs.getToken( XML_type) );
+ sal_Int32 nSubType( rAttribs.getToken( XML_type, XML_obj ) );
+ oox::drawingml::ShapePtr pTmpPlaceholder;
+
+ mpShapePtr->setSubType( nSubType );
+
+ if( rAttribs.hasAttribute( XML_idx ) )
+ {
+ sal_Int32 nSubTypeIndex = rAttribs.getString( XML_idx ).get().toInt32();
+ mpShapePtr->setSubTypeIndex( nSubTypeIndex );
+
+ if(!oSubType.has() && pMasterPersist)
+ {
+ pTmpPlaceholder = PPTShape::findPlaceholderByIndex( nSubTypeIndex, pMasterPersist->getShapes()->getChildren() );
+
+ if(pTmpPlaceholder)
+ nSubType = pTmpPlaceholder->getSubType(); // When we don't have type attribute on slide but have on slidelayout we have to use it instead of default type
+ }
+ }
+
+ if ( nSubType )
+ {
+ PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
+ if ( pPPTShapePtr )
+ {
+ oox::ppt::ShapeLocation eShapeLocation = pPPTShapePtr->getShapeLocation();
+ if ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) )
+ {
+ // inheriting properties from placeholder objects by cloning shape
+ sal_Int32 nFirstPlaceholder = 0;
+ sal_Int32 nSecondPlaceholder = 0;
+ switch( nSubType )
+ {
+ case XML_ctrTitle : // slide/layout
+ nFirstPlaceholder = XML_ctrTitle;
+ nSecondPlaceholder = XML_title;
+ break;
+
+ case XML_subTitle : // slide/layout
+ nFirstPlaceholder = XML_subTitle;
+ nSecondPlaceholder = XML_body;
+ break;
+
+ case XML_obj : // slide/layout
+ nFirstPlaceholder = XML_obj;
+ nSecondPlaceholder = XML_body;
+ break;
+
+ case XML_dt : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_sldNum : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_ftr : // slide/layout/master/notes/notesmaster/handoutmaster
+ case XML_hdr : // notes/notesmaster/handoutmaster
+ case XML_body : // slide/layout/master/notes/notesmaster
+ case XML_title : // slide/layout/master/
+ case XML_chart : // slide/layout
+ case XML_tbl : // slide/layout
+ case XML_clipArt : // slide/layout
+ case XML_dgm : // slide/layout
+ case XML_media : // slide/layout
+ case XML_sldImg : // notes/notesmaster
+ case XML_pic : // slide/layout
+ nFirstPlaceholder = nSubType;
+ break;
+ default:
+ break;
+ }
+ if ( nFirstPlaceholder )
+ {
+ oox::drawingml::ShapePtr pPlaceholder;
+ if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
+ {
+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+ pPPTShapePtr->getSubTypeIndex(), mpSlidePersistPtr->getShapes()->getChildren(), true );
+ }
+ else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
+ {
+ if ( pMasterPersist )
+ {
+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+ pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+ }
+ }
+ if ( pPlaceholder )
+ {
+ SAL_INFO("oox.ppt","shape " << mpShapePtr->getId() <<
+ " will get shape reference " << pPlaceholder->getId() << " applied");
+ mpShapePtr->applyShapeReference( *pPlaceholder );
+ PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
+ if ( pPPTShape )
+ pPPTShape->setReferenced( true );
+ pPPTShapePtr->setPlaceholder( pPlaceholder );
+ }
+ }
+ }
+ }
+
+ }
+ break;
+ }
+
+ // nvSpPr CT_ShapeNonVisual end
+
+ case PPT_TOKEN( spPr ):
+ return new PPTShapePropertiesContext( *this, *mpShapePtr );
+
+ case PPT_TOKEN( style ):
+ return new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
+
+ case PPT_TOKEN( txBody ):
+ {
+ oox::drawingml::TextBodyPtr xTextBody = std::make_shared<oox::drawingml::TextBody>( mpShapePtr->getTextBody() );
+ xTextBody->getTextProperties().maPropertyMap.setProperty( PROP_FontIndependentLineSpacing, true );
+ mpShapePtr->setTextBody( xTextBody );
+ return new oox::drawingml::TextBodyContext( *this, mpShapePtr );
+ }
+ case PPT_TOKEN( txXfrm ):
+ {
+ return new oox::drawingml::Transform2DContext( *this, rAttribs, *mpShapePtr, true );
+ }
+ }
+
+ return ShapeContext::onCreateContext(aElementToken, rAttribs);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
new file mode 100644
index 000000000..17d3e6c58
--- /dev/null
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <memory>
+#include <com/sun/star/xml/sax/FastToken.hpp>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/pptgraphicshapecontext.hxx>
+#include <oox/ppt/pptshapecontext.hxx>
+#include <oox/ppt/pptshapegroupcontext.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <oox/drawingml/connectorshapecontext.hxx>
+#include <drawingml/fillproperties.hxx>
+#include "extdrawingfragmenthandler.hxx"
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+PPTShapeGroupContext::PPTShapeGroupContext(
+ FragmentHandler2 const & rParent,
+ const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ const ShapeLocation eShapeLocation,
+ const oox::drawingml::ShapePtr& pMasterShapePtr,
+ const oox::drawingml::ShapePtr& pGroupShapePtr )
+: ShapeGroupContext( rParent, pMasterShapePtr, pGroupShapePtr )
+, mpSlidePersistPtr( rSlidePersistPtr )
+, meShapeLocation( eShapeLocation )
+{
+}
+
+ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ if( getNamespace( aElementToken ) == NMSP_dsp )
+ aElementToken = NMSP_ppt | getBaseToken( aElementToken );
+
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( cNvPr ):
+ {
+ // don't override SmartArt properties for embedded drawing's spTree
+ mpGroupShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ if (mpGroupShapePtr->getId().isEmpty())
+ mpGroupShapePtr->setId(rAttribs.getString(XML_id).get());
+ if (mpGroupShapePtr->getName().isEmpty())
+ mpGroupShapePtr->setName( rAttribs.getString( XML_name ).get() );
+ break;
+ }
+ case PPT_TOKEN( ph ):
+ mpGroupShapePtr->setSubType( rAttribs.getToken( XML_type, FastToken::DONTKNOW ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpGroupShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
+
+ case PPT_TOKEN( grpSpPr ):
+ return new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
+ case PPT_TOKEN( spPr ):
+ return new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
+/*
+ case PPT_TOKEN( style ):
+ return new ShapeStyleContext( getParser() );
+*/
+ case PPT_TOKEN( cxnSp ): // connector shape
+ {
+ auto pShape = std::make_shared<PPTShape>(meShapeLocation, "com.sun.star.drawing.ConnectorShape");
+ return new oox::drawingml::ConnectorShapeContext(*this, mpGroupShapePtr, pShape,
+ pShape->getConnectorShapeProperties());
+ }
+ case PPT_TOKEN( grpSp ): // group shape
+ return new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
+ case PPT_TOKEN( sp ): // Shape
+ {
+ auto pShape = std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.CustomShape" );
+ bool bUseBgFill = rAttribs.getBool(XML_useBgFill, false);
+ if (bUseBgFill)
+ {
+ pShape->getFillProperties().moFillType = XML_noFill;
+ pShape->getFillProperties().moUseBgFill = true;
+ }
+ pShape->setModelId(rAttribs.getString( XML_modelId ).get());
+ return new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape );
+ }
+ case PPT_TOKEN( pic ): // CT_Picture
+ return new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) );
+ case PPT_TOKEN( graphicFrame ): // CT_GraphicalObjectFrame
+ {
+ pGraphicShape = std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.OLE2Shape" );
+ return new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true );
+ }
+ }
+
+ return this;
+}
+
+void PPTShapeGroupContext::importExtDrawings( )
+{
+ if( !pGraphicShape )
+ return;
+
+ for (auto const& extDrawing : pGraphicShape->getExtDrawings())
+ {
+ OUString aFragmentPath = getFragmentPathFromRelId(extDrawing);
+ getFilter().importFragment( new ExtDrawingFragmentHandler( getFilter(), aFragmentPath,
+ mpSlidePersistPtr,
+ meShapeLocation,
+ mpGroupShapePtr,
+ pGraphicShape ) );
+ pGraphicShape->keepDiagramDrawing(getFilter(), aFragmentPath);
+
+ // Apply font color imported from color fragment
+ if( pGraphicShape->getFontRefColorForNodes().isUsed() )
+ applyFontRefColor(mpGroupShapePtr, pGraphicShape->getFontRefColorForNodes());
+ }
+ pGraphicShape = oox::drawingml::ShapePtr( nullptr );
+}
+
+void PPTShapeGroupContext::applyFontRefColor(const oox::drawingml::ShapePtr& pShape, const oox::drawingml::Color& rFontRefColor)
+{
+ pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
+ std::vector< oox::drawingml::ShapePtr >& vChildren = pShape->getChildren();
+ for (auto const& child : vChildren)
+ {
+ applyFontRefColor(child, rFontRefColor);
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptshapepropertiescontext.cxx b/oox/source/ppt/pptshapepropertiescontext.cxx
new file mode 100644
index 000000000..70ef2fcef
--- /dev/null
+++ b/oox/source/ppt/pptshapepropertiescontext.cxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/pptshapepropertiescontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/ppt/pptshape.hxx>
+
+using namespace oox::core;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace oox::ppt {
+
+// CT_Shape
+PPTShapePropertiesContext::PPTShapePropertiesContext( ContextHandler2Helper const & rParent, ::oox::drawingml::Shape& rShape )
+: ShapePropertiesContext( rParent, rShape )
+{
+}
+
+ContextHandlerRef PPTShapePropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ PPTShape* pPPTShape = dynamic_cast<PPTShape*>(&mrShape);
+ if (pPPTShape)
+ pPPTShape->setHasNoninheritedShapeProperties();
+
+ switch( aElementToken )
+ {
+ case A_TOKEN( xfrm ):
+ mrShape.getShapeProperties().setProperty( PROP_IsPlaceholderDependent, false);
+ return ShapePropertiesContext::onCreateContext( aElementToken, rAttribs );
+
+ default:
+ return ShapePropertiesContext::onCreateContext( aElementToken, rAttribs );
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/presPropsfragmenthandler.cxx b/oox/source/ppt/presPropsfragmenthandler.cxx
new file mode 100644
index 000000000..4792d07c0
--- /dev/null
+++ b/oox/source/ppt/presPropsfragmenthandler.cxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/presentation/XPresentationSupplier.hpp>
+#include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/presPropsfragmenthandler.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace oox::ppt
+{
+PresPropsFragmentHandler::PresPropsFragmentHandler(core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath)
+ : FragmentHandler2(rFilter, rFragmentPath)
+{
+}
+
+PresPropsFragmentHandler::~PresPropsFragmentHandler() = default;
+
+void PresPropsFragmentHandler::finalizeImport()
+{
+ css::uno::Reference<css::presentation::XPresentationSupplier> xPresentationSupplier(
+ getFilter().getModel(), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference<css::beans::XPropertySet> xPresentationProps(
+ xPresentationSupplier->getPresentation(), css::uno::UNO_QUERY_THROW);
+ xPresentationProps->setPropertyValue("IsEndless", css::uno::Any(m_bLoop));
+ xPresentationProps->setPropertyValue("IsAutomatic", css::uno::Any(!m_bTiming));
+
+ if (!m_sId.isEmpty())
+ {
+ css::uno::Reference<css::presentation::XCustomPresentationSupplier>
+ XCustPresentationSupplier(getFilter().getModel(), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference<css::container::XNameContainer> mxCustShows;
+ mxCustShows = XCustPresentationSupplier->getCustomPresentations();
+ const css::uno::Sequence<OUString> aNameSeq(mxCustShows->getElementNames());
+ xPresentationProps->setPropertyValue("CustomShow",
+ css::uno::Any(aNameSeq[m_sId.toInt32()]));
+ }
+
+ if (!m_sSt.isEmpty())
+ {
+ Reference<drawing::XDrawPagesSupplier> xDPS(getFilter().getModel(), uno::UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW);
+ Reference<drawing::XDrawPage> xDrawPage;
+ xDrawPages->getByIndex(m_sSt.toInt32() - 1) >>= xDrawPage;
+ Reference<container::XNamed> xNamed(xDrawPage, uno::UNO_QUERY_THROW);
+ xPresentationProps->setPropertyValue("FirstPage", uno::Any(xNamed->getName()));
+ }
+}
+
+core::ContextHandlerRef PresPropsFragmentHandler::onCreateContext(sal_Int32 aElementToken,
+ const AttributeList& rAttribs)
+{
+ switch (aElementToken)
+ {
+ case PPT_TOKEN(presentationPr):
+ return this;
+ case PPT_TOKEN(showPr):
+ m_bLoop = rAttribs.getBool(XML_loop, false);
+ m_bTiming = rAttribs.getBool(XML_useTimings, true);
+ return this;
+ case PPT_TOKEN(custShow):
+ m_sId = rAttribs.getString(XML_id).get();
+ return this;
+ case PPT_TOKEN(sldRg):
+ m_sSt = rAttribs.getString(XML_st).get();
+ return this;
+ }
+ return this;
+}
+} // namespace oox::ppt
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
new file mode 100644
index 000000000..ac1e32e53
--- /dev/null
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -0,0 +1,792 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <comphelper/anytostring.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <o3tl/string_view.hxx>
+#include <sal/log.hxx>
+#include <tools/multisel.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/drawing/XMasterPageTarget.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <com/sun/star/presentation/XPresentationPage.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <oox/drawingml/theme.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/themefragmenthandler.hxx>
+#include <drawingml/textliststylecontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/ole/vbaproject.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/presentationfragmenthandler.hxx>
+#include <oox/ppt/slidefragmenthandler.hxx>
+#include <oox/ppt/layoutfragmenthandler.hxx>
+#include <oox/ppt/pptimport.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+#include <com/sun/star/office/XAnnotation.hpp>
+#include <com/sun/star/office/XAnnotationAccess.hpp>
+#include <ooxresid.hxx>
+#include <strings.hrc>
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::presentation;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+static std::map<PredefinedClrSchemeId, sal_Int32> PredefinedClrTokens =
+{
+ //{ dk1, XML_dk1 },
+ //{ lt1, XML_lt1 },
+ { dk2, XML_dk2 },
+ { lt2, XML_lt2 },
+ { accent1, XML_accent1 },
+ { accent2, XML_accent2 },
+ { accent3, XML_accent3 },
+ { accent4, XML_accent4 },
+ { accent5, XML_accent5 },
+ { accent6, XML_accent6 },
+ { hlink, XML_hlink },
+ { folHlink, XML_folHlink }
+};
+
+PresentationFragmentHandler::PresentationFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath)
+ : FragmentHandler2( rFilter, rFragmentPath )
+ , mpTextListStyle( std::make_shared<TextListStyle>() )
+ , mbCommentAuthorsRead(false)
+{
+ TextParagraphPropertiesArray& rParagraphDefaultsVector( mpTextListStyle->getListStyle() );
+ for (auto & elem : rParagraphDefaultsVector)
+ {
+ // ppt is having zero bottom margin per default, whereas OOo is 0,5cm,
+ // so this attribute needs to be set always
+ elem.getParaBottomMargin() = TextSpacing( 0 );
+ }
+}
+
+PresentationFragmentHandler::~PresentationFragmentHandler() noexcept
+{
+}
+
+static void lcl_setBookmark(uno::Reference<drawing::XShape>& rShape,
+ std::vector<SlidePersistPtr>& rSlidePersist)
+{
+ OUString aBookmark;
+ static const OUStringLiteral sSlideName = u"#page";
+ uno::Reference<beans::XPropertySet> xPropSet(rShape, uno::UNO_QUERY);
+ xPropSet->getPropertyValue("Bookmark") >>= aBookmark;
+ if (aBookmark.startsWith(sSlideName))
+ {
+ sal_Int32 nPageNumber = o3tl::toInt32(aBookmark.subView(sSlideName.getLength()));
+ Reference<XDrawPage> xDrawPage(rSlidePersist[nPageNumber - 1]->getPage());
+ Reference<container::XNamed> xNamed(xDrawPage, UNO_QUERY_THROW);
+ aBookmark = xNamed->getName();
+ xPropSet->setPropertyValue("Bookmark", Any(aBookmark));
+ }
+}
+
+static void ResolveShapeBookmark(std::vector<SlidePersistPtr>& rSlidePersist)
+{
+ sal_Int32 nPageCount = rSlidePersist.size();
+ for (sal_Int32 nPage = 0; nPage < nPageCount; ++nPage)
+ {
+ if (!rSlidePersist[nPage]->getURLShapeId().empty())
+ {
+ auto aShapeMap = rSlidePersist[nPage]->getShapeMap();
+ sal_Int32 nCount = rSlidePersist[nPage]->getURLShapeId().size();
+ for (sal_Int32 i = 0; i < nCount; i++)
+ {
+ OUString sId = rSlidePersist[nPage]->getURLShapeId()[i];
+ uno::Reference<drawing::XShape> xShape(aShapeMap[sId]->getXShape(), uno::UNO_QUERY);
+ Reference<XShapes> xShapes(xShape, UNO_QUERY);
+ if (xShapes.is()) // group shape
+ {
+ for (sal_Int32 j = 0; j < xShapes->getCount(); j++)
+ {
+ uno::Reference<drawing::XShape> xGroupedShape(xShapes->getByIndex(j),
+ uno::UNO_QUERY);
+ lcl_setBookmark(xGroupedShape, rSlidePersist);
+ }
+ }
+ else
+ lcl_setBookmark(xShape, rSlidePersist);
+ }
+ }
+ }
+}
+
+static void ResolveTextFields( XmlFilterBase const & rFilter )
+{
+ const oox::core::TextFieldStack& rTextFields = rFilter.getTextFieldStack();
+ if ( rTextFields.empty() )
+ return;
+
+ const Reference< frame::XModel >& xModel( rFilter.getModel() );
+ for (auto const& textField : rTextFields)
+ {
+ static const OUStringLiteral sURL = u"URL";
+ Reference< drawing::XDrawPagesSupplier > xDPS( xModel, uno::UNO_QUERY_THROW );
+ Reference< drawing::XDrawPages > xDrawPages( xDPS->getDrawPages(), uno::UNO_SET_THROW );
+
+ const oox::core::TextField& rTextField( textField );
+ Reference< XPropertySet > xPropSet( rTextField.xTextField, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+ if ( xPropSetInfo->hasPropertyByName( sURL ) )
+ {
+ OUString aURL;
+ if ( xPropSet->getPropertyValue( sURL ) >>= aURL )
+ {
+ static const OUStringLiteral sSlide = u"#Slide ";
+ static const OUStringLiteral sNotes = u"#Notes ";
+ bool bNotes = false;
+ sal_Int32 nPageNumber = 0;
+ if ( aURL.match( sSlide ) )
+ nPageNumber = o3tl::toInt32(aURL.subView( sSlide.getLength() ));
+ else if ( aURL.match( sNotes ) )
+ {
+ nPageNumber = o3tl::toInt32(aURL.subView( sNotes.getLength() ));
+ bNotes = true;
+ }
+ if ( nPageNumber )
+ {
+ try
+ {
+ Reference< XDrawPage > xDrawPage;
+ xDrawPages->getByIndex( nPageNumber - 1 ) >>= xDrawPage;
+ if ( bNotes )
+ {
+ Reference< css::presentation::XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
+ xDrawPage = xPresentationPage->getNotesPage();
+ }
+ Reference< container::XNamed > xNamed( xDrawPage, UNO_QUERY_THROW );
+ if (!xNamed->getName().startsWith("page"))
+ aURL = "#" + xNamed->getName();
+ else
+ aURL = "#" + URLResId(STR_SLIDE_NAME) + " " + OUString::number(nPageNumber);
+ xPropSet->setPropertyValue( sURL, Any( aURL ) );
+ Reference< text::XTextContent > xContent( rTextField.xTextField);
+ Reference< text::XTextRange > xTextRange = rTextField.xTextCursor;
+ rTextField.xText->insertTextContent( xTextRange, xContent, true );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ }
+ }
+ }
+}
+
+void PresentationFragmentHandler::importCustomSlideShow(std::vector<CustomShow>& rCustomShowList)
+{
+ PowerPointImport& rFilter = dynamic_cast<PowerPointImport&>(getFilter());
+ Reference<frame::XModel> xModel(rFilter.getModel());
+ Reference<XDrawPagesSupplier> xDrawPagesSupplier(xModel, UNO_QUERY_THROW);
+ Reference<XDrawPages> xDrawPages(xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW);
+
+ Reference<css::lang::XSingleServiceFactory> mxShowFactory;
+ Reference<css::container::XNameContainer> mxShows;
+ Reference<XCustomPresentationSupplier> xShowsSupplier(xModel, UNO_QUERY);
+ if (xShowsSupplier.is())
+ {
+ mxShows = xShowsSupplier->getCustomPresentations();
+ mxShowFactory.set(mxShows, UNO_QUERY);
+ }
+
+ for (size_t i = 0; i < rCustomShowList.size(); ++i)
+ {
+ Reference<com::sun::star::container::XIndexContainer> xShow(mxShowFactory->createInstance(),
+ UNO_QUERY);
+ if (xShow.is())
+ {
+ static const OUStringLiteral sSlide = u"slides/slide";
+ for (size_t j = 0; j < rCustomShowList[i].maSldLst.size(); ++j)
+ {
+ OUString sCustomSlide = rCustomShowList[i].maSldLst[j];
+ sal_Int32 nPageNumber = 0;
+ if (sCustomSlide.match(sSlide))
+ nPageNumber = o3tl::toInt32(sCustomSlide.subView(sSlide.getLength()));
+
+ Reference<XDrawPage> xPage;
+ xDrawPages->getByIndex(nPageNumber - 1) >>= xPage;
+ if (xPage.is())
+ xShow->insertByIndex(xShow->getCount(), Any(xPage));
+ }
+
+ Any aAny;
+ aAny <<= xShow;
+ mxShows->insertByName(rCustomShowList[i].maCustomShowName, aAny);
+ }
+ }
+}
+
+void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr,
+ sal_Int32 nThemeIdx)
+{
+ if (!pThemePtr)
+ return;
+
+ try
+ {
+ uno::Reference<beans::XPropertySet> xDocProps(getFilter().getModel(), uno::UNO_QUERY);
+ if (xDocProps.is())
+ {
+ uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
+
+ static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
+ if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
+ {
+ // get existing grab bag
+ comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue(aGrabBagPropName));
+
+ comphelper::SequenceAsHashMap aThemesHashMap;
+
+ // create current theme
+ uno::Sequence<beans::PropertyValue> aCurrentTheme(PredefinedClrSchemeId::Count);
+ auto pCurrentTheme = aCurrentTheme.getArray();
+
+ ClrScheme rClrScheme = pThemePtr->getClrScheme();
+ for (int nId = PredefinedClrSchemeId::dk2; nId != PredefinedClrSchemeId::Count; nId++)
+ {
+ sal_uInt32 nToken = PredefinedClrTokens[static_cast<PredefinedClrSchemeId>(nId)];
+ const OUString& sName = PredefinedClrNames[static_cast<PredefinedClrSchemeId>(nId)];
+ ::Color nColor;
+
+ rClrScheme.getColor(nToken, nColor);
+ const uno::Any& rColor = uno::Any(nColor);
+
+ pCurrentTheme[nId].Name = sName;
+ pCurrentTheme[nId].Value = rColor;
+ }
+
+
+ uno::Sequence<beans::PropertyValue> aTheme{
+ // add new theme to the sequence
+ // Export code uses the master slide's index to find the right theme
+ // so use the same index in the grabbag.
+ comphelper::makePropertyValue(
+ "ppt/theme/theme" + OUString::number(nThemeIdx) + ".xml", aCurrentTheme),
+ // store DOM fragment for SmartArt re-generation
+ comphelper::makePropertyValue("OOXTheme", pThemePtr->getFragment())
+ };
+
+ aThemesHashMap << aTheme;
+
+ // put the new items
+ aGrabBag.update(aThemesHashMap);
+
+ // put it back to the document
+ xDocProps->setPropertyValue(aGrabBagPropName, uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ SAL_WARN("oox", "oox::ppt::PresentationFragmentHandler::saveThemeToGrabBag, Failed to save grab bag");
+ }
+}
+
+void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage, bool bImportNotesPage)
+{
+ PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( getFilter() );
+
+ Reference< frame::XModel > xModel( rFilter.getModel() );
+ Reference< drawing::XDrawPage > xSlide;
+
+ // importing slide pages and its corresponding notes page
+ Reference< drawing::XDrawPagesSupplier > xDPS( xModel, uno::UNO_QUERY_THROW );
+ Reference< drawing::XDrawPages > xDrawPages( xDPS->getDrawPages(), uno::UNO_SET_THROW );
+
+ try {
+
+ if( bFirstPage )
+ xDrawPages->getByIndex( 0 ) >>= xSlide;
+ else
+ xSlide = xDrawPages->insertNewByIndex( xDrawPages->getCount() );
+
+ OUString aSlideFragmentPath = getFragmentPathFromRelId( maSlidesVector[ nSlide ] );
+ if( !aSlideFragmentPath.isEmpty() )
+ {
+ SlidePersistPtr pMasterPersistPtr;
+ SlidePersistPtr pSlidePersistPtr = std::make_shared<SlidePersist>( rFilter, false, false, xSlide,
+ std::make_shared<PPTShape>( Slide, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
+
+ FragmentHandlerRef xSlideFragmentHandler( new SlideFragmentHandler( rFilter, aSlideFragmentPath, pSlidePersistPtr, Slide ) );
+
+ // importing the corresponding masterpage/layout
+ OUString aLayoutFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"slideLayout" );
+ OUString aCommentFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"comments" );
+ if ( !aLayoutFragmentPath.isEmpty() )
+ {
+ // importing layout
+ RelationsRef xLayoutRelations = rFilter.importRelations( aLayoutFragmentPath );
+ OUString aMasterFragmentPath = xLayoutRelations->getFragmentPathFromFirstTypeFromOfficeDoc( u"slideMaster" );
+ if( !aMasterFragmentPath.isEmpty() )
+ {
+ // check if the corresponding masterpage+layout has already been imported
+ std::vector< SlidePersistPtr >& rMasterPages( rFilter.getMasterPages() );
+ for (auto const& masterPage : rMasterPages)
+ {
+ if ( ( masterPage->getPath() == aMasterFragmentPath ) && ( masterPage->getLayoutPath() == aLayoutFragmentPath ) )
+ {
+ pMasterPersistPtr = masterPage;
+ break;
+ }
+ }
+
+ if ( !pMasterPersistPtr )
+ { // masterpersist not found, we have to load it
+ Reference< drawing::XDrawPage > xMasterPage;
+ Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW );
+ Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_SET_THROW );
+
+ sal_Int32 nIndex;
+ if( rFilter.getMasterPages().empty() )
+ {
+ nIndex = 0;
+ xMasterPages->getByIndex( nIndex ) >>= xMasterPage;
+ }
+ else
+ {
+ nIndex = xMasterPages->getCount();
+ xMasterPage = xMasterPages->insertNewByIndex( nIndex );
+ }
+
+ pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, false, xMasterPage,
+ std::make_shared<PPTShape>( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
+ pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
+ rFilter.getMasterPages().push_back( pMasterPersistPtr );
+ rFilter.setActualSlidePersist( pMasterPersistPtr );
+ FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aMasterFragmentPath, pMasterPersistPtr, Master ) );
+
+ // set the correct theme
+ OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
+ if( !aThemeFragmentPath.isEmpty() )
+ {
+ std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() );
+ std::map< OUString, oox::drawingml::ThemePtr >::iterator aIter2( rThemes.find( aThemeFragmentPath ) );
+ if( aIter2 == rThemes.end() )
+ {
+ oox::drawingml::ThemePtr pThemePtr = std::make_shared<oox::drawingml::Theme>();
+ pMasterPersistPtr->setTheme( pThemePtr );
+ Reference<xml::dom::XDocument> xDoc=
+ rFilter.importFragment(aThemeFragmentPath);
+
+ rFilter.importFragment(
+ new ThemeFragmentHandler(
+ rFilter, aThemeFragmentPath, *pThemePtr ),
+ Reference<xml::sax::XFastSAXSerializable>(
+ xDoc,
+ UNO_QUERY_THROW));
+ rThemes[ aThemeFragmentPath ] = pThemePtr;
+ pThemePtr->setFragment(xDoc);
+ saveThemeToGrabBag(pThemePtr, nIndex + 1);
+ }
+ else
+ {
+ pMasterPersistPtr->setTheme( (*aIter2).second );
+ }
+ }
+ importSlide( xMasterFragmentHandler, pMasterPersistPtr );
+ rFilter.importFragment( new LayoutFragmentHandler( rFilter, aLayoutFragmentPath, pMasterPersistPtr ) );
+ pMasterPersistPtr->createBackground( rFilter );
+ pMasterPersistPtr->createXShapes( rFilter );
+
+ oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme();
+ if (pTheme)
+ {
+ pTheme->addTheme(pMasterPersistPtr->getPage());
+ }
+ }
+ }
+ }
+
+ // importing slide page
+ if (pMasterPersistPtr) {
+ pSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
+ pSlidePersistPtr->setTheme( pMasterPersistPtr->getTheme() );
+ Reference< drawing::XMasterPageTarget > xMasterPageTarget( pSlidePersistPtr->getPage(), UNO_QUERY );
+ if( xMasterPageTarget.is() )
+ xMasterPageTarget->setMasterPage( pMasterPersistPtr->getPage() );
+ }
+ rFilter.getDrawPages().push_back( pSlidePersistPtr );
+ rFilter.setActualSlidePersist( pSlidePersistPtr );
+ importSlide( xSlideFragmentHandler, pSlidePersistPtr );
+ pSlidePersistPtr->createBackground( rFilter );
+ pSlidePersistPtr->createXShapes( rFilter );
+
+ if(bImportNotesPage) {
+
+ // now importing the notes page
+ OUString aNotesFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"notesSlide" );
+ if( !aNotesFragmentPath.isEmpty() )
+ {
+ Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
+ if ( xPresentationPage.is() )
+ {
+ Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
+ if ( xNotesPage.is() )
+ {
+ SlidePersistPtr pNotesPersistPtr = std::make_shared<SlidePersist>( rFilter, false, true, xNotesPage,
+ std::make_shared<PPTShape>( Slide, "com.sun.star.drawing.GroupShape" ), mpTextListStyle );
+ FragmentHandlerRef xNotesFragmentHandler( new SlideFragmentHandler( getFilter(), aNotesFragmentPath, pNotesPersistPtr, Slide ) );
+ rFilter.getNotesPages().push_back( pNotesPersistPtr );
+ rFilter.setActualSlidePersist( pNotesPersistPtr );
+ importSlide( xNotesFragmentHandler, pNotesPersistPtr );
+ pNotesPersistPtr->createBackground( rFilter );
+ pNotesPersistPtr->createXShapes( rFilter );
+ }
+ }
+ }
+ }
+
+ if( !mbCommentAuthorsRead && !aCommentFragmentPath.isEmpty() )
+ {
+ // Comments are present and commentAuthors.xml has still not been read
+ mbCommentAuthorsRead = true;
+ Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
+ Reference< XDrawPage > xCommentAuthorsPage( xPresentationPage->getNotesPage() );
+ SlidePersistPtr pCommentAuthorsPersistPtr =
+ std::make_shared<SlidePersist>( rFilter, false, true, xCommentAuthorsPage,
+ std::make_shared<PPTShape>(
+ Slide, "com.sun.star.drawing.GroupShape" ),
+ mpTextListStyle );
+ FragmentHandlerRef xCommentAuthorsFragmentHandler(
+ new SlideFragmentHandler( getFilter(),
+ "ppt/commentAuthors.xml",
+ pCommentAuthorsPersistPtr,
+ Slide ) );
+
+ getFilter().importFragment( xCommentAuthorsFragmentHandler );
+ maAuthorList.setValues( pCommentAuthorsPersistPtr->getCommentAuthors() );
+ }
+ if( !aCommentFragmentPath.isEmpty() )
+ {
+ Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
+ Reference< XDrawPage > xCommentsPage( xPresentationPage->getNotesPage() );
+ SlidePersistPtr pCommentsPersistPtr =
+ std::make_shared<SlidePersist>(
+ rFilter, false, true, xCommentsPage,
+ std::make_shared<PPTShape>(
+ Slide, "com.sun.star.drawing.GroupShape" ),
+ mpTextListStyle );
+
+ FragmentHandlerRef xCommentsFragmentHandler(
+ new SlideFragmentHandler(
+ getFilter(),
+ aCommentFragmentPath,
+ pCommentsPersistPtr,
+ Slide ) );
+ pCommentsPersistPtr->getCommentsList().cmLst.clear();
+ getFilter().importFragment( xCommentsFragmentHandler );
+
+ if (!pCommentsPersistPtr->getCommentsList().cmLst.empty())
+ {
+ //set comment chars for last comment on slide
+ SlideFragmentHandler* comment_handler =
+ dynamic_cast<SlideFragmentHandler*>(xCommentsFragmentHandler.get());
+ assert(comment_handler);
+ // some comments have no text -> set empty string as text to avoid
+ // crash (back() on empty vector is undefined) and losing other
+ // comment data that might be there (author, position, timestamp etc.)
+ pCommentsPersistPtr->getCommentsList().cmLst.back().setText(
+ comment_handler->getCharVector().empty() ? "" :
+ comment_handler->getCharVector().back() );
+ }
+ pCommentsPersistPtr->getCommentAuthors().setValues(maAuthorList);
+
+ //insert all comments from commentsList
+ for(int i=0; i<pCommentsPersistPtr->getCommentsList().getSize(); i++)
+ {
+ try {
+ Comment aComment = pCommentsPersistPtr->getCommentsList().getCommentAtIndex(i);
+ uno::Reference< office::XAnnotationAccess > xAnnotationAccess( xSlide, UNO_QUERY_THROW );
+ uno::Reference< office::XAnnotation > xAnnotation( xAnnotationAccess->createAndInsertAnnotation() );
+ int nPosX = aComment.getIntX();
+ int nPosY = aComment.getIntY();
+ xAnnotation->setPosition(
+ geometry::RealPoint2D(
+ ::oox::drawingml::convertEmuToHmm( nPosX ) * 15.87,
+ ::oox::drawingml::convertEmuToHmm( nPosY ) * 15.87 ) );
+ xAnnotation->setAuthor( aComment.getAuthor(maAuthorList) );
+ xAnnotation->setDateTime( aComment.getDateTime() );
+ uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
+ xText->setString( aComment.get_text());
+ } catch( css::lang::IllegalArgumentException& ) {}
+ }
+ }
+ }
+ }
+ catch( uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::PresentationFragmentHandler::EndDocument()" );
+ }
+}
+
+void PresentationFragmentHandler::finalizeImport()
+{
+ PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( getFilter() );
+
+ sal_Int32 nPageCount = maSlidesVector.size();
+
+ // we will take the FilterData property "PageRange" if available, otherwise full range is used
+ comphelper::SequenceAsHashMap& rFilterData = rFilter.getFilterData();
+
+ // writing back the original PageCount of this document, it can be accessed from the XModel
+ // via getArgs after the import.
+ rFilterData["OriginalPageCount"] <<= nPageCount;
+ bool bImportNotesPages = rFilterData.getUnpackedValueOrDefault("ImportNotesPages", true);
+ OUString aPageRange = rFilterData.getUnpackedValueOrDefault("PageRange", OUString());
+
+ if( !aPageRange.getLength() )
+ {
+ aPageRange = "1-" + OUString::number( nPageCount );
+ }
+
+ StringRangeEnumerator aRangeEnumerator( aPageRange, 0, nPageCount - 1 );
+ if (aRangeEnumerator.size())
+ {
+ // todo: localized progress bar text
+ const Reference< task::XStatusIndicator >& rxStatusIndicator( getFilter().getStatusIndicator() );
+ if ( rxStatusIndicator.is() )
+ rxStatusIndicator->start( OUString(), 10000 );
+
+ try
+ {
+ int nPagesImported = 0;
+ for (sal_Int32 elem : aRangeEnumerator)
+ {
+ if ( rxStatusIndicator.is() )
+ rxStatusIndicator->setValue((nPagesImported * 10000) / aRangeEnumerator.size());
+
+ importSlide(elem, !nPagesImported, bImportNotesPages);
+ nPagesImported++;
+ }
+ ResolveTextFields( rFilter );
+ ResolveShapeBookmark(rFilter.getDrawPages());
+ if (!maCustomShowList.empty())
+ importCustomSlideShow(maCustomShowList);
+ }
+ catch( uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::PresentationFragmentHandler::finalizeImport()" );
+ }
+ // todo error handling;
+ if ( rxStatusIndicator.is() )
+ rxStatusIndicator->end();
+ }
+
+ // open the VBA project storage
+ OUString aVbaFragmentPath = getFragmentPathFromFirstType(CREATE_MSOFFICE_RELATION_TYPE("vbaProject"));
+ if (!aVbaFragmentPath.isEmpty())
+ {
+ uno::Reference<io::XInputStream> xInStrm = getFilter().openInputStream(aVbaFragmentPath);
+ if (xInStrm.is())
+ {
+ StorageRef xPrjStrg = std::make_shared<oox::ole::OleStorage>(getFilter().getComponentContext(), xInStrm, false);
+ getFilter().getVbaProject().importVbaProject(*xPrjStrg);
+ }
+ }
+}
+
+// CT_Presentation
+::oox::core::ContextHandlerRef PresentationFragmentHandler::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( presentation ):
+ case PPT_TOKEN( sldMasterIdLst ):
+ case PPT_TOKEN( notesMasterIdLst ):
+ case PPT_TOKEN( sldIdLst ):
+ return this;
+ case PPT_TOKEN( sldMasterId ):
+ maSlideMasterVector.push_back( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ return this;
+ case PPT_TOKEN( sldId ):
+ maSlidesVector.push_back( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ return this;
+ case PPT_TOKEN( notesMasterId ):
+ maNotesMasterVector.push_back( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ return this;
+ case PPT_TOKEN( sldSz ):
+ maSlideSize = GetSize2D( rAttribs.getFastAttributeList() );
+ return this;
+ case PPT_TOKEN( notesSz ):
+ maNotesSize = GetSize2D( rAttribs.getFastAttributeList() );
+ return this;
+ case PPT_TOKEN( custShowLst ):
+ return new CustomShowListContext( *this, maCustomShowList );
+ case PPT_TOKEN( defaultTextStyle ):
+ return new TextListStyleContext( *this, *mpTextListStyle );
+ case PPT_TOKEN( modifyVerifier ):
+ OUString sAlgorithmClass = rAttribs.getString(XML_cryptAlgorithmClass, OUString());
+ OUString sAlgorithmType = rAttribs.getString(XML_cryptAlgorithmType, OUString());
+ sal_Int32 nAlgorithmSid = rAttribs.getInteger(XML_cryptAlgorithmSid, 0);
+ sal_Int32 nSpinCount = rAttribs.getInteger(XML_spinCount, 0);
+ OUString sSalt = rAttribs.getString(XML_saltData, OUString());
+ OUString sHash = rAttribs.getString(XML_hashData, OUString());
+ if (sAlgorithmClass == "hash" && sAlgorithmType == "typeAny" && nAlgorithmSid != 0
+ && !sSalt.isEmpty() && !sHash.isEmpty())
+ {
+ OUString sAlgorithmName;
+ switch (nAlgorithmSid)
+ {
+ case 1:
+ sAlgorithmName = "MD2";
+ break;
+ case 2:
+ sAlgorithmName = "MD4";
+ break;
+ case 3:
+ sAlgorithmName = "MD5";
+ break;
+ case 4:
+ sAlgorithmName = "SHA-1";
+ break;
+ case 5:
+ sAlgorithmName = "MAC";
+ break;
+ case 6:
+ sAlgorithmName = "RIPEMD";
+ break;
+ case 7:
+ sAlgorithmName = "RIPEMD-160";
+ break;
+ case 9:
+ sAlgorithmName = "HMAC";
+ break;
+ case 12:
+ sAlgorithmName = "SHA-256";
+ break;
+ case 13:
+ sAlgorithmName = "SHA-384";
+ break;
+ case 14:
+ sAlgorithmName = "SHA-512";
+ break;
+ default:; // 8, 10, 11, any other value: Undefined.
+ }
+
+ if (!sAlgorithmName.isEmpty())
+ {
+ uno::Sequence<beans::PropertyValue> aResult{
+ comphelper::makePropertyValue("algorithm-name", sAlgorithmName),
+ comphelper::makePropertyValue("salt", sSalt),
+ comphelper::makePropertyValue("iteration-count", nSpinCount),
+ comphelper::makePropertyValue("hash", sHash)
+ };
+ try
+ {
+ uno::Reference<beans::XPropertySet> xDocSettings(
+ getFilter().getModelFactory()->createInstance(
+ "com.sun.star.document.Settings"),
+ uno::UNO_QUERY);
+ xDocSettings->setPropertyValue("ModifyPasswordInfo", uno::Any(aResult));
+ }
+ catch (const uno::Exception&)
+ {
+ }
+ }
+ }
+ return this;
+ }
+ return this;
+}
+
+void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlideFragmentHandler,
+ const SlidePersistPtr& rSlidePersistPtr )
+{
+ Reference< drawing::XDrawPage > xSlide( rSlidePersistPtr->getPage() );
+ SlidePersistPtr pMasterPersistPtr( rSlidePersistPtr->getMasterPersist() );
+ if ( pMasterPersistPtr )
+ {
+ // Setting "Layout" property adds extra title and outliner preset shapes to the master slide
+ Reference< drawing::XDrawPage > xMasterSlide(pMasterPersistPtr->getPage());
+ const int nCount = xMasterSlide->getCount();
+
+ uno::Reference< beans::XPropertySet > xSet( xSlide, uno::UNO_QUERY_THROW );
+ xSet->setPropertyValue( "Layout", Any( pMasterPersistPtr->getLayoutFromValueToken() ) );
+
+ while( nCount < xMasterSlide->getCount())
+ {
+ Reference< drawing::XShape > xShape;
+ xMasterSlide->getByIndex(xMasterSlide->getCount()-1) >>= xShape;
+ xMasterSlide->remove(xShape);
+ }
+ }
+ while( xSlide->getCount() )
+ {
+ Reference< drawing::XShape > xShape;
+ xSlide->getByIndex(0) >>= xShape;
+ xSlide->remove( xShape );
+ }
+
+ Reference< XPropertySet > xPropertySet( xSlide, UNO_QUERY );
+ if ( xPropertySet.is() )
+ {
+ awt::Size& rPageSize( rSlidePersistPtr->isNotesPage() ? maNotesSize : maSlideSize );
+ xPropertySet->setPropertyValue( "Width", Any( rPageSize.Width ) );
+ xPropertySet->setPropertyValue( "Height", Any( rPageSize.Height ) );
+
+ oox::ppt::HeaderFooter aHeaderFooter( rSlidePersistPtr->getHeaderFooter() );
+ if ( !rSlidePersistPtr->isMasterPage() )
+ aHeaderFooter.mbSlideNumber = aHeaderFooter.mbHeader = aHeaderFooter.mbFooter = aHeaderFooter.mbDateTime = false;
+ try
+ {
+ if ( rSlidePersistPtr->isNotesPage() )
+ xPropertySet->setPropertyValue( "IsHeaderVisible", Any( aHeaderFooter.mbHeader ) );
+ xPropertySet->setPropertyValue( "IsFooterVisible", Any( aHeaderFooter.mbFooter ) );
+ xPropertySet->setPropertyValue( "IsDateTimeVisible", Any( aHeaderFooter.mbDateTime ) );
+ xPropertySet->setPropertyValue( "IsPageNumberVisible", Any( aHeaderFooter.mbSlideNumber ) );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ rSlidePersistPtr->setPath( rxSlideFragmentHandler->getFragmentPath() );
+ getFilter().importFragment( rxSlideFragmentHandler );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
new file mode 100644
index 000000000..79ea427b5
--- /dev/null
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -0,0 +1,265 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <tools/diagnose_ex.h>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include "headerfootercontext.hxx"
+#include <oox/ppt/backgroundproperties.hxx>
+#include <oox/ppt/slidefragmenthandler.hxx>
+#include <oox/ppt/slidetimingcontext.hxx>
+#include <oox/ppt/slidetransitioncontext.hxx>
+#include <oox/ppt/slidemastertextstylescontext.hxx>
+#include <oox/ppt/pptshapegroupcontext.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmldrawingfragment.hxx>
+#include <drawingml/clrschemecontext.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/ppt/pptimport.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::container;
+
+namespace oox::ppt {
+
+SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, const SlidePersistPtr& pPersistPtr, const ShapeLocation eShapeLocation )
+: FragmentHandler2( rFilter, rFragmentPath )
+, mpSlidePersistPtr( pPersistPtr )
+, meShapeLocation( eShapeLocation )
+{
+ OUString aVMLDrawingFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"vmlDrawing" );
+ if( !aVMLDrawingFragmentPath.isEmpty() )
+ getFilter().importFragment( new oox::vml::DrawingFragment(
+ getFilter(), aVMLDrawingFragmentPath, *pPersistPtr->getDrawing() ) );
+}
+
+SlideFragmentHandler::~SlideFragmentHandler()
+{
+ // convert and insert all VML shapes (mostly form controls)
+ mpSlidePersistPtr->getDrawing()->convertAndInsert();
+}
+
+::oox::core::ContextHandlerRef SlideFragmentHandler::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( sldMaster ): // CT_SlideMaster
+ case PPT_TOKEN( handoutMaster ): // CT_HandoutMaster
+ case PPT_TOKEN( sld ): // CT_CommonSlideData
+ {
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ Reference< css::beans::XPropertySet > xSet(xSlide, UNO_QUERY);
+ PropertyMap aPropMap;
+ PropertySet aSlideProp( xSlide );
+
+ OptValue<bool> aShowMasterShapes = rAttribs.getBool(XML_showMasterSp);
+ if (aShowMasterShapes.has() && !aShowMasterShapes.get())
+ xSet->setPropertyValue("IsBackgroundObjectsVisible", Any(false));
+
+ aPropMap.setProperty( PROP_Visible, rAttribs.getBool( XML_show, true ));
+ aSlideProp.setProperties( aPropMap );
+
+ return this;
+ }
+ case PPT_TOKEN( notes ): // CT_NotesSlide
+ {
+ // Import notesMaster
+ PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( getFilter() );
+ OUString aNotesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"notesMaster" );
+
+ std::vector< SlidePersistPtr >& rMasterPages( rFilter.getMasterPages() );
+ bool bNotesFragmentPathFound = false;
+ for (auto const& masterPage : rMasterPages)
+ {
+ if( masterPage->getPath() == aNotesFragmentPath )
+ {
+ if( !mpSlidePersistPtr->getMasterPersist() )
+ mpSlidePersistPtr->setMasterPersist(masterPage);
+ bNotesFragmentPathFound=true;
+ break;
+ }
+ }
+ if( !bNotesFragmentPathFound && !mpSlidePersistPtr->getMasterPersist() )
+ {
+ SlidePersistPtr pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, true, mpSlidePersistPtr->getPage(),
+ std::make_shared<PPTShape>( Master, "com.sun.star.drawing.GroupShape" ), mpSlidePersistPtr->getNotesTextStyle() );
+ pMasterPersistPtr->setPath( aNotesFragmentPath );
+ rFilter.getMasterPages().push_back( pMasterPersistPtr );
+ FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aNotesFragmentPath, pMasterPersistPtr, Master ) );
+ rFilter.importFragment( xMasterFragmentHandler );
+ mpSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
+ }
+ return this;
+ }
+ case PPT_TOKEN( notesMaster ): // CT_NotesMaster
+ return this;
+ case PPT_TOKEN( cSld ): // CT_CommonSlideData
+ maSlideName = rAttribs.getString(XML_name, OUString());
+ return this;
+
+ case PPT_TOKEN( spTree ): // CT_GroupShape
+ {
+ return new PPTShapeGroupContext(
+ *this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
+ std::make_shared<PPTShape>( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
+ }
+ break;
+
+ case PPT_TOKEN( controls ):
+ return this;
+ case PPT_TOKEN( control ):
+ {
+ ::oox::vml::ControlInfo aInfo;
+ aInfo.setShapeId( rAttribs.getInteger( XML_spid, 0 ) );
+ aInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ aInfo.maName = rAttribs.getXString( XML_name, OUString() );
+ mpSlidePersistPtr->getDrawing()->registerControl( aInfo );
+ }
+ return this;
+
+ case PPT_TOKEN( timing ): // CT_SlideTiming
+ return new SlideTimingContext( *this, mpSlidePersistPtr->getTimeNodeList() );
+ case PPT_TOKEN( transition ): // CT_SlideTransition
+ return new SlideTransitionContext( *this, rAttribs, maSlideProperties );
+ case PPT_TOKEN( hf ):
+ return new HeaderFooterContext( *this, rAttribs, mpSlidePersistPtr->getHeaderFooter() );
+
+ // BackgroundGroup
+ case PPT_TOKEN( bg ):
+ return this;
+ case PPT_TOKEN( bgPr ): // CT_BackgroundProperties
+ {
+ FillPropertiesPtr pFillPropertiesPtr =std::make_shared<FillProperties>();
+ mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
+ return new BackgroundPropertiesContext( *this, *pFillPropertiesPtr );
+ }
+ break;
+
+ case PPT_TOKEN( bgRef ): // a:CT_StyleMatrixReference
+ {
+ const FillProperties *pFillProperties = nullptr;
+ if( mpSlidePersistPtr->getTheme() )
+ pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) );
+ FillPropertiesPtr pFillPropertiesPtr =
+ pFillProperties
+ ? std::make_shared<FillProperties>( *pFillProperties )
+ : std::make_shared<FillProperties>();
+ mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
+ ContextHandlerRef ret = new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() );
+ return ret;
+ }
+ break;
+
+ case A_TOKEN( overrideClrMapping ):
+ case PPT_TOKEN( clrMap ): // CT_ColorMapping
+ {
+ oox::drawingml::ClrMapPtr pClrMapPtr =
+ ( aElementToken == PPT_TOKEN( clrMap ) || !mpSlidePersistPtr || !mpSlidePersistPtr->getClrMap() )
+ ? std::make_shared<oox::drawingml::ClrMap>()
+ : std::make_shared<oox::drawingml::ClrMap>( *mpSlidePersistPtr->getClrMap() );
+ ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, rAttribs, *pClrMapPtr );
+ mpSlidePersistPtr->setClrMap( pClrMapPtr );
+ return ret;
+ }
+ break;
+ case PPT_TOKEN( clrMapOvr ): // CT_ColorMappingOverride
+ case PPT_TOKEN( sldLayoutIdLst ): // CT_SlideLayoutIdList
+ return this;
+ case PPT_TOKEN( txStyles ): // CT_SlideMasterTextStyles
+ return new SlideMasterTextStylesContext( *this, mpSlidePersistPtr );
+ case PPT_TOKEN( custDataLst ): // CT_CustomerDataList
+ case PPT_TOKEN( tagLst ): // CT_TagList
+ return this;
+
+ //for Comments
+ case PPT_TOKEN( cmLst ):
+ break;
+ case PPT_TOKEN( cm ):
+ if (!mpSlidePersistPtr->getCommentsList().cmLst.empty() && !getCharVector().empty())
+ {
+ // set comment text for earlier comment
+ mpSlidePersistPtr->getCommentsList().cmLst.back().setText( getCharVector().back() );
+ }
+ // insert a new comment in vector commentsList
+ mpSlidePersistPtr->getCommentsList().cmLst.emplace_back();
+ mpSlidePersistPtr->getCommentsList().cmLst.back().setAuthorId(rAttribs.getString(XML_authorId, OUString()));
+ mpSlidePersistPtr->getCommentsList().cmLst.back().setdt(rAttribs.getString(XML_dt, OUString()));
+ mpSlidePersistPtr->getCommentsList().cmLst.back().setidx(rAttribs.getString(XML_idx, OUString()));
+ break;
+
+ case PPT_TOKEN( pos ):
+ mpSlidePersistPtr->getCommentsList().cmLst.back().setPoint(
+ rAttribs.getString(XML_x, OUString()),
+ rAttribs.getString(XML_y, OUString()));
+ break;
+
+ case PPT_TOKEN( cmAuthor ):
+ CommentAuthor _author;
+ _author.clrIdx = rAttribs.getString(XML_clrIdx, OUString());
+ _author.id = rAttribs.getString(XML_id, OUString());
+ _author.initials = rAttribs.getString(XML_initials, OUString());
+ _author.lastIdx = rAttribs.getString(XML_lastIdx, OUString());
+ _author.name = rAttribs.getString(XML_name, OUString());
+ mpSlidePersistPtr->getCommentAuthors().addAuthor(_author);
+ break;
+ }
+
+ return this;
+}
+void SlideFragmentHandler::onCharacters( const OUString& rChars)
+{
+ maCharVector.push_back(rChars);
+}
+void SlideFragmentHandler::finalizeImport()
+{
+ try
+ {
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ PropertySet aSlideProp( xSlide );
+ aSlideProp.setProperties( maSlideProperties );
+ if ( !maSlideName.isEmpty() )
+ {
+ Reference< XNamed > xNamed( xSlide, UNO_QUERY );
+ if( xNamed.is() )
+ xNamed->setName( maSlideName );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::SlideFragmentHandler::EndElement()" );
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidemastertextstylescontext.cxx b/oox/source/ppt/slidemastertextstylescontext.cxx
new file mode 100644
index 000000000..de326c9bb
--- /dev/null
+++ b/oox/source/ppt/slidemastertextstylescontext.cxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/textliststyle.hxx>
+#include <drawingml/textliststylecontext.hxx>
+#include <oox/ppt/slidemastertextstylescontext.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+SlideMasterTextStylesContext::SlideMasterTextStylesContext( FragmentHandler2 const & rParent, SlidePersistPtr const & pSlidePersistPtr )
+: FragmentHandler2( rParent )
+, mpSlidePersistPtr( pSlidePersistPtr )
+{
+}
+
+SlideMasterTextStylesContext::~SlideMasterTextStylesContext()
+{
+}
+
+::oox::core::ContextHandlerRef SlideMasterTextStylesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ )
+{
+ oox::drawingml::TextListStylePtr aTextListStylePtr;
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( titleStyle ):
+ {
+ aTextListStylePtr = mpSlidePersistPtr->getTitleTextStyle();
+ break;
+ }
+ case PPT_TOKEN( bodyStyle ):
+ {
+ aTextListStylePtr = mpSlidePersistPtr->getBodyTextStyle();
+ break;
+ }
+ case PPT_TOKEN( notesStyle ):
+ {
+ aTextListStylePtr = mpSlidePersistPtr->getNotesTextStyle();
+ break;
+ }
+ case PPT_TOKEN( otherStyle ):
+ {
+ aTextListStylePtr = mpSlidePersistPtr->getOtherTextStyle();
+ break;
+ }
+ }
+ if ( aTextListStylePtr ) // sj: the master list style is the last instance of from where properties
+ { // are obtained. i got some documents without having the textsize set at
+ for ( int i = 0; i < 9; i++ ) // any point, the master reference application is using 18pt then
+ aTextListStylePtr->getListStyle()[ i ].getTextCharacterProperties().moHeight = 1800;
+ return new oox::drawingml::TextListStyleContext( *this, *aTextListStylePtr );
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
new file mode 100644
index 000000000..dc068b0b6
--- /dev/null
+++ b/oox/source/ppt/slidepersist.cxx
@@ -0,0 +1,555 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <oox/ppt/timenode.hxx>
+#include <oox/ppt/pptshape.hxx>
+#include <oox/ppt/slidepersist.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/textliststyle.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+
+#include <osl/diagnose.h>
+
+#include <com/sun/star/style/XStyle.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
+#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
+#include <com/sun/star/container/XIdentifierContainer.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#include <svx/svdobj.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::animations;
+
+
+namespace oox::ppt {
+
+SlidePersist::SlidePersist( XmlFilterBase& rFilter, bool bMaster, bool bNotes,
+ const css::uno::Reference< css::drawing::XDrawPage >& rxPage,
+ oox::drawingml::ShapePtr const & pShapesPtr, const drawingml::TextListStylePtr & pDefaultTextStyle )
+: mpDrawingPtr( std::make_shared<oox::vml::Drawing>( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) )
+, mxPage( rxPage )
+, maShapesPtr( pShapesPtr )
+, mnLayoutValueToken( 0 )
+, mbMaster( bMaster )
+, mbNotes ( bNotes )
+, maDefaultTextStylePtr( pDefaultTextStyle )
+, maTitleTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maBodyTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maNotesTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+, maOtherTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
+{
+#if OSL_DEBUG_LEVEL > 0
+ mxDebugPage = mxPage;
+#endif
+}
+
+#if OSL_DEBUG_LEVEL > 0
+css::uno::WeakReference< css::drawing::XDrawPage > SlidePersist::mxDebugPage;
+#endif
+
+SlidePersist::~SlidePersist()
+{
+}
+
+sal_Int16 SlidePersist::getLayoutFromValueToken() const
+{
+ sal_Int16 nLayout = 20; // 20 == blank (so many magic numbers :-( the description at com.sun.star.presentation.DrawPage.Layout does not help)
+ switch( mnLayoutValueToken )
+ {
+ case XML_blank: nLayout = 20; break;
+ case XML_chart: nLayout = 2; break;
+ case XML_chartAndTx: nLayout = 7; break;
+ case XML_clipArtAndTx: nLayout = 9; break;
+ case XML_clipArtAndVertTx: nLayout = 24; break;
+ case XML_fourObj: nLayout = 18; break;
+ case XML_obj: nLayout = 11; break;
+ case XML_objAndTx: nLayout = 13; break;
+ case XML_objOverTx: nLayout = 14; break;
+ case XML_tbl: nLayout = 8; break;
+ case XML_title: nLayout = 0; break;
+ case XML_titleOnly: nLayout = 19; break;
+ case XML_twoObj:
+ case XML_twoColTx: nLayout = 3; break;
+ case XML_twoObjAndTx: nLayout = 15; break;
+ case XML_twoObjOverTx: nLayout = 16; break;
+ case XML_tx: nLayout = 1; break;
+ case XML_txAndChart: nLayout = 4; break;
+ case XML_txAndClipArt: nLayout = 6; break;
+ case XML_txAndMedia: nLayout = 6; break;
+ case XML_txAndObj: nLayout = 10; break;
+ case XML_txAndTwoObj: nLayout = 12; break;
+ case XML_txOverObj: nLayout = 17; break;
+ case XML_vertTitleAndTx: nLayout = 22; break;
+ case XML_vertTitleAndTxOverChart: nLayout = 21; break;
+ case XML_vertTx: nLayout = 23; break;
+
+ case XML_twoTxTwoObj:
+ case XML_twoObjAndObj:
+ case XML_objTx:
+ case XML_picTx:
+ case XML_secHead:
+ case XML_objOnly:
+ case XML_objAndTwoObj:
+ case XML_mediaAndTx:
+ case XML_dgm:
+ case XML_cust:
+ default:
+ nLayout = 20;
+ }
+ return nLayout;
+}
+
+void SlidePersist::createXShapes( XmlFilterBase& rFilterBase )
+{
+ applyTextStyles( rFilterBase );
+
+ Reference< XShapes > xShapes( getPage() );
+ std::vector< oox::drawingml::ShapePtr >& rShapes( maShapesPtr->getChildren() );
+
+ for (auto const& shape : rShapes)
+ {
+ std::vector< oox::drawingml::ShapePtr >& rChildren( shape->getChildren() );
+ for (auto const& child : rChildren)
+ {
+ PPTShape* pPPTShape = dynamic_cast< PPTShape* >( child.get() );
+ basegfx::B2DHomMatrix aTransformation;
+ if ( pPPTShape )
+ {
+ pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, aTransformation, &getShapeMap() );
+ if (pPPTShape->isConnectorShape())
+ maConnectorShapeId.push_back(pPPTShape->getId());
+ if (!pPPTShape->getChildren().empty())
+ {
+ for (size_t i = 0; i < pPPTShape->getChildren().size(); i++)
+ {
+ if (pPPTShape->getChildren()[i]->isConnectorShape())
+ maConnectorShapeId.push_back(pPPTShape->getChildren()[i]->getId());
+ }
+ }
+ if (pPPTShape->hasBookmark())
+ addURLShapeId(pPPTShape->getId());
+ }
+ else
+ child->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), &getShapeMap() );
+ }
+ }
+
+ if (!maConnectorShapeId.empty())
+ createConnectorShapeConnection();
+
+ Reference< XAnimationNodeSupplier > xNodeSupplier( getPage(), UNO_QUERY);
+ if( !xNodeSupplier.is() )
+ return;
+
+ Reference< XAnimationNode > xNode( xNodeSupplier->getAnimationNode() );
+ if( xNode.is() && !maTimeNodeList.empty() )
+ {
+ SlidePersistPtr pSlidePtr( shared_from_this() );
+ TimeNodePtr pNode(maTimeNodeList.front());
+ OSL_ENSURE( pNode, "pNode" );
+
+ Reference<XAnimationNode> xDummy;
+ pNode->setNode(rFilterBase, xNode, pSlidePtr, xDummy);
+ }
+}
+
+void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
+{
+ if ( mpBackgroundPropertiesPtr )
+ {
+ ::Color nPhClr = maBackgroundColor.isUsed() ?
+ maBackgroundColor.getColor( rFilterBase.getGraphicHelper() ) : API_RGB_TRANSPARENT;
+
+ oox::drawingml::ShapePropertyIds aPropertyIds = oox::drawingml::ShapePropertyInfo::DEFAULT.mrPropertyIds;
+ aPropertyIds[oox::drawingml::ShapeProperty::FillGradient] = PROP_FillGradientName;
+ oox::drawingml::ShapePropertyInfo aPropInfo( aPropertyIds, true, false, true, false, false );
+ oox::drawingml::ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper(), aPropInfo );
+ mpBackgroundPropertiesPtr->pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), 0, nPhClr );
+ PropertySet( mxPage ).setProperty( PROP_Background, aPropMap.makePropertySet() );
+ }
+}
+
+static void setTextStyle( Reference< beans::XPropertySet > const & rxPropSet, const XmlFilterBase& rFilter,
+ oox::drawingml::TextListStylePtr const & pTextListStylePtr, int nLevel )
+{
+ ::oox::drawingml::TextParagraphProperties* pTextParagraphPropertiesPtr( &pTextListStylePtr->getListStyle()[ nLevel ] );
+ if( pTextParagraphPropertiesPtr == nullptr )
+ {
+ // no properties. return
+ return;
+ }
+
+ PropertyMap& rTextParagraphPropertyMap( pTextParagraphPropertiesPtr->getTextParagraphPropertyMap() );
+
+ PropertySet aPropSet( rxPropSet );
+ aPropSet.setProperties( rTextParagraphPropertyMap );
+ pTextParagraphPropertiesPtr->getTextCharacterProperties().pushToPropSet( aPropSet, rFilter );
+}
+
+void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase )
+{
+ if ( !mbMaster )
+ return;
+
+ try
+ {
+ Reference< style::XStyleFamiliesSupplier > aXStyleFamiliesSupplier( rFilterBase.getModel(), UNO_QUERY_THROW );
+ Reference< container::XNameAccess > aXNameAccess( aXStyleFamiliesSupplier->getStyleFamilies() );
+ Reference< container::XNamed > aXNamed( mxPage, UNO_QUERY_THROW );
+
+ if ( aXNameAccess.is() )
+ {
+ oox::drawingml::TextListStylePtr pTextListStylePtr;
+ OUString aStyle;
+ OUString aFamily;
+
+ static const OUStringLiteral sOutline( u"outline1" );
+ static const OUStringLiteral sTitle( u"title" );
+ static const OUStringLiteral sStandard( u"standard" );
+ static const OUStringLiteral sSubtitle( u"subtitle" );
+
+ for( int i = 0; i < 4; i++ ) // todo: aggregation of bodystyle (subtitle)
+ {
+ switch( i )
+ {
+ case 0 : // title style
+ {
+ pTextListStylePtr = maTitleTextStylePtr;
+ aStyle = sTitle;
+ aFamily= aXNamed->getName();
+ break;
+ }
+ case 1 : // body style
+ {
+ pTextListStylePtr = maBodyTextStylePtr;
+ aStyle = sOutline;
+ aFamily= aXNamed->getName();
+ break;
+ }
+ case 3 : // notes style
+ {
+ pTextListStylePtr = maNotesTextStylePtr;
+ aStyle = sTitle;
+ aFamily= aXNamed->getName();
+ break;
+ }
+ case 4 : // standard style
+ {
+ pTextListStylePtr = maOtherTextStylePtr;
+ aStyle = sStandard;
+ aFamily = "graphics";
+ break;
+ }
+ case 5 : // subtitle
+ {
+ pTextListStylePtr = maBodyTextStylePtr;
+ aStyle = sSubtitle;
+ aFamily = aXNamed->getName();
+ break;
+ }
+ }
+ Reference< container::XNameAccess > xFamilies;
+ if ( aXNameAccess->hasByName( aFamily ) )
+ {
+ if( aXNameAccess->getByName( aFamily ) >>= xFamilies )
+ {
+ if ( xFamilies->hasByName( aStyle ) )
+ {
+ Reference< style::XStyle > aXStyle;
+ if ( xFamilies->getByName( aStyle ) >>= aXStyle )
+ {
+ Reference< beans::XPropertySet > xPropSet( aXStyle, UNO_QUERY_THROW );
+ setTextStyle( xPropSet, rFilterBase, maDefaultTextStylePtr, 0 );
+ setTextStyle( xPropSet, rFilterBase, pTextListStylePtr, 0 );
+ if ( i == 1 /* BodyStyle */ )
+ {
+ for ( int nLevel = 1; nLevel < 5; nLevel++ )
+ {
+ {
+ char pOutline[ 9 ] = "outline1";
+ pOutline[ 7 ] = static_cast< char >( '0' + nLevel );
+ OUString sOutlineStyle( OUString::createFromAscii( pOutline ) );
+ if ( xFamilies->hasByName( sOutlineStyle ) )
+ {
+ xFamilies->getByName( sOutlineStyle ) >>= aXStyle;
+ if( aXStyle.is() )
+ xPropSet.set( aXStyle, UNO_QUERY_THROW );
+ }
+ }
+ setTextStyle( xPropSet, rFilterBase, maDefaultTextStylePtr, nLevel );
+ setTextStyle( xPropSet, rFilterBase, pTextListStylePtr, nLevel );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ }
+}
+
+void SlidePersist::hideShapesAsMasterShapes()
+{
+ std::vector< oox::drawingml::ShapePtr >& rShapes( maShapesPtr->getChildren() );
+ for (auto const& shape : rShapes)
+ {
+ std::vector< oox::drawingml::ShapePtr >& rChildren( shape->getChildren() );
+ for (auto const& child : rChildren)
+ {
+ PPTShape* pPPTShape = dynamic_cast< PPTShape* >( child.get() );
+ if (!pPPTShape)
+ continue;
+ pPPTShape->setHiddenMasterShape( true );
+ }
+ }
+}
+
+// This angle determines in the direction of the line
+static sal_Int32 lcl_GetAngle(uno::Reference<drawing::XShape>& rXShape, awt::Point& rPt)
+{
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(rXShape);
+ tools::Rectangle aR(pObj->GetSnapRect());
+ sal_Int32 nLeftX = rPt.X - aR.Left();
+ sal_Int32 nTopY = rPt.Y - aR.Top();
+ sal_Int32 nRightX = aR.Right() - rPt.X;
+ sal_Int32 nBottomY = aR.Bottom() - rPt.Y;
+ sal_Int32 nX = std::min(nLeftX, nRightX);
+ sal_Int32 nY = std::min(nTopY, nBottomY);
+
+ sal_Int32 nAngle;
+ if (nX < nY)
+ {
+ if (nLeftX < nRightX)
+ nAngle = 180; // Left
+ else
+ nAngle = 0; // Right
+ }
+ else
+ {
+ if (nTopY < nBottomY)
+ nAngle = 270; // Top
+ else
+ nAngle = 90; // Bottom
+ }
+ return nAngle;
+}
+
+Reference<XAnimationNode> SlidePersist::getAnimationNode(const OUString& sId) const
+{
+ const auto& pIter = maAnimNodesMap.find(sId);
+ if (pIter != maAnimNodesMap.end())
+ return pIter->second;
+
+ Reference<XAnimationNode> aResult;
+ return aResult;
+}
+
+static void lcl_SetEdgeLineValue(uno::Reference<drawing::XShape>& rXConnector,
+ oox::drawingml::ShapePtr& rShapePtr)
+{
+ sal_Int32 nEdge = 0;
+ awt::Point aStartPt, aEndPt;
+ tools::Rectangle aStartRect, aEndRect;
+ uno::Reference<drawing::XShape> xStartSp, xEndSp;
+ uno::Reference<beans::XPropertySet> xPropSet(rXConnector, uno::UNO_QUERY);
+ xPropSet->getPropertyValue("EdgeStartPoint") >>= aStartPt;
+ xPropSet->getPropertyValue("EdgeEndPoint") >>= aEndPt;
+ xPropSet->getPropertyValue("StartShape") >>= xStartSp;
+ xPropSet->getPropertyValue("EndShape") >>= xEndSp;
+ xPropSet->setPropertyValue("EdgeNode1HorzDist", Any(sal_Int32(0)));
+ xPropSet->setPropertyValue("EdgeNode1VertDist", Any(sal_Int32(0)));
+ xPropSet->setPropertyValue("EdgeNode2HorzDist", Any(sal_Int32(0)));
+ xPropSet->setPropertyValue("EdgeNode2VertDist", Any(sal_Int32(0)));
+
+ SdrObject* pStartObj = xStartSp.is() ? SdrObject::getSdrObjectFromXShape(xStartSp) : nullptr;
+ SdrObject* pEndObj = xEndSp.is() ? SdrObject::getSdrObjectFromXShape(xEndSp) : nullptr;
+
+ sal_Int32 nStartSpLineW = 0;
+ sal_Int32 nStartA = -1;
+ sal_Int32 nEndA = -1;
+ if (pStartObj)
+ {
+ aStartRect = pStartObj->GetSnapRect();
+ uno::Reference<beans::XPropertySet> xPropxStartSp(xStartSp, uno::UNO_QUERY);
+ xPropxStartSp->getPropertyValue("LineWidth") >>= nStartSpLineW;
+ if (nStartSpLineW)
+ nStartSpLineW = nStartSpLineW / 2;
+ nStartA = lcl_GetAngle(xStartSp, aStartPt);
+ }
+ sal_Int32 nEndSpLineW = 0;
+ if (pEndObj)
+ {
+ aEndRect = pEndObj->GetSnapRect();
+ uno::Reference<beans::XPropertySet> xPropxEndSp(xEndSp, uno::UNO_QUERY);
+ xPropxEndSp->getPropertyValue("LineWidth") >>= nEndSpLineW;
+ if (nEndSpLineW)
+ nEndSpLineW = nEndSpLineW / 2;
+ nEndA = lcl_GetAngle(xEndSp, aEndPt);
+ }
+
+ const OUString sConnectorName = rShapePtr->getConnectorName();
+ if (sConnectorName == "bentConnector2")
+ {
+ awt::Size aConnSize = rXConnector->getSize();
+ if (xStartSp.is() || xEndSp.is())
+ {
+ if (nStartA >= 0)
+ {
+ switch (nStartA)
+ {
+ case 0: nEdge = aEndPt.X - aStartRect.Right(); break;
+ case 180: nEdge = aEndPt.X - aStartRect.Left(); break;
+ case 90: nEdge = aEndPt.Y - aStartRect.Bottom(); break;
+ case 270: nEdge = aEndPt.Y - aStartRect.Top(); break;
+ }
+ nEdge += nStartSpLineW * (nStartA >= 180 ? +1 : -1);
+ } else {
+ switch (nEndA)
+ {
+ case 0: nEdge = aStartPt.X - aEndRect.Right(); break;
+ case 180: nEdge = aStartPt.X - aEndRect.Left(); break;
+ case 90: nEdge = aStartPt.Y - aEndRect.Bottom(); break;
+ case 270: nEdge = aStartPt.Y - aEndRect.Top(); break;
+ }
+ nEdge += nEndSpLineW * (nEndA >= 180 ? +1 : -1);
+ }
+ }
+ else
+ {
+ bool bFlipH = rShapePtr->getFlipH();
+ bool bFlipV = rShapePtr->getFlipV();
+ sal_Int32 nConnectorAngle = rShapePtr->getRotation() / 60000;
+ if (aConnSize.Height < aConnSize.Width)
+ {
+ if ((nConnectorAngle == 90 && bFlipH && bFlipV) || (nConnectorAngle == 180)
+ || (nConnectorAngle == 270 && bFlipH))
+ nEdge -= aConnSize.Width;
+ else
+ nEdge += aConnSize.Width;
+ }
+ else
+ {
+ if ((nConnectorAngle == 180 && bFlipV) || (nConnectorAngle == 270 && bFlipV)
+ || (nConnectorAngle == 90 && bFlipH && bFlipV)
+ || (nConnectorAngle == 0 && !bFlipV))
+ nEdge -= aConnSize.Height;
+ else
+ nEdge += aConnSize.Height;
+ }
+ }
+ xPropSet->setPropertyValue("EdgeLine1Delta", Any(nEdge / 2));
+ }
+}
+
+// create connection between two shape with a connector shape.
+void SlidePersist::createConnectorShapeConnection()
+{
+ sal_Int32 nConnectorShapeCount = maConnectorShapeId.size();
+ for (sal_Int32 i = 0; i < nConnectorShapeCount; i++)
+ {
+ const auto& pIt = maShapeMap.find(maConnectorShapeId[i]);
+ if (pIt == maShapeMap.end())
+ continue;
+ oox::drawingml::ConnectorShapePropertiesList aConnectorShapeProperties
+ = pIt->second->getConnectorShapeProperties();
+ uno::Reference<drawing::XShape> xConnector(pIt->second->getXShape(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xConnector, uno::UNO_QUERY);
+
+ if (xConnector.is())
+ {
+ sal_Int32 nCount = aConnectorShapeProperties.size();
+ for (sal_Int32 j = 0; j < nCount; j++)
+ {
+ OUString aDestShapeId = aConnectorShapeProperties[j].maDestShapeId;
+ const auto& pShape = maShapeMap.find(aDestShapeId);
+ if (pShape == maShapeMap.end())
+ continue;
+ uno::Reference<drawing::XShape> xShape(pShape->second->getXShape(), uno::UNO_QUERY);
+ if (xShape.is())
+ {
+ uno::Reference<drawing::XGluePointsSupplier> xSupplier(xShape, uno::UNO_QUERY);
+ css::uno::Reference<css::container::XIdentifierContainer> xGluePoints(
+ xSupplier->getGluePoints(), uno::UNO_QUERY);
+
+ sal_Int32 nCountGluePoints = xGluePoints->getIdentifiers().getLength();
+ sal_Int32 nGlueId = aConnectorShapeProperties[j].mnDestGlueId;
+
+ // The first 4 glue points belong to the bounding box.
+ if (nCountGluePoints > 4)
+ nGlueId += 4;
+ else
+ {
+ // change id of the left and right glue points of the bounding box (1 <-> 3)
+ if (nGlueId == 1)
+ nGlueId = 3; // Right
+ else if (nGlueId == 3)
+ nGlueId = 1; // Left
+ }
+
+ bool bStart = aConnectorShapeProperties[j].mbStartShape;
+ if (bStart)
+ {
+ xPropertySet->setPropertyValue("StartShape", uno::Any(xShape));
+ xPropertySet->setPropertyValue("StartGluePointIndex", uno::Any(nGlueId));
+ }
+ else
+ {
+ xPropertySet->setPropertyValue("EndShape", uno::Any(xShape));
+ xPropertySet->setPropertyValue("EndGluePointIndex", uno::Any(nGlueId));
+ }
+ }
+ }
+ uno::Reference<beans::XPropertySetInfo> xPropInfo = xPropertySet->getPropertySetInfo();
+ if (xPropInfo->hasPropertyByName("EdgeKind"))
+ {
+ ConnectorType aConnectorType;
+ xPropertySet->getPropertyValue("EdgeKind") >>= aConnectorType;
+ if (aConnectorType == ConnectorType_STANDARD)
+ lcl_SetEdgeLineValue(xConnector, pIt->second);
+ }
+ }
+ }
+ maConnectorShapeId.clear();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidetimingcontext.cxx b/oox/source/ppt/slidetimingcontext.cxx
new file mode 100644
index 000000000..300249446
--- /dev/null
+++ b/oox/source/ppt/slidetimingcontext.cxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/slidetimingcontext.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/ppt/timenodelistcontext.hxx>
+#include "buildlistcontext.hxx"
+#include <oox/token/namespaces.hxx>
+
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+SlideTimingContext::SlideTimingContext( FragmentHandler2 const & rParent, TimeNodePtrList & aTimeNodeList ) noexcept
+ : FragmentHandler2( rParent )
+ , maTimeNodeList( aTimeNodeList )
+{
+}
+
+SlideTimingContext::~SlideTimingContext() noexcept
+{
+
+}
+
+::oox::core::ContextHandlerRef SlideTimingContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( bldLst ):
+ return new BuildListContext( *this );
+ case PPT_TOKEN( extLst ):
+ return this;
+ case PPT_TOKEN( tnLst ):
+ // timing nodes
+ {
+ return new TimeNodeListContext( *this, maTimeNodeList );
+ }
+ break;
+
+ default:
+ return this;
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
new file mode 100644
index 000000000..5221c2f68
--- /dev/null
+++ b/oox/source/ppt/slidetransition.cxx
@@ -0,0 +1,467 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/slidetransition.hxx>
+
+#include <com/sun/star/animations/TransitionType.hpp>
+#include <com/sun/star/animations/TransitionSubType.hpp>
+#include <com/sun/star/animations/XTransitionFilter.hpp>
+
+#include <sal/log.hxx>
+#include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <oox/helper/propertymap.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::presentation;
+
+namespace oox::ppt {
+
+ SlideTransition::SlideTransition()
+ : mnTransitionType( 0 )
+ , mnTransitionSubType( 0 )
+ , mbTransitionDirectionNormal( true )
+ , mnAnimationSpeed( AnimationSpeed_FAST )
+ , mfTransitionDurationInSeconds( -1.0 )
+ , mbMode( true )
+ , mnAdvanceTime( -1 )
+ , mnTransitionFadeColor( 0 )
+ {
+
+ }
+
+ SlideTransition::SlideTransition(std::u16string_view sFilterName)
+ : mnTransitionType( 0 )
+ , mnTransitionSubType( 0 )
+ , mbTransitionDirectionNormal( true )
+ , mnAnimationSpeed( AnimationSpeed_FAST )
+ , mfTransitionDurationInSeconds( -1.0 )
+ , mbMode( true )
+ , mnAdvanceTime( -1 )
+ , mnTransitionFadeColor( 0 )
+ {
+ const transition *p = transition::find( sFilterName );
+ if( p )
+ {
+ mnTransitionType = p->mnType;
+ mnTransitionSubType = p->mnSubType;
+ mbTransitionDirectionNormal = p->mbDirection;
+ }
+ }
+
+ void SlideTransition::setSlideProperties( PropertyMap & aProps )
+ {
+ try
+ {
+ aProps.setProperty( PROP_TransitionType, mnTransitionType);
+ aProps.setProperty( PROP_TransitionSubtype, mnTransitionSubType);
+ aProps.setProperty( PROP_TransitionDirection, mbTransitionDirectionNormal);
+ aProps.setProperty( PROP_Speed, mnAnimationSpeed);
+ if( mfTransitionDurationInSeconds >= 0.0 )
+ aProps.setProperty( PROP_TransitionDuration, mfTransitionDurationInSeconds);
+ aProps.setProperty( PROP_TransitionFadeColor, mnTransitionFadeColor);
+ if( mnAdvanceTime != -1 ) {
+ aProps.setProperty( PROP_Duration, mnAdvanceTime/1000);
+ aProps.setProperty( PROP_Change, static_cast<sal_Int32>(1));
+ }
+ }
+ catch( Exception& )
+ {
+ // should not happen
+ TOOLS_WARN_EXCEPTION( "oox", "" );
+ }
+ }
+
+ void SlideTransition::setTransitionFilterProperties( const Reference< XTransitionFilter > & xFilter )
+ {
+ try
+ {
+ xFilter->setTransition( mnTransitionType );
+ xFilter->setSubtype( mnTransitionSubType );
+ xFilter->setDirection( mbTransitionDirectionNormal );
+ xFilter->setFadeColor( 0 );
+ xFilter->setMode( mbMode );
+ }
+ catch( Exception& )
+ {
+ // should not happen
+ TOOLS_WARN_EXCEPTION( "oox", "" );
+ }
+ }
+
+ void SlideTransition::setOoxTransitionSpeed( sal_Int32 nToken)
+ {
+ switch( nToken )
+ {
+ /* the speed values are located in the PPT97 importer
+ * sd/source/filter/ppt/pptin.cxx:1783
+ * (void ImplSdPPTImport::ImportPageEffect)
+ */
+ case XML_fast:
+ mnAnimationSpeed = AnimationSpeed_FAST;
+ mfTransitionDurationInSeconds = 0.5;
+ break;
+ case XML_med:
+ mnAnimationSpeed = AnimationSpeed_MEDIUM;
+ mfTransitionDurationInSeconds = 0.75;
+ break;
+ case XML_slow:
+ mnAnimationSpeed = AnimationSpeed_SLOW;
+ mfTransitionDurationInSeconds = 1.0;
+ break;
+ default:
+ // should not happen. just ignore
+ break;
+ }
+ }
+
+ void SlideTransition::setOoxTransitionSpeed( double fDurationInSeconds )
+ {
+ // for compatibility
+ mnAnimationSpeed = ( fDurationInSeconds <= 0.5 ) ? AnimationSpeed_FAST
+ : ( fDurationInSeconds >= 1.0 ) ? AnimationSpeed_SLOW : AnimationSpeed_MEDIUM;
+ mfTransitionDurationInSeconds = fDurationInSeconds;
+ }
+
+ sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType )
+ {
+ sal_Int16 nOdpDirection;
+ nOdpDirection = ooxToOdpBorderDirections( nOoxType );
+ if( nOdpDirection == 0 )
+ {
+ nOdpDirection = ooxToOdpCornerDirections( nOoxType );
+ }
+ return nOdpDirection;
+ }
+
+ sal_Int16 SlideTransition::ooxToOdpBorderDirections( ::sal_Int32 nOoxType )
+ {
+ sal_Int16 nOdpDirection;
+ switch( nOoxType )
+ {
+ case XML_d:
+ nOdpDirection = TransitionSubType::FROMTOP;
+ break;
+ case XML_l:
+ nOdpDirection = TransitionSubType::FROMLEFT;
+ break;
+ case XML_r:
+ nOdpDirection = TransitionSubType::FROMRIGHT;
+ break;
+ case XML_u:
+ nOdpDirection = TransitionSubType::FROMBOTTOM;
+ break;
+ default:
+ nOdpDirection= 0;
+ break;
+ }
+ return nOdpDirection;
+ }
+
+ sal_Int16 SlideTransition::ooxToOdpSideDirections( ::sal_Int32 nOoxType )
+ {
+ sal_Int16 nOdpDirection;
+ switch( nOoxType )
+ {
+ case XML_d:
+ case XML_u:
+ nOdpDirection = TransitionSubType::TOPTOBOTTOM;
+ break;
+ case XML_l:
+ case XML_r:
+ nOdpDirection = TransitionSubType::LEFTTORIGHT;
+ break;
+ default:
+ nOdpDirection= 0;
+ break;
+ }
+ return nOdpDirection;
+ }
+
+ bool SlideTransition::ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType )
+ {
+ bool bOdpDirection = true;
+ switch( nOoxType )
+ {
+ case XML_u:
+ case XML_l:
+ bOdpDirection = false;
+ break;
+ }
+ return bOdpDirection;
+ }
+
+ sal_Int16 SlideTransition::ooxToOdpCornerDirections( ::sal_Int32 nOoxType )
+ {
+ sal_Int16 nOdpDirection;
+ switch( nOoxType )
+ {
+ case XML_lu:
+ nOdpDirection = TransitionSubType::FROMBOTTOMRIGHT;
+ break;
+ case XML_ru:
+ nOdpDirection = TransitionSubType::FROMBOTTOMLEFT;
+ break;
+ case XML_ld:
+ nOdpDirection = TransitionSubType::FROMTOPRIGHT;
+ break;
+ case XML_rd:
+ nOdpDirection = TransitionSubType::FROMTOPLEFT;
+ break;
+ default:
+ nOdpDirection = 0;
+ break;
+ }
+ return nOdpDirection;
+ }
+
+ sal_Int16 SlideTransition::ooxToOdpDirection( ::sal_Int32 nOoxType )
+ {
+ sal_Int16 nOdpDir;
+ switch( nOoxType )
+ {
+ case XML_vert:
+ nOdpDir = TransitionSubType::VERTICAL;
+ break;
+ case XML_horz:
+ nOdpDir = TransitionSubType::HORIZONTAL;
+ break;
+ default:
+ nOdpDir = 0;
+ break;
+ }
+ return nOdpDir;
+ }
+
+ void SlideTransition::setOoxTransitionType( ::sal_Int32 OoxType, ::sal_Int32 param1, ::sal_Int32 param2 )
+ {
+ switch( OoxType )
+ {
+ case PPT_TOKEN( blinds ):
+ mnTransitionType = TransitionType::BLINDSWIPE;
+ mnTransitionSubType = ooxToOdpDirection( param1 );
+ break;
+ case PPT_TOKEN( checker ):
+ mnTransitionType = TransitionType::CHECKERBOARDWIPE;
+ switch ( param1 )
+ {
+ case XML_vert:
+ mnTransitionSubType = TransitionSubType::DOWN;
+ break;
+ case XML_horz:
+ mnTransitionSubType = TransitionSubType::ACROSS;
+ break;
+ default:
+ break;
+ }
+ break;
+ case PPT_TOKEN( comb ):
+ mnTransitionType = TransitionType::PUSHWIPE;
+ switch( param1 )
+ {
+ case XML_vert:
+ mnTransitionSubType = TransitionSubType::COMBVERTICAL;
+ break;
+ case XML_horz:
+ mnTransitionSubType = TransitionSubType::COMBHORIZONTAL;
+ break;
+ default:
+ break;
+ }
+ break;
+ case PPT_TOKEN( cover ):
+ mnTransitionType = TransitionType::SLIDEWIPE;
+ mnTransitionSubType = ooxToOdpEightDirections( param1 );
+ break;
+ case PPT_TOKEN( pull ): // uncover
+ mnTransitionType = TransitionType::SLIDEWIPE;
+ mnTransitionSubType = ooxToOdpEightDirections( param1 );
+ mbTransitionDirectionNormal = false;
+ break;
+ case PPT_TOKEN( cut ):
+ if( param1 )
+ {
+ mnTransitionType = TransitionType::BARWIPE;
+ mnTransitionSubType = TransitionSubType::FADEOVERCOLOR;
+ }
+ SAL_WARN("oox.ppt", "OOX: cut transition fallback." );
+ break;
+ case PPT_TOKEN( fade ):
+ mnTransitionType = TransitionType::FADE;
+ if( param1 )
+ {
+ mnTransitionSubType = TransitionSubType::FADEOVERCOLOR;
+ }
+ else
+ {
+ mnTransitionSubType = TransitionSubType::CROSSFADE;
+ }
+ break;
+ case PPT_TOKEN( push ):
+ mnTransitionType = TransitionType::PUSHWIPE;
+ mnTransitionSubType = ooxToOdpBorderDirections( param1 );
+ break;
+ case PPT_TOKEN( wipe ):
+ mnTransitionType = TransitionType::BARWIPE;
+ mnTransitionSubType = ooxToOdpSideDirections( param1 );
+ mbTransitionDirectionNormal = ooxToOdpSideDirectionsDirectionNormal( param1 );
+ break;
+ case PPT_TOKEN( split ):
+ mnTransitionType = TransitionType::BARNDOORWIPE;
+ mnTransitionSubType = ooxToOdpDirection( param1 );
+ if( param2 == XML_in )
+ {
+ // reverse
+ mbTransitionDirectionNormal = false;
+ }
+ break;
+ case PPT_TOKEN( wheel ):
+ mnTransitionType = TransitionType::PINWHEELWIPE;
+ switch( param1 )
+ {
+ case 1:
+ mnTransitionSubType = TransitionSubType::ONEBLADE;
+ break;
+ case 2:
+ mnTransitionSubType = TransitionSubType::TWOBLADEVERTICAL;
+ break;
+ case 3:
+ mnTransitionSubType = TransitionSubType::THREEBLADE;
+ break;
+ case 4:
+ mnTransitionSubType = TransitionSubType::FOURBLADE;
+ break;
+ case 8:
+ mnTransitionSubType = TransitionSubType::EIGHTBLADE;
+ break;
+ default:
+ SAL_INFO(
+ "oox.ppt",
+ "strange number of blades for the wheel-wipe " << param1);
+ if( param1 > 8 )
+ {
+ mnTransitionSubType = TransitionSubType::EIGHTBLADE;
+ }
+ else if( param1 > 4 )
+ {
+ mnTransitionSubType = TransitionSubType::FOURBLADE;
+ }
+ else if( param1 == 0)
+ {
+ mnTransitionSubType = TransitionSubType::ONEBLADE;
+ }
+ break;
+ }
+ break;
+ case PPT_TOKEN( randomBar ):
+ mnTransitionType = TransitionType::RANDOMBARWIPE;
+ mnTransitionSubType = ooxToOdpDirection( param1 );
+ break;
+ case PPT_TOKEN( circle ):
+ mnTransitionType = TransitionType::ELLIPSEWIPE;
+ mnTransitionSubType = TransitionSubType::CIRCLE;
+ break;
+ case PPT_TOKEN( diamond ):
+ mnTransitionType = TransitionType::IRISWIPE;
+ mnTransitionSubType = TransitionSubType::DIAMOND;
+ break;
+ case PPT_TOKEN( dissolve ):
+ mnTransitionType = TransitionType::DISSOLVE;
+ mnTransitionSubType = TransitionSubType::DEFAULT;
+ break;
+ case PPT_TOKEN( newsflash ):
+ mnTransitionType = TransitionType::ZOOM;
+ mnTransitionSubType = TransitionSubType::ROTATEIN;
+ break;
+ case PPT_TOKEN( plus ):
+ mnTransitionType = TransitionType::FOURBOXWIPE;
+ mnTransitionSubType = TransitionSubType::CORNERSOUT;
+ break;
+ case PPT_TOKEN( random ):
+ mnTransitionType = TransitionType::RANDOM;
+ mnTransitionSubType = TransitionSubType::DEFAULT;
+ break;
+ case PPT_TOKEN( wedge ):
+ mnTransitionType = TransitionType::FANWIPE;
+ mnTransitionSubType = TransitionSubType::CENTERTOP;
+ break;
+ case PPT_TOKEN( zoom ):
+ mnTransitionType = TransitionType::ZOOM;
+ mnTransitionSubType = TransitionSubType::DEFAULT;
+ break;
+ case P14_TOKEN(prism):
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ if (param1)
+ mnTransitionSubType = TransitionSubType::CORNERSIN;
+ else
+ mnTransitionSubType = TransitionSubType::CORNERSOUT;
+ break;
+ case P14_TOKEN(vortex):
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ mnTransitionSubType = TransitionSubType::VERTICAL;
+ break;
+ case P14_TOKEN(ripple):
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ mnTransitionSubType = TransitionSubType::HORIZONTAL;
+ break;
+ case P14_TOKEN(glitter):
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ mnTransitionSubType = TransitionSubType::DIAMOND;
+ break;
+ case P14_TOKEN(honeycomb):
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ mnTransitionSubType = TransitionSubType::HEART;
+ break;
+ case P14_TOKEN(flash):
+ mnTransitionType = TransitionType::FADE;
+ mnTransitionSubType = TransitionSubType::FADEOVERCOLOR;
+ mnTransitionFadeColor = static_cast<sal_Int32>(COL_WHITE);
+ break;
+ case PPT_TOKEN(strips):
+ mnTransitionType = TransitionType::SLIDEWIPE;
+ mnTransitionSubType = ooxToOdpCornerDirections( param1 );
+ break;
+ default:
+ mnTransitionType = 0;
+ break;
+ }
+ }
+
+ void SlideTransition::setPresetTransition(std::u16string_view sPresetTransition)
+ {
+ if (sPresetTransition == u"fallOver")
+ {
+ mnTransitionType = TransitionType::MISCSHAPEWIPE;
+ mnTransitionSubType = TransitionSubType::LEFTTORIGHT;
+ }
+ else
+ {
+ mnTransitionType = 0;
+ }
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
new file mode 100644
index 000000000..8ec8e0fd8
--- /dev/null
+++ b/oox/source/ppt/slidetransitioncontext.cxx
@@ -0,0 +1,200 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/slidetransitioncontext.hxx>
+
+#include <oox/ppt/backgroundproperties.hxx>
+#include <oox/ppt/soundactioncontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent, const AttributeList& rAttribs, PropertyMap & aProperties ) noexcept
+: FragmentHandler2( rParent )
+, maSlideProperties( aProperties )
+, mbHasTransition( false )
+, mbHasTransitionDuration( false )
+{
+ // ST_TransitionSpeed
+ maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) );
+
+ // p14:dur
+ sal_Int32 nDurationInMs = rAttribs.getInteger( P14_TOKEN( dur ), -1 );
+ if( nDurationInMs > -1 )
+ {
+ // In MSO 0 is visible as 0.01s
+ if( nDurationInMs == 0.0 )
+ nDurationInMs = 10;
+ maTransition.setOoxTransitionSpeed( nDurationInMs / 1000.0 );
+ mbHasTransitionDuration = true;
+ }
+
+ // TODO
+ rAttribs.getBool( XML_advClick, true );
+
+ // careful. if missing, no auto advance... 0 looks like a valid value
+ // for auto advance
+ if(rAttribs.hasAttribute( XML_advTm ))
+ maTransition.setOoxAdvanceTime( rAttribs.getInteger( XML_advTm, -1 ) );
+}
+
+SlideTransitionContext::~SlideTransitionContext() noexcept
+{
+
+}
+
+::oox::core::ContextHandlerRef SlideTransitionContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+{
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( blinds ):
+ case PPT_TOKEN( checker ):
+ case PPT_TOKEN( comb ):
+ case PPT_TOKEN( randomBar ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_horz ), 0);
+ }
+ return this;
+ case PPT_TOKEN( cover ):
+ case PPT_TOKEN( pull ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_l ), 0 );
+ }
+ return this;
+ case PPT_TOKEN( cut ):
+ case PPT_TOKEN( fade ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, sal_Int32(rAttribs.getBool( XML_thruBlk, false )), 0);
+ }
+ return this;
+ case PPT_TOKEN( push ):
+ case PPT_TOKEN( wipe ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_l ), 0 );
+ }
+ return this;
+ case PPT_TOKEN( split ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_orient, XML_horz ), rAttribs.getToken( XML_dir, XML_out ) );
+ }
+ return this;
+ case PPT_TOKEN( zoom ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_out ), 0 );
+ }
+ return this;
+ case PPT_TOKEN( wheel ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getUnsigned( XML_spokes, 4 ), 0 );
+ // unsignedInt
+ }
+ return this;
+ case PPT_TOKEN( circle ):
+ case PPT_TOKEN( diamond ):
+ case PPT_TOKEN( dissolve ):
+ case PPT_TOKEN( newsflash ):
+ case PPT_TOKEN( plus ):
+ case PPT_TOKEN( random ):
+ case PPT_TOKEN( wedge ):
+ case P14_TOKEN( vortex ):
+ case P14_TOKEN( ripple ):
+ case P14_TOKEN( glitter ):
+ case P14_TOKEN( honeycomb ):
+ case P14_TOKEN( flash ):
+ // CT_Empty
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, 0, 0 );
+ }
+ return this;
+
+ case PPT_TOKEN( sndAc ): // CT_TransitionSoundAction
+ //"Sound"
+ return new SoundActionContext ( *this, maSlideProperties );
+ case PPT_TOKEN( extLst ): // CT_OfficeArtExtensionList
+ return this;
+
+ case P14_TOKEN(prism):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType(aElementToken, sal_Int32(rAttribs.getBool(XML_isInverted, false)), 0);
+ }
+ return this;
+ case P15_TOKEN(prstTrans):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setPresetTransition(rAttribs.getString(XML_prst, ""));
+ }
+ return this;
+ case PPT_TOKEN( strips ):
+ if (!mbHasTransition)
+ {
+ mbHasTransition = true;
+ maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_ld ), 0 );
+ }
+ return this;
+
+
+ default:
+ break;
+ }
+
+ return this;
+}
+
+void SlideTransitionContext::onEndElement()
+{
+ if( isCurrentElement(PPT_TOKEN( transition )) )
+ {
+ if( mbHasTransition || mbHasTransitionDuration )
+ {
+ maTransition.setSlideProperties( maSlideProperties );
+ mbHasTransition = false;
+ }
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/soundactioncontext.cxx b/oox/source/ppt/soundactioncontext.cxx
new file mode 100644
index 000000000..bac5c6641
--- /dev/null
+++ b/oox/source/ppt/soundactioncontext.cxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_features.h>
+
+#include <oox/ppt/soundactioncontext.hxx>
+
+#include <com/sun/star/io/XInputStream.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <drawingml/embeddedwavaudiofile.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <avmedia/mediaitem.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+
+namespace oox::ppt {
+
+ SoundActionContext::SoundActionContext( FragmentHandler2 const & rParent, PropertyMap & aProperties ) noexcept
+ : FragmentHandler2( rParent )
+ , maSlideProperties( aProperties )
+ , mbHasStartSound( false )
+ , mbLoopSound( false )
+ , mbStopSound( false )
+ {
+ }
+
+ SoundActionContext::~SoundActionContext() noexcept
+ {
+ }
+
+ void SoundActionContext::onEndElement()
+ {
+ if ( !isCurrentElement( PPT_TOKEN( sndAc ) ) )
+ return;
+
+ if( !mbHasStartSound )
+ return;
+
+ OUString url;
+#if HAVE_FEATURE_AVMEDIA
+ if ( !msSndName.isEmpty() )
+ {
+ Reference<css::io::XInputStream>
+ xInputStream = getFilter().openInputStream(msSndName);
+ if (xInputStream.is())
+ {
+ ::avmedia::EmbedMedia(getFilter().getModel(), msSndName, url, xInputStream);
+ xInputStream->closeInput();
+ }
+ }
+#endif
+ if ( !url.isEmpty() )
+ {
+ maSlideProperties.setProperty( PROP_Sound, url);
+ maSlideProperties.setProperty( PROP_SoundOn, true);
+ }
+ }
+
+ ::oox::core::ContextHandlerRef SoundActionContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( snd ):
+ if( mbHasStartSound )
+ {
+ msSndName = drawingml::getEmbeddedWAVAudioFile( getRelations(), rAttribs );
+ }
+ return this;
+ case PPT_TOKEN( endSnd ):
+ // CT_Empty
+ mbStopSound = true;
+ return this;
+ case PPT_TOKEN( stSnd ):
+ mbHasStartSound = true;
+ mbLoopSound = rAttribs.getBool( XML_loop, false );
+ return this;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timeanimvaluecontext.cxx b/oox/source/ppt/timeanimvaluecontext.cxx
new file mode 100644
index 000000000..e81f4967a
--- /dev/null
+++ b/oox/source/ppt/timeanimvaluecontext.cxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "timeanimvaluecontext.hxx"
+
+#include "animvariantcontext.hxx"
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+namespace oox::ppt {
+
+ TimeAnimValueListContext::TimeAnimValueListContext( FragmentHandler2 const & rParent,
+ TimeAnimationValueList & aTavList )
+ : FragmentHandler2( rParent )
+ , maTavList( aTavList )
+ , mbInValue( false )
+ {
+ }
+
+ TimeAnimValueListContext::~TimeAnimValueListContext( )
+ {
+ }
+
+ void TimeAnimValueListContext::onEndElement()
+ {
+ if( isCurrentElement( PPT_TOKEN( tav ) ) )
+ {
+ mbInValue = false;
+ }
+ }
+
+ ::oox::core::ContextHandlerRef TimeAnimValueListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( tav ):
+ {
+ mbInValue = true;
+ TimeAnimationValue val;
+ val.msFormula = rAttribs.getString( XML_fmla, OUString() );
+ val.msTime = rAttribs.getString( XML_tm, OUString() );
+ maTavList.push_back( val );
+ return this;
+ }
+ case PPT_TOKEN( val ):
+ if( mbInValue )
+ {
+ // CT_TLAnimVariant
+ return new AnimVariantContext( *this, aElementToken, maTavList.back().maValue );
+ }
+ break;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timeanimvaluecontext.hxx b/oox/source/ppt/timeanimvaluecontext.hxx
new file mode 100644
index 000000000..34b1c5432
--- /dev/null
+++ b/oox/source/ppt/timeanimvaluecontext.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_TIMEANIMVALUECONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_TIMEANIMVALUECONTEXT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/ppt/animationspersist.hxx>
+
+namespace oox::ppt {
+
+ /** CT_TLTimeAnimateValueList */
+ class TimeAnimValueListContext
+ : public ::oox::core::FragmentHandler2
+ {
+ public:
+ TimeAnimValueListContext( ::oox::core::FragmentHandler2 const & rParent,
+ TimeAnimationValueList & aTavList );
+
+ virtual ~TimeAnimValueListContext( ) override;
+
+ virtual void onEndElement() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ TimeAnimationValueList & maTavList;
+ bool mbInValue;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
new file mode 100644
index 000000000..2701a3f60
--- /dev/null
+++ b/oox/source/ppt/timenode.cxx
@@ -0,0 +1,668 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/timenode.hxx>
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/animations/XAnimateColor.hpp>
+#include <com/sun/star/animations/XAnimateMotion.hpp>
+#include <com/sun/star/animations/XAnimateTransform.hpp>
+#include <com/sun/star/animations/XCommand.hpp>
+#include <com/sun/star/animations/XAudio.hpp>
+#include <com/sun/star/animations/XIterateContainer.hpp>
+#include <com/sun/star/animations/XTimeContainer.hpp>
+#include <com/sun/star/animations/XTransitionFilter.hpp>
+#include <com/sun/star/animations/AnimationNodeType.hpp>
+#include <com/sun/star/animations/Event.hpp>
+#include <com/sun/star/animations/EventTrigger.hpp>
+#include <com/sun/star/io/WrongFormatException.hpp>
+#include <com/sun/star/presentation/EffectNodeType.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/ppt/pptfilterhelpers.hxx>
+#include <oox/token/tokens.hxx>
+#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::presentation;
+
+namespace {
+
+void lcl_setAncestorSubItem( const Reference<XAnimationNode>& xParent, sal_Int16 nSubItem )
+{
+
+ Reference<XAnimationNode> xNode = xParent;
+
+ while ( xNode.is() )
+ {
+ if ( xNode->getType() == AnimationNodeType::ANIMATE )
+ {
+ Reference<XAnimate> xAnimate( xNode, UNO_QUERY );
+ if ( xAnimate.is() )
+ xAnimate->setSubItem( nSubItem );
+ break;
+ }
+ else if ( xNode->getType() == AnimationNodeType::ITERATE )
+ {
+ Reference<XIterateContainer> xIterateContainer( xNode, UNO_QUERY );
+ if ( xIterateContainer.is() )
+ xIterateContainer->setSubItem( nSubItem );
+ break;
+ }
+
+ xNode.set( xNode->getParent(), UNO_QUERY );
+ }
+}
+
+}
+
+namespace oox::ppt {
+ OUString TimeNode::getServiceName( sal_Int16 nNodeType )
+ {
+ OUString sServiceName;
+ switch( nNodeType )
+ {
+ case AnimationNodeType::PAR:
+ sServiceName = "com.sun.star.animations.ParallelTimeContainer";
+ break;
+ case AnimationNodeType::SEQ:
+ sServiceName = "com.sun.star.animations.SequenceTimeContainer";
+ break;
+ case AnimationNodeType::ANIMATE:
+ sServiceName = "com.sun.star.animations.Animate";
+ break;
+ case AnimationNodeType::ITERATE:
+ sServiceName = "com.sun.star.animations.IterateContainer";
+ break;
+ case AnimationNodeType::ANIMATECOLOR:
+ sServiceName = "com.sun.star.animations.AnimateColor";
+ break;
+ case AnimationNodeType::TRANSITIONFILTER:
+ sServiceName = "com.sun.star.animations.TransitionFilter";
+ break;
+ case AnimationNodeType::ANIMATEMOTION:
+ sServiceName = "com.sun.star.animations.AnimateMotion";
+ break;
+ case AnimationNodeType::ANIMATETRANSFORM:
+ sServiceName = "com.sun.star.animations.AnimateTransform";
+ break;
+ case AnimationNodeType::COMMAND:
+ sServiceName = "com.sun.star.animations.Command";
+ break;
+ case AnimationNodeType::SET:
+ sServiceName = "com.sun.star.animations.AnimateSet";
+ break;
+ case AnimationNodeType::AUDIO:
+ sServiceName = "com.sun.star.animations.Audio";
+ break;
+ default:
+ SAL_INFO("oox.ppt","OOX: unhandled type " << nNodeType );
+ break;
+ }
+ return sServiceName;
+ }
+
+ TimeNode::TimeNode( sal_Int16 nNodeType )
+ : mnNodeType( nNodeType )
+ , mbHasEndSyncValue( false )
+ {
+ }
+
+ TimeNode::~TimeNode()
+ {
+ }
+
+ void fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode )
+ {
+ try
+ {
+ bool bFirst = true;
+ Reference< XEnumerationAccess > xEA( xNode, UNO_QUERY_THROW );
+ Reference< XEnumeration > xE( xEA->createEnumeration(), UNO_SET_THROW );
+ while( xE->hasMoreElements() )
+ {
+ // click node
+ Reference< XAnimationNode > xClickNode( xE->nextElement(), UNO_QUERY );
+
+ Event aEvent;
+ aEvent.Trigger = EventTrigger::ON_NEXT;
+ aEvent.Repeat = 0;
+ xClickNode->setBegin( Any( aEvent ) );
+
+ if( bFirst )
+ {
+ bFirst = false;
+ Reference< XEnumerationAccess > xEA2( xClickNode, UNO_QUERY_THROW );
+ Reference< XEnumeration > xE2( xEA2->createEnumeration(), UNO_SET_THROW );
+ if( xE2->hasMoreElements() )
+ {
+ // with node
+ xE2->nextElement() >>= xEA2;
+ if( xEA2.is() )
+ xE2 = xEA2->createEnumeration();
+ else
+ xE2.clear();
+
+ if( xE2.is() && xE2->hasMoreElements() )
+ {
+ Reference< XAnimationNode > xEffectNode( xE2->nextElement(), UNO_QUERY_THROW );
+ const Sequence< NamedValue > aUserData( xEffectNode->getUserData() );
+ for( const NamedValue& rProp : aUserData )
+ {
+ if ( rProp.Name == "node-type" )
+ {
+ sal_Int16 nNodeType = 0;
+ rProp.Value >>= nNodeType;
+ if( nNodeType != css::presentation::EffectNodeType::ON_CLICK )
+ {
+ // first effect does not start on click, so correct
+ // first click nodes begin to 0s
+ xClickNode->setBegin( Any( 0.0 ) );
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ SAL_INFO("oox.ppt","fixMainSequenceTiming(), exception caught!" );
+ }
+ }
+
+ void fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode )
+ {
+ try
+ {
+ Any aBegin( xNode->getBegin() );
+ Any aEmpty;
+ xNode->setBegin( aEmpty );
+
+ Reference< XEnumerationAccess > xEA( xNode, UNO_QUERY_THROW );
+ Reference< XEnumeration > xE( xEA->createEnumeration(), UNO_SET_THROW );
+ while( xE->hasMoreElements() )
+ {
+ // click node
+ Reference< XAnimationNode > xClickNode( xE->nextElement(), UNO_QUERY );
+ xClickNode->setBegin( aBegin );
+ }
+ }
+ catch( Exception& )
+ {
+ SAL_INFO("oox.ppt","fixInteractiveSequenceTiming(), exception caught!" );
+ }
+ }
+
+ void TimeNode::addNode( const XmlFilterBase& rFilter, const Reference< XAnimationNode >& rxNode, const SlidePersistPtr & pSlide )
+ {
+ try {
+ sal_Int16 nNodeType = mnNodeType;
+
+ if (mnNodeType == AnimationNodeType::PAR && maNodeProperties[NP_ITERATETYPE].hasValue())
+ nNodeType = AnimationNodeType::ITERATE;
+
+ OUString sServiceName = getServiceName(nNodeType);
+
+ Reference< XAnimationNode > xNode = createAndInsert( rFilter, sServiceName, rxNode );
+ if (!xNode)
+ return;
+ setNode(rFilter, xNode, pSlide, rxNode);
+ }
+ catch( const Exception& )
+ {
+ TOOLS_INFO_EXCEPTION("oox.ppt","OOX: exception raised in TimeNode::addNode()" );
+ }
+ }
+
+ void TimeNode::setNode(const XmlFilterBase& rFilter, const Reference< XAnimationNode >& xNode, const SlidePersistPtr & pSlide, const Reference<XAnimationNode>& xParent)
+ {
+ SAL_WARN_IF( !xNode.is(), "oox.ppt", "null node passed" );
+
+ try {
+ if( !msId.isEmpty() )
+ {
+ pSlide->getAnimNodesMap()[ msId ] = xNode;
+ }
+
+ if( mpTarget )
+ {
+ sal_Int16 nSubItem(0);
+ maNodeProperties[ NP_TARGET ] = mpTarget->convert( pSlide, nSubItem );
+ if( mpTarget->mnType == XML_spTgt )
+ {
+ if ( xNode->getType() == AnimationNodeType::ANIMATE ||
+ xNode->getType() == AnimationNodeType::ITERATE )
+ {
+ maNodeProperties[ NP_SUBITEM ] <<= nSubItem;
+ }
+ else
+ lcl_setAncestorSubItem( xParent, nSubItem );
+ }
+ }
+
+ if( !maStCondList.empty() )
+ {
+ Any aAny = AnimationCondition::convertList( pSlide, maStCondList );
+ if( aAny.hasValue() )
+ {
+ xNode->setBegin( aAny );
+ }
+
+ }
+ if( !maEndCondList.empty() )
+ {
+ Any aAny = AnimationCondition::convertList( pSlide, maEndCondList );
+ if( aAny.hasValue() )
+ {
+ xNode->setEnd( aAny );
+ }
+ }
+ if( mbHasEndSyncValue )
+ {
+ Any aValue = maEndSyncValue.convert( pSlide );
+ xNode->setEndSync(aValue);
+ }
+
+ if( !maUserData.empty() )
+ {
+ Sequence< NamedValue > aUserDataSeq( static_cast< sal_Int32 >( maUserData.size() ) );
+ NamedValue* pValues = aUserDataSeq.getArray();
+ for (auto const& elem : maUserData)
+ {
+ pValues->Name = elem.first;
+ pValues->Value = elem.second;
+ ++pValues;
+ }
+ maNodeProperties[ NP_USERDATA ] <<= aUserDataSeq;
+ }
+
+ Reference< XAnimate > xAnimate( xNode, UNO_QUERY );
+ Reference< XAnimateColor > xAnimateColor( xNode, UNO_QUERY );
+ Reference< XAnimateMotion > xAnimateMotion( xNode, UNO_QUERY );
+ Reference< XAnimateTransform > xAnimateTransform( xNode, UNO_QUERY );
+ Reference< XCommand > xCommand( xNode, UNO_QUERY );
+ Reference< XAudio > xAudio( xNode, UNO_QUERY );
+ Reference< XIterateContainer > xIterateContainer( xNode, UNO_QUERY );
+ sal_Int16 nInt16 = 0;
+ bool bBool = false;
+ double fDouble = 0;
+ OUString sString;
+ Sequence< NamedValue > aSeq;
+
+ for( int i = 0; i < NP_SIZE_; i++)
+ {
+ Any & aValue( maNodeProperties[ i ] );
+ if( aValue.hasValue() )
+ {
+ switch( i )
+ {
+ case NP_TO:
+ if( xAnimate.is() )
+ xAnimate->setTo( aValue );
+ break;
+ case NP_FROM:
+ if( xAnimate.is() )
+ xAnimate->setFrom( aValue );
+ break;
+ case NP_BY:
+ if( xAnimate.is() )
+ xAnimate->setBy( aValue );
+ break;
+ case NP_HIDEDURINGSHOW:
+ if (xAudio.is() && (aValue >>= bBool))
+ {
+ xAudio->setHideDuringShow(bBool);
+ }
+ break;
+ case NP_ISNARRATION:
+ if (xAudio.is() && (aValue >>= bBool))
+ {
+ xAudio->setNarration(bBool);
+ }
+ break;
+ case NP_TARGET:
+
+ if (xParent.is() && xParent->getType() == AnimationNodeType::ITERATE)
+ {
+ Reference<XIterateContainer> xParentContainer(xParent, UNO_QUERY);
+ if (xParentContainer.is())
+ xParentContainer->setTarget(aValue);
+ }
+ else
+ {
+ if (xAnimate.is())
+ xAnimate->setTarget(aValue);
+ if (xCommand.is())
+ xCommand->setTarget(aValue);
+ if (xAudio.is())
+ xAudio->setSource(aValue);
+ }
+ break;
+ case NP_SUBITEM:
+ if( aValue >>= nInt16 )
+ {
+ if( xAnimate.is() )
+ {
+ xAnimate->setSubItem( nInt16 );
+ }
+ else if ( xIterateContainer.is() )
+ {
+ xIterateContainer->setSubItem( nInt16 );
+ }
+ }
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_ATTRIBUTENAME:
+ if( xAnimate.is() )
+ {
+ if( aValue >>= sString )
+ xAnimate->setAttributeName( sString );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_CALCMODE:
+ if( xAnimate.is() )
+ {
+ if( aValue >>= nInt16 )
+ xAnimate->setCalcMode( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_KEYTIMES:
+ if( xAnimate.is() )
+ {
+ Sequence<double> aKeyTimes;
+ if( aValue >>= aKeyTimes )
+ xAnimate->setKeyTimes(aKeyTimes);
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_VALUES:
+ if( xAnimate.is() )
+ {
+ Sequence<Any> aValues;
+ if( aValue >>= aValues )
+ xAnimate->setValues(aValues);
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_FORMULA:
+ if( xAnimate.is() )
+ {
+ if( aValue >>= sString )
+ xAnimate->setFormula(sString);
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_COLORINTERPOLATION:
+ if( xAnimateColor.is() )
+ {
+ if( aValue >>= nInt16 )
+ xAnimateColor->setColorInterpolation( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_DIRECTION:
+ if( xAnimateColor.is() )
+ {
+ if( aValue >>= bBool )
+ xAnimateColor->setDirection( bBool );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_PATH:
+ if( xAnimateMotion.is() )
+ xAnimateMotion->setPath( aValue );
+ break;
+ case NP_TRANSFORMTYPE:
+ if( xAnimateTransform.is() )
+ {
+ if( aValue >>= nInt16 )
+ xAnimateTransform->setTransformType( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_USERDATA:
+ if( aValue >>= aSeq )
+ xNode->setUserData( aSeq );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_ACCELERATION:
+ if( aValue >>= fDouble )
+ xNode->setAcceleration( fDouble );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_DECELERATE:
+ if( aValue >>= fDouble )
+ xNode->setDecelerate( fDouble );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_AUTOREVERSE:
+ if( aValue >>= bBool )
+ xNode->setAutoReverse( bBool );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_DURATION:
+ xNode->setDuration( aValue );
+ break;
+ case NP_FILL:
+ if( aValue >>= nInt16 )
+ xNode->setFill( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_REPEATCOUNT:
+ xNode->setRepeatCount( aValue );
+ break;
+ case NP_REPEATDURATION:
+ xNode->setRepeatDuration( aValue );
+ break;
+ case NP_RESTART:
+ if( aValue >>= nInt16 )
+ xNode->setRestart( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ break;
+ case NP_COMMAND:
+ if( xCommand.is() )
+ {
+ if( aValue >>= nInt16 )
+ xCommand->setCommand( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_PARAMETER:
+ if( xCommand.is() )
+ xCommand->setParameter( aValue );
+ break;
+ case NP_ITERATETYPE:
+ if( xIterateContainer.is() )
+ {
+ if( aValue >>= nInt16 )
+ xIterateContainer->setIterateType( nInt16 );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ case NP_ITERATEINTERVAL:
+ if( xIterateContainer.is() )
+ {
+ if( aValue >>= fDouble )
+ xIterateContainer->setIterateInterval( fDouble );
+ else
+ {
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+ }
+ }
+ break;
+ default:
+ SAL_INFO("oox.ppt","ERR-OOX: unknown prop index " << i );
+ break;
+ }
+ }
+ }
+
+ if (xAnimate.is() && xAnimate->getValues().getLength() != xAnimate->getKeyTimes().getLength())
+ throw css::io::WrongFormatException();
+
+ if( mnNodeType == AnimationNodeType::TRANSITIONFILTER )
+ {
+
+ Reference< XTransitionFilter > xFilter( xNode, UNO_QUERY );
+ maTransitionFilter.setTransitionFilterProperties( xFilter );
+ }
+
+ std::for_each(
+ maChildren.begin(), maChildren.end(),
+ [&rFilter, &xNode, &pSlide] (TimeNodePtr const & child) {
+ child->addNode(rFilter, xNode, pSlide);
+ } );
+
+ switch( mnNodeType )
+ {
+ case AnimationNodeType::SEQ:
+ {
+ sal_Int16 nEnum = 0;
+ if( maUserData[ "node-type" ] >>= nEnum )
+ {
+ if( nEnum == EffectNodeType::MAIN_SEQUENCE )
+ {
+ fixMainSequenceTiming( xNode );
+ }
+ else if( nEnum == EffectNodeType::INTERACTIVE_SEQUENCE )
+ {
+ fixInteractiveSequenceTiming( xNode );
+ }
+ }
+ break;
+ }
+ case AnimationNodeType::PAR:
+ // some other cut&paste... from AnimationImporter::importAnimationContainer()
+ break;
+ }
+ }
+ catch( const Exception& )
+ {
+ TOOLS_INFO_EXCEPTION("oox.ppt","OOX: exception raised in TimeNode::setNode()");
+ }
+ }
+
+ Reference< XAnimationNode > TimeNode::createAndInsert(
+ const XmlFilterBase& rFilter,
+ const OUString& rServiceName,
+ const Reference< XAnimationNode >& rxNode )
+ {
+ try {
+ Reference< XAnimationNode > xNode( Reference<css::lang::XMultiServiceFactory>(rFilter.getComponentContext()->getServiceManager(), UNO_QUERY_THROW)->createInstance( rServiceName ), UNO_QUERY_THROW );
+ Reference< XTimeContainer > xParentContainer( rxNode, UNO_QUERY_THROW );
+
+ xParentContainer->appendChild( xNode );
+ return xNode;
+ }
+ catch( const Exception& )
+ {
+ TOOLS_INFO_EXCEPTION("oox.ppt", "OOX: exception raised in TimeNode::createAndInsert() trying to create a service " << rServiceName);
+ }
+
+ return Reference< XAnimationNode >();
+ }
+
+ void TimeNode::setId( sal_Int32 nId )
+ {
+ msId = OUString::number(nId);
+ }
+
+ void TimeNode::setTo( const Any & aTo )
+ {
+ maNodeProperties[ NP_TO ] = aTo;
+ }
+
+ void TimeNode::setFrom( const Any & aFrom )
+ {
+ maNodeProperties[ NP_FROM ] = aFrom;
+ }
+
+ void TimeNode::setBy( const Any & aBy )
+ {
+ maNodeProperties[ NP_BY ] = aBy;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
new file mode 100644
index 000000000..a7637432a
--- /dev/null
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -0,0 +1,1048 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/ppt/timenodelistcontext.hxx>
+
+#include <rtl/math.hxx>
+#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <com/sun/star/animations/AnimationTransformType.hpp>
+#include <com/sun/star/animations/AnimationCalcMode.hpp>
+#include <com/sun/star/animations/AnimationColorSpace.hpp>
+#include <com/sun/star/animations/AnimationNodeType.hpp>
+#include <com/sun/star/animations/ValuePair.hpp>
+#include <com/sun/star/presentation/EffectCommands.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/ppt/slidetransition.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <o3tl/string_view.hxx>
+
+#include "animvariantcontext.hxx"
+#include "commonbehaviorcontext.hxx"
+#include "conditioncontext.hxx"
+#include "commontimenodecontext.hxx"
+#include "timeanimvaluecontext.hxx"
+#include "animationtypes.hxx"
+#include "timetargetelementcontext.hxx"
+
+using namespace ::oox::core;
+using namespace ::oox::drawingml;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::animations;
+using namespace ::com::sun::star::presentation;
+using namespace ::com::sun::star::xml::sax;
+using ::com::sun::star::beans::NamedValue;
+
+namespace {
+
+ oox::ppt::AnimationAttributeEnum getAttributeEnumByAPIName(std::u16string_view rAPIName)
+ {
+ oox::ppt::AnimationAttributeEnum eResult = oox::ppt::AnimationAttributeEnum::UNKNOWN;
+ const oox::ppt::ImplAttributeNameConversion *attrConv = oox::ppt::getAttributeConversionList();
+ while(attrConv->mpAPIName != nullptr)
+ {
+ if(o3tl::equalsAscii(rAPIName, attrConv->mpAPIName))
+ {
+ eResult = attrConv->meAttribute;
+ break;
+ }
+ attrConv++;
+ }
+ return eResult;
+ }
+
+ bool convertAnimationValueWithTimeNode(const oox::ppt::TimeNodePtr& pNode, css::uno::Any &rAny)
+ {
+ css::uno::Any aAny = pNode->getNodeProperties()[oox::ppt::NP_ATTRIBUTENAME];
+ OUString aNameList;
+ aAny >>= aNameList;
+
+ // only get first token.
+ return oox::ppt::convertAnimationValue(getAttributeEnumByAPIName(o3tl::getToken(aNameList, 0, ';')), rAny);
+ }
+
+ css::uno::Any convertPointPercent(const css::awt::Point& rPoint)
+ {
+ css::animations::ValuePair aPair;
+ // rPoint.X and rPoint.Y are in 1000th of a percent, but we only need ratio.
+ aPair.First <<= static_cast<double>(rPoint.X) / 100000.0;
+ aPair.Second <<= static_cast<double>(rPoint.Y) / 100000.0;
+ return Any(aPair);
+ }
+}
+
+namespace oox::ppt {
+
+ namespace {
+
+ struct AnimColor
+ {
+ AnimColor(sal_Int16 cs, sal_Int32 o, sal_Int32 t, sal_Int32 th )
+ : colorSpace( cs ), one( o ), two( t ), three( th )
+ {
+ }
+
+ Any get() const
+ {
+ sal_Int32 nColor;
+ Any aColor;
+
+ switch( colorSpace )
+ {
+ case AnimationColorSpace::HSL:
+ aColor <<= Sequence< double >{ one / 100000.0, two / 100000.0, three / 100000.0 };
+ break;
+ case AnimationColorSpace::RGB:
+ nColor = ( ( ( one * 128 ) / 1000 ) & 0xff ) << 16
+ | ( ( ( two * 128 ) / 1000 ) & 0xff ) << 8
+ | ( ( ( three * 128 ) / 1000 ) & 0xff );
+ aColor <<= nColor;
+ break;
+ default:
+ nColor = 0;
+ aColor <<= nColor;
+ break;
+ }
+ return aColor;
+ }
+
+ sal_Int16 colorSpace;
+ sal_Int32 one;
+ sal_Int32 two;
+ sal_Int32 three;
+ };
+
+ /** CT_TLMediaNodeAudio
+ CT_TLMediaNodeVideo */
+ class MediaNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ MediaNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ , mbIsNarration( false )
+ , mbFullScrn( false )
+ , mbHideDuringShow(false)
+ {
+ AttributeList attribs( xAttribs );
+
+ switch( aElement )
+ {
+ case PPT_TOKEN( audio ):
+ mbIsNarration = attribs.getBool( XML_isNarration, false );
+ break;
+ case PPT_TOKEN( video ):
+ mbFullScrn = attribs.getBool( XML_fullScrn, false );
+ break;
+ default:
+ break;
+ }
+ }
+
+ virtual void onEndElement() override
+ {
+ sal_Int32 aElement = getCurrentElement();
+ if( aElement == PPT_TOKEN( audio ) )
+ {
+ mpNode->getNodeProperties()[NP_ISNARRATION] <<= mbIsNarration;
+ }
+ else if( aElement == PPT_TOKEN( video ) )
+ {
+ // TODO deal with mbFullScrn
+ }
+ else if (aElement == PPT_TOKEN(cMediaNode))
+ {
+ mpNode->getNodeProperties()[NP_HIDEDURINGSHOW] <<= mbHideDuringShow;
+ }
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cTn ):
+ return new CommonTimeNodeContext( *this, aElementToken, rAttribs.getFastAttributeList(), mpNode );
+ case PPT_TOKEN( tgtEl ):
+ return new TimeTargetElementContext( *this, mpNode->getTarget() );
+ case PPT_TOKEN(cMediaNode):
+ mbHideDuringShow = !rAttribs.getBool(XML_showWhenStopped, true);
+ break;
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+ private:
+ bool mbIsNarration;
+ bool mbFullScrn;
+ bool mbHideDuringShow;
+ };
+
+ /** CT_TLSetBehavior
+ */
+ class SetTimeNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ SetTimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+
+ }
+
+ virtual ~SetTimeNodeContext() noexcept override
+ {
+ if(maTo.hasValue())
+ {
+ convertAnimationValueWithTimeNode(mpNode, maTo);
+ mpNode->setTo(maTo);
+ }
+
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( to ):
+ // CT_TLAnimVariant
+ return new AnimVariantContext( *this, aElementToken, maTo );
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ Any maTo;
+ };
+
+ /** CT_TLCommandBehavior
+ */
+ class CmdTimeNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ CmdTimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ , maType(0)
+ {
+ switch ( aElement )
+ {
+ case PPT_TOKEN( cmd ):
+ msCommand = xAttribs->getOptionalValue( XML_cmd );
+ maType = xAttribs->getOptionalValueToken( XML_type, 0 );
+ break;
+ default:
+ break;
+ }
+ }
+
+ virtual void onEndElement() override
+ {
+ if( !isCurrentElement( PPT_TOKEN( cmd ) ) )
+ return;
+
+ try {
+ // see sd/source/filter/ppt/pptinanimations.cxx
+ // in AnimationImporter::importCommandContainer()
+ // REFACTOR?
+ // a good chunk of this code has been copied verbatim *sigh*
+ sal_Int16 nCommand = EffectCommands::CUSTOM;
+ NamedValue aParamValue;
+
+ switch( maType )
+ {
+ case XML_verb:
+ aParamValue.Name = "Verb";
+ // TODO make sure msCommand has what we want
+ aParamValue.Value <<= msCommand.toInt32();
+ nCommand = EffectCommands::VERB;
+ break;
+ case XML_evt:
+ case XML_call:
+ if ( msCommand == "onstopaudio" )
+ {
+ nCommand = EffectCommands::STOPAUDIO;
+ }
+ else if ( msCommand == "play" )
+ {
+ nCommand = EffectCommands::PLAY;
+ }
+ else if (msCommand.startsWith("playFrom"))
+ {
+ std::u16string_view aMediaTime( msCommand.subView( 9, msCommand.getLength() - 10 ) );
+ rtl_math_ConversionStatus eStatus;
+ double fMediaTime = ::rtl::math::stringToDouble( aMediaTime, u'.', u',', &eStatus );
+ if( eStatus == rtl_math_ConversionStatus_Ok )
+ {
+ aParamValue.Name = "MediaTime";
+ aParamValue.Value <<= fMediaTime;
+ }
+ nCommand = EffectCommands::PLAY;
+ }
+ else if ( msCommand == "togglePause" )
+ {
+ nCommand = EffectCommands::TOGGLEPAUSE;
+ }
+ else if ( msCommand == "stop" )
+ {
+ nCommand = EffectCommands::STOP;
+ }
+ break;
+ }
+ mpNode->getNodeProperties()[ NP_COMMAND ] <<= nCommand;
+ if( nCommand == EffectCommands::CUSTOM )
+ {
+ SAL_WARN("oox.ppt", "OOX: CmdTimeNodeContext::endFastElement(), unknown command!");
+ aParamValue.Name = "UserDefined";
+ aParamValue.Value <<= msCommand;
+ }
+ if( aParamValue.Value.hasValue() )
+ {
+ Sequence< NamedValue > aParamSeq( &aParamValue, 1 );
+ mpNode->getNodeProperties()[ NP_PARAMETER ] <<= aParamSeq;
+ }
+ }
+ catch( RuntimeException& )
+ {
+ TOOLS_WARN_EXCEPTION("oox.ppt", "OOX: Exception in CmdTimeNodeContext::endFastElement()" );
+ }
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+ private:
+ OUString msCommand;
+ sal_Int32 maType;
+ };
+
+ /** CT_TLTimeNodeSequence
+ */
+ class SequenceTimeNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ SequenceTimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ , mnNextAc(0)
+ , mnPrevAc(0)
+ {
+ AttributeList attribs(xAttribs);
+ mbConcurrent = attribs.getBool( XML_concurrent, false );
+ mnNextAc = xAttribs->getOptionalValueToken( XML_nextAc, 0 );
+ mnPrevAc = xAttribs->getOptionalValueToken( XML_prevAc, 0 );
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cTn ):
+ return new CommonTimeNodeContext( *this, aElementToken, rAttribs.getFastAttributeList(), mpNode );
+ case PPT_TOKEN( nextCondLst ):
+ return new CondListContext( *this, aElementToken, mpNode, mpNode->getNextCondition() );
+ case PPT_TOKEN( prevCondLst ):
+ return new CondListContext( *this, aElementToken, mpNode, mpNode->getPrevCondition() );
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ bool mbConcurrent;
+ sal_Int32 mnNextAc, mnPrevAc;
+ };
+
+ /** CT_TLTimeNodeParallel
+ * CT_TLTimeNodeExclusive
+ */
+ class ParallelExclTimeNodeContext
+ : public TimeNodeContext
+ {
+ public:
+ ParallelExclTimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const TimeNodePtr & pNode )
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cTn ):
+ return new CommonTimeNodeContext( *this, aElementToken, rAttribs.getFastAttributeList(), mpNode );
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+ protected:
+
+ };
+
+ /** CT_TLAnimateColorBehavior */
+ class AnimColorContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimColorContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ , mnColorSpace( xAttribs->getOptionalValueToken( XML_clrSpc, 0 ) )
+ , mnDir( xAttribs->getOptionalValueToken( XML_dir, 0 ) )
+ , mbHasByColor( false )
+ , m_byColor( AnimationColorSpace::RGB, 0, 0, 0)
+ {
+ }
+
+ virtual void onEndElement() override
+ {
+ //xParentNode
+ if( !isCurrentElement( mnElement ) )
+ return;
+
+ NodePropertyMap & rProps(mpNode->getNodeProperties());
+ rProps[ NP_DIRECTION ] <<= mnDir == XML_cw;
+ rProps[ NP_COLORINTERPOLATION ] <<= mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB;
+ const GraphicHelper& rGraphicHelper = getFilter().getGraphicHelper();
+ if( maToClr.isUsed() )
+ mpNode->setTo( Any( maToClr.getColor( rGraphicHelper ) ) );
+ if( maFromClr.isUsed() )
+ mpNode->setFrom( Any( maFromClr.getColor( rGraphicHelper ) ) );
+ if( mbHasByColor )
+ mpNode->setBy( m_byColor.get() );
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( hsl ):
+ // CT_TLByHslColorTransform
+ {
+ if( mbHasByColor )
+ {
+ m_byColor.colorSpace = AnimationColorSpace::HSL;
+ m_byColor.one = rAttribs.getInteger( XML_h, 0 );
+ m_byColor.two = rAttribs.getInteger( XML_s, 0 );
+ m_byColor.three = rAttribs.getInteger( XML_l, 0 );
+ }
+ return this;
+ }
+ case PPT_TOKEN( rgb ):
+ {
+ if( mbHasByColor )
+ {
+ // CT_TLByRgbColorTransform
+ m_byColor.colorSpace = AnimationColorSpace::RGB;
+ m_byColor.one = rAttribs.getInteger( XML_r, 0 );
+ m_byColor.two = rAttribs.getInteger( XML_g, 0 );
+ m_byColor.three = rAttribs.getInteger( XML_b, 0 );
+ }
+ return this;
+ }
+ case PPT_TOKEN( by ):
+ // CT_TLByAnimateColorTransform
+ mbHasByColor = true;
+ return this;
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( to ):
+ // CT_Color
+ return new ColorContext( *this, maToClr );
+ case PPT_TOKEN( from ):
+ // CT_Color
+ return new ColorContext( *this, maFromClr );
+
+ default:
+ break;
+ }
+
+ return this;
+ }
+
+ private:
+ sal_Int32 mnColorSpace;
+ sal_Int32 mnDir;
+ bool mbHasByColor;
+ AnimColor m_byColor;
+ oox::drawingml::Color maToClr;
+ oox::drawingml::Color maFromClr;
+ };
+
+ /** CT_TLAnimateBehavior */
+ class AnimContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+ NodePropertyMap & aProps( pNode->getNodeProperties() );
+ sal_Int32 nCalcMode = xAttribs->getOptionalValueToken( XML_calcmode, 0 );
+ if(nCalcMode)
+ {
+ sal_Int16 nEnum = 0;
+ switch(nCalcMode)
+ {
+ case XML_discrete:
+ nEnum = AnimationCalcMode::DISCRETE;
+ break;
+ case XML_lin:
+ nEnum = AnimationCalcMode::LINEAR;
+ break;
+ case XML_fmla:
+ default:
+ // TODO what value is good ?
+ nEnum = AnimationCalcMode::DISCRETE;
+ break;
+ }
+ aProps[ NP_CALCMODE ] <<= nEnum;
+ }
+
+ msFrom = xAttribs->getOptionalValue(XML_from);
+ msTo = xAttribs->getOptionalValue(XML_to);
+ msBy = xAttribs->getOptionalValue(XML_by);
+
+ mnValueType = xAttribs->getOptionalValueToken( XML_valueType, 0 );
+ }
+
+ virtual ~AnimContext() noexcept override
+ {
+ if (!msFrom.isEmpty())
+ {
+ css::uno::Any aAny;
+ aAny <<= msFrom;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setFrom(aAny);
+ }
+
+ if (!msTo.isEmpty())
+ {
+ css::uno::Any aAny;
+ aAny <<= msTo;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setTo(aAny);
+ }
+
+ if (!msBy.isEmpty())
+ {
+ css::uno::Any aAny;
+ aAny <<= msBy;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setBy(aAny);
+ }
+
+ int nKeyTimes = maTavList.size();
+ if( nKeyTimes <= 0)
+ return;
+
+ int i=0;
+ Sequence< double > aKeyTimes( nKeyTimes );
+ auto pKeyTimes = aKeyTimes.getArray();
+ Sequence< Any > aValues( nKeyTimes );
+ auto pValues = aValues.getArray();
+
+ NodePropertyMap & aProps( mpNode->getNodeProperties() );
+ for (auto const& tav : maTavList)
+ {
+ // TODO what to do if it is Timing_INFINITE ?
+ Any aTime = GetTimeAnimateValueTime( tav.msTime );
+ aTime >>= pKeyTimes[i];
+ pValues[i] = tav.maValue;
+ convertAnimationValueWithTimeNode(mpNode, pValues[i]);
+
+ // Examine pptx documents and find that only the first tav
+ // has the formula set. The formula can be used for the whole.
+ if (!tav.msFormula.isEmpty())
+ {
+ OUString sFormula = tav.msFormula;
+ (void)convertMeasure(sFormula);
+ aProps[NP_FORMULA] <<= sFormula;
+ }
+
+ ++i;
+ }
+ aProps[ NP_VALUES ] <<= aValues;
+ aProps[ NP_KEYTIMES ] <<= aKeyTimes;
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( tavLst ):
+ return new TimeAnimValueListContext ( *this, maTavList );
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ sal_Int32 mnValueType;
+ TimeAnimationValueList maTavList;
+ OUString msFrom;
+ OUString msTo;
+ OUString msBy;
+ };
+
+ /** CT_TLAnimateScaleBehavior */
+ class AnimScaleContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimScaleContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ , mbZoomContents( false )
+ {
+ AttributeList attribs( xAttribs );
+ // TODO what to do with mbZoomContents
+ mbZoomContents = attribs.getBool( XML_zoomContents, false );
+ pNode->getNodeProperties()[ NP_TRANSFORMTYPE ]
+ <<= sal_Int16(AnimationTransformType::SCALE);
+ }
+
+ virtual void onEndElement() override
+ {
+ if( !isCurrentElement( mnElement ) )
+ return;
+
+ if( maTo.hasValue() )
+ {
+ mpNode->setTo( maTo );
+ }
+ if( maBy.hasValue() )
+ {
+ mpNode->setBy( maBy );
+ }
+ if( maFrom.hasValue() )
+ {
+ mpNode->setFrom( maFrom );
+ }
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( to ):
+ {
+ // CT_TLPoint
+ maTo = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList()));
+ return this;
+ }
+ case PPT_TOKEN( from ):
+ {
+ // CT_TLPoint
+ maFrom = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList()));
+ return this;
+ }
+ case PPT_TOKEN( by ):
+ {
+ // CT_TLPoint
+ css::awt::Point aPoint = GetPointPercent(rAttribs.getFastAttributeList());
+ // We got ending values instead of offset values, so subtract 100% from them.
+ aPoint.X -= 100000;
+ aPoint.Y -= 100000;
+ maBy = convertPointPercent(aPoint);
+ return this;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ Any maBy;
+ Any maFrom;
+ Any maTo;
+ bool mbZoomContents;
+ };
+
+ /** CT_TLAnimateRotationBehavior */
+ class AnimRotContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimRotContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+ AttributeList attribs( xAttribs );
+
+ pNode->getNodeProperties()[ NP_TRANSFORMTYPE ]
+ <<= sal_Int16(AnimationTransformType::ROTATE);
+ // see also DFF_msofbtAnimateRotationData in
+ // sd/source/filter/ppt/pptinanimations.cxx
+ if(attribs.hasAttribute( XML_by ) )
+ {
+ double fBy = attribs.getDouble( XML_by, 0.0 ) / PER_DEGREE; //1 PowerPoint-angle-unit = 1/60000 degree
+ pNode->setBy( Any( fBy ) );
+ }
+ if(attribs.hasAttribute( XML_from ) )
+ {
+ double fFrom = attribs.getDouble( XML_from, 0.0 ) / PER_DEGREE;
+ pNode->setFrom( Any( fFrom ) );
+ }
+ if(attribs.hasAttribute( XML_to ) )
+ {
+ double fTo = attribs.getDouble( XML_to, 0.0 ) / PER_DEGREE;
+ pNode->setTo( Any( fTo ) );
+ }
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ default:
+ break;
+ }
+
+ return this;
+ }
+ };
+
+ /** CT_TLAnimateMotionBehavior */
+ class AnimMotionContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimMotionContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+ pNode->getNodeProperties()[ NP_TRANSFORMTYPE ]
+ <<= sal_Int16(AnimationTransformType::TRANSLATE);
+
+ AttributeList attribs( xAttribs );
+ sal_Int32 nOrigin = xAttribs->getOptionalValueToken( XML_origin, 0 );
+ if( nOrigin != 0 )
+ {
+ switch(nOrigin)
+ {
+ case XML_layout:
+ case XML_parent:
+ break;
+ }
+ // TODO
+ }
+
+ OUString aStr = xAttribs->getOptionalValue( XML_path );
+ // E can appear inside a number, so we only check for its presence at the end
+ aStr = aStr.trim();
+ if (aStr.endsWith("E"))
+ aStr = aStr.copy(0, aStr.getLength() - 1);
+ aStr = aStr.trim();
+ pNode->getNodeProperties()[ NP_PATH ] <<= aStr;
+ mnPathEditMode = xAttribs->getOptionalValueToken( XML_pathEditMode, 0 );
+ msPtsTypes = xAttribs->getOptionalValue( XML_ptsTypes );
+ mnAngle = attribs.getInteger( XML_rAng, 0 );
+ // TODO make sure the units are right. Likely not.
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( to ):
+ {
+ // CT_TLPoint
+ awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
+ Any rAny;
+ rAny <<= p.X;
+ rAny <<= p.Y;
+ mpNode->setTo( rAny );
+ return this;
+ }
+ case PPT_TOKEN( from ):
+ {
+ // CT_TLPoint
+ awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
+ Any rAny;
+ rAny <<= p.X;
+ rAny <<= p.Y;
+ mpNode->setFrom( rAny );
+ return this;
+ }
+ case PPT_TOKEN( by ):
+ {
+ // CT_TLPoint
+ awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
+ Any rAny;
+ rAny <<= p.X;
+ rAny <<= p.Y;
+ mpNode->setBy( rAny );
+ return this;
+ }
+ case PPT_TOKEN( rCtr ):
+ {
+ // CT_TLPoint
+ awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
+ // TODO push
+ (void)p;
+ return this;
+ }
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ OUString msPtsTypes;
+ sal_Int32 mnPathEditMode;
+ sal_Int32 mnAngle;
+ };
+
+ /** CT_TLAnimateEffectBehavior */
+ class AnimEffectContext
+ : public TimeNodeContext
+ {
+ public:
+ AnimEffectContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode ) noexcept
+ : TimeNodeContext( rParent, aElement, pNode )
+ {
+ sal_Int32 nDir = xAttribs->getOptionalValueToken( XML_transition, 0 );
+ OUString sFilter = xAttribs->getOptionalValue( XML_filter );
+ // TODO
+// OUString sPrList = xAttribs->getOptionalValue( XML_prLst );
+
+ if( !sFilter.isEmpty() )
+ {
+ SlideTransition aFilter( sFilter );
+ aFilter.setMode( nDir != XML_out );
+ pNode->setTransitionFilter( aFilter );
+ }
+ }
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ ) override
+ {
+ switch ( aElementToken )
+ {
+ case PPT_TOKEN( cBhvr ):
+ return new CommonBehaviorContext ( *this, mpNode );
+ case PPT_TOKEN( progress ):
+ return new AnimVariantContext( *this, aElementToken, maProgress );
+ // TODO handle it.
+ default:
+ break;
+ }
+
+ return this;
+ }
+ private:
+ Any maProgress;
+ };
+
+ }
+
+ rtl::Reference<TimeNodeContext> TimeNodeContext::makeContext(
+ FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const Reference< XFastAttributeList >& xAttribs,
+ const TimeNodePtr & pNode )
+ {
+ rtl::Reference<TimeNodeContext> pCtx;
+ switch( aElement )
+ {
+ case PPT_TOKEN( animClr ):
+ pCtx = new AnimColorContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( par ):
+ pCtx = new ParallelExclTimeNodeContext( rParent, aElement, pNode );
+ break;
+ case PPT_TOKEN( seq ):
+ pCtx = new SequenceTimeNodeContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( excl ):
+ pCtx = new ParallelExclTimeNodeContext( rParent, aElement, pNode );
+ break;
+ case PPT_TOKEN( anim ):
+ pCtx = new AnimContext ( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( animEffect ):
+ pCtx = new AnimEffectContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( animMotion ):
+ pCtx = new AnimMotionContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( animRot ):
+ pCtx = new AnimRotContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( animScale ):
+ pCtx = new AnimScaleContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( cmd ):
+ pCtx = new CmdTimeNodeContext( rParent, aElement, xAttribs, pNode );
+ break;
+ case PPT_TOKEN( set ):
+ pCtx = new SetTimeNodeContext( rParent, aElement, pNode );
+ break;
+ case PPT_TOKEN( audio ):
+ case PPT_TOKEN( video ):
+ pCtx = new MediaNodeContext( rParent, aElement, xAttribs, pNode );
+ break;
+ default:
+ break;
+ }
+ return pCtx;
+ }
+
+ TimeNodeContext::TimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
+ const TimeNodePtr & pNode ) noexcept
+ : FragmentHandler2( rParent )
+ , mnElement( aElement )
+ , mpNode( pNode )
+ {
+ }
+
+ TimeNodeContext::~TimeNodeContext( ) noexcept
+ {
+
+ }
+
+ TimeNodeListContext::TimeNodeListContext( FragmentHandler2 const & rParent, TimeNodePtrList & aList )
+ noexcept
+ : FragmentHandler2( rParent )
+ , maList( aList )
+ {
+ }
+
+ TimeNodeListContext::~TimeNodeListContext( ) noexcept
+ {
+ }
+
+ ::oox::core::ContextHandlerRef TimeNodeListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ sal_Int16 nNodeType;
+
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( par ):
+ nNodeType = AnimationNodeType::PAR;
+ break;
+ case PPT_TOKEN( seq ):
+ nNodeType = AnimationNodeType::SEQ;
+ break;
+ case PPT_TOKEN( excl ):
+ // TODO pick the right type. We choose parallel for now as
+ // there does not seem to be an "Exclusive"
+ nNodeType = AnimationNodeType::PAR;
+ break;
+ case PPT_TOKEN( anim ):
+ nNodeType = AnimationNodeType::ANIMATE;
+ break;
+ case PPT_TOKEN( animClr ):
+ nNodeType = AnimationNodeType::ANIMATECOLOR;
+ break;
+ case PPT_TOKEN( animEffect ):
+ nNodeType = AnimationNodeType::TRANSITIONFILTER;
+ break;
+ case PPT_TOKEN( animMotion ):
+ nNodeType = AnimationNodeType::ANIMATEMOTION;
+ break;
+ case PPT_TOKEN( animRot ):
+ case PPT_TOKEN( animScale ):
+ nNodeType = AnimationNodeType::ANIMATETRANSFORM;
+ break;
+ case PPT_TOKEN( cmd ):
+ nNodeType = AnimationNodeType::COMMAND;
+ break;
+ case PPT_TOKEN( set ):
+ nNodeType = AnimationNodeType::SET;
+ break;
+ case PPT_TOKEN( audio ):
+ nNodeType = AnimationNodeType::AUDIO;
+ break;
+ case PPT_TOKEN( video ):
+ nNodeType = AnimationNodeType::AUDIO;
+ SAL_WARN("oox.ppt", "OOX: video requested, gave Audio instead" );
+ break;
+
+ default:
+ nNodeType = AnimationNodeType::CUSTOM;
+ SAL_INFO("oox.ppt", "unhandled token " << aElementToken);
+ break;
+ }
+
+ TimeNodePtr pNode = std::make_shared<TimeNode>(nNodeType);
+ maList.push_back( pNode );
+ rtl::Reference<FragmentHandler2> pContext = TimeNodeContext::makeContext( *this, aElementToken, rAttribs.getFastAttributeList(), pNode );
+
+ return pContext ? pContext : this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timetargetelementcontext.cxx b/oox/source/ppt/timetargetelementcontext.cxx
new file mode 100644
index 000000000..bf74b3353
--- /dev/null
+++ b/oox/source/ppt/timetargetelementcontext.cxx
@@ -0,0 +1,168 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_features.h>
+
+#include "timetargetelementcontext.hxx"
+
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+
+#include <oox/helper/attributelist.hxx>
+#include <drawingml/embeddedwavaudiofile.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <avmedia/mediaitem.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::oox::core;
+
+namespace oox::ppt {
+
+ namespace {
+
+ // CT_TLShapeTargetElement
+ class ShapeTargetElementContext
+ : public FragmentHandler2
+ {
+ public:
+ ShapeTargetElementContext( FragmentHandler2 const & rParent, ShapeTargetElement & aValue )
+ : FragmentHandler2( rParent )
+ , bTargetSet(false)
+ , maShapeTarget(aValue)
+ {
+ }
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( bg ):
+ bTargetSet = true;
+ maShapeTarget.mnType = XML_bg;
+ return this;
+ case PPT_TOKEN( txEl ):
+ bTargetSet = true;
+ maShapeTarget.mnType = XML_txEl;
+ return this;
+ case PPT_TOKEN( subSp ):
+ bTargetSet = true;
+ maShapeTarget.mnType = XML_subSp;
+ maShapeTarget.msSubShapeId = rAttribs.getString( XML_spid, OUString() );
+ return this;
+ case PPT_TOKEN( graphicEl ):
+ return this; // needs a:dgm for the target
+ case A_TOKEN( dgm ):
+ bTargetSet = true;
+ maShapeTarget.mnType = XML_dgm;
+ maShapeTarget.msSubShapeId = rAttribs.getString( XML_id, OUString() );
+ return this;
+ case PPT_TOKEN( oleChartEl ):
+ bTargetSet = true;
+ // TODO
+ return this;
+ case PPT_TOKEN( charRg ):
+ case PPT_TOKEN( pRg ):
+ if( bTargetSet && maShapeTarget.mnType == XML_txEl )
+ {
+ maShapeTarget.mnRangeType = getBaseToken( aElementToken );
+ maShapeTarget.maRange = drawingml::GetIndexRange( rAttribs.getFastAttributeList() );
+ }
+ return this;
+ default:
+ break;
+ }
+ return this;
+ }
+
+ private:
+ bool bTargetSet;
+ ShapeTargetElement & maShapeTarget;
+ };
+
+ }
+
+ TimeTargetElementContext::TimeTargetElementContext( FragmentHandler2 const & rParent, const AnimTargetElementPtr & pValue )
+ : FragmentHandler2( rParent ),
+ mpTarget( pValue )
+ {
+ OSL_ENSURE( mpTarget, "no valid target passed" );
+ }
+
+ TimeTargetElementContext::~TimeTargetElementContext( ) noexcept
+ {
+ }
+
+ ::oox::core::ContextHandlerRef TimeTargetElementContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
+ {
+ switch( aElementToken )
+ {
+ case PPT_TOKEN( inkTgt ):
+ {
+ mpTarget->mnType = XML_inkTgt;
+ OUString aId = rAttribs.getString( XML_spid, OUString() );
+ if( !aId.isEmpty() )
+ {
+ mpTarget->msValue = aId;
+ }
+ return this;
+ }
+ case PPT_TOKEN( sldTgt ):
+ mpTarget->mnType = XML_sldTgt;
+ return this;
+ case PPT_TOKEN( sndTgt ):
+ {
+ mpTarget->mnType = XML_sndTgt;
+
+#if HAVE_FEATURE_AVMEDIA
+ OUString srcFile = drawingml::getEmbeddedWAVAudioFile(getRelations(), rAttribs);
+ Reference<css::io::XInputStream>
+ xInputStream = getFilter().openInputStream(srcFile);
+
+ if (xInputStream.is())
+ {
+ ::avmedia::EmbedMedia(getFilter().getModel(), srcFile, mpTarget->msValue, xInputStream);
+ xInputStream->closeInput();
+ }
+#endif
+ break;
+ }
+ case PPT_TOKEN( spTgt ):
+ {
+ mpTarget->mnType = XML_spTgt;
+ OUString aId = rAttribs.getString( XML_spid, OUString() );
+ mpTarget->msValue = aId;
+ return new ShapeTargetElementContext( *this, mpTarget->maShapeTarget );
+ }
+ default:
+ SAL_INFO(
+ "oox.ppt",
+ "unhandled tag " << getBaseToken(aElementToken)
+ << " in TL_TimeTargetElement");
+ break;
+ }
+
+ return this;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/timetargetelementcontext.hxx b/oox/source/ppt/timetargetelementcontext.hxx
new file mode 100644
index 000000000..29fed88b6
--- /dev/null
+++ b/oox/source/ppt/timetargetelementcontext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_PPT_TIMETARGETELEMENTCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_PPT_TIMETARGETELEMENTCONTEXT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/ppt/animationspersist.hxx>
+
+namespace oox::ppt {
+
+ /** context CT_TLTimeTargetElement */
+ class TimeTargetElementContext
+ : public ::oox::core::FragmentHandler2
+ {
+ public:
+ TimeTargetElementContext( ::oox::core::FragmentHandler2 const & rParent, const AnimTargetElementPtr & aValue );
+ virtual ~TimeTargetElementContext( ) noexcept override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
+
+ private:
+ AnimTargetElementPtr mpTarget;
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx
new file mode 100644
index 000000000..19267954c
--- /dev/null
+++ b/oox/source/shape/LockedCanvasContext.cxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "LockedCanvasContext.hxx"
+#include <sal/log.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <oox/drawingml/connectorshapecontext.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <oox/drawingml/shapecontext.hxx>
+#include <oox/drawingml/shapegroupcontext.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace com::sun::star;
+
+namespace oox::shape
+{
+LockedCanvasContext::LockedCanvasContext(FragmentHandler2 const& rParent)
+ : FragmentHandler2(rParent)
+{
+ mpShapePtr = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape");
+ mpShapePtr->setLockedCanvas(true); // will be "LockedCanvas" in InteropGrabBag
+}
+
+LockedCanvasContext::~LockedCanvasContext() = default;
+
+::oox::core::ContextHandlerRef
+LockedCanvasContext::onCreateContext(sal_Int32 nElementToken, const ::oox::AttributeList& rAttribs)
+{
+ switch (getBaseToken(nElementToken))
+ {
+ case XML_nvGrpSpPr: // CT_GvmlGroupShapeNonVisual, child see at end
+ return this;
+ case XML_grpSpPr: // CT_GroupShapeProperties
+ return new oox::drawingml::ShapePropertiesContext(*this, *mpShapePtr);
+ case XML_txSp: // CT_GvmlTextShape
+ break;
+ case XML_sp: // CT_GvmlShape
+ {
+ return new oox::drawingml::ShapeContext(
+ *this, mpShapePtr,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.CustomShape", true));
+ }
+ case XML_cxnSp: // CT_GvmlConnector
+ {
+ oox::drawingml::ShapePtr pShape
+ = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.ConnectorShape");
+ return new oox::drawingml::ConnectorShapeContext(*this, mpShapePtr, pShape,
+ pShape->getConnectorShapeProperties());
+ }
+ case XML_pic: // CT_GvmlPicture
+ {
+ return new oox::drawingml::GraphicShapeContext(
+ *this, mpShapePtr,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GraphicObjectShape"));
+ }
+ case XML_graphicFrame: // CT_GvmlGraphicObjectFrame
+ {
+ return new oox::drawingml::GraphicalObjectFrameContext(
+ *this, mpShapePtr,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GraphicObjectShape"),
+ true);
+ }
+ case XML_grpSp: // CT_GvmlGroupShape
+ {
+ return new oox::drawingml::ShapeGroupContext(
+ *this, mpShapePtr,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape"));
+ }
+ // mandatory child elements of CT_GvmlGroupShapeNonVisual
+ case XML_cNvPr: // CT_NonVisualDrawingProps
+ {
+ mpShapePtr->setHidden(rAttribs.getBool(XML_hidden, false));
+ mpShapePtr->setId(rAttribs.getString(XML_id).get());
+ mpShapePtr->setName(rAttribs.getString(XML_name).get());
+ break;
+ }
+ case XML_cNvGrpSpPr: // CT_NonVisualGroupDrawingShapeProps
+ break;
+ default:
+ SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:"
+ << getBaseToken(nElementToken));
+ break;
+ }
+ return nullptr;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/LockedCanvasContext.hxx b/oox/source/shape/LockedCanvasContext.hxx
new file mode 100644
index 000000000..076931d09
--- /dev/null
+++ b/oox/source/shape/LockedCanvasContext.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_SHAPE_LOCKEDCANVASCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_SHAPE_LOCKEDCANVASCONTEXT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox::shape
+{
+/// Locked canvas is kind of a container for drawingml shapes: it can even contain group shapes.
+class LockedCanvasContext final : public oox::core::FragmentHandler2
+{
+public:
+ explicit LockedCanvasContext(oox::core::FragmentHandler2 const& rParent);
+ ~LockedCanvasContext() override;
+
+ oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken,
+ const ::oox::AttributeList& rAttribs) override;
+
+ const oox::drawingml::ShapePtr& getShape() const { return mpShapePtr; }
+
+private:
+ oox::drawingml::ShapePtr mpShapePtr;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
new file mode 100644
index 000000000..e88637fc4
--- /dev/null
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -0,0 +1,584 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+
+#include <oox/shape/ShapeContextHandler.hxx>
+#include "ShapeDrawingFragmentHandler.hxx"
+#include "LockedCanvasContext.hxx"
+#include "WpsContext.hxx"
+#include "WpgContext.hxx"
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <oox/vml/vmldrawingfragment.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#include <oox/shape/ShapeFilterBase.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/drawingml/theme.hxx>
+#include <oox/drawingml/themefragmenthandler.hxx>
+#include <memory>
+
+using namespace ::com::sun::star;
+
+namespace oox::shape {
+using namespace core;
+using namespace drawingml;
+
+ShapeContextHandler::ShapeContextHandler(const rtl::Reference<ShapeFilterBase>& xFilterBase) :
+ m_bFullWPGSUpport(false),
+ mxShapeFilterBase(xFilterBase)
+
+{
+}
+
+ShapeContextHandler::~ShapeContextHandler()
+{
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getLockedCanvasContext(sal_Int32 nElement)
+{
+ if (!mxLockedCanvasContext.is())
+ {
+ FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
+
+ switch (nElement & 0xffff)
+ {
+ case XML_lockedCanvas:
+ mxLockedCanvasContext.set(static_cast<oox::core::ContextHandler*>(new LockedCanvasContext(*rFragmentHandler)));
+ break;
+ default:
+ break;
+ }
+ }
+
+ return mxLockedCanvasContext;
+}
+
+/*
+ * This method creates new ChartGraphicDataContext Object.
+ */
+uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getChartShapeContext(sal_Int32 nElement)
+{
+ if (!mxChartShapeContext.is())
+ {
+ switch (nElement & 0xffff)
+ {
+ case XML_chart:
+ {
+ std::unique_ptr<ContextHandler2Helper> pFragmentHandler(
+ new ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
+ mpShape = std::make_shared<Shape>("com.sun.star.drawing.OLE2Shape" );
+ mxChartShapeContext.set(new ChartGraphicDataContext(*pFragmentHandler, mpShape, true));
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ return mxChartShapeContext;
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement)
+{
+ if (!mxWpsContext.is())
+ {
+ FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
+ ShapePtr pMasterShape;
+
+ uno::Reference<drawing::XShape> xShape;
+ // No element happens in case of pretty-printed XML, bodyPr is the case when we are called again after <wps:txbx>.
+ if (!nElement || nElement == WPS_TOKEN(bodyPr))
+ // Assume that this is just a continuation of the previous shape.
+ xShape = mxSavedShape;
+
+ switch (getBaseToken(nStartElement))
+ {
+ case XML_wsp:
+ mxWpsContext.set(new WpsContext(
+ *rFragmentHandler,
+ xShape,
+ pMasterShape,
+ std::make_shared<oox::drawingml::Shape>(
+ "com.sun.star.drawing.CustomShape")));
+ break;
+ default:
+ break;
+ }
+ }
+
+ return mxWpsContext;
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getWpgContext(sal_Int32 nElement)
+{
+ if (!mxWpgContext.is())
+ {
+ FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath));
+
+ switch (getBaseToken(nElement))
+ {
+ case XML_wgp:
+ {
+ rtl::Reference<WpgContext> rContext = new WpgContext(*rFragmentHandler, oox::drawingml::ShapePtr());
+ rContext->setFullWPGSupport(m_bFullWPGSUpport);
+ mxWpgContext.set(static_cast<oox::core::ContextHandler*>(rContext.get()));
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ return mxWpgContext;
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const &
+ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element )
+{
+ if (! mxGraphicShapeContext.is())
+ {
+ auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
+ ShapePtr pMasterShape;
+
+ switch (Element & 0xffff)
+ {
+ case XML_graphic:
+ mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
+ mxGraphicShapeContext.set
+ (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true));
+ break;
+ case XML_pic:
+ mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
+ mxGraphicShapeContext.set
+ (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape));
+ break;
+ default:
+ break;
+ }
+ }
+
+ return mxGraphicShapeContext;
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const &
+ShapeContextHandler::getDrawingShapeContext()
+{
+ if (!mxDrawingFragmentHandler.is())
+ {
+ mpDrawing = std::make_shared<oox::vml::Drawing>( *mxShapeFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD );
+ mxDrawingFragmentHandler.set
+ (static_cast<ContextHandler *>
+ (new oox::vml::DrawingFragment
+ ( *mxShapeFilterBase, msRelationFragmentPath, *mpDrawing )));
+ }
+ else
+ {
+ // Reset the handler if fragment path has changed
+ OUString sHandlerFragmentPath = dynamic_cast<ContextHandler&>(*mxDrawingFragmentHandler).getFragmentPath();
+ if ( msRelationFragmentPath != sHandlerFragmentPath )
+ {
+ mxDrawingFragmentHandler.clear();
+ mxDrawingFragmentHandler.set
+ (static_cast<ContextHandler *>
+ (new oox::vml::DrawingFragment
+ ( *mxShapeFilterBase, msRelationFragmentPath, *mpDrawing )));
+ }
+ }
+ return mxDrawingFragmentHandler;
+}
+
+uno::Reference<xml::sax::XFastContextHandler> const &
+ShapeContextHandler::getDiagramShapeContext()
+{
+ if (!mxDiagramShapeContext.is())
+ {
+ auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
+ mpShape = std::make_shared<Shape>();
+ mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape));
+ }
+
+ return mxDiagramShapeContext;
+}
+
+uno::Reference<xml::sax::XFastContextHandler>
+ShapeContextHandler::getContextHandler(sal_Int32 nElement)
+{
+ uno::Reference<xml::sax::XFastContextHandler> xResult;
+ const sal_uInt32 nStartToken = getStartToken();
+
+ switch (getNamespace( nStartToken ))
+ {
+ case NMSP_doc:
+ case NMSP_vml:
+ xResult.set(getDrawingShapeContext());
+ break;
+ case NMSP_dmlDiagram:
+ xResult.set(getDiagramShapeContext());
+ break;
+ case NMSP_dmlLockedCanvas:
+ xResult.set(getLockedCanvasContext(nStartToken));
+ break;
+ case NMSP_dmlChart:
+ xResult.set(getChartShapeContext(nStartToken));
+ break;
+ case NMSP_wps:
+ xResult.set(getWpsContext(nStartToken, nElement));
+ break;
+ case NMSP_wpg:
+ xResult.set(getWpgContext(nStartToken));
+ break;
+ default:
+ xResult.set(getGraphicShapeContext(nStartToken));
+ break;
+ }
+
+ return xResult;
+}
+
+// css::xml::sax::XFastContextHandler:
+void SAL_CALL ShapeContextHandler::startFastElement
+(::sal_Int32 Element,
+ const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
+{
+ mxShapeFilterBase->filter(maMediaDescriptor);
+
+ if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart) ||
+ Element == WPS_TOKEN(wsp) || Element == WPG_TOKEN(wgp) || Element == OOX_TOKEN(dmlPicture, pic))
+ {
+ // Parse the theme relation, if available; the diagram won't have colors without it.
+ if (!mpThemePtr && !msRelationFragmentPath.isEmpty())
+ {
+ mpThemePtr = std::make_shared<Theme>();
+ // Get Target for Type = "officeDocument" from _rels/.rels file
+ // aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
+ FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
+ OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
+
+ // Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
+ // and the same is used by header and footer as well.
+ FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, aOfficeDocumentFragmentPath));
+ OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
+
+ if(!aThemeFragmentPath.isEmpty())
+ {
+ uno::Reference<xml::sax::XFastSAXSerializable> xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
+ mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc);
+ mxShapeFilterBase->setCurrentTheme(mpThemePtr);
+ }
+ }
+
+ createFastChildContext(Element, Attribs);
+ }
+
+ // Entering VML block (startFastElement() is called for the outermost tag),
+ // handle possible recursion.
+ if ( getContextHandler() == getDrawingShapeContext() )
+ mpDrawing->getShapes().pushMark();
+
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ xContextHandler->startFastElement(Element, Attribs);
+}
+
+void SAL_CALL ShapeContextHandler::startUnknownElement
+(const OUString & Namespace, const OUString & Name,
+ const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
+{
+ if ( getContextHandler() == getDrawingShapeContext() )
+ mpDrawing->getShapes().pushMark();
+
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ xContextHandler->startUnknownElement(Namespace, Name, Attribs);
+}
+
+void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
+{
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ xContextHandler->endFastElement(Element);
+ // In case a textbox is sent, and later we get additional properties for
+ // the textbox, then the wps context is not cleared, so do that here.
+ if (Element != (NMSP_wps | XML_wsp))
+ return;
+
+ uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
+ bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
+ bool bTextBox = false;
+ if (!bTextFrame)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
+ }
+ if (bTextFrame || bTextBox)
+ mxWpsContext.clear();
+ mxSavedShape.clear();
+}
+
+void SAL_CALL ShapeContextHandler::endUnknownElement
+(const OUString & Namespace,
+ const OUString & Name)
+{
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ xContextHandler->endUnknownElement(Namespace, Name);
+}
+
+uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
+ShapeContextHandler::createFastChildContext
+(::sal_Int32 Element,
+ const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
+{
+ uno::Reference< xml::sax::XFastContextHandler > xResult;
+ uno::Reference< xml::sax::XFastContextHandler > xContextHandler(getContextHandler(Element));
+
+ if (xContextHandler.is())
+ xResult.set(xContextHandler->createFastChildContext
+ (Element, Attribs));
+
+ return xResult;
+}
+
+uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
+ShapeContextHandler::createUnknownChildContext
+(const OUString & Namespace,
+ const OUString & Name,
+ const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
+{
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ return xContextHandler->createUnknownChildContext
+ (Namespace, Name, Attribs);
+
+ return uno::Reference< xml::sax::XFastContextHandler >();
+}
+
+void SAL_CALL ShapeContextHandler::characters(const OUString & aChars)
+{
+ uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
+
+ if (xContextHandler.is())
+ xContextHandler->characters(aChars);
+}
+
+uno::Reference< drawing::XShape >
+ShapeContextHandler::getShape()
+{
+ uno::Reference< drawing::XShape > xResult;
+ uno::Reference< drawing::XShapes > xShapes = mxDrawPage;
+
+ if (mxShapeFilterBase && xShapes.is())
+ {
+ if ( getContextHandler() == getDrawingShapeContext() )
+ {
+ mpDrawing->finalizeFragmentImport();
+ if( std::shared_ptr< vml::ShapeBase > pShape = mpDrawing->getShapes().takeLastShape() )
+ xResult = pShape->convertAndInsert( xShapes );
+ // Only now remove the recursion mark, because getShape() is called in writerfilter
+ // after endFastElement().
+ mpDrawing->getShapes().popMark();
+ }
+ else if (mxDiagramShapeContext.is())
+ {
+ basegfx::B2DHomMatrix aMatrix;
+ if (mpShape->getExtDrawings().empty())
+ {
+ mpShape->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
+ xResult = mpShape->getXShape();
+ }
+ else
+ {
+ // Prerendered diagram output is available, then use that, and throw away the original result.
+ for (auto const& extDrawing : mpShape->getExtDrawings())
+ {
+ DiagramGraphicDataContext* pDiagramGraphicDataContext = dynamic_cast<DiagramGraphicDataContext*>(mxDiagramShapeContext.get());
+ if (!pDiagramGraphicDataContext)
+ break;
+ OUString aFragmentPath(pDiagramGraphicDataContext->getFragmentPathFromRelId(extDrawing));
+ oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
+ pShapePtr->setDiagramType();
+ mxShapeFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxShapeFilterBase, aFragmentPath, pShapePtr));
+ pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
+ pShapePtr->keepDiagramDrawing(*mxShapeFilterBase, aFragmentPath);
+
+ // migrate IDiagramHelper to new oox::Shape (from mpShape which was loaded
+ // to pShapePtr where the geometry is now constructed)
+ mpShape->migrateDiagramHelperToNewShape(pShapePtr);
+
+ if (!mpShape->getChildren().empty())
+ {
+ // first child is diagram background - we want to keep it, as drawingML fallback doesn't contain it
+ auto& aChildren = pShapePtr->getChildren();
+ ShapePtr pBackground = mpShape->getChildren().front();
+ aChildren.insert(aChildren.begin(), pBackground);
+ }
+
+ pShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
+ xResult = pShapePtr->getXShape();
+ }
+ mpShape.reset();
+ }
+ mxDiagramShapeContext.clear();
+ }
+ else if (mxLockedCanvasContext.is())
+ {
+ ShapePtr pShape = dynamic_cast<LockedCanvasContext&>(*mxLockedCanvasContext).getShape();
+ if (pShape)
+ {
+ basegfx::B2DHomMatrix aMatrix;
+ pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
+ xResult = pShape->getXShape();
+ mxLockedCanvasContext.clear();
+ }
+ }
+ //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
+ //mnStartToken is set as NMSP_dmlChart in setStartToken.
+ //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
+ else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( getStartToken() )))
+ {
+ ChartGraphicDataContext* pChartGraphicDataContext = dynamic_cast<ChartGraphicDataContext*>(mxChartShapeContext.get());
+ if (pChartGraphicDataContext)
+ {
+ basegfx::B2DHomMatrix aMatrix;
+ oox::drawingml::ShapePtr xShapePtr( pChartGraphicDataContext->getShape());
+ // See SwXTextDocument::createInstance(), ODF import uses the same hack.
+ xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
+ xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
+ xResult = xShapePtr->getXShape();
+ }
+ mxChartShapeContext.clear();
+ }
+ else if (mxWpsContext.is())
+ {
+ ShapePtr pShape = dynamic_cast<WpsContext&>(*mxWpsContext).getShape();
+ if (pShape)
+ {
+ basegfx::B2DHomMatrix aMatrix;
+ pShape->setPosition(maPosition);
+ pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
+ xResult = pShape->getXShape();
+ mxSavedShape = xResult;
+ mxWpsContext.clear();
+ }
+ }
+ else if (mxWpgContext.is())
+ {
+ ShapePtr pShape = dynamic_cast<WpgContext&>(*mxWpgContext).getShape();
+ if (pShape)
+ {
+ basegfx::B2DHomMatrix aMatrix;
+ pShape->setPosition(maPosition);
+ pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
+ xResult = pShape->getXShape();
+ mxSavedShape = xResult;
+ mxWpgContext.clear();
+ }
+ }
+ else if (mpShape)
+ {
+ basegfx::B2DHomMatrix aTransformation;
+
+ if (maPosition.X != 0 || maPosition.Y != 0)
+ {
+ // We got a position from writerfilter/, store that in the shape, otherwise the
+ // position won't be set.
+ mpShape->setWps(true);
+ mpShape->setPosition(maPosition);
+ }
+
+ mpShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );
+ xResult.set(mpShape->getXShape());
+ mxGraphicShapeContext.clear( );
+ }
+ }
+
+ if (xResult)
+ popStartToken();
+ return xResult;
+}
+
+void ShapeContextHandler::setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value)
+{
+ mxDrawPage = the_value;
+}
+
+void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel > & the_value)
+{
+ if( !mxShapeFilterBase.is() )
+ throw uno::RuntimeException();
+ uno::Reference<lang::XComponent> xComp(the_value, uno::UNO_QUERY_THROW);
+ mxShapeFilterBase->setTargetDocument(xComp);
+}
+
+void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
+{
+ msRelationFragmentPath = the_value;
+}
+
+sal_Int32 ShapeContextHandler::getStartToken() const
+{
+ assert(mnStartTokenStack.size() && "This stack must not be empty!");
+ return mnStartTokenStack.top();
+}
+
+void ShapeContextHandler::popStartToken()
+{
+ if (mnStartTokenStack.size() > 1)
+ mnStartTokenStack.pop();
+}
+
+void ShapeContextHandler::pushStartToken( sal_Int32 _starttoken )
+{
+ mnStartTokenStack.push(_starttoken);
+}
+
+void ShapeContextHandler::setPosition(const awt::Point& rPosition)
+{
+ maPosition = rPosition;
+}
+
+void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps)
+{
+ mxDocumentProperties = xDocProps;
+ mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
+}
+
+void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
+{
+ maMediaDescriptor = rMediaDescriptor;
+}
+
+void ShapeContextHandler::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
+{
+ mxShapeFilterBase->setGraphicMapper(rxGraphicMapper);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.cxx b/oox/source/shape/ShapeDrawingFragmentHandler.cxx
new file mode 100644
index 000000000..aafe004fa
--- /dev/null
+++ b/oox/source/shape/ShapeDrawingFragmentHandler.cxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ShapeDrawingFragmentHandler.hxx"
+
+#include <oox/drawingml/shapegroupcontext.hxx>
+#include <oox/token/namespaces.hxx>
+
+using namespace com::sun::star;
+
+namespace oox::shape {
+
+ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr const & pGroupShapePtr)
+ : FragmentHandler2(rFilter, rFragmentPath)
+ , mpGroupShapePtr(pGroupShapePtr)
+{
+}
+
+ShapeDrawingFragmentHandler::~ShapeDrawingFragmentHandler() noexcept
+{
+}
+
+void SAL_CALL ShapeDrawingFragmentHandler::endDocument()
+{
+}
+
+::oox::core::ContextHandlerRef ShapeDrawingFragmentHandler::onCreateContext(sal_Int32 Element, const AttributeList& /*Attribs*/ )
+{
+ switch( Element )
+ {
+ case DSP_TOKEN( spTree ):
+ return new oox::drawingml::ShapeGroupContext(*this, oox::drawingml::ShapePtr(nullptr), mpGroupShapePtr);
+ default:
+ break;
+ }
+
+ return this;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.hxx b/oox/source/shape/ShapeDrawingFragmentHandler.hxx
new file mode 100644
index 000000000..68b27f949
--- /dev/null
+++ b/oox/source/shape/ShapeDrawingFragmentHandler.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_SHAPE_SHAPEDRAWINGFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_SOURCE_SHAPE_SHAPEDRAWINGFRAGMENTHANDLER_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox::shape {
+
+/// Generic (i.e. not specific to PPTX) handler for the prerendered diagram parsing.
+class ShapeDrawingFragmentHandler : public oox::core::FragmentHandler2
+{
+public:
+ ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr const & pGroupShapePtr);
+ virtual ~ShapeDrawingFragmentHandler() noexcept override;
+ virtual void SAL_CALL endDocument() override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const AttributeList& rAttribs ) override;
+
+private:
+ oox::drawingml::ShapePtr mpGroupShapePtr;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
new file mode 100644
index 000000000..ad10c4fe6
--- /dev/null
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <config_wasm_strip.h>
+
+#include <oox/shape/ShapeFilterBase.hxx>
+#include <oox/drawingml/chart/chartconverter.hxx>
+#include <oox/drawingml/themefragmenthandler.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/ole/vbaproject.hxx>
+#include <oox/drawingml/theme.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+
+namespace oox::shape {
+
+using namespace ::com::sun::star;
+
+ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) :
+ XmlFilterBase( rxContext ),
+#if ENABLE_WASM_STRIP_CHART
+ // WASM_CHART change
+ mxChartConv( )
+#else
+ mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
+#endif
+{
+}
+
+ShapeFilterBase::~ShapeFilterBase()
+{
+}
+
+const ::oox::drawingml::Theme* ShapeFilterBase::getCurrentTheme() const
+{
+ return mpTheme.get();
+}
+
+std::shared_ptr<::oox::drawingml::Theme> ShapeFilterBase::getCurrentThemePtr() const
+{
+ return mpTheme;
+}
+
+void ShapeFilterBase::setCurrentTheme(const ::oox::drawingml::ThemePtr& pTheme)
+{
+ mpTheme = pTheme;
+}
+
+::oox::vml::Drawing* ShapeFilterBase::getVmlDrawing()
+{
+ return nullptr;
+}
+
+::oox::drawingml::table::TableStyleListPtr ShapeFilterBase::getTableStyles()
+{
+ return ::oox::drawingml::table::TableStyleListPtr();
+}
+
+::oox::drawingml::chart::ChartConverter* ShapeFilterBase::getChartConverter()
+{
+ return mxChartConv.get();
+}
+
+::oox::ole::VbaProject* ShapeFilterBase::implCreateVbaProject() const
+{
+ return new ::oox::ole::VbaProject( getComponentContext(), getModel(), u"Writer" );
+}
+
+OUString ShapeFilterBase::getImplementationName()
+{
+ return OUString();
+}
+
+namespace {
+
+/// Graphic helper for shapes, that can manage color schemes.
+class ShapeGraphicHelper : public GraphicHelper
+{
+public:
+ explicit ShapeGraphicHelper( const ShapeFilterBase& rFilter );
+ virtual ::Color getSchemeColor( sal_Int32 nToken ) const override;
+private:
+ const ShapeFilterBase& mrFilter;
+};
+
+}
+
+ShapeGraphicHelper::ShapeGraphicHelper( const ShapeFilterBase& rFilter ) :
+ GraphicHelper( rFilter.getComponentContext(), rFilter.getTargetFrame(), rFilter.getStorage() ),
+ mrFilter( rFilter )
+{
+}
+
+::Color ShapeGraphicHelper::getSchemeColor( sal_Int32 nToken ) const
+{
+ return mrFilter.getSchemeColor( nToken );
+}
+
+GraphicHelper* ShapeFilterBase::implCreateGraphicHelper() const
+{
+ GraphicHelper* pGraphicHelper = new ShapeGraphicHelper(*this);
+ if (mxGraphicMapper.is())
+ pGraphicHelper->setGraphicMapper(mxGraphicMapper);
+ return pGraphicHelper;
+}
+
+::Color ShapeFilterBase::getSchemeColor( sal_Int32 nToken ) const
+{
+ ::Color nColor;
+
+ if (mpTheme)
+ mpTheme->getClrScheme().getColor( nToken, nColor );
+
+ return nColor;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx
new file mode 100644
index 000000000..cf65491e0
--- /dev/null
+++ b/oox/source/shape/WpgContext.cxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "WpgContext.hxx"
+#include "WpsContext.hxx"
+#include <sal/log.hxx>
+#include <drawingml/shapepropertiescontext.hxx>
+#include <oox/drawingml/shapegroupcontext.hxx>
+#include <oox/drawingml/graphicshapecontext.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+using namespace com::sun::star;
+
+namespace oox::shape
+{
+WpgContext::WpgContext(FragmentHandler2 const& rParent, oox::drawingml::ShapePtr pMaster)
+ : FragmentHandler2(rParent)
+ , m_bFullWPGSupport(false)
+{
+ mpShape = std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape");
+ mpShape->setWps(true);
+ if (pMaster)
+ pMaster->addChild(mpShape);
+}
+
+WpgContext::~WpgContext() = default;
+
+oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken,
+ const oox::AttributeList& /*rAttribs*/)
+{
+ switch (getBaseToken(nElementToken))
+ {
+ case XML_wgp:
+ case XML_cNvGrpSpPr:
+ case XML_grpSpPr:
+ return new oox::drawingml::ShapePropertiesContext(*this, *mpShape);
+ case XML_wsp:
+ {
+ if (m_bFullWPGSupport)
+ {
+ oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>(
+ "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false);
+ return new oox::shape::WpsContext(*this, uno::Reference<drawing::XShape>(), mpShape,
+ pShape);
+ }
+ else
+ {
+ // Don't set default character height, Writer has its own way to set
+ // the default, and if we don't set it here, editeng properly inherits
+ // it.
+ oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>(
+ "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false);
+ return new oox::drawingml::ShapeContext(*this, mpShape, pShape);
+ }
+ }
+ case XML_pic:
+ return new oox::drawingml::GraphicShapeContext(
+ *this, mpShape,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GraphicObjectShape"));
+ case XML_grpSp:
+ {
+ if (m_bFullWPGSupport)
+ {
+ rtl::Reference<WpgContext> pWPGShape = new oox::shape::WpgContext(*this, mpShape);
+ pWPGShape->setFullWPGSupport(m_bFullWPGSupport);
+ return pWPGShape;
+ }
+ else
+ {
+ return new oox::drawingml::ShapeGroupContext(
+ *this, mpShape,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape"));
+ }
+ }
+ case XML_graphicFrame:
+ {
+ auto pShape = std::make_shared<oox::drawingml::Shape>(
+ "com.sun.star.drawing.GraphicObjectShape");
+ pShape->setWps(true);
+ return new oox::drawingml::GraphicalObjectFrameContext(*this, mpShape, pShape,
+ /*bEmbedShapesInChart=*/true);
+ }
+ default:
+ SAL_WARN("oox", "WpgContext::createFastChildContext: unhandled element: "
+ << getBaseToken(nElementToken));
+ break;
+ }
+ return nullptr;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/WpgContext.hxx b/oox/source/shape/WpgContext.hxx
new file mode 100644
index 000000000..643a2a493
--- /dev/null
+++ b/oox/source/shape/WpgContext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_SHAPE_WPGCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_SHAPE_WPGCONTEXT_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox::shape
+{
+/// Wpg is the drawingML equivalent of v:group.
+class WpgContext final : public oox::core::FragmentHandler2
+{
+public:
+ explicit WpgContext(oox::core::FragmentHandler2 const& rParent,
+ oox::drawingml::ShapePtr pMaster);
+ ~WpgContext() override;
+
+ oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken,
+ const oox::AttributeList& rAttribs) override;
+
+ const oox::drawingml::ShapePtr& getShape() const { return mpShape; }
+
+ const bool& isFullWPGSupport() const { return m_bFullWPGSupport; };
+ void setFullWPGSupport(bool bUse) { m_bFullWPGSupport = bUse; };
+
+private:
+ oox::drawingml::ShapePtr mpShape;
+
+ bool m_bFullWPGSupport;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
new file mode 100644
index 000000000..176ad569e
--- /dev/null
+++ b/oox/source/shape/WpsContext.cxx
@@ -0,0 +1,338 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "WpsContext.hxx"
+#include "WpgContext.hxx"
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <drawingml/customshapeproperties.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <svx/svdtrans.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/drawingml/shape.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbody.hxx>
+#include <drawingml/textbodyproperties.hxx>
+
+#include <optional>
+
+using namespace com::sun::star;
+
+namespace oox::shape
+{
+WpsContext::WpsContext(ContextHandler2Helper const& rParent, uno::Reference<drawing::XShape> xShape,
+ const drawingml::ShapePtr& pMasterShapePtr,
+ const drawingml::ShapePtr& pShapePtr)
+ : ShapeContext(rParent, pMasterShapePtr, pShapePtr)
+ , mxShape(std::move(xShape))
+{
+ if (mpShapePtr)
+ mpShapePtr->setWps(true);
+
+ if (const auto pParent = dynamic_cast<const WpgContext*>(&rParent))
+ m_bHasWPGParent = pParent->isFullWPGSupport();
+ else
+ m_bHasWPGParent = false;
+}
+
+WpsContext::~WpsContext() = default;
+
+oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken,
+ const oox::AttributeList& rAttribs)
+{
+ switch (getBaseToken(nElementToken))
+ {
+ case XML_wsp:
+ case XML_cNvCnPr:
+ break;
+ case XML_bodyPr:
+ if (mxShape.is())
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(mxShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ sal_Int32 nVert = rAttribs.getToken(XML_vert, XML_horz);
+ if (nVert == XML_eaVert)
+ {
+ xPropertySet->setPropertyValue("TextWritingMode",
+ uno::Any(text::WritingMode_TB_RL));
+ }
+ else if (nVert != XML_horz)
+ {
+ // Get the existing rotation of the shape.
+ drawing::HomogenMatrix3 aMatrix;
+ xPropertySet->getPropertyValue("Transformation") >>= aMatrix;
+ basegfx::B2DHomMatrix aTransformation;
+ aTransformation.set(0, 0, aMatrix.Line1.Column1);
+ aTransformation.set(0, 1, aMatrix.Line1.Column2);
+ aTransformation.set(0, 2, aMatrix.Line1.Column3);
+ aTransformation.set(1, 0, aMatrix.Line1.Column1);
+ aTransformation.set(1, 1, aMatrix.Line2.Column2);
+ aTransformation.set(1, 2, aMatrix.Line3.Column3);
+ aTransformation.set(2, 0, aMatrix.Line1.Column1);
+ aTransformation.set(2, 1, aMatrix.Line2.Column2);
+ aTransformation.set(2, 2, aMatrix.Line3.Column3);
+ basegfx::B2DTuple aScale;
+ basegfx::B2DTuple aTranslate;
+ double fRotate = 0;
+ double fShearX = 0;
+ aTransformation.decompose(aScale, aTranslate, fRotate, fShearX);
+
+ // If the text is not rotated the way the shape wants it already, set the angle.
+ const sal_Int32 nRotation = nVert == XML_vert270 ? -270 : -90;
+ if (static_cast<sal_Int32>(basegfx::rad2deg(fRotate))
+ != NormAngle36000(Degree100(nRotation * 100)).get() / 100)
+ {
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(
+ xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ aCustomShapeGeometry["TextPreRotateAngle"] <<= nRotation;
+ xPropertySet->setPropertyValue(
+ "CustomShapeGeometry",
+ uno::Any(aCustomShapeGeometry.getAsConstPropertyValueList()));
+ }
+ }
+
+ if (bool bUpright = rAttribs.getBool(XML_upright, false))
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc(length + 1);
+ auto pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "Upright";
+ pGrabBag[length].Value <<= bUpright;
+ xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag));
+ }
+
+ if (xServiceInfo.is())
+ {
+ // Handle inset attributes for Writer textframes.
+ sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns };
+ std::optional<sal_Int32> oInsets[4];
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS(aInsets); ++i)
+ {
+ OptValue<OUString> oValue = rAttribs.getString(aInsets[i]);
+ if (oValue.has())
+ oInsets[i] = oox::drawingml::GetCoordinate(oValue.get());
+ else
+ // Defaults from the spec: left/right: 91440 EMU, top/bottom: 45720 EMU
+ oInsets[i]
+ = (aInsets[i] == XML_lIns || aInsets[i] == XML_rIns) ? 254 : 127;
+ }
+ const OUString aShapeProps[]
+ = { OUString("TextLeftDistance"), OUString("TextUpperDistance"),
+ OUString("TextRightDistance"), OUString("TextLowerDistance") };
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS(aShapeProps); ++i)
+ if (oInsets[i])
+ xPropertySet->setPropertyValue(aShapeProps[i], uno::Any(*oInsets[i]));
+ }
+
+ // Handle text vertical adjustment inside a text frame
+ if (rAttribs.hasAttribute(XML_anchor))
+ {
+ drawing::TextVerticalAdjust eAdjust
+ = drawingml::GetTextVerticalAdjust(rAttribs.getToken(XML_anchor, XML_t));
+ xPropertySet->setPropertyValue("TextVerticalAdjust", uno::Any(eAdjust));
+ }
+
+ // Apply character color of the shape to the shape's textbox.
+ uno::Reference<text::XText> xText(mxShape, uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor();
+ xTextCursor->gotoStart(false);
+ xTextCursor->gotoEnd(true);
+ uno::Reference<beans::XPropertySet> xTextBoxPropertySet(xTextCursor,
+ uno::UNO_QUERY);
+ uno::Any xCharColor = xPropertySet->getPropertyValue("CharColor");
+ Color aColor = COL_AUTO;
+ if ((xCharColor >>= aColor) && aColor != COL_AUTO)
+ {
+ const uno::Reference<beans::XPropertyState> xPropertyState(xTextCursor,
+ uno::UNO_QUERY);
+ const beans::PropertyState ePropertyState
+ = xPropertyState->getPropertyState("CharColor");
+ if (ePropertyState == beans::PropertyState_DEFAULT_VALUE)
+ {
+ xTextBoxPropertySet->setPropertyValue("CharColor", xCharColor);
+ }
+ else
+ {
+ // tdf#135923 Apply character color of the shape to the textrun
+ // when the character color of the textrun is default.
+ uno::Reference<container::XEnumerationAccess> paraEnumAccess(
+ xText, uno::UNO_QUERY);
+ if (paraEnumAccess.is())
+ {
+ uno::Reference<container::XEnumeration> paraEnum(
+ paraEnumAccess->createEnumeration());
+
+ while (paraEnum->hasMoreElements())
+ {
+ uno::Reference<text::XTextRange> xParagraph(paraEnum->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> runEnumAccess(
+ xParagraph, uno::UNO_QUERY);
+ if (!runEnumAccess.is())
+ continue;
+
+ uno::Reference<container::XEnumeration> runEnum
+ = runEnumAccess->createEnumeration();
+
+ while (runEnum->hasMoreElements())
+ {
+ uno::Reference<text::XTextRange> xRun(runEnum->nextElement(),
+ uno::UNO_QUERY);
+ const uno::Reference<beans::XPropertyState> xRunState(
+ xRun, uno::UNO_QUERY);
+ if (xRunState->getPropertyState("CharColor")
+ == beans::PropertyState_DEFAULT_VALUE)
+ {
+ uno::Reference<beans::XPropertySet> xRunPropSet(
+ xRun, uno::UNO_QUERY);
+ xRunPropSet->setPropertyValue("CharColor", xCharColor);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ auto nWrappingType = rAttribs.getToken(XML_wrap, XML_square);
+ xPropertySet->setPropertyValue("TextWordWrap",
+ uno::Any(nWrappingType == XML_square));
+
+ return this;
+ }
+ else if (m_bHasWPGParent && mpShapePtr)
+ {
+ // this WPS context has to be inside a WPG shape, so the <BodyPr> element
+ // cannot be applied to mxShape member, use mpShape instead, and after the
+ // the parent shape finished, apply it for its children.
+ mpShapePtr->setWPGChild(true);
+ oox::drawingml::TextBodyPtr pTextBody;
+ pTextBody.reset(new oox::drawingml::TextBody());
+
+ if (rAttribs.hasAttribute(XML_anchor))
+ {
+ drawing::TextVerticalAdjust eAdjust
+ = drawingml::GetTextVerticalAdjust(rAttribs.getToken(XML_anchor, XML_t));
+ pTextBody->getTextProperties().meVA = eAdjust;
+ }
+
+ sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns };
+ for (int i = 0; i < 4; ++i)
+ {
+ if (rAttribs.hasAttribute(XML_lIns))
+ {
+ OptValue<OUString> oValue = rAttribs.getString(aInsets[i]);
+ if (oValue.has())
+ pTextBody->getTextProperties().moInsets[i]
+ = oox::drawingml::GetCoordinate(oValue.get());
+ else
+ // Defaults from the spec: left/right: 91440 EMU, top/bottom: 45720 EMU
+ pTextBody->getTextProperties().moInsets[i]
+ = (aInsets[i] == XML_lIns || aInsets[i] == XML_rIns) ? 254 : 127;
+ }
+ }
+
+ mpShapePtr->setTextBody(pTextBody);
+ }
+ break;
+ case XML_noAutofit:
+ case XML_spAutoFit:
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(mxShape, uno::UNO_QUERY);
+ // We can't use oox::drawingml::TextBodyPropertiesContext here, as this
+ // is a child context of bodyPr, so the shape is already sent: we need
+ // to alter the XShape directly.
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ if (xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
+ xPropertySet->setPropertyValue(
+ "FrameIsAutomaticHeight",
+ uno::Any(getBaseToken(nElementToken) == XML_spAutoFit));
+ else
+ xPropertySet->setPropertyValue(
+ "TextAutoGrowHeight",
+ uno::Any(getBaseToken(nElementToken) == XML_spAutoFit));
+ }
+ }
+ break;
+ case XML_prstTxWarp:
+ if (rAttribs.hasAttribute(XML_prst))
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ oox::OptValue<OUString> presetShapeName = rAttribs.getString(XML_prst);
+ const OUString& preset = presetShapeName.get();
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(
+ xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ aCustomShapeGeometry["PresetTextWarp"] <<= preset;
+ xPropertySet->setPropertyValue(
+ "CustomShapeGeometry",
+ uno::Any(aCustomShapeGeometry.getAsConstPropertyValueList()));
+ }
+ }
+ break;
+ case XML_txbx:
+ {
+ mpShapePtr->getCustomShapeProperties()->setShapeTypeOverride(true);
+ mpShapePtr->setTextBox(true);
+ //in case if the textbox is linked, save the attributes
+ //for further processing.
+ if (rAttribs.hasAttribute(XML_id))
+ {
+ OptValue<OUString> id = rAttribs.getString(XML_id);
+ if (id.has())
+ {
+ oox::drawingml::LinkedTxbxAttr linkedTxtBoxAttr;
+ linkedTxtBoxAttr.id = id.get().toInt32();
+ mpShapePtr->setTxbxHasLinkedTxtBox(true);
+ mpShapePtr->setLinkedTxbxAttributes(linkedTxtBoxAttr);
+ }
+ }
+ return this;
+ }
+ break;
+ case XML_linkedTxbx:
+ {
+ //in case if the textbox is linked, save the attributes
+ //for further processing.
+ mpShapePtr->getCustomShapeProperties()->setShapeTypeOverride(true);
+ mpShapePtr->setTextBox(true);
+ OptValue<OUString> id = rAttribs.getString(XML_id);
+ OptValue<OUString> seq = rAttribs.getString(XML_seq);
+ if (id.has() && seq.has())
+ {
+ oox::drawingml::LinkedTxbxAttr linkedTxtBoxAttr;
+ linkedTxtBoxAttr.id = id.get().toInt32();
+ linkedTxtBoxAttr.seq = seq.get().toInt32();
+ mpShapePtr->setTxbxHasLinkedTxtBox(true);
+ mpShapePtr->setLinkedTxbxAttributes(linkedTxtBoxAttr);
+ }
+ }
+ break;
+ default:
+ return ShapeContext::onCreateContext(nElementToken, rAttribs);
+ }
+ return nullptr;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/shape/WpsContext.hxx b/oox/source/shape/WpsContext.hxx
new file mode 100644
index 000000000..29110b6fb
--- /dev/null
+++ b/oox/source/shape/WpsContext.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_SOURCE_SHAPE_WPSCONTEXT_HXX
+#define INCLUDED_OOX_SOURCE_SHAPE_WPSCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/shapecontext.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace com::sun::star::drawing
+{
+class XShape;
+}
+
+namespace oox::shape
+{
+/// Wps is the drawingML equivalent of v:shape.
+class WpsContext final : public oox::drawingml::ShapeContext
+{
+public:
+ WpsContext(oox::core::ContextHandler2Helper const& rParent,
+ css::uno::Reference<css::drawing::XShape> xShape,
+ oox::drawingml::ShapePtr const& pMasterShapePtr,
+ oox::drawingml::ShapePtr const& pShapePtr);
+ ~WpsContext() override;
+
+ oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken,
+ const oox::AttributeList& rAttribs) override;
+
+private:
+ css::uno::Reference<css::drawing::XShape> mxShape;
+ bool m_bHasWPGParent;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/namespacemap.cxx b/oox/source/token/namespacemap.cxx
new file mode 100644
index 000000000..1cfa48a1c
--- /dev/null
+++ b/oox/source/token/namespacemap.cxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/token/namespacemap.hxx>
+
+namespace oox
+{
+NamespaceMap::NamespaceMap()
+{
+ maTransitionalNamespaceMap = std::map<sal_Int32, OUString>{
+#include <namespacenames.inc>
+ };
+
+ maStrictNamespaceMap = std::map<sal_Int32, OUString>{
+#include <namespaces-strictnames.inc>
+ };
+}
+
+/** Thread-safe singleton of a map of all supported XML namespace URLs. */
+NamespaceMap& StaticNamespaceMap()
+{
+ static NamespaceMap SINGLETON;
+ return SINGLETON;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/namespaces-strict.txt b/oox/source/token/namespaces-strict.txt
new file mode 100644
index 000000000..7449dca99
--- /dev/null
+++ b/oox/source/token/namespaces-strict.txt
@@ -0,0 +1,99 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# generic XML -----------------------------------------------------------------
+
+xml http://www.w3.org/XML/1998/namespace
+schema http://purl.oclc.org/ooxml/schemaLibrary/main
+xsi http://www.w3.org/2001/XMLSchema-instance
+
+# package ---------------------------------------------------------------------
+
+packageContentTypes http://schemas.openxmlformats.org/package/2006/content-types
+packageMetaCorePr http://schemas.openxmlformats.org/package/2006/metadata/core-properties
+packageRel http://schemas.openxmlformats.org/package/2006/relationships
+
+# office shared ---------------------------------------------------------------
+
+officeCustomPr http://purl.oclc.org/ooxml/officeDocument/custom-properties
+officeDocPropsVT http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes
+officeExtPr http://purl.oclc.org/ooxml/officeDocument/extended-properties
+officeMath http://purl.oclc.org/ooxml/officeDocument/math
+officeRel http://purl.oclc.org/ooxml/officeDocument/relationships
+officeRelTheme http://purl.oclc.org/ooxml/officeDocument/relationships/theme
+
+# applications ----------------------------------------------------------------
+
+doc http://purl.oclc.org/ooxml/wordprocessingml/main
+xls http://purl.oclc.org/ooxml/spreadsheetml/main
+ppt http://purl.oclc.org/ooxml/presentationml/main
+
+# drawing ---------------------------------------------------------------------
+
+dml http://purl.oclc.org/ooxml/drawingml/main
+dsp http://schemas.microsoft.com/office/drawing/2008/diagram
+dmlChart http://purl.oclc.org/ooxml/drawingml/chart
+dmlChartDr http://purl.oclc.org/ooxml/drawingml/chartDrawing
+dmlDiagram http://purl.oclc.org/ooxml/drawingml/diagram
+dmlLockedCanvas http://purl.oclc.org/ooxml/drawingml/lockedCanvas
+dmlPicture http://purl.oclc.org/ooxml/drawingml/picture
+dmlSpreadDr http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing
+dmlWordDr http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing
+
+# VML -------------------------------------------------------------------------
+
+vml urn:schemas-microsoft-com:vml
+vmlExcel urn:schemas-microsoft-com:office:excel
+vmlOffice urn:schemas-microsoft-com:office:office
+vmlPowerpoint urn:schemas-microsoft-com:office:powerpoint
+vmlWord urn:schemas-microsoft-com:office:word
+
+# other -----------------------------------------------------------------------
+
+ax http://schemas.microsoft.com/office/2006/activeX
+dc http://purl.org/dc/elements/1.1/
+dcTerms http://purl.org/dc/terms/
+dcmiType http://purl.org/dc/dcmitype/
+xm http://schemas.microsoft.com/office/excel/2006/main
+mce http://schemas.openxmlformats.org/markup-compatibility/2006
+mceTest http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2
+
+# MSO 2010 extensions ---------------------------------------------------------
+
+wps http://schemas.microsoft.com/office/word/2010/wordprocessingShape
+wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
+wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
+w14 http://schemas.microsoft.com/office/word/2010/wordml
+a14 http://schemas.microsoft.com/office/drawing/2010/main
+p14 http://schemas.microsoft.com/office/powerpoint/2010/main
+
+# MSO 2012/2013 extensions ---------------------------------------------------------
+
+w15 http://schemas.microsoft.com/office/word/2012/wordml
+p15 http://schemas.microsoft.com/office/powerpoint/2012/main
+x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
+c15 http://schemas.microsoft.com/office/drawing/2012/chart
+xr2 http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
+
+# extlst namespaces
+
+# xls14Lst for features introduced by excel 2010
+xls14Lst http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
+
+# LibreOffice's own extensions
+loext http://schemas.libreoffice.org/
diff --git a/oox/source/token/namespaces.hxx.head b/oox/source/token/namespaces.hxx.head
new file mode 100644
index 000000000..ff8af387c
--- /dev/null
+++ b/oox/source/token/namespaces.hxx.head
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef OOX_TOKEN_NAMESPACES_HXX
+#define OOX_TOKEN_NAMESPACES_HXX
+
+#include <sal/types.h>
+#include <oox/token/tokens.hxx>
+
+namespace oox {
diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail
new file mode 100644
index 000000000..382955683
--- /dev/null
+++ b/oox/source/token/namespaces.hxx.tail
@@ -0,0 +1,71 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+
+const sal_Int32 TOKEN_MASK = static_cast< sal_Int32 >( (1 << NMSP_SHIFT) - 1 );
+const sal_Int32 NMSP_MASK = static_cast< sal_Int32 >( SAL_MAX_INT32 & ~TOKEN_MASK );
+
+/** Returns the raw token identifier without namespace of the passed token. */
+inline sal_Int32 getBaseToken( sal_Int32 nToken ) { return nToken & TOKEN_MASK; }
+
+/** Returns the namespace without token identifier of the passed token. */
+inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; }
+
+
+// defines for tokens with specific namespaces
+#define OOX_TOKEN( namespace, token ) (::oox::NMSP_##namespace | ::oox::XML_##token)
+#define OOX_NS( namespace ) (::oox::NMSP_##namespace)
+
+#define A_TOKEN( token ) OOX_TOKEN( dml, token )
+#define AX_TOKEN( token ) OOX_TOKEN( ax, token )
+#define C_TOKEN( token ) OOX_TOKEN( dmlChart, token )
+#define CDR_TOKEN( token ) OOX_TOKEN( dmlChartDr, token )
+#define DGM_TOKEN( token ) OOX_TOKEN( dmlDiagram, token )
+#define MCE_TOKEN( token ) OOX_TOKEN( mce, token)
+#define O_TOKEN( token ) OOX_TOKEN( vmlOffice, token )
+#define PC_TOKEN( token ) OOX_TOKEN( packageContentTypes, token )
+#define PPT_TOKEN( token ) OOX_TOKEN( ppt, token )
+#define P14_TOKEN( token ) OOX_TOKEN( p14, token )
+#define P15_TOKEN( token ) OOX_TOKEN( p15, token )
+#define C15_TOKEN( token ) OOX_TOKEN( c15, token )
+#define PR_TOKEN( token ) OOX_TOKEN( packageRel, token )
+#define R_TOKEN( token ) OOX_TOKEN( officeRel, token )
+#define VML_TOKEN( token ) OOX_TOKEN( vml, token )
+#define VMLX_TOKEN( token ) OOX_TOKEN( vmlExcel, token )
+#define X12AC_TOKEN( token ) OOX_TOKEN( x12ac, token )
+#define XDR_TOKEN( token ) OOX_TOKEN( dmlSpreadDr, token )
+#define XLS_TOKEN( token ) OOX_TOKEN( xls, token )
+#define XLS14_TOKEN( token ) OOX_TOKEN( xls14Lst, token )
+#define XM_TOKEN( token ) OOX_TOKEN( xm, token )
+#define XML_TOKEN( token ) OOX_TOKEN( xml, token )
+#define VMLPPT_TOKEN( token ) OOX_TOKEN( vmlPowerpoint, token )
+#define DSP_TOKEN( token ) OOX_TOKEN( dsp, token )
+#define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token )
+#define WPS_TOKEN( token ) OOX_TOKEN( wps, token )
+#define WPG_TOKEN( token ) OOX_TOKEN( wpg, token )
+#define W_TOKEN( token ) OOX_TOKEN( doc, token )
+#define LOEXT_TOKEN( token ) OOX_TOKEN( loext, token )
+#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
+#define XR2_TOKEN(token) OOX_TOKEN(xr2, token)
+
+
+
+} // namespace oox
+
+#endif
diff --git a/oox/source/token/namespaces.py b/oox/source/token/namespaces.py
new file mode 100644
index 000000000..1244e88e8
--- /dev/null
+++ b/oox/source/token/namespaces.py
@@ -0,0 +1,85 @@
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+import sys, re
+
+infile_name = sys.argv[1]
+id_out_name = sys.argv[2]
+name_out_name = sys.argv[3]
+txt_out_name = sys.argv[4]
+instrict_name = sys.argv[5]
+strict_out_name = sys.argv[6]
+
+# parse input file
+
+namespaces = {}
+
+with open(infile_name) as infile:
+ for line in infile:
+ line = line.strip()
+ # trim comments
+ line = line.split('#')[0]
+ # skip empty lines
+ if line:
+ # check for valid characters
+ m = re.match(r'([a-zA-Z][a-zA-Z0-9]*)\s+([a-zA-Z0-9-.:\/]+)\s*$', line)
+ if not m:
+ sys.exit('Invalid character in input data: ' + line)
+ namespaces[m.group(1)] = m.group(2)
+
+# OOXML strict namespaces
+
+namespaces_strict = {}
+with open(instrict_name) as infile_strict:
+ for line in infile_strict:
+ line = line.strip()
+ # trim comments
+ line = line.split('#')[0]
+ # skip empty lines
+ if line:
+ # check for valid characters
+ m = re.match(r'([a-zA-Z][a-zA-Z0-9]*)\s+([a-zA-Z0-9-.:\/]+)\s*$', line)
+ if not m:
+ sys.exit("Error: invalid character in input data: " + line)
+ namespaces_strict[m.group(1)] = m.group(2)
+
+# generate output files
+
+idfile = open(id_out_name, 'w')
+namefile = open(name_out_name, 'w')
+txtfile = open(txt_out_name, 'w')
+namefile_strict = open(strict_out_name, 'w')
+
+# number of bits to shift the namespace identifier
+shift = 16
+
+idfile.write("const size_t NMSP_SHIFT = {};\n".format(shift))
+
+i = 1;
+for token in sorted(namespaces.keys()):
+ idfile.write("const sal_Int32 NMSP_{} = {} << NMSP_SHIFT;\n".format(token, i))
+ cur_id = i << shift
+ namefile.write("{{ {}, \"{}\" }},\n".format(cur_id, namespaces[token]))
+ namefile_strict.write("{{ {}, \"{}\" }},\n".format(cur_id, namespaces_strict[token]))
+ txtfile.write("{} {} {}\n".format(cur_id, token, namespaces[token]))
+ txtfile.write("{} {} {}\n".format(cur_id, token, namespaces_strict[token]))
+ i += 1
+
+idfile.close()
+namefile.close()
+namefile_strict.close()
+txtfile.close()
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
new file mode 100644
index 000000000..849caa547
--- /dev/null
+++ b/oox/source/token/namespaces.txt
@@ -0,0 +1,99 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# generic XML -----------------------------------------------------------------
+
+xml http://www.w3.org/XML/1998/namespace
+schema http://schemas.openxmlformats.org/schemaLibrary/2006/main
+xsi http://www.w3.org/2001/XMLSchema-instance
+
+# package ---------------------------------------------------------------------
+
+packageContentTypes http://schemas.openxmlformats.org/package/2006/content-types
+packageMetaCorePr http://schemas.openxmlformats.org/package/2006/metadata/core-properties
+packageRel http://schemas.openxmlformats.org/package/2006/relationships
+
+# office shared ---------------------------------------------------------------
+
+officeCustomPr http://schemas.openxmlformats.org/officeDocument/2006/custom-properties
+officeDocPropsVT http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes
+officeExtPr http://schemas.openxmlformats.org/officeDocument/2006/extended-properties
+officeMath http://schemas.openxmlformats.org/officeDocument/2006/math
+officeRel http://schemas.openxmlformats.org/officeDocument/2006/relationships
+officeRelTheme http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme
+
+# applications ----------------------------------------------------------------
+
+doc http://schemas.openxmlformats.org/wordprocessingml/2006/main
+xls http://schemas.openxmlformats.org/spreadsheetml/2006/main
+ppt http://schemas.openxmlformats.org/presentationml/2006/main
+
+# drawing ---------------------------------------------------------------------
+
+dml http://schemas.openxmlformats.org/drawingml/2006/main
+dsp http://schemas.microsoft.com/office/drawing/2008/diagram
+dmlChart http://schemas.openxmlformats.org/drawingml/2006/chart
+dmlChartDr http://schemas.openxmlformats.org/drawingml/2006/chartDrawing
+dmlDiagram http://schemas.openxmlformats.org/drawingml/2006/diagram
+dmlLockedCanvas http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas
+dmlPicture http://schemas.openxmlformats.org/drawingml/2006/picture
+dmlSpreadDr http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing
+dmlWordDr http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
+
+# VML -------------------------------------------------------------------------
+
+vml urn:schemas-microsoft-com:vml
+vmlExcel urn:schemas-microsoft-com:office:excel
+vmlOffice urn:schemas-microsoft-com:office:office
+vmlPowerpoint urn:schemas-microsoft-com:office:powerpoint
+vmlWord urn:schemas-microsoft-com:office:word
+
+# other -----------------------------------------------------------------------
+
+ax http://schemas.microsoft.com/office/2006/activeX
+dc http://purl.org/dc/elements/1.1/
+dcTerms http://purl.org/dc/terms/
+dcmiType http://purl.org/dc/dcmitype/
+xm http://schemas.microsoft.com/office/excel/2006/main
+mce http://schemas.openxmlformats.org/markup-compatibility/2006
+mceTest http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2
+
+# MSO 2010 extensions ---------------------------------------------------------
+
+wps http://schemas.microsoft.com/office/word/2010/wordprocessingShape
+wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
+wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
+w14 http://schemas.microsoft.com/office/word/2010/wordml
+a14 http://schemas.microsoft.com/office/drawing/2010/main
+p14 http://schemas.microsoft.com/office/powerpoint/2010/main
+
+# MSO 2012/2013 extensions ---------------------------------------------------------
+
+w15 http://schemas.microsoft.com/office/word/2012/wordml
+p15 http://schemas.microsoft.com/office/powerpoint/2012/main
+x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
+c15 http://schemas.microsoft.com/office/drawing/2012/chart
+xr2 http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
+
+# extlst namespaces
+
+# xls14Lst for features introduced by excel 2010
+xls14Lst http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
+
+# LibreOffice's own extensions
+loext http://schemas.libreoffice.org/
diff --git a/oox/source/token/parsexsd.pl b/oox/source/token/parsexsd.pl
new file mode 100644
index 000000000..5a4d595f2
--- /dev/null
+++ b/oox/source/token/parsexsd.pl
@@ -0,0 +1,66 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+$ARGV = shift @ARGV;
+my %tokens;
+
+my @files = glob("$ARGV/*.rnc");
+
+open( TOKEN, ">tokens.txt" ) || die "can't write token file";
+
+foreach( @files )
+{
+ print( "parsing $_\n" );
+ open ( XSD, $_ ) || die "can't open token file: $!";
+ while( <XSD> )
+ {
+ chomp($_);
+ if( /element (\S*:)?(\S*)/ )
+ {
+ $tokens{$2} = 1;
+ print(".");
+ }
+ elsif( /attribute (\S*:)?(\S*)/ )
+ {
+ $tokens{$2} = 1;
+ print(".");
+ }
+ elsif( /list\s*\{/ )
+ {
+ while( <XSD> )
+ {
+ chomp($_);
+ last if( /^\s*\}/ );
+ if( /"(\S*?)\"/ )
+ {
+ $tokens{$1} = 1;
+ print(".");
+ }
+ }
+ }
+ }
+ close ( XSD );
+
+ print("\n" );
+}
+
+foreach( sort(keys(%tokens)) )
+{
+ print TOKEN "$_\n";
+}
+close( TOKEN );
diff --git a/oox/source/token/properties.hxx.head b/oox/source/token/properties.hxx.head
new file mode 100644
index 000000000..22cda5af9
--- /dev/null
+++ b/oox/source/token/properties.hxx.head
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef OOX_TOKEN_PROPERTIES_HXX
+#define OOX_TOKEN_PROPERTIES_HXX
+
+#include <sal/types.h>
+
+namespace oox {
diff --git a/oox/source/token/properties.hxx.tail b/oox/source/token/properties.hxx.tail
new file mode 100644
index 000000000..1e11f26ce
--- /dev/null
+++ b/oox/source/token/properties.hxx.tail
@@ -0,0 +1,6 @@
+
+
+
+} // namespace oox
+
+#endif
diff --git a/oox/source/token/properties.py b/oox/source/token/properties.py
new file mode 100644
index 000000000..8f8bc437b
--- /dev/null
+++ b/oox/source/token/properties.py
@@ -0,0 +1,50 @@
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+import sys, re
+
+infile_name = sys.argv[1]
+id_out_name = sys.argv[2]
+name_out_name = sys.argv[3]
+
+# parse input file
+
+props = {}
+with open(infile_name) as infile:
+ for line in infile:
+ line = line.strip()
+ # check for valid characters
+ if not re.match(r'[A-Z][a-zA-Z0-9]*$', line):
+ sys.exit("Error: invalid character in property '{}'".format(line))
+ props[line] = "PROP_" + line
+
+# generate output files
+
+idfile = open(id_out_name, 'w')
+namefile = open(name_out_name, 'w')
+
+i = 0;
+for token in sorted(props.keys()):
+ idfile.write("const sal_Int32 {} = {};\n".format(props[token], i))
+ namefile.write("/* {} */ \"{}\",\n".format(i, token))
+ i += 1
+
+idfile.write("const sal_Int32 PROP_COUNT = {};\n".format(i))
+idfile.write("const sal_Int32 PROP_INVALID = -1;\n" )
+
+idfile.close()
+namefile.close()
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
new file mode 100644
index 000000000..8f17d34db
--- /dev/null
+++ b/oox/source/token/properties.txt
@@ -0,0 +1,611 @@
+AbsoluteName
+Action
+ActiveSplitRange
+ActiveTable
+Address
+Adjust
+AdjustContrast
+AdjustLuminance
+AdjustmentValues
+Align
+AnchorPosition
+AnchorType
+ApplyFormDesignMode
+AreaLinks
+ArrangeOrder
+Aspect
+AttachedAxisIndex
+AutoFilter
+AutoShowInfo
+Autocomplete
+BackColor
+BackColorTransparency
+BackGraphicLocation
+BackGraphic
+Background
+BackgroundColor
+BasicLibraries
+BlackDay
+BlockIncrement
+Border
+BorderColor
+BorderDashName
+BorderStyle
+BorderTransparency
+BorderWidth
+BottomBorder
+BottomBorderDistance
+BottomMargin
+BuiltInUnit
+BulletChar
+BulletColor
+BulletFont
+BulletFontName
+BulletRelSize
+CLSID
+CalcAsShown
+CellBackColor
+CellProtection
+CellStyle
+CenterHorizontally
+CenterVertically
+Change
+CharBackColor
+CharCaseMap
+CharColor
+CharContoured
+CharColorTheme
+CharColorTintOrShade
+CharColorLumMod
+CharColorLumOff
+CharEscapement
+CharEscapementHeight
+CharFontCharSet
+CharFontCharSetAsian
+CharFontCharSetComplex
+CharFontFamily
+CharFontFamilyAsian
+CharFontFamilyComplex
+CharFontName
+CharFontNameAsian
+CharFontNameComplex
+CharFontPitch
+CharFontPitchAsian
+CharFontPitchComplex
+CharHeight
+CharHeightAsian
+CharHeightComplex
+CharInteropGrabBag
+CharKerning
+CharLocale
+CharLocaleAsian
+CharLocaleComplex
+CharPosture
+CharPostureAsian
+CharPostureComplex
+CharShadowed
+CharStrikeout
+CharStyleName
+CharTransparence
+CharUnderline
+CharUnderlineColor
+CharUnderlineHasColor
+CharWeight
+CharWeightAsian
+CharWeightComplex
+CircleEndAngle
+CircleKind
+CircleStartAngle
+ClassId
+CodeName
+Color
+ColumnGrand
+ColumnLabelRanges
+CompileEnglish
+ConditionalFormat
+ConnectBars
+ContainsHeader
+Coordinates
+CopyBack
+CopyFormulas
+CopyOutputData
+CopyStyles
+CornerRadius
+CrossoverPosition
+CrossoverValue
+CursorPositionX
+CursorPositionY
+CurveName
+CurveStyle
+CustomLabelPosition
+CustomShapeGeometry
+D3DSceneAmbientColor
+D3DSceneLightColor2
+D3DSceneLightDirection2
+D3DSceneLightOn1
+D3DSceneLightOn2
+D3DScenePerspective
+D3DSceneShadeMode
+DDELinks
+DataTableHBorder
+DataTableOutline
+DataTableVBorder
+DatabaseRanges
+Decoration
+DefaultScrollValue
+DefaultSpinValue
+DefaultState
+DefaultText
+DefaultValue
+DeletedLegendEntries
+DiagonalBLTR
+DiagonalTLBR
+DialogLibraries
+DisableComplexChartTypes
+DisableDataTableDialog
+DisplayLabels
+DisplayUnits
+DrillDownOnDoubleClick
+Dropdown
+Duration
+EchoChar
+EnableVisible
+Enabled
+EndPosition
+Equations
+ErrorAlertStyle
+ErrorBarStyle
+ErrorBarX
+ErrorBarY
+ErrorMessage
+ErrorTitle
+Expansion
+ExternalData
+ExternalDocLinks
+ExternalLinks
+ExtrapolateBackward
+ExtrapolateForward
+FileFormat
+FillBackground
+FillBitmapMode
+FillBitmapName
+FillBitmapPositionOffsetX
+FillBitmapPositionOffsetY
+FillBitmapRectanglePoint
+FillBitmapSizeX
+FillBitmapSizeY
+FillBitmap
+FillColor
+FillColorTheme
+FillColorLumMod
+FillColorLumOff
+FillGradient
+FillGradientName
+FillHatch
+FillHatchName
+FillStyle
+FillTransparence
+FillTransparenceGradient
+FillTransparenceGradientName
+FillUseSlideBackground
+Filter
+FilterCriteriaSource
+FilterOptions
+FirstLineOffset
+FirstPageFooterContent
+FirstPageHeaderContent
+FirstPageFooterIsShared
+FirstPageHeaderIsShared
+FirstPageNumber
+FocusOnClick
+FontCharset
+FontHeight
+FontIndependentLineSpacing
+FontName
+FontSlant
+FontStrikeout
+FontUnderline
+FontWeight
+FooterBodyDistance
+FooterHeight
+FooterIsDynamicHeight
+FooterIsOn
+FooterIsShared
+ForceIntercept
+FormulaConvention
+FrameIsAutomaticHeight
+FromWordArt
+Function
+GapwidthSequence
+GenerateVbaEvents
+Geometry3D
+GlowEffect
+GlowEffectRadius
+GradientName
+HatchName
+Graphic
+GraphicBitmap
+GraphicColorMode
+GraphicCrop
+GraphicSize
+GridColor
+GroupInfo
+GroupName
+HScroll
+Handles
+HasAutoShowInfo
+HasColumnRowHeaders
+HasHorizontalScrollBar
+HasLayoutInfo
+HasMainTitle
+HasReference
+HasSecondaryXAxisTitle
+HasSecondaryYAxisTitle
+HasSheetTabs
+HasSortInfo
+HasVerticalScrollBar
+HasXAxisTitle
+HasYAxisTitle
+HasZAxisTitle
+HeaderBodyDistance
+HeaderHeight
+HeaderIsDynamicHeight
+HeaderIsOn
+HeaderIsShared
+Height
+HelpText
+HideInactiveSelection
+HoriJustify
+HoriJustifyMethod
+HoriOrient
+HoriOrientPosition
+HoriOrientRelation
+HorizontalSplitMode
+HorizontalSplitPositionTwips
+Hyperlink
+HyperLinkURL
+IgnoreBlankCells
+IgnoreCase
+IgnoreLeadingSpaces
+ImagePosition
+IncludeHiddenCells
+InputMessage
+InputTitle
+InterceptValue
+IsActive
+IsAdjustHeightEnabled
+IsCaseSensitive
+IsCellBackgroundTransparent
+IsChangeReadOnlyEnabled
+IsDate
+IsExecuteLinkEnabled
+IsHidden
+IsIterationEnabled
+IsLandscape
+IsLoaded
+IsNumbering
+IsOutlineSymbolsSet
+IsPlaceholderDependent
+IsSharedFormula
+IsStartOfNewPage
+IsTextWrapped
+IsUndoEnabled
+IsVisible
+IterationCount
+IterationEpsilon
+Japanese
+Label
+LabelBorderColor
+LabelBorderStyle
+LabelBorderWidth
+LabelPlacement
+LabelPosition
+LabelSeparator
+LabelFillBackground
+LabelFillHatchName
+LabelFillStyle
+LabelFillColor
+CustomLabelFields
+LayoutInfo
+LeftBorder
+LeftBorderDistance
+LeftMargin
+LeftPageFooterContent
+LeftPageHeaderContent
+LegacyFragment
+LineCap
+LineColor
+LineCount
+LineDash
+LineDashName
+LineEndCenter
+LineEndName
+LineEndWidth
+LineIncrement
+LineJoint
+LineStartCenter
+LineStartName
+LineStartWidth
+LineStyle
+LineTransparence
+LineWidth
+LinkNumberFormatToSource
+LinkURL
+LoadReadonly
+LookUpLabels
+MajorTickmarks
+MarkPosition
+MaxFieldCount
+MaxTextLen
+MediaType
+MediaURL
+MinorTickmarks
+MirroredX
+MirroredY
+MissingValueTreatment
+Model
+ModifyPasswordHash
+ModifyPasswordInfo
+MoveProtect
+MovingAveragePeriod
+MultiLine
+MultiPageValue
+MultiSelection
+Name
+NamedRanges
+NegativeError
+NullDate
+NumberFormat
+NumberingIsNumber
+NumberingLevel
+NumberingRules
+NumberingType
+Offset
+OpCodeMap
+Opaque
+Orientation
+OutputPosition
+OverlapSequence
+Overlay
+PageScale
+PageStyle
+PageToggle
+PageViewZoomValue
+PaintTransparent
+ParaAdjust
+ParaBottomMargin
+ParaFirstLineIndent
+ParaIndent
+ParaIsHangingPunctuation
+ParaIsHyphenation
+ParaLeftMargin
+ParaLineSpacing
+ParaRightMargin
+ParaTabStops
+ParaTopMargin
+Path
+PercentageNumberFormat
+PersistName
+Perspective
+PolyPolygon
+PolyPolygonBezier
+PolygonKind
+PolynomialDegree
+Position
+PositionBottom
+PositionLeft
+PositionRight
+PositionTop
+PositionX
+PositionY
+PositiveError
+Prefix
+PresetTextWarp
+PrintAnnotations
+PrintBorder
+PrintDownFirst
+PrintGrid
+PrintHeaders
+Printable
+PrivateStream
+PrivateTempFileURL
+ProgressValueMax
+ProgressValueMin
+Protected
+RadiusRangeMaximum
+RadiusRangeMinimum
+RangeXMaximum
+RangeXMinimum
+RangeYMaximum
+RangeYMinimum
+ReadOnly
+RefAngle
+RefConventionChartOOXML
+RefR
+RefX
+RefY
+Reference
+ReferenceDevice
+ReferenceSheet
+RefreshPeriod
+RegularExpressions
+RelId
+RelativeHeight
+RelativeHorizontalTabbarWidth
+RelativePosition
+RelativeSize
+RelativeWidth
+Repeat
+RepeatDelay
+Representation
+RightAngledAxes
+RightBorder
+RightBorderDistance
+RightMargin
+RightPageFooterContent
+RightPageHeaderContent
+Role
+RotateAngle
+RotateReference
+RotationHorizontal
+RotationVertical
+RowGrand
+RowLabelRanges
+SaveOutputPosition
+ScaleMode
+ScaleToPages
+ScaleToPagesX
+ScaleToPagesY
+ScrollHeight
+ScrollLeft
+ScrollTop
+ScrollValue
+ScrollValueMax
+ScrollValueMin
+ScrollWidth
+Segments
+SelectedItems
+SelectedPage
+Shadow
+ShadowColor
+ShadowFormat
+ShadowSizeX
+ShadowSizeY
+ShadowTransparence
+ShadowBlur
+ShadowXDistance
+ShadowYDistance
+Show
+ShowBorder
+ShowCharts
+ShowCorrelationCoefficient
+ShowCustomLeaderLines
+ShowDetail
+ShowDrawing
+ShowEmpty
+ShowEquation
+ShowErrorMessage
+ShowFilterButton
+ShowFirst
+ShowFormulas
+ShowGrid
+ShowHighLow
+ShowInputMessage
+ShowLegendEntry
+ShowList
+ShowNegativeError
+ShowObjects
+ShowPageBreakPreview
+ShowPositiveError
+ShowZeroValues
+ShrinkToFit
+Size
+Size100thMM
+SizePixel
+SizeProtect
+SizeType
+SkipDuplicates
+SortInfo
+Sound
+SoundOn
+Speed
+Spin
+SpinIncrement
+SpinValue
+SpinValueMax
+SpinValueMin
+StackCharacters
+StackingDirection
+StartPosition
+StartWith
+StartingAngle
+State
+StringItemList
+SubViewSize
+Subtotals
+Suffix
+Surround
+SurroundContour
+SwapXAndYAxis
+Symbol
+SymbolColor
+TabColor
+TabIndex
+TableBorder
+TableLayout
+TableSelected
+Tables
+Tabstop
+Tag
+TargetFrame
+Text
+TextAutoGrowHeight
+TextBox
+TextBreak
+TextCameraZRotateAngle
+TextColor
+TextColumns
+TextContourFrame
+TextFitToSize
+TextFrames
+TextHorizontalAdjust
+TextLeftDistance
+TextLowerDistance
+TextOverlap
+TextPreRotateAngle
+TextRightDistance
+TextRotateAngle
+TextRotation
+TextUpperDistance
+TextVerticalAdjust
+TextWordWrap
+TextWritingMode
+Title
+Toggle
+TokenIndex
+TopBorder
+TopBorderDistance
+TopMargin
+TotalsRow
+Transformation
+TransitionDirection
+TransitionDuration
+TransitionFadeColor
+TransitionSubtype
+TransitionType
+Transparency
+TriState
+Type
+URL
+UnnamedDatabaseRanges
+Url
+UseFilterCriteriaSource
+UseRegularExpressions
+UseRings
+UseSelectedPage
+VScroll
+Validation
+Value
+VaryColorsByPoint
+VertJustify
+VertJustifyMethod
+VertOrient
+VertOrientPosition
+VertOrientRelation
+VerticalAlign
+VerticalSplitMode
+VerticalSplitPositionTwips
+ViewBox
+Visible
+VisibleFlag
+VisibleSize
+VisualArea
+VisualEffect
+Weight
+WhiteDay
+Width
+Wildcards
+WritingMode
+XLA1Representation
+ZoomType
+ZoomValue
diff --git a/oox/source/token/propertynames.cxx b/oox/source/token/propertynames.cxx
new file mode 100644
index 000000000..eadf0d5d4
--- /dev/null
+++ b/oox/source/token/propertynames.cxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/token/propertynames.hxx>
+
+namespace oox
+{
+const std::vector<OUString>& GetPropertyNameVector()
+{
+ static const std::vector<OUString> NAMES{
+// include auto-generated C array with property names as C strings
+#include <propertynames.inc>
+ };
+ return NAMES;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/relationship.cxx b/oox/source/token/relationship.cxx
new file mode 100644
index 000000000..cfe1dedc5
--- /dev/null
+++ b/oox/source/token/relationship.cxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <oox/token/relationship.hxx>
+
+#include <sal/log.hxx>
+#include <map>
+
+namespace oox {
+
+OUString getRelationship(Relationship eRelationship)
+{
+ static const std::map<Relationship, OUString> aMap =
+ {
+#include "relationship.inc"
+ };
+
+ auto itr = aMap.find(eRelationship);
+ if (itr != aMap.end())
+ return itr->second;
+
+ SAL_WARN("oox", "could not find an entry for the relationship: " << static_cast<int>(eRelationship));
+ return OUString();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/relationship.inc b/oox/source/token/relationship.inc
new file mode 100644
index 000000000..4a772671a
--- /dev/null
+++ b/oox/source/token/relationship.inc
@@ -0,0 +1,48 @@
+{Relationship::ACTIVEXCONTROLBINARY, "http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary"},
+{Relationship::CHART, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"},
+{Relationship::CHARTUSERSHAPES, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes"},
+{Relationship::COMMENTS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"},
+{Relationship::COMMENTAUTHORS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"},
+{Relationship::COMMENTSEXTENDED, "http://schemas.microsoft.com/office/2011/relationships/commentsExtended"},
+{Relationship::CONTROL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control"},
+{Relationship::CTRLPROP, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp"},
+{Relationship::CUSTOMXML, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"},
+{Relationship::CUSTOMXMLPROPS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps"},
+{Relationship::DIAGRAMCOLORS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"},
+{Relationship::DIAGRAMDATA, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"},
+{Relationship::DIAGRAMDRAWING, "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing"},
+{Relationship::DIAGRAMLAYOUT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"},
+{Relationship::DIAGRAMQUICKSTYLE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle"},
+{Relationship::DRAWING, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"},
+{Relationship::ENDNOTES, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"},
+{Relationship::EXTERNALLINKPATH, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath"},
+{Relationship::FONT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font"},
+{Relationship::FONTTABLE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"},
+{Relationship::FOOTER, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"},
+{Relationship::FOOTNOTES, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"},
+{Relationship::GLOSSARYDOCUMENT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument"},
+{Relationship::HDPHOTO, "http://schemas.microsoft.com/office/2007/relationships/hdphoto"},
+{Relationship::HEADER, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"},
+{Relationship::HYPERLINK, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"},
+{Relationship::IMAGE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"},
+{Relationship::MEDIA, "http://schemas.microsoft.com/office/2007/relationships/media"},
+{Relationship::NOTESMASTER, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"},
+{Relationship::NOTESSLIDE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"},
+{Relationship::NUMBERING, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"},
+{Relationship::OFFICEDOCUMENT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"},
+{Relationship::OLEOBJECT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"},
+{Relationship::PACKAGE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"},
+{Relationship::PRESPROPS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"},
+{Relationship::SETTINGS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"},
+{Relationship::SHAREDSTRINGS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"},
+{Relationship::SLIDE, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"},
+{Relationship::SLIDELAYOUT, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"},
+{Relationship::SLIDEMASTER, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"},
+{Relationship::STYLES, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"},
+{Relationship::THEME, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"},
+{Relationship::VBAPROJECT, "http://schemas.microsoft.com/office/2006/relationships/vbaProject"},
+{Relationship::VIDEO, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"},
+{Relationship::AUDIO, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"},
+{Relationship::VMLDRAWING, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"},
+{Relationship::WORDVBADATA, "http://schemas.microsoft.com/office/2006/relationships/wordVbaData"},
+{Relationship::WORKSHEET, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"}
diff --git a/oox/source/token/tokenmap.cxx b/oox/source/token/tokenmap.cxx
new file mode 100644
index 000000000..1e5111619
--- /dev/null
+++ b/oox/source/token/tokenmap.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/token/tokenmap.hxx>
+
+#include <string.h>
+#include <rtl/string.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox {
+
+using ::com::sun::star::uno::Sequence;
+
+namespace {
+// include auto-generated Perfect_Hash
+#if defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#if __has_warning("-Wdeprecated-register")
+#pragma GCC diagnostic ignored "-Wdeprecated-register"
+#endif
+#endif
+#include <tokenhash.inc>
+#if defined __clang__
+#pragma GCC diagnostic pop
+#endif
+} // namespace
+
+const css::uno::Sequence< sal_Int8 > TokenMap::EMPTY_BYTE_SEQ;
+
+TokenMap::TokenMap() :
+ maTokenNames( static_cast< size_t >( XML_TOKEN_COUNT ) )
+{
+ static const char* sppcTokenNames[] =
+ {
+// include auto-generated C array with token names as C strings
+#include <tokennames.inc>
+ ""
+ };
+
+ const char* const* ppcTokenName = sppcTokenNames;
+ for (auto & tokenName : maTokenNames)
+ {
+ OString aUtf8Token( *ppcTokenName );
+ tokenName = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aUtf8Token.getStr() ), aUtf8Token.getLength() );
+ ++ppcTokenName;
+ }
+
+ for (unsigned char c = 'a'; c <= 'z'; c++)
+ {
+ const struct xmltoken* pToken = Perfect_Hash::in_word_set(
+ reinterpret_cast< const char* >( &c ), 1 );
+ mnAlphaTokens[ c - 'a' ] = pToken ? pToken->nToken : XML_TOKEN_INVALID;
+ }
+}
+
+TokenMap::~TokenMap()
+{
+}
+
+sal_Int32 TokenMap::getTokenFromUnicode( std::u16string_view rUnicodeName )
+{
+ OString aUtf8Name = OUStringToOString( rUnicodeName, RTL_TEXTENCODING_UTF8 );
+ const struct xmltoken* pToken = Perfect_Hash::in_word_set( aUtf8Name.getStr(), aUtf8Name.getLength() );
+ return pToken ? pToken->nToken : XML_TOKEN_INVALID;
+}
+
+sal_Int32 TokenMap::getTokenPerfectHash( const char *pStr, sal_Int32 nLength )
+{
+ const struct xmltoken* pToken = Perfect_Hash::in_word_set( pStr, nLength );
+ return pToken ? pToken->nToken : XML_TOKEN_INVALID;
+}
+
+TokenMap& StaticTokenMap()
+{
+ static TokenMap SINGLETON;
+ return SINGLETON;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/tokens.hxx.head b/oox/source/token/tokens.hxx.head
new file mode 100644
index 000000000..da1a7d342
--- /dev/null
+++ b/oox/source/token/tokens.hxx.head
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef OOX_TOKEN_TOKENS_HXX
+#define OOX_TOKEN_TOKENS_HXX
+
+#include <com/sun/star/xml/sax/FastToken.hpp>
+
+namespace oox {
diff --git a/oox/source/token/tokens.hxx.tail b/oox/source/token/tokens.hxx.tail
new file mode 100644
index 000000000..c77188b37
--- /dev/null
+++ b/oox/source/token/tokens.hxx.tail
@@ -0,0 +1,8 @@
+
+const sal_Int32 XML_TOKEN_INVALID = ::com::sun::star::xml::sax::FastToken::DONTKNOW;
+
+
+
+} // namespace oox
+
+#endif
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
new file mode 100644
index 000000000..d1a40140a
--- /dev/null
+++ b/oox/source/token/tokens.txt
@@ -0,0 +1,5890 @@
+1D
+1pic
+1picTitle
+2D
+2pic
+2picTitle
+35mm
+3Arrows
+3ArrowsGray
+3Flags
+3Signs
+3Symbols
+3Symbols2
+3TrafficLights1
+3TrafficLights2
+3cd4
+3cd8
+3dDkShadow
+3dLight
+4Arrows
+4ArrowsGray
+4Rating
+4RedToBlack
+4TrafficLights
+4pic
+4picTitle
+5Arrows
+5ArrowsGray
+5Quarters
+5Rating
+5cd8
+7cd8
+A1
+A3
+A4
+AbbreviatedCaseNumber
+Accel
+Accel2
+AlbumTitle
+AlternateContent
+Always
+Anchor
+AppVersion
+Append
+Application
+Art
+ArticleInAPeriodical
+Artist
+Author
+AutoFill
+AutoFit
+AutoLine
+AutoPict
+AutoScale
+B4ISO
+B4JIS
+B5ISO
+B5JIS
+BackColor
+Bitmap
+Book
+BookAuthor
+BookSection
+BookTitle
+BorderColor
+BorderStyle
+Bottom
+BroadcastTitle
+Broadcaster
+Button
+CF
+CalcA1
+CalcA1ExcelA1
+Camera
+Cancel
+Caption
+Case
+CaseNumber
+Center
+ChapterNumber
+Characters
+CharactersWithSpaces
+Checkbox
+Checked
+Choice
+City
+ClientData
+ColHidden
+Colored
+Column
+Combo
+ComboEdit
+Comments
+Company
+Compiler
+Composer
+Conductor
+ConferenceName
+ConferenceProceedings
+ConnectionID
+Content
+ContentType
+Corporate
+Counsel
+CountryRegion
+Court
+DDE
+DMY
+DVASPECT_CONTENT
+DVASPECT_ICON
+DYM
+DataBinding
+DataBindingLoadMode
+DataBindingName
+Day
+DayAccessed
+Default
+DefaultSize
+Delay
+Department
+Dialog
+DigSig
+Director
+Disabled
+Dismiss
+DisplayStyle
+Distributed
+Distributor
+DocSecurity
+DocumentFromInternetSite
+DrawAspect
+Drop
+DropButtonStyle
+DropLines
+DropStyle
+Dx
+EMD
+ENTITIES
+ENTITY
+Edit
+Edition
+Editor
+ElectronicSource
+Embed
+EnhancedMetaFile
+ExcelA1
+ExcelR1C1
+Extend
+Extension
+External
+Fallback
+False
+FieldCodes
+FileBinding
+FileBindingName
+Film
+First
+FirstButton
+FmlaGroup
+FmlaLink
+FmlaMacro
+FmlaPict
+FmlaRange
+FmlaTxbx
+FontCharSet
+FontEffects
+FontHeight
+FontName
+FontPitchAndFamily
+FontWeight
+ForeColor
+Format
+Formula
+GBox
+Group
+GroupName
+Guid
+HLinks
+HTMLInset
+HTMLOutset
+HeadingPairs
+Help
+HiddenSlides
+Hiragana
+Horiz
+HyperlinkBase
+HyperlinksChanged
+ID
+IDREF
+IDREFS
+Icon
+Id
+Ignorable
+Inc
+Institution
+Internal
+InternetSite
+InternetSiteTitle
+Interview
+Interviewee
+Interviewer
+Inventor
+Issue
+JournalArticle
+JournalName
+JustLastX
+Justify
+LCID
+LCT
+Label
+LargeChange
+Last
+Left
+LineA
+Lines
+Link
+LinkType
+LinksUpToDate
+List
+ListItem
+ListRows
+ListStyle
+LockText
+Locked
+LockedField
+M1
+M10
+M11
+M12
+M2
+M3
+M4
+M5
+M6
+M7
+M8
+M9
+MDY
+MMClips
+MYD
+Manager
+Map
+MapInfo
+MapOCX
+MatchEntry
+Max
+MaxLength
+Medium
+Middle
+Min
+Misc
+Month
+MonthAccessed
+MouseIcon
+MousePointer
+MoveWithCells
+Movie
+Multi
+MultiLine
+MultiSel
+MultiSelect
+NA
+NCName
+NMTOKEN
+NMTOKENS
+NOTATION
+Name
+NameList
+Namespace
+NextEnabled
+NoThreeD
+NoThreeD2
+Note
+Notes
+NumberVolumes
+OLEObject
+OLEUPDATE_ALWAYS
+OLEUPDATE_ONCALL
+ObjectID
+ObjectType
+OnCall
+Orientation
+Override
+Page
+Pages
+ParagraphAlign
+ParagraphFormat
+Paragraphs
+PartName
+PasswordChar
+Patent
+PatentNumber
+Performance
+Performer
+PeriodicalTitle
+Person
+Pict
+PictOld
+PictPrint
+PictScreen
+Picture
+PictureAlignment
+PicturePosition
+PictureTiling
+Position
+PresentationFormat
+PreserveFormat
+PreserveSortAFLayout
+PrevEnabled
+PrintObject
+ProducerName
+ProductionCompany
+ProgID
+Properties
+ProportionalThumb
+PublicationTitle
+Publisher
+Q1
+Q2
+Q3
+Q4
+QName
+R1C1
+Radio
+RecalcAlways
+RecordingNumber
+Rect
+RectA
+RefOrder
+Relationship
+RelationshipReference
+Relationships
+RelationshipsGroupReference
+Report
+Reporter
+Requires
+Right
+RootElement
+Row
+RowHidden
+ScaleCrop
+Schema
+SchemaID
+SchemaRef
+ScriptExtended
+ScriptLanguage
+ScriptLocation
+ScriptText
+Scroll
+ScrollBars
+SecretEdit
+Sel
+SelType
+SelectedStyle
+SelectionNamespaces
+Shape
+ShapeID
+SharedDoc
+ShortTitle
+ShowDropButtonWhen
+ShowImportExportValidationErrors
+SignatureTime
+Simple
+Single
+Size
+SizeMode
+SizeWithCells
+Slides
+SmallChange
+SoundRecording
+Source
+SourceId
+SourceType
+Sources
+SpecialEffect
+Spin
+StandardNumber
+StateProvince
+Station
+StyleName
+Tag
+TakeFocusOnClick
+Target
+TargetMode
+Template
+TextHAlign
+TextVAlign
+Theater
+ThesisType
+Title
+TitlesOfParts
+Top
+TotalTime
+Translator
+True
+Type
+Types
+UIObj
+Unspecified
+URI
+URL
+UpdateMode
+VScroll
+VTEdit
+Val
+ValidIds
+Value
+VariousPropertyBits
+Version
+Visible
+Volume
+WidthMin
+Words
+Writer
+XY
+YDM
+YMD
+YZ
+Year
+YearAccessed
+ZX
+a
+a14
+aa
+above
+aboveAverage
+absSizeAnchor
+absolute
+absoluteAnchor
+abstractNum
+abstractNumId
+aca
+acc
+accPr
+accel
+accent1
+accent2
+accent3
+accent4
+accent5
+accent6
+accentBorderCallout1
+accentBorderCallout2
+accentBorderCallout3
+accentCallout1
+accentCallout2
+accentCallout3
+accentbar
+accumulate
+action
+actionButtonBackPrevious
+actionButtonBeginning
+actionButtonBlank
+actionButtonDocument
+actionButtonEnd
+actionButtonForwardNext
+actionButtonHelp
+actionButtonHome
+actionButtonInformation
+actionButtonMovie
+actionButtonReturn
+actionButtonSound
+active
+activeBorder
+activeCaption
+activeCell
+activeCellId
+activeCol
+activePane
+activeRecord
+activeRow
+activeSheetId
+activeTab
+activeWritingStyle
+actualPg
+ad
+add
+additionalCharacteristics
+additive
+addlxml
+addressBook
+addressFieldName
+adj
+adjLst
+adjust
+adjustColumnWidth
+adjustLineHeightInTable
+adjustRightInd
+adjusthandles
+administrators
+advAuto
+advClick
+advTm
+advise
+aft
+after
+afterAutospacing
+afterEffect
+afterGroup
+afterLines
+ahLst
+ahPolar
+ahXY
+aiueo
+aiueoFullWidth
+alg
+algIdExt
+algIdExtSource
+algn
+algorithmName
+alias
+aliases
+aliceBlue
+align
+alignBordersAndEdges
+alignOff
+alignTablesRowByRow
+alignTx
+alignWithMargins
+alignment
+alignshape
+all
+allAtOnce
+allCaption
+allDrilled
+allLines
+allPages
+allPts
+allUniqueName
+allowBlank
+allowOverlap
+allowPNG
+allowPng
+allowRefreshQuery
+allowSpaceOfSameStyleInTable
+allowcomments
+allowincell
+allowoverlap
+aln
+alnAt
+alnScr
+alongPath
+alpha
+alphaBiLevel
+alphaCeiling
+alphaFloor
+alphaInv
+alphaLcParenBoth
+alphaLcParenR
+alphaLcPeriod
+alphaMod
+alphaModFix
+alphaOff
+alphaOutset
+alphaRepl
+alphaUcParenBoth
+alphaUcParenR
+alphaUcPeriod
+alt
+altChunk
+altChunkPr
+altLang
+altName
+althref
+always
+alwaysMergeEmptyNamespace
+alwaysShow
+alwaysShowPlaceholderText
+amount
+amt
+anchor
+anchorCtr
+anchorId
+anchorLock
+anchorlock
+anchorx
+anchory
+ancst
+ancstOrSelf
+and
+ang
+angle
+anim
+animBg
+animClr
+animEffect
+animLvl
+animMotion
+animOne
+animRot
+animScale
+annotation
+annotationRef
+antiqueWhite
+antsBlack
+antsRed
+any
+anyType
+anyURI
+appName
+appWorkspace
+apples
+applyAlignment
+applyAlignmentFormats
+applyBorder
+applyBorderFormats
+applyBreakingRules
+applyFill
+applyFont
+applyFontFormats
+applyNumberFormat
+applyNumberFormats
+applyPatternFormats
+applyProtection
+applyStyles
+applyToEnd
+applyToFront
+applyToSides
+applyWidthHeightFormats
+aqua
+aquamarine
+ar
+arabic1Minus
+arabic2Minus
+arabicAbjad
+arabicAlpha
+arabicDbPeriod
+arabicDbPlain
+arabicParenBoth
+arabicParenR
+arabicPeriod
+arabicPlain
+arc
+arcTo
+archedScallops
+arcsize
+area
+area3DChart
+areaChart
+areaError
+arg
+argPr
+argSz
+around
+arr
+array
+arrow
+arrowok
+artDeco
+artisticBlur
+artisticCement
+artisticChalkSketch
+artisticCrisscrossEtching
+artisticCutout
+artisticFilmGrain
+artisticGlass
+artisticGlowDiffused
+artisticGlowEdges
+artisticLightScreen
+artisticLineDrawing
+artisticMarker
+artisticMosiaicBubbles
+artisticPaintBrush
+artisticPaintStrokes
+artisticPastelsSmooth
+artisticPencilGrayscale
+artisticPencilSketch
+artisticPhotocopy
+artisticPlasticWrap
+artisticTexturizer
+artisticWatercolorSponge
+asDisplayed
+ascending
+ascendingAlpha
+ascendingNatural
+ascii
+asciiTheme
+aspect
+aspectratio
+assign
+asst
+asteriskTotals
+atEnd
+atLeast
+atMost
+attachedSchema
+attachedTemplate
+attr
+attrName
+attrNameLst
+attribute
+audio
+audioCd
+audioFile
+author
+authorId
+authors
+auto
+autoAdjust
+autoCaption
+autoCaptions
+autoCompressPictures
+autoEnd
+autoExp
+autoFill
+autoFilter
+autoFilterDateGrouping
+autoFormatId
+autoFormatOverride
+autoHyphenation
+autoLine
+autoLoad
+autoNoTable
+autoPage
+autoPageBreaks
+autoPict
+autoRecover
+autoRedefine
+autoRepublish
+autoRev
+autoScale
+autoShow
+autoSortScope
+autoSpaceDE
+autoSpaceDN
+autoSpaceLikeWord95
+autoStart
+autoText
+autoTitleDeleted
+autoTxRot
+autoTxt
+autoUpdate
+autoUpdateAnimBg
+autoZero
+autofit
+autofitToFirstFixedWidthCell
+autoformat
+autolayout
+autorotationcenter
+avLst
+average
+avg
+avgSubtotal
+ax
+axId
+axPos
+axis
+axisCol
+axisColor
+axisPage
+axisPosition
+axisRow
+axisValues
+azure
+b
+bCs
+bCtr
+bCtrCh
+bCtrDes
+bIns
+bL
+bMarg
+bOff
+bR
+babyPacifier
+babyRattle
+back
+backWall
+backdepth
+backdrop
+background
+background1
+background2
+backgroundQuery
+backgroundRefresh
+backgroundRemoval
+backupFile
+backward
+backwardCompatible
+backwards
+bal
+balanceSingleByteDoubleByteWidth
+balanced
+balloons3Colors
+balloonsHotAir
+band1H
+band1Horz
+band1V
+band1Vert
+band2H
+band2Horz
+band2V
+band2Vert
+bandCol
+bandFmt
+bandFmts
+bandRow
+banner
+bar
+bar3DChart
+barChart
+barDir
+barPr
+base
+base64Binary
+baseColWidth
+baseField
+baseItem
+baseJc
+baseTimeUnit
+baseType
+basedOn
+baseline
+basicBlackDashes
+basicBlackDots
+basicBlackSquares
+basicThinLines
+basicWhiteDashes
+basicWhiteDots
+basicWhiteSquares
+basicWideInline
+basicWideMidline
+basicWideOutline
+bats
+bbPlcHdr
+bc
+bdr
+bef
+before
+beforeAutospacing
+beforeLines
+beg
+begChr
+begMarg
+begPad
+begPts
+begSty
+begin
+beginsWith
+behavior
+behaviors
+behindDoc
+beige
+below
+belowAverage
+bend
+bendDist
+bendPt
+beneathText
+bentArrow
+bentConnector2
+bentConnector3
+bentConnector4
+bentConnector5
+bentUpArrow
+bestFit
+between
+bevel
+bevelB
+bevelT
+bg
+bg1
+bg2
+bgClr
+bgColor
+bgFillStyleLst
+bgPr
+bgRef
+bi
+biLevel
+bib
+bibliography
+bidi
+bidiVisual
+bilevel
+billions
+birds
+birdsFlight
+bisque
+bk
+bkPtFixedVal
+bkpt
+bl
+black
+blackAndWhite
+blackGray
+blackTextAndLines
+blackTextOnWhite
+blackWhite
+blacklevel
+blanchedAlmond
+blank
+blankRow
+bld
+bldAsOne
+bldChart
+bldDgm
+bldGraphic
+bldLst
+bldLvl
+bldOleChart
+bldP
+bldStep
+bldSub
+blend
+blinds
+blinkBackground
+blip
+blipFill
+blipPhldr
+blob
+block
+blockArc
+blockQuote
+blue
+blueMod
+blueOff
+blueViolet
+blur
+blurRad
+bmk
+body
+bodyDiv
+bodyPr
+bodyStyle
+bold
+boldItalic
+bookFoldPrinting
+bookFoldPrintingSheets
+bookFoldRevPrinting
+bookViews
+bookmarkEnd
+bookmarkIdSeed
+bookmarkStart
+bool
+boolVal
+boolean
+border
+borderBox
+borderBoxPr
+borderCallout1
+borderCallout2
+borderCallout3
+borderId
+borderbottom
+borderbottomcolor
+borderleft
+borderleftcolor
+borderright
+borderrightcolor
+borders
+bordersDoNotSurroundFooter
+bordersDoNotSurroundHeader
+bordertop
+bordertopcolor
+bot
+both
+bothSides
+bottom
+bottomFromText
+bottomLeft
+bottomMargin
+bottomRight
+boundingCube
+box
+boxPr
+br
+bracePair
+bracketPair
+branch
+breadthByLvl
+breadthByNode
+bright
+brightRoom
+brightness
+brightnessContrast
+brk
+brkBin
+brkBinSub
+brown
+browse
+browser
+brushSize
+bstr
+btLr
+btnFace
+btnHighlight
+btnShadow
+btnText
+buAutoNum
+buBlip
+buChar
+buClr
+buClrTx
+buFont
+buFontTx
+buNone
+buSzPct
+buSzPts
+buSzTx
+bubble3D
+bubbleChart
+bubbleScale
+bubbleSize
+build
+builtIn
+builtInGroupCount
+builtInUnit
+builtinId
+bulEnabled
+bullet
+bulletEnabled
+bullseye
+burlyWood
+button
+bw
+bwMode
+bwmode
+bwnormal
+bwpure
+bx
+by
+byPosition
+byte
+c
+c15
+cBhvr
+cdr
+cGp
+cGpRule
+cMediaNode
+cNvCnPr
+cNvCxnSpPr
+cNvGraphicFramePr
+cNvGrpSpPr
+cNvPicPr
+cNvPr
+cNvSpPr
+cSld
+cSldViewPr
+cSp
+cTn
+cViewPr
+ca
+cabins
+cacheField
+cacheFields
+cacheHierarchies
+cacheHierarchy
+cacheId
+cacheIndex
+cacheSource
+cachedColBalance
+cadetBlue
+cakeSlice
+calcChain
+calcCompleted
+calcId
+calcMode
+calcOnExit
+calcOnSave
+calcPr
+calcmode
+calculated
+calculatedColumn
+calculatedColumnFormula
+calculatedItem
+calculatedItems
+calculatedMember
+calculatedMembers
+calendar
+calendarType
+call
+callout
+callout1
+callout2
+callout3
+camera
+can
+canSlip
+candyCorn
+cantSplit
+canvas
+cap
+caps
+caption
+captionBeginsWith
+captionBetween
+captionContains
+captionEndsWith
+captionEqual
+captionGreaterThan
+captionGreaterThanOrEqual
+captionLessThan
+captionLessThanOrEqual
+captionNotBeginsWith
+captionNotBetween
+captionNotContains
+captionNotEndsWith
+captionNotEqual
+captionText
+captions
+cardinalText
+caseSensitive
+cat
+catAx
+catLst
+catalog
+category
+categoryEl
+categoryIdx
+ccw
+ccwIn
+ccwOut
+cd2
+cd3
+cd4
+cd8
+cell
+cell3D
+cellColor
+cellComments
+cellDel
+cellIns
+cellIs
+cellMerge
+cellMeta
+cellMetadata
+cellSmartTag
+cellSmartTagPr
+cellSmartTags
+cellStyle
+cellStyleXfs
+cellStyles
+cellWatch
+cellWatches
+cellXfs
+celticKnotwork
+center
+centerContinuous
+centerGroup
+centered
+certificateBanner
+cf
+cfIcon
+cfRule
+cfvo
+ch
+chAlign
+chDir
+chExt
+chMax
+chOff
+chOrder
+chPref
+chainLink
+champagneBottle
+changesSavedWin
+chapNum
+chapSep
+chapStyle
+char
+charRg
+charSpace
+character
+characterSet
+characterSpacingControl
+characteristic
+charset
+chart
+chartAndTx
+chartFormat
+chartFormats
+chartObject
+chartPlus
+chartSpace
+chartStar
+chartX
+chartreuse
+chartsheet
+checkBox
+checkCompatibility
+checkErrors
+checkStyle
+checkbox
+checked
+checkedBarBlack
+checkedBarColor
+checkedState
+checker
+checkered
+chevron
+chicago
+childStyle
+childTnLst
+chilly
+chineseCounting
+chineseCountingThousand
+chineseLegalSimplified
+chocolate
+choose
+chord
+chosung
+chr
+christmasTree
+chromakey
+circle
+circleNumDbPlain
+circleNumWdBlackPlain
+circleNumWdWhitePlain
+circlesLines
+circlesRectangles
+circularArrow
+citation
+class
+classic
+classicalWave
+classid
+clean
+clear
+clearAll
+clearComments
+clearContents
+clearFormats
+click
+clickAndTypeStyle
+clickEffect
+clickPar
+clientData
+clientInsertedTime
+clip
+clipArt
+clipArtAndTx
+clipArtAndVertTx
+clippath
+clipped
+cliptowrap
+clocks
+close
+cloud
+cloudCallout
+clr
+clrChange
+clrData
+clrFrom
+clrIdx
+clrMap
+clrMapOvr
+clrMode
+clrMru
+clrRepl
+clrScheme
+clrSchemeMapping
+clrSpc
+clrTo
+clrVal
+clsid
+clustered
+cm
+cmAuthor
+cmAuthorLst
+cmLst
+cmd
+cmpd
+cnfStyle
+cnt
+cntxtAlts
+code
+codeName
+codePage
+coerce
+coherent3DOff
+col
+colBreaks
+colDelim
+colFields
+colFirst
+colGrandTotals
+colHeaderCaption
+colHidden
+colHierarchiesUsage
+colHierarchyUsage
+colId
+colItems
+colLast
+colOff
+colPageCount
+collapse
+collapsed
+collapsedLevelsAreSubtotals
+colon
+color
+color2
+colorAxis
+colorFilter
+colorFirst
+colorHigh
+colorId
+colorLast
+colorLow
+colorMarkers
+colorNegative
+colorScale
+colorSeries
+colorTemp
+colorTemperature
+colormenu
+colormode
+colormru
+colors
+colorsDef
+colorsDefHdr
+colorsDefHdrLst
+cols
+column
+columnSort
+comb
+combine
+combineBrackets
+comboBox
+commIndAndComment
+commIndicator
+commNone
+comma
+command
+commandType
+comment
+commentEx
+commentList
+commentPr
+commentRangeEnd
+commentRangeStart
+commentReference
+comments
+commentsEx
+comp
+compact
+compactData
+compass
+compat
+compatLnSpc
+compatMode
+compatSetting
+complex
+composite
+compressPunctuation
+compressPunctuationAndJapaneseKana
+computedArea
+concurrent
+concurrentCalc
+concurrentManualCount
+cond
+condense
+conditionalFormat
+conditionalFormats
+conditionalFormatting
+conditionalFormattings
+cone
+coneToMax
+confetti
+confettiGrays
+confettiOutline
+confettiStreamers
+confettiWhite
+conformance
+conn
+connDist
+connRout
+connectString
+connectangles
+connection
+connectionId
+connections
+connectloc
+connectlocs
+connector
+connectortype
+connecttype
+consecutive
+consecutiveHyphenLimit
+consolidation
+constr
+constrLst
+constrainbounds
+cont
+contDir
+containsBlank
+containsBlanks
+containsDate
+containsErrors
+containsInteger
+containsMixedTypes
+containsNonDate
+containsNumber
+containsSemiMixedTypes
+containsString
+containsText
+content
+contentLocked
+contentStatus
+contentType
+contextualSpacing
+continuationNotice
+continuationSeparator
+continue
+continuous
+contourClr
+contourW
+contrast
+contrasting
+contributors
+control
+control1
+control2
+controlPr
+controls
+convMailMergeEsc
+convex
+conveyor
+coolSlant
+coordorigin
+coordsize
+copies
+copy
+coral
+coreProperties
+corner
+cornerTabs
+cornerTriangles
+cornflowerBlue
+cornsilk
+count
+countA
+countASubtotal
+countBy
+countNums
+countSubtotal
+couponCutoutDashes
+couponCutoutDots
+cover
+coverPg
+cp
+cr
+crackSpacing
+crashSave
+crazyMaze
+created
+createdVersion
+creator
+creaturesButterfly
+creaturesFish
+creaturesInsects
+creaturesLadyBug
+credentials
+crimson
+cropbottom
+cropleft
+cropping
+cropright
+croptop
+cross
+crossAx
+crossBetween
+crossStitch
+crosses
+crossesAt
+cryptAlgorithmClass
+cryptAlgorithmSid
+cryptAlgorithmType
+cryptProvider
+cryptProviderType
+cryptProviderTypeExt
+cryptProviderTypeExtSource
+cryptSpinCount
+cs
+csCatId
+csTypeId
+csb0
+csb1
+css
+cstate
+cstheme
+ct
+ctr
+ctrShpMap
+ctrTitle
+ctrX
+ctrXOff
+ctrY
+ctrYOff
+ctrlPr
+cube
+cubicBezTo
+culture
+cup
+curly
+current
+currentDate
+currentTime
+curve
+curved
+curvedConnector2
+curvedConnector3
+curvedConnector4
+curvedConnector5
+curvedDownArrow
+curvedLeftArrow
+curvedRightArrow
+curvedUpArrow
+cust
+custAng
+custAutoTxt
+custBib
+custClr
+custClrLst
+custCoverPg
+custDash
+custData
+custDataLst
+custEq
+custFlipHor
+custFlipVert
+custFtrs
+custGeom
+custHdrs
+custLinFactNeighborX
+custLinFactNeighborY
+custLinFactX
+custLinFactY
+custPgNum
+custPgNumB
+custPgNumMargins
+custPgNumT
+custQuickParts
+custRadScaleInc
+custRadScaleRad
+custScaleX
+custScaleY
+custShow
+custShowLst
+custSplit
+custSzX
+custSzY
+custT
+custTblOfContents
+custTbls
+custTxtBox
+custUnit
+custWatermarks
+custom
+custom1
+custom2
+custom3
+custom4
+custom5
+customBuiltin
+customFilter
+customFilters
+customFormat
+customHeight
+customList
+customListSort
+customMarkFollows
+customMenu
+customPr
+customProperties
+customRollUp
+customSheetView
+customSheetViews
+customStyle
+customView
+customWidth
+customWorkbookView
+customWorkbookViews
+customXml
+customXmlDelRangeEnd
+customXmlDelRangeStart
+customXmlInsRangeEnd
+customXmlInsRangeStart
+customXmlMoveFromRangeEnd
+customXmlMoveFromRangeStart
+customXmlMoveToRangeEnd
+customXmlMoveToRangeStart
+customXmlPr
+cut
+cw
+cwIn
+cwOut
+cx
+cxn
+cxnId
+cxnLst
+cxnSp
+cxnSpLocks
+cy
+cyan
+cycle
+cylinder
+d
+dLbl
+dLblPos
+dLbls
+dPr
+dPt
+dTable
+dark1
+dark2
+darkBlue
+darkCyan
+darkDown
+darkGray
+darkGreen
+darkGrid
+darkHorizontal
+darkMagenta
+darkRed
+darkTrellis
+darkUp
+darkVertical
+darkYellow
+darken
+darkenLess
+dash
+dashDnDiag
+dashDot
+dashDotDot
+dashDotDotHeavy
+dashDotHeavy
+dashDotStroked
+dashHeavy
+dashHorz
+dashLong
+dashLongHeavy
+dashSmallGap
+dashUpDiag
+dashVert
+dashdot
+dashed
+dashedHeavy
+dashedSmall
+dashstyle
+data
+dataBar
+dataBinding
+dataBound
+dataCaption
+dataCellStyle
+dataConsolidate
+dataDxfId
+dataExtractLoad
+dataField
+dataFields
+dataModel
+dataModelExt
+dataOnRows
+dataOnly
+dataPosition
+dataRef
+dataRefs
+dataSource
+dataSourceSort
+dataTable
+dataType
+dataValidation
+dataValidations
+database
+databaseField
+datalabelsRange
+datastoreItem
+date
+date1904
+dateAx
+dateAxis
+dateBetween
+dateCompatibility
+dateEqual
+dateFormat
+dateGroupItem
+dateNewerThan
+dateNewerThanOrEqual
+dateNotBetween
+dateNotEqual
+dateOlderThan
+dateOlderThanOrEqual
+dateTime
+dateTimeGrouping
+day
+dayLong
+dayShort
+days
+dbColumn
+dbPr
+dbl
+dblStrike
+dc
+dcmitype
+dcterms
+ddList
+ddeItem
+ddeItems
+ddeLink
+ddeService
+ddeTopic
+dec
+decagon
+decel
+decimal
+decimalEnclosedCircle
+decimalEnclosedCircleChinese
+decimalEnclosedFullstop
+decimalEnclosedParen
+decimalFullWidth
+decimalFullWidth2
+decimalHalfWidth
+decimalSymbol
+decimalZero
+decoArch
+decoArchColor
+decoBlocks
+decorated
+decorative
+deepPink
+deepSkyBlue
+def
+defJc
+defLockedState
+defPPr
+defQFormat
+defRPr
+defSemiHidden
+defStyle
+defTabSz
+defUIPriority
+defUnhideWhenUsed
+default
+defaultAttributeDrillState
+defaultColWidth
+defaultGridColor
+defaultMemberUniqueName
+defaultPivotStyle
+defaultRowHeight
+defaultSize
+defaultSubtotal
+defaultTabStop
+defaultTableStyle
+defaultTextStyle
+defaultThemeVersion
+definedName
+definedNames
+deg
+degHide
+degree
+del
+del1
+del2
+delInstrText
+delText
+delay
+delete
+deleteCol
+deleteColumns
+deleteRow
+deleteRows
+deleted
+deletedField
+delimited
+delimiter
+den
+denormalized
+depth
+depthByBranch
+depthByNode
+depthPercent
+des
+desOrSelf
+desc
+descending
+descendingAlpha
+descendingNatural
+descr
+description
+destId
+destOrd
+destination
+destinationFile
+detail
+detectmouseclick
+dgm
+dgmbasetextscale
+dgmfontsize
+dgmlayout
+dgmlayoutmru
+dgmnodekind
+dgmscalex
+dgmscaley
+dgmstyle
+diagBrick
+diagCross
+diagStripe
+diagonal
+diagonalDown
+diagonalUp
+diagram
+dialogsheet
+diam
+diamond
+diamondsGray
+diff
+difference
+differentFirst
+differentOddEven
+diffusity
+dim
+dimGray
+dimension
+dimensionUniqueName
+dimensions
+dir
+dirty
+disableEdit
+disableFieldList
+disablePrompts
+disableRefresh
+disabled
+discrete
+discretePr
+diskRevisions
+dispBlanksAs
+dispDef
+dispEq
+dispRSqr
+dispUnits
+dispUnitsLbl
+displacedByCustomXml
+display
+displayBackgroundShape
+displayEmptyCellsAs
+displayFolder
+displayHangulFixedWidth
+displayHidden
+displayHorizontalDrawingGridEvery
+displayName
+displayText
+displayVerticalDrawingGridEvery
+displayXAxis
+displayed
+dissolve
+dist
+distB
+distL
+distR
+distT
+distance
+distribute
+distributeLetter
+distributeSpace
+distributed
+div
+divBdr
+divId
+divot
+divs
+divsChild
+dk1
+dk2
+dkBlue
+dkCyan
+dkDnDiag
+dkEdge
+dkGoldenrod
+dkGray
+dkGreen
+dkHorz
+dkKhaki
+dkMagenta
+dkOliveGreen
+dkOrange
+dkOrchid
+dkRed
+dkSalmon
+dkSeaGreen
+dkSlateBlue
+dkSlateGray
+dkTurquoise
+dkUpDiag
+dkVert
+dkViolet
+dlblRangeCache
+dllVersion
+dm
+dn
+dnDiag
+doNotAutoCompressPictures
+doNotAutofitConstrainedTables
+doNotBreakConstrainedForcedTable
+doNotBreakWrappedTables
+doNotCompress
+doNotDemarcateInvalidXml
+doNotDisplayPageBoundaries
+doNotEmbedSmartTags
+doNotExpandShiftReturn
+doNotHyphenateCaps
+doNotIncludeSubdocsInStats
+doNotLeaveBackslashAlone
+doNotOrganizeInFolder
+doNotRelyOnCSS
+doNotSaveAsSingleFile
+doNotShadeFormData
+doNotSnapToGridInCell
+doNotSuppressBlankLines
+doNotSuppressIndentation
+doNotSuppressParagraphBorders
+doNotTrackFormatting
+doNotTrackMoves
+doNotUseEastAsianBreakRules
+doNotUseHTMLParagraphAutoSpacing
+doNotUseIndentAsNumberingTabStop
+doNotUseLongFileNames
+doNotUseMarginsForDrawingGridOrigin
+doNotValidateAgainstSchema
+doNotVertAlignCellWithSp
+doNotVertAlignInTxbx
+doNotWrapTextWithPunct
+done
+doc
+docDefaults
+docEnd
+docGrid
+docLocation
+docPart
+docPartBody
+docPartCategory
+docPartGallery
+docPartList
+docPartObj
+docPartPr
+docPartUnique
+docParts
+docPr
+docVar
+docVars
+document
+document1
+document2
+documentProtection
+documentType
+dodecagon
+dodgerBlue
+donut
+doors
+dos
+dot
+dotDash
+dotDashHeavy
+dotDmnd
+dotDotDash
+dotDotDashHeavy
+dotGrid
+dotted
+dottedHeavy
+double
+double-struck
+doubleAccounting
+doubleD
+doubleDiamonds
+doubleQuote
+doubleWave
+doubleclicknotify
+doughnutChart
+down
+downArrow
+downArrowCallout
+downBars
+downThenOver
+dpi
+dr
+draft
+dragOff
+dragToCol
+dragToData
+dragToPage
+dragToRow
+drawing
+drawingGridHorizontalOrigin
+drawingGridHorizontalSpacing
+drawingGridVerticalOrigin
+drawingGridVerticalSpacing
+drill
+drop
+dropCap
+dropDownList
+dropLines
+dropauto
+ds
+dstNode
+dstrike
+dt
+dt2D
+dtr
+duotone
+duplicateValues
+dur
+duration
+dvAspect
+dx
+dxa
+dxaOrig
+dxf
+dxfId
+dxfs
+dy
+dyaOrig
+dynamicAddress
+dynamicFilter
+dz
+e
+eMail
+ea
+ea1ChsPeriod
+ea1ChsPlain
+ea1ChtPeriod
+ea1ChtPlain
+ea1JpnChsDbPeriod
+ea1JpnKorPeriod
+ea1JpnKorPlain
+eaLnBrk
+eaVert
+eachPage
+eachSect
+earth1
+earth2
+eastAsia
+eastAsiaTheme
+eastAsianLayout
+eb
+eclipsingSquares1
+eclipsingSquares2
+ed
+edGrp
+edge
+edit
+editAs
+editData
+editPage
+editas
+edited
+editors
+effect
+effectClrLst
+effectDag
+effectExtent
+effectLst
+effectRef
+effectStyle
+effectStyleLst
+eggsBlack
+el
+elbow
+element
+ellipse
+ellipseRibbon
+ellipseRibbon2
+ellipsis
+else
+em
+emDash
+email
+embed
+embedBold
+embedBoldItalic
+embedItalic
+embedRegular
+embedSystemFonts
+embedTrueTypeFonts
+embeddedFont
+embeddedFontLst
+emboss
+embosscolor
+emph
+empty
+emptyCellReference
+enDash
+enableDrill
+enableFieldProperties
+enableFormatConditionsCalculation
+enableRefresh
+enableWizard
+enabled
+encoding
+end
+endA
+endAngle
+endChars
+endChr
+endCnv
+endCondLst
+endCxn
+endDate
+endMarg
+endNum
+endOfListFormulaUpdate
+endPad
+endParaRPr
+endPos
+endPts
+endSnd
+endSty
+endSync
+endarrow
+endarrowlength
+endarrowwidth
+endcap
+endnote
+endnotePr
+endnoteRef
+endnoteReference
+endnotes
+endsWith
+enforcement
+entr
+entries
+entry
+entryMacro
+envelopes
+eol
+eq
+eqArr
+eqArrPr
+eqn
+equ
+equal
+equalAverage
+equalWidth
+equation
+equationxml
+err
+errBarType
+errBars
+errDir
+errValType
+error
+errorCaption
+errorStyle
+errorTitle
+errors
+evalError
+evalOrder
+even
+evenAndOddHeaders
+evenFooter
+evenHBand
+evenHeader
+evenPage
+evenVBand
+everyone
+evt
+evtFilter
+exact
+excl
+exclusive
+exit
+exitMacro
+exp
+explosion
+expression
+ext
+extCalcPr
+extLst
+extend
+extendable
+extent
+external
+externalBook
+externalData
+externalLink
+externalReference
+externalReferences
+extraClrScheme
+extraClrSchemeLst
+extrusion
+extrusionClr
+extrusionH
+extrusionOk
+extrusioncolor
+extrusionok
+f
+fHdr
+fLocksText
+fLocksWithSheet
+fName
+fNode
+fPr
+fPrintsWithSheet
+fPublished
+face
+facet
+fact
+factor
+fade
+fadeDir
+fallback
+false
+family
+fans
+fast
+fax
+fc
+ferris
+ffData
+fgClr
+fgColor
+fi
+field
+fieldGroup
+fieldId
+fieldIdWrapped
+fieldListSortAscending
+fieldMapData
+fieldPosition
+fieldPrintTitles
+fieldUsage
+fieldsUsage
+fileRecoveryPr
+fileSharing
+fileType
+fileVersion
+filetime
+fill
+fillClrLst
+fillFormulas
+fillId
+fillOverlay
+fillRect
+fillRef
+fillStyleLst
+fillToRect
+fillcolor
+filled
+fillok
+fills
+filltype
+film
+filter
+filterColumn
+filterMode
+filterPrivacy
+filterUnique
+filterVal
+filters
+firebrick
+firecrackers
+first
+firstAndLastLine
+firstBackgroundRefresh
+firstCol
+firstColumn
+firstColumnStripe
+firstColumnSubheading
+firstDataCol
+firstDataRow
+firstFooter
+firstHeader
+firstHeaderCell
+firstHeaderRow
+firstLine
+firstLineChars
+firstLineOnly
+firstPage
+firstPageNumber
+firstRow
+firstRowFirstColumn
+firstRowLastColumn
+firstRowStripe
+firstRowSubheading
+firstSheet
+firstSliceAng
+firstSlideNum
+firstSubtotalColumn
+firstSubtotalRow
+firstTotalCell
+fitText
+fitToHeight
+fitToPage
+fitToSlide
+fitToWidth
+fitpath
+fitshape
+fixed
+fixedVal
+flash
+flat
+flatBorders
+flatTx
+fld
+fldChar
+fldCharType
+fldData
+fldLock
+fldSimple
+flip
+flipH
+flipV
+float
+flood
+floor
+floralWhite
+flowChartAlternateProcess
+flowChartCollate
+flowChartConnector
+flowChartDecision
+flowChartDelay
+flowChartDisplay
+flowChartDocument
+flowChartExtract
+flowChartInputOutput
+flowChartInternalStorage
+flowChartMagneticDisk
+flowChartMagneticDrum
+flowChartMagneticTape
+flowChartManualInput
+flowChartManualOperation
+flowChartMerge
+flowChartMultidocument
+flowChartOfflineStorage
+flowChartOffpageConnector
+flowChartOnlineStorage
+flowChartOr
+flowChartPredefinedProcess
+flowChartPreparation
+flowChartProcess
+flowChartPunchedCard
+flowChartPunchedTape
+flowChartSort
+flowChartSummingJunction
+flowChartTerminator
+flowDir
+flowersBlockPrint
+flowersDaisies
+flowersModern1
+flowersModern2
+flowersPansy
+flowersRedRose
+flowersRoses
+flowersTeacup
+flowersTiny
+fltVal
+flythrough
+fmla
+fmt
+fmtId
+fmtScheme
+fmtid
+focus
+focusposition
+focussize
+folHlink
+foldedCorner
+follow
+followColorScheme
+followSib
+followedHyperlink
+font
+font4
+fontAlgn
+fontColor
+fontId
+fontKey
+fontRef
+fontScale
+fontScheme
+fontSz
+fonts
+footer
+footerReference
+footnote
+footnoteLayoutLikeWW8
+footnotePr
+footnoteRef
+footnoteReference
+footnotes
+for
+forEach
+forName
+forceAA
+forceFullCalc
+forceUpgrade
+forcedash
+foredepth
+forestGreen
+forgetLastTabAlignment
+formControlPr
+formFld
+formLetters
+formProt
+format
+formatCells
+formatCode
+formatColumns
+formatRows
+formats
+formatting
+forms
+formsDesign
+formula
+formula1
+formula2
+formulaRange
+formulas
+forward
+fourObj
+fov
+fraktur
+frame
+frameLayout
+framePr
+frameSlides
+frameStyle1
+frameStyle2
+frameStyle3
+frameStyle4
+frameStyle5
+frameStyle6
+frameStyle7
+frameset
+framesetSplitbar
+freeze
+freezing
+from
+fromB
+fromL
+fromR
+fromT
+fromWordArt
+front
+frozen
+frozenSplit
+ftr
+ftrs
+fuchsia
+full
+fullAlpha
+fullCalcOnLoad
+fullDate
+fullHangul
+fullKatakana
+fullPage
+fullPrecision
+fullScrn
+fullwidthKatakana
+func
+funcPr
+function
+functionGroup
+functionGroupId
+functionGroups
+funnel
+futureMetadata
+g
+gDay
+gMonth
+gMonthDay
+gYear
+gYearMonth
+gain
+gainsboro
+gallery
+gamma
+ganada
+gap
+gapDepth
+gapWidth
+gd
+gdLst
+gdRefAng
+gdRefR
+gdRefX
+gdRefY
+ge
+gear6
+gear9
+gems
+general
+gfxdata
+ghostCol
+ghostRow
+ghostWhite
+gingerbreadMan
+glitter
+glossaryDocument
+glow
+goal
+gold
+goldenrod
+grDir
+gradFill
+gradient
+gradientActiveCaption
+gradientCenter
+gradientFill
+gradientInactiveCaption
+gradientRadial
+gradientUnscaled
+gradientshapeok
+grainSize
+gramEnd
+gramStart
+grammar
+grand
+grandCol
+grandRow
+grandTotalCaption
+graphic
+graphicData
+graphicEl
+graphicFrame
+graphicFrameLocks
+grav
+gray
+gray0625
+gray125
+grayOutline
+grayScale
+grayText
+grayWhite
+grayscale
+grayscl
+greaterThan
+greaterThanOrEqual
+green
+greenMod
+greenOff
+greenYellow
+gregorian
+gregorianArabic
+gregorianMeFrench
+gregorianUs
+gregorianXlitEnglish
+gregorianXlitFrench
+gridAfter
+gridBefore
+gridCol
+gridDropZones
+gridLegend
+gridLines
+gridLinesSet
+gridSize
+gridSpacing
+gridSpan
+group
+groupBy
+groupChr
+groupChrPr
+groupInterval
+groupItems
+groupLevel
+groupLevels
+groupMember
+groupMembers
+grouping
+groups
+grow
+growAutofit
+growShrinkType
+grpFill
+grpId
+grpSp
+grpSpLocks
+grpSpPr
+gs
+gsLst
+gt
+gte
+guid
+guide
+guideLst
+gutter
+gutterAtTop
+h
+hAnchor
+hAnsi
+hAnsiTheme
+hArH
+hMerge
+hMode
+hOff
+hPercent
+hR
+hRule
+hSpace
+hagakiCard
+hair
+hairline
+half
+halfAlpha
+halfFrame
+halfHangul
+halfKatakana
+halfwidthKatakana
+handles
+handmade1
+handmade2
+handoutMaster
+handoutMasterId
+handoutMasterIdLst
+handoutView
+handouts1
+handouts2
+handouts3
+handouts4
+handouts6
+handouts9
+hang
+hanging
+hangingChars
+hangingPunct
+hardEdge
+harsh
+hasCustomPrompt
+hash
+hashData
+hashValue
+hc
+hd10
+hd2
+hd3
+hd4
+hd5
+hd6
+hd8
+hdr
+hdrShapeDefaults
+hdrs
+headEnd
+header
+headerFooter
+headerReference
+headerRow
+headerRowBorderDxfId
+headerRowCellStyle
+headerRowCount
+headerRowDxfId
+headerSource
+headers
+headersInLastRefresh
+heading
+headings
+heart
+heartBalloon
+heartGray
+hearts
+heavy
+hebrew
+hebrew1
+hebrew2
+hebrew2Minus
+heebieJeebies
+help
+helpText
+heptagon
+hex
+hexBinary
+hexagon
+hf
+hiLowLines
+hidden
+hiddenButton
+hiddenColumn
+hiddenColumns
+hiddenLevel
+hiddenRow
+hiddenRows
+hiddenSlides
+hide
+hideBot
+hideGeom
+hideGrammaticalErrors
+hideLastTrans
+hideLeft
+hideMark
+hideNewItems
+hidePivotFieldList
+hideRight
+hideSpellingErrors
+hideTop
+hier
+hierAlign
+hierBranch
+hierChild
+hierRoot
+hierarchy
+hierarchyUsage
+high
+highContrast
+highKashida
+highlight
+highlightClick
+highlightText
+hijri
+hindiAlpha1Period
+hindiAlphaPeriod
+hindiConsonants
+hindiCounting
+hindiNumParenR
+hindiNumPeriod
+hindiNumbers
+hindiVowels
+hint
+hiragana
+history
+hlink
+hlinkClick
+hlinkHover
+hlinkMouseOver
+hold
+holeSize
+holly
+honeycomb
+homePlate
+honeydew
+horizontal
+horizontalCentered
+horizontalDpi
+horizontalScroll
+horz
+horzAlign
+horzAnchor
+horzBarState
+horzBrick
+horzCross
+horzOverflow
+horzStripe
+hotLight
+hotPink
+hour
+hours
+houseFunky
+how
+hps
+hpsBaseText
+hpsRaise
+hqprint
+hr
+hralign
+href
+hrnoshade
+hrpct
+hrstd
+hsl
+hslClr
+ht
+htmlFormat
+htmlPubPr
+htmlTables
+hue
+hueDir
+hueMod
+hueOff
+hundredMillions
+hundredThousands
+hundreds
+hybridMultilevel
+hyperlink
+hyperlinks
+hyphen
+hyphenationZone
+hypnotic
+i
+i1
+i2
+i3
+i4
+i8
+iCs
+iLevel
+iMeasureFld
+iMeasureHier
+iceCreamCones
+icon
+iconFilter
+iconId
+iconSet
+id
+idcntr
+iddest
+identifier
+ideographDigital
+ideographEnclosedCircle
+ideographLegalTraditional
+ideographTraditional
+ideographZodiac
+ideographZodiacTraditional
+idmap
+idref
+idsrc
+idx
+if
+ignore
+ignoreMixedContent
+ignoredError
+ignoredErrors
+ilvl
+image
+imagealignshape
+imageaspect
+imagedata
+imagesize
+imeMode
+img
+imgEffect
+imgH
+imgLayer
+imgProps
+imgSz
+imgW
+immersive
+imprint
+in
+inBase
+inByRing
+inEnd
+inactiveBorder
+inactiveCaption
+inactiveCaptionText
+includeHiddenRowCol
+includeNewItemsInFilter
+includePrintSettings
+ind
+indefinite
+indent
+index
+indexed
+indexedColors
+indianRed
+indigo
+infoBk
+infoText
+information
+init
+initials
+ink
+inkAnnotations
+inkTgt
+inline
+inlineStr
+inner
+innerShdw
+inputCells
+ins
+insDel
+insertBlankRow
+insertClear
+insertCol
+insertColumns
+insertDelete
+insertHyperlinks
+insertPageBreak
+insertRow
+insertRowShift
+insertRows
+inset
+insetmode
+insetpen
+insetpenok
+inside
+insideH
+insideMargin
+insideV
+instr
+instrText
+int
+intLim
+intVal
+integer
+integrated
+intensity
+interSp
+interactiveSeq
+intercept
+intermediate
+interval
+intraSp
+inv
+invGamma
+invGray
+invalEndChars
+invalStChars
+invalid
+invalidUrl
+inverseGray
+invertIfNegative
+invx
+invy
+iroha
+irohaFullWidth
+irregularSeal1
+irregularSeal2
+is
+isInverted
+isLgl
+isNarration
+isPhoto
+iscomment
+isometricBottomDown
+isometricBottomUp
+isometricLeftDown
+isometricLeftUp
+isometricOffAxis1Left
+isometricOffAxis1Right
+isometricOffAxis1Top
+isometricOffAxis2Left
+isometricOffAxis2Right
+isometricOffAxis2Top
+isometricOffAxis3Bottom
+isometricOffAxis3Left
+isometricOffAxis3Right
+isometricOffAxis4Bottom
+isometricOffAxis4Left
+isometricOffAxis4Right
+isometricRightDown
+isometricRightUp
+isometricTopDown
+isometricTopUp
+issignatureline
+italic
+item
+itemID
+itemPageCount
+itemPrintTitles
+items
+iterate
+iterateCount
+iterateDelta
+ivory
+japan
+japaneseCounting
+japaneseDigitalTenThousand
+japaneseLegal
+jc
+joinstyle
+just
+justLow
+justify
+justifyLastLine
+k
+keepAlive
+keepChangeHistory
+keepLines
+keepNext
+kern
+key
+keyAttribute
+keywords
+khaki
+kinsoku
+kiosk
+korea
+koreanCounting
+koreanDigital
+koreanDigital2
+koreanLegal
+kpi
+kpis
+kumimoji
+kx
+ky
+l
+lB
+lBounds
+lCtrCh
+lCtrDes
+lIns
+lMarg
+lMargin
+lOff
+lT
+label
+labelOnly
+landscape
+lang
+language
+largest
+last
+last7Days
+lastClick
+lastClr
+lastCol
+lastColumn
+lastEdited
+lastGuid
+lastHeaderCell
+lastIdx
+lastLineOnly
+lastModifiedBy
+lastMonth
+lastPrinted
+lastQuarter
+lastRenderedPageBreak
+lastRow
+lastRowFirstColumn
+lastRowLastColumn
+lastTotalCell
+lastValue
+lastView
+lastWeek
+lastYear
+lat
+latentStyles
+latin
+latinLnBrk
+lavender
+lavenderBlush
+lawnGreen
+layout
+layoutDef
+layoutDefHdr
+layoutDefHdrLst
+layoutInCell
+layoutNode
+layoutRawTableWidth
+layoutTableRowsApart
+layoutTarget
+lblAlgn
+lblOffset
+lc
+ld
+le
+leader
+leaderLines
+ledger
+left
+leftArrow
+leftArrowCallout
+leftBrace
+leftBracket
+leftChars
+leftCircularArrow
+leftFromText
+leftLabels
+leftMargin
+leftRightArrow
+leftRightArrowCallout
+leftRightCircularArrow
+leftRightRibbon
+leftRightUpArrow
+leftUpArrow
+legacy
+legacyDrawing
+legacyDrawingHF
+legacyFlat1
+legacyFlat2
+legacyFlat3
+legacyFlat4
+legacyHarsh1
+legacyHarsh2
+legacyHarsh3
+legacyHarsh4
+legacyIndent
+legacyMatte
+legacyMetal
+legacyNormal1
+legacyNormal2
+legacyNormal3
+legacyNormal4
+legacyObliqueBottom
+legacyObliqueBottomLeft
+legacyObliqueBottomRight
+legacyObliqueFront
+legacyObliqueLeft
+legacyObliqueRight
+legacyObliqueTop
+legacyObliqueTopLeft
+legacyObliqueTopRight
+legacyPerspectiveBottom
+legacyPerspectiveBottomLeft
+legacyPerspectiveBottomRight
+legacyPerspectiveFront
+legacyPerspectiveLeft
+legacyPerspectiveRight
+legacyPerspectiveTop
+legacyPerspectiveTopLeft
+legacyPerspectiveTopRight
+legacyPlastic
+legacySpace
+legacyWireframe
+legend
+legendEntry
+legendPos
+lemonChiffon
+len
+length
+lengthspecified
+lessThan
+lessThanOrEqual
+letter
+level
+lg
+lgCheck
+lgConfetti
+lgDash
+lgDashDot
+lgDashDotDot
+lgGrid
+license
+lid
+ligatures
+light1
+light2
+lightBulb
+lightDown
+lightGray
+lightGrayscale
+lightGrid
+lightHorizontal
+lightRig
+lightTrellis
+lightUp
+lightVertical
+lighten
+lightenLess
+lightface
+lightharsh
+lightharsh2
+lightlevel
+lightlevel2
+lightning1
+lightning2
+lightningBolt
+lightposition
+lightposition2
+lights
+lim
+limLoc
+limLow
+limLowPr
+limUpp
+limUppPr
+lime
+limeGreen
+limo
+lin
+linClrLst
+linDir
+line
+line3DChart
+lineChart
+lineInv
+lineMarker
+linePitch
+lineRule
+lineTo
+lineWeight
+lineWrapLikeWord6
+linear
+linen
+lines
+linesAndChars
+linestyle
+link
+linkStyles
+linkTarget
+linkToQuery
+linkedToFile
+linkedTxbx
+list
+listDataValidation
+listEntry
+listItem
+listSeparator
+lit
+lkTxEntry
+ln
+lnB
+lnBlToTr
+lnDef
+lnL
+lnNumType
+lnR
+lnRef
+lnSpAfChP
+lnSpAfParP
+lnSpCh
+lnSpPar
+lnSpc
+lnSpcReduction
+lnStyleLst
+lnT
+lnTlToBr
+lnTo
+lo
+loCatId
+loTypeId
+local
+localConnection
+localRefresh
+localSheetId
+location
+lock
+lockRevision
+lockStructure
+lockText
+lockWindows
+locked
+lockedCanvas
+lockrotationcenter
+loext
+log
+logBase
+lon
+long
+longCurve
+longFileNames
+longText
+longdash
+longdashdot
+longdashdotdot
+loop
+low
+lowKashida
+lowerLetter
+lowerRoman
+lowestEdited
+lpstr
+lpwstr
+lrTb
+lrTbV
+ls
+lsdException
+lstStyle
+lt
+lt1
+lt2
+ltBlue
+ltCoral
+ltCyan
+ltDnDiag
+ltGoldenrodYellow
+ltGray
+ltGreen
+ltHorz
+ltPink
+ltSalmon
+ltSeaGreen
+ltSkyBlue
+ltSlateGray
+ltSteelBlue
+ltUpDiag
+ltVert
+ltYellow
+lte
+lu
+lum
+lumMod
+lumOff
+lvl
+lvl1pPr
+lvl2pPr
+lvl3pPr
+lvl4pPr
+lvl5pPr
+lvl6pPr
+lvl7pPr
+lvl8pPr
+lvl9pPr
+lvlAtOnce
+lvlJc
+lvlOne
+lvlOverride
+lvlPicBulletId
+lvlRestart
+lvlText
+m
+mPr
+mac
+macro
+macrosheet
+magenta
+mailAsAttachment
+mailMerge
+mailSubject
+mailingLabels
+main
+mainDocumentType
+mainSeq
+major
+majorAscii
+majorBidi
+majorEastAsia
+majorFont
+majorGridlines
+majorHAnsi
+majorTickMark
+majorTimeUnit
+majorUnit
+man
+manifestLocation
+manual
+manualBreakCount
+manualLayout
+manualMax
+manualMin
+map
+mapId
+mapPins
+mapleLeaf
+mapleMuffins
+mappedName
+mappingCount
+maps
+marB
+marBottom
+marH
+marL
+marLeft
+marR
+marRight
+marT
+marTop
+marW
+margin
+marker
+markers
+markup
+maroon
+marquee
+marqueeToothed
+master
+masterClrMapping
+masterPages
+masterRel
+match
+matchSrc
+matchingName
+mathDivide
+mathEqual
+mathFont
+mathMinus
+mathMultiply
+mathNotEqual
+mathPlus
+mathPr
+matrix
+matte
+max
+maxAxisType
+maxAng
+maxDate
+maxDepth
+maxDist
+maxLength
+maxMin
+maxR
+maxRId
+maxRank
+maxSheetId
+maxSubtotal
+maxVal
+maxValue
+maxX
+maxY
+maximized
+mc
+mcJc
+mcPr
+mcs
+mdx
+mdxMetadata
+mdxSubqueries
+measure
+measureFilter
+measureGroup
+measureGroups
+measures
+med
+medAquamarine
+medBlue
+medOrchid
+medPurple
+medSeaGreen
+medSlateBlue
+medSpringGreen
+medTurquoise
+medVioletRed
+media
+mediaAndTx
+mediacall
+medium
+mediumDashDot
+mediumDashDotDot
+mediumDashed
+mediumGray
+mediumKashida
+member
+memberName
+memberPropertyField
+memberValueDatatype
+members
+menu
+menuBar
+menuHighlight
+menuText
+merge
+mergeCell
+mergeCells
+mergeInterval
+mergeItem
+metadata
+metadataStrings
+metadataType
+metadataTypes
+metal
+meth
+method
+mid
+midCat
+midL
+midR
+middle
+middleDot
+midnightBlue
+millions
+min
+minAxisType
+minAng
+minDate
+minLength
+minMax
+minR
+minRId
+minRefreshableVersion
+minSubtotal
+minSupportedVersion
+minValue
+minVer
+minX
+minY
+minimized
+minimumVersion
+minor
+minorAscii
+minorBidi
+minorEastAsia
+minorFont
+minorGridlines
+minorHAnsi
+minorTickMark
+minorTimeUnit
+minorUnit
+mintCream
+minus
+minusx
+minusy
+minute
+minutes
+mirrorIndents
+mirrorMargins
+missingCaption
+missingItemsLimit
+mistyRose
+miter
+miterlimit
+moccasin
+mod
+modId
+modelId
+modern
+modified
+modifyVerifier
+mongolianVert
+monospace
+month
+monthLong
+monthShort
+months
+moon
+moons
+morning
+morph
+mosaic
+moveFrom
+moveFromRangeEnd
+moveFromRangeStart
+moveTo
+moveToRangeEnd
+moveToRangeStart
+moveWith
+moveWithCells
+movie
+movingAvg
+mp
+mpFld
+mpMap
+mps
+mr
+mruColors
+ms
+mult
+multiLevelType
+multiLine
+multiLvlStrCache
+multiLvlStrRef
+multilevel
+multipleFieldFilters
+multipleItemSelectionAllowed
+musicNotes
+mute
+mwSmallCaps
+n
+na
+name
+nameLen
+namespaceUri
+namespaceuri
+narHorz
+narVert
+narrow
+nary
+naryLim
+naryPr
+native
+navajoWhite
+navy
+nc
+nd
+ndxf
+neCell
+negative
+negativeBarColorSameAsPositive
+negativeFillColor
+negativeInteger
+neq
+never
+new
+newDocument
+newLength
+newName
+newPage
+newSection
+newsflash
+next
+nextAc
+nextClick
+nextColumn
+nextCondLst
+nextId
+nextMonth
+nextPage
+nextQuarter
+nextTo
+nextWeek
+nextYear
+nf
+nil
+nlCheck
+noAdjustHandles
+noArr
+noAutofit
+noBar
+noBorder
+noBreak
+noBreakHyphen
+noChangeArrowheads
+noChangeAspect
+noChangeShapeType
+noColumnBalance
+noControl
+noConversion
+noCrop
+noDrilldown
+noEditPoints
+noEndCap
+noEndnote
+noExtraLineSpacing
+noFill
+noGrp
+noHBand
+noIndicator
+noLabel
+noLeading
+noLineBreaksAfter
+noLineBreaksBefore
+noMove
+noMultiLvlLbl
+noProof
+noPunctuationKerning
+noResize
+noResizeAllowed
+noRot
+noSelect
+noSmoking
+noSpaceRaiseLower
+noStrike
+noTabHangInd
+noTextEdit
+noUngrp
+noVBand
+noWrap
+node
+nodeHorzAlign
+nodePh
+nodeType
+nodeVertAlign
+nonAsst
+nonAutoSortDefault
+nonIsoscelesTrapezoid
+nonNegativeInteger
+nonNorm
+nonPositiveInteger
+none
+nor
+norm
+normAutofit
+normal
+normalViewPr
+normalizeH
+normalizedString
+northwest
+notBeside
+notBetween
+notContains
+notContainsBlanks
+notContainsErrors
+notContainsText
+notEqual
+notFirstPage
+notSpecified
+notTrueType
+notchedRightArrow
+notes
+notesMaster
+notesMasterId
+notesMasterIdLst
+notesMasterView
+notesStyle
+notesSz
+notesTextViewPr
+notesView
+notesViewPr
+nothing
+np
+ns
+nsid
+null
+num
+numCache
+numCol
+numFmt
+numFmtId
+numFmts
+numForm
+numId
+numIdMacAtCleanup
+numLit
+numPicBullet
+numPicBulletId
+numPr
+numRef
+numRestart
+numSld
+numSpacing
+numStart
+numStyleLink
+numTab
+number
+numberInDash
+numberOfShades
+numberStoredAsText
+numbering
+numberingChange
+nvCxnSpPr
+nvGraphicFramePr
+nvGrpSpPr
+nvPicPr
+nvPr
+nvSpPr
+nwCell
+o
+oMath
+oMathPara
+oMathParaPr
+obj
+objAndTwoObj
+objAndTx
+objDist
+objOnly
+objOverTx
+objTx
+object
+objectDefaults
+objectType
+objects
+obliqueBottom
+obliqueBottomLeft
+obliqueBottomRight
+obliqueLeft
+obliqueRight
+obliqueTop
+obliqueTopLeft
+obliqueTopRight
+oblob
+obscured
+oc
+octagon
+ocx
+ocxPr
+odbc
+odcFile
+oddFooter
+oddHBand
+oddHeader
+oddPage
+oddVBand
+odso
+odxf
+ofPieChart
+ofPieType
+off
+offset
+offset2
+offsetFrom
+olapFunctions
+olapPr
+old
+oldComment
+oldCustomMenu
+oldDescription
+oldFormula
+oldFunction
+oldFunctionGroupId
+oldHelp
+oldHidden
+oldLace
+oldLength
+oldName
+oldPh
+oldQuotePrefix
+oldShortcutKey
+oldStatusBar
+ole
+oleChartEl
+oleItem
+oleItems
+oleLink
+oleObj
+oleObject
+oleObjects
+oleSize
+oleUpdate
+oleicon
+oleid
+olive
+oliveDrab
+on
+onBegin
+onClick
+onDblClick
+onEnd
+onMouseOut
+onMouseOver
+onNext
+onPrev
+onStopAudio
+one
+oneCell
+oneCellAnchor
+oneField
+oned
+onlySync
+onlyUseConnectionFile
+op
+opEmu
+opacity
+opacity2
+open
+openDmnd
+operator
+optimizeForBrowser
+optimizeMemory
+orange
+orangeRed
+orchid
+order
+ordinal
+ordinalText
+orgChart
+organizeInFolders
+orgchart
+orient
+orientation
+orientationangle
+origin
+original
+orthographicFront
+ostorage
+ostream
+other
+otherStyle
+out
+outByRing
+outEnd
+outer
+outerShdw
+outline
+outline1pPr
+outline2pPr
+outlineData
+outlineLevel
+outlineLevelCol
+outlineLevelRow
+outlineLvl
+outlinePr
+outlineSymbols
+outlineView
+outlineViewPr
+outset
+outside
+outsideMargin
+oval
+ovals
+over
+overThenDown
+overflow
+overflowPunct
+overhead
+overlap
+overlay
+override
+overrideClrMapping
+overwriteClear
+owners
+p
+p14
+p15
+pBdr
+pLen
+pPos
+pPr
+pPrChange
+pPrDefault
+pRg
+pStyle
+packages
+page
+pageBottom
+pageBreakBefore
+pageBreakPreview
+pageField
+pageFieldLabels
+pageFieldValues
+pageFields
+pageItem
+pageLayout
+pageMargins
+pageOrder
+pageOverThenDown
+pageSetUpPr
+pageSetup
+pageStyle
+pageWrap
+pages
+paleGoldenrod
+paleGreen
+paleTurquoise
+paleVioletRed
+palmsBlack
+palmsColor
+pan
+pane
+panose
+panose1
+papayaWhip
+paperClips
+paperHeight
+paperSize
+paperSrc
+paperUnits
+paperWidth
+papyrus
+par
+parOf
+parTrans
+parTransId
+parTxLTRAlign
+parTxRTLAlign
+paraId
+paragraph
+parallel
+parallelogram
+param
+parameter
+parameterType
+parameters
+parent
+parentSet
+parsePre
+partyFavor
+partyGlass
+password
+pasteAll
+pasteBorders
+pasteColWidths
+pasteComments
+pasteDataValidation
+pasteFormats
+pasteFormulas
+pasteNumberFormats
+pasteValues
+path
+pathEditMode
+pathLst
+pattFill
+pattern
+patternFill
+patternType
+pct
+pct10
+pct12
+pct15
+pct20
+pct25
+pct30
+pct35
+pct37
+pct40
+pct45
+pct5
+pct50
+pct55
+pct60
+pct62
+pct65
+pct70
+pct75
+pct80
+pct85
+pct87
+pct90
+pct95
+pctHeight
+pctPosHOffset
+pctPosVOffset
+pctWidth
+peachPuff
+penClr
+pencilSize
+pencils
+pentagon
+people
+peopleHats
+peopleWaving
+percent
+percentDiff
+percentOfCol
+percentOfRow
+percentOfTotal
+percentStacked
+percentage
+percentile
+period
+permEnd
+permStart
+persistPropertyBag
+persistStorage
+persistStream
+persistStreamInit
+persistence
+personal
+personalCompose
+personalReply
+personalView
+perspective
+perspectiveAbove
+perspectiveAboveLeftFacing
+perspectiveAboveRightFacing
+perspectiveBelow
+perspectiveContrastingLeftFacing
+perspectiveContrastingRightFacing
+perspectiveFront
+perspectiveHeroicExtremeLeftFacing
+perspectiveHeroicExtremeRightFacing
+perspectiveHeroicLeftFacing
+perspectiveHeroicRightFacing
+perspectiveLeft
+perspectiveRelaxed
+perspectiveRelaxedModerately
+perspectiveRight
+peru
+pg
+pgBorders
+pgMar
+pgNum
+pgNumB
+pgNumMargins
+pgNumT
+pgNumType
+pgSz
+ph
+phClr
+phant
+phantPr
+phldr
+phldrT
+phonetic
+phoneticPr
+photoAlbum
+pic
+picLocks
+picTx
+pict
+picture
+pictureFormat
+pictureOptions
+pictureStackUnit
+pid
+pie
+pie3DChart
+pieChart
+pieWedge
+pinYin
+pink
+pitch
+pitchFamily
+pivot
+pivotArea
+pivotAreas
+pivotButton
+pivotCache
+pivotCacheDefinition
+pivotCacheRecords
+pivotCaches
+pivotField
+pivotFields
+pivotFmt
+pivotFmts
+pivotHierarchies
+pivotHierarchy
+pivotSelection
+pivotSource
+pivotTable
+pivotTableDefinition
+pivotTableStyle
+pivotTableStyleInfo
+pivotTables
+pixelsPerInch
+placeholder
+placeholders
+plaid
+plane
+plaque
+plaqueTabs
+plastic
+plcHide
+plotArea
+plotVisOnly
+plum
+plus
+poinsettias
+points
+polar
+poly
+polyline
+portrait
+pos
+posEven
+posOdd
+posOffset
+position
+positionH
+positionV
+positiveInteger
+post
+postSp
+postageStamp
+powder
+powderBlue
+power
+prLst
+prSet
+preSp
+preced
+precedSib
+preferPic
+preferRelativeResize
+preferSingleView
+preferrelative
+prefixMappings
+pres
+presAssocID
+presId
+presLayoutVars
+presName
+presOf
+presParOf
+presStyleCnt
+presStyleIdx
+presStyleLbl
+present
+presentation
+presentationAccent
+presentationPr
+presentationText
+preserve
+preserveFormatting
+preserveHistory
+preserveSortFilterLayout
+presetClass
+presetID
+presetSubtype
+pressure
+prev
+prevAc
+prevCondLst
+previousCol
+previousRow
+pri
+primFontSz
+print
+printArea
+printBodyTextBeforeHeader
+printColBlack
+printDrill
+printFormsData
+printFractionalCharacterWidth
+printOptions
+printPostScriptOverText
+printSettings
+printTwoOnOne
+printer
+printerSettings
+priority
+prism
+prnPr
+prnWhat
+product
+productSubtotal
+progId
+progress
+prompt
+promptTitle
+promptedSolutions
+proofErr
+proofState
+property
+propertyName
+props3d
+prot
+protected
+protectedRange
+protectedRanges
+protection
+provid
+proxy
+prst
+prstClr
+prstDash
+prstGeom
+prstMaterial
+prstShdw
+prstTrans
+prstTxWarp
+pt
+ptCount
+ptInCategory
+ptInSeries
+ptLst
+ptType
+ptab
+ptsTypes
+pubBrowser
+publishItems
+publishToServer
+published
+pull
+pumpkin1
+purple
+push
+pushPinNote1
+pushPinNote2
+pyra
+pyraAcctBkgdNode
+pyraAcctPos
+pyraAcctRatio
+pyraAcctTxMar
+pyraAcctTxNode
+pyraLvlNode
+pyramid
+pyramidToMax
+pyramids
+pyramidsAbove
+qFormat
+qs
+qsCatId
+qsTypeId
+quadArrow
+quadArrowCallout
+quadBezTo
+quadrants
+qualifier
+quarter
+quarters
+query
+queryCache
+queryFailed
+queryTable
+queryTableDeletedFields
+queryTableField
+queryTableFieldId
+queryTableFields
+queryTableRefresh
+quickTimeFile
+quotePrefix
+r
+r1
+r2
+r4
+r8
+rAng
+rAngAx
+rB
+rCtr
+rCtrCh
+rCtrDes
+rFont
+rFonts
+rId
+rIns
+rMarg
+rMargin
+rOff
+rPh
+rPr
+rPrChange
+rPrDefault
+rSp
+rSpRule
+rStyle
+rT
+ra
+rad
+radPr
+radarChart
+radarStyle
+radial
+radiusrange
+raf
+random
+randomBar
+range
+rangePr
+rangeSet
+rangeSets
+rank
+rankBy
+rc
+rcc
+rcft
+rcmt
+rctx
+rcv
+rd
+rdn
+readModeInkLockDown
+readOnly
+readOnlyRecommended
+readingOrder
+realTimeData
+recipientData
+recipients
+recolor
+recolortarget
+recommended
+reconnectionMethod
+recordCount
+rect
+red
+redMod
+redOff
+ref
+ref3D
+refError
+refFor
+refForName
+refMode
+refPtType
+refType
+reference
+references
+refersTo
+reflection
+refreshAllConnections
+refreshError
+refreshOnChange
+refreshOnLoad
+refreshedBy
+refreshedDate
+refreshedVersion
+regroupid
+regrouptable
+regular
+rel
+relId
+relIds
+relOff
+relSizeAnchor
+relation
+relationtable
+relative
+relativeFrom
+relativeHeight
+relativeIndent
+relativeTo
+relaxedInset
+relid
+relyOnVML
+relyOnVml
+remove
+removeDataOnSave
+removeDateAndTime
+removePersonalInfoOnSave
+removePersonalInformation
+render
+repairLoad
+repeat
+repeatCount
+repeatDur
+repl
+resId
+reservationPassword
+resizeGraphics
+resizeHandles
+rest
+restart
+restored
+restoredLeft
+restoredTop
+result
+rev
+revDir
+revPos
+reveal
+reverse
+reverseDiagStripe
+reviewed
+reviewedList
+revision
+revisionId
+revisionView
+revisions
+revisionsPassword
+rfmt
+rgb
+rgbColor
+ribbon
+ribbon2
+riblet
+rich
+richText
+rig
+right
+rightArrow
+rightArrowCallout
+rightBrace
+rightBracket
+rightChars
+rightFromText
+rightMargin
+rightToLeft
+rightVertical
+rings
+ripple
+ris
+rm
+rnd
+roman
+romanLcParenBoth
+romanLcParenR
+romanLcPeriod
+romanUcParenBoth
+romanUcParenR
+romanUcPeriod
+root
+rosyBrown
+rot
+rotPath
+rotWithShape
+rotX
+rotY
+rotate
+rotation
+rotationangle
+rotationcenter
+round
+round1Rect
+round2DiagRect
+round2SameRect
+roundRect
+roundedCorners
+roundrect
+row
+rowBreaks
+rowColShift
+rowDrillCount
+rowFields
+rowGrandTotals
+rowHeaderCaption
+rowHidden
+rowHierarchiesUsage
+rowHierarchyUsage
+rowItems
+rowNumbers
+rowOff
+rowPageCount
+rowSpan
+rows
+royalBlue
+rqt
+rrc
+rsaAES
+rsaFull
+rsid
+rsidDel
+rsidP
+rsidR
+rsidRDefault
+rsidRPr
+rsidRoot
+rsidSect
+rsidTr
+rsids
+rsnm
+rt
+rtShortDist
+rtTriangle
+rtf
+rtl
+rtlCol
+rtlGutter
+rtn
+ru
+ruby
+rubyAlign
+rubyBase
+rubyPr
+rule
+ruleLst
+rules
+runTotal
+rupBuild
+russianLower
+russianUpper
+s
+sId
+sPre
+sPrePr
+sSub
+sSubPr
+sSubSup
+sSubSupPr
+sSup
+sSupPr
+saddleBrown
+safari
+saka
+salmon
+salt
+saltData
+saltValue
+sameClick
+sameDir
+sampData
+sandyBrown
+sans-serif
+sat
+satMod
+satOff
+saturation
+saveData
+saveExternalLinkValues
+saveFormsData
+saveInvalidXml
+savePassword
+savePreviewPicture
+saveSmartTagsAsXml
+saveSubsetFonts
+saveThroughXslt
+saveXmlDataOnly
+sawtooth
+sawtoothGray
+sb
+scale
+scaleToFitPaper
+scaleWithDoc
+scaled
+scaling
+scaredCat
+scatterChart
+scatterStyle
+scenario
+scenarios
+scene3d
+schema
+schemaLibrary
+schemaLocation
+schemaRef
+schemaRefs
+scheme
+schemeClr
+scope
+scr
+screen
+screen16x10
+screen16x9
+screen4x3
+scrgbClr
+script
+scrollBar
+scrollbar
+sd
+sdt
+sdtContent
+sdtContentLocked
+sdtEndContent
+sdtEndPr
+sdtLocked
+sdtPr
+seCell
+seaGreen
+seaShell
+seattle
+secChAlign
+secFontSz
+secHead
+secLinDir
+secSibSp
+second
+secondColumnStripe
+secondColumnSubheading
+secondPiePt
+secondPieSize
+secondRowStripe
+secondRowSubheading
+secondSubtotalColumn
+secondSubtotalRow
+seconds
+sectEnd
+sectPr
+sectPrChange
+securityDescriptor
+seek
+segments
+selectFldWithFirstOrLastChar
+selectLockedCells
+selectUnlockedCells
+selected
+selection
+self
+semiHidden
+semicolon
+sendLocale
+sep
+sepChr
+separate
+separator
+seq
+ser
+serAx
+serLines
+series
+seriesEl
+seriesIdx
+serverCommand
+serverField
+serverFill
+serverFont
+serverFontColor
+serverFormat
+serverFormats
+serverNumberFormat
+serverSldId
+serverSldModifiedTime
+serverZoom
+set
+setDefinition
+sets
+settings
+shade
+shadeToTitle
+shadow
+shadowcolor
+shadowedSquares
+shadowok
+shape
+shapeDefaults
+shapeId
+shapeLayoutLikeWW8
+shapedefaults
+shapeid
+shapelayout
+shapetype
+shared
+sharedItems
+sharksTeeth
+sharpenSoften
+shd
+shdw1
+shdw10
+shdw11
+shdw12
+shdw13
+shdw14
+shdw15
+shdw16
+shdw17
+shdw18
+shdw19
+shdw2
+shdw20
+shdw3
+shdw4
+shdw5
+shdw6
+shdw7
+shdw8
+shdw9
+sheet
+sheetCalcPr
+sheetData
+sheetDataSet
+sheetFormatPr
+sheetId
+sheetIdMap
+sheetName
+sheetNames
+sheetPosition
+sheetPr
+sheetProtection
+sheetView
+sheetViews
+sheets
+shimmer
+shingle
+shininess
+shorebirdTracks
+short
+shortcutKey
+shortdash
+shortdashdot
+shortdashdotdot
+shortdot
+show
+showAll
+showAnimation
+showAsCaption
+showAsIcon
+showAutoFilter
+showBorderUnselectedTables
+showBreaksInFrames
+showBubbleSize
+showButton
+showCalcMbrs
+showCaptions
+showCatName
+showCell
+showColHeaders
+showColStripes
+showColumnStripes
+showComments
+showDLblsOverMax
+showDataAs
+showDataDropDown
+showDataLabelsRange
+showDataTips
+showDrill
+showDropDown
+showDropDowns
+showDropZones
+showEmptyCol
+showEmptyRow
+showEnvelope
+showError
+showErrorMessage
+showFirstColumn
+showFormatting
+showFormulaBar
+showFormulas
+showGridLines
+showGuides
+showHeader
+showHeaders
+showHorizontalScroll
+showHorzBorder
+showInFieldList
+showInkAnnotation
+showInputMessage
+showItems
+showKeys
+showLastColumn
+showLeaderLines
+showLegendKey
+showMasterPhAnim
+showMasterSp
+showMemberPropertyTips
+showMissing
+showMultipleLabel
+showNarration
+showNegBubbles
+showObjects
+showOutline
+showOutlineIcons
+showOutlineSymbols
+showPageBreaks
+showPercent
+showPivotChartFilter
+showPr
+showPropAsCaption
+showPropCell
+showPropTip
+showRowCol
+showRowColHeaders
+showRowHeaders
+showRowStripes
+showRuler
+showScrollbar
+showSerName
+showSheetTabs
+showSpeakerNotes
+showSpecialPlsOnTitleSld
+showStatusbar
+showTip
+showVal
+showValue
+showVertBorder
+showVerticalScroll
+showWhenStopped
+showWhiteSpace
+showXMLTags
+showZeros
+showingPlcHdr
+showsigndate
+shp
+shpTxLTRAlignCh
+shpTxRTLAlignCh
+shred
+shrinkToFit
+si
+sib
+sibSp
+sibTrans
+sibTransId
+side
+sideWall
+sienna
+sig
+sigma
+signatureline
+signinginstructions
+signinginstructionsset
+sigprovurl
+silver
+simplePos
+single
+singleAccounting
+singleLevel
+singleQuote
+singleSignOnId
+singleXmlCell
+singleXmlCells
+singleclick
+size
+sizeAuto
+sizeRelH
+sizeRelV
+sizeRepresents
+sizeWithCells
+skew
+skewamt
+skewangle
+skip
+skipTimed
+skw
+skyBlue
+skyrocket
+slantDashDot
+slateBlue
+slateGray
+sld
+sldAll
+sldId
+sldIdLst
+sldImg
+sldLayout
+sldLayoutId
+sldLayoutIdLst
+sldLst
+sldMaster
+sldMasterId
+sldMasterIdLst
+sldMasterView
+sldNum
+sldRg
+sldSorterView
+sldSyncPr
+sldSz
+sldTgt
+sldThumbnailView
+sldView
+slideViewPr
+slides
+slope
+slow
+sm
+smCheck
+smConfetti
+smGrid
+small
+smallCaps
+smallFrac
+smartTag
+smartTagPr
+smartTagType
+smartTagTypes
+smartTags
+smileyFace
+smooth
+smoothMarker
+smoothness
+smtClean
+smtId
+snake
+snapToChars
+snapToGrid
+snapToObjects
+snapVertSplitter
+snd
+sndAc
+sndTgt
+sng
+sngStrike
+snip1Rect
+snip2DiagRect
+snip2SameRect
+snipRoundRect
+snow
+snowflakeFancy
+snowflakes
+soft
+softEdge
+softHyphen
+softRound
+softmetal
+solid
+solidDmnd
+solidFill
+solutionID
+solveOrder
+sombrero
+sort
+sortBy
+sortByTuple
+sortCondition
+sortMethod
+sortState
+sortType
+sorterViewPr
+source
+sourceData
+sourceFile
+sourceFileName
+sourceLinked
+sourceObject
+sourceRef
+sourceSheetId
+sourceType
+southwest
+sp
+sp3d
+spAutoFit
+spDef
+spLocks
+spPr
+spTgt
+spTree
+space
+spaceForUL
+spacing
+spacingInWholePoints
+span
+spanAng
+spans
+sparkle
+sparklineGroups
+sparklineGroup
+sparklines
+sparkline
+spc
+spcAft
+spcBef
+spcCol
+spcFirstLastPara
+spcPct
+spcPts
+spd
+specVanish
+specularity
+spellEnd
+spellStart
+speller
+spelling
+sphere
+spid
+spidmax
+spinCount
+split
+splitAll
+splitFirst
+splitPgBreakAndParaMark
+splitPos
+splitType
+spokes
+spreadsheet
+springGreen
+spt
+sq
+sqlType
+sqref
+square
+squareTabs
+src
+srcId
+srcNode
+srcOrd
+srcRect
+srgbClr
+ss
+ssd16
+ssd2
+ssd32
+ssd4
+ssd6
+ssd8
+sst
+st
+stA
+stAng
+stBulletLvl
+stCondLst
+stCxn
+stElem
+stPos
+stSnd
+stack
+stackScale
+stacked
+standard
+star
+star10
+star12
+star16
+star24
+star32
+star4
+star5
+star6
+star7
+star8
+stars
+stars3d
+starsBlack
+starsShadowed
+starsTop
+start
+startAngle
+startAt
+startChars
+startDate
+startNum
+startOverride
+startarrow
+startarrowlength
+startarrowwidth
+state
+status
+statusBar
+statusText
+std
+stdDev
+stdDevP
+stdDevPSubtotal
+stdDevSubtotal
+stdDevp
+stdErr
+stealth
+steelBlue
+stemThick
+step
+stockChart
+stop
+stopIfTrue
+storage
+storeItemID
+storeMappedDataAs
+stored
+stp
+str
+strCache
+strLit
+strRef
+strVal
+stra
+straight
+straightConnector1
+stream
+stretch
+strictFirstAndLastChars
+strike
+strikeBLTR
+strikeH
+strikeTLBR
+strikeV
+string
+stringRefSyntax
+stringValue1
+stringValue2
+stripedRightArrow
+strips
+stroke
+strokecolor
+stroked
+strokeok
+strokeweight
+sty
+style
+styleData
+styleDef
+styleDefHdr
+styleDefHdrLst
+styleId
+styleLbl
+styleLink
+styleLockQFSet
+styleLockTheme
+styleName
+stylePaneFormatFilter
+stylePaneSortMethod
+styleSet
+styleSheet
+styles
+stylisticSets
+sub
+subDoc
+subFontBySize
+subHide
+subSp
+subSup
+subTitle
+subTnLst
+subject
+subscript
+subsetted
+subtotal
+subtotalCaption
+subtotalHiddenItems
+subtotalTop
+suff
+suggestedsigner
+suggestedsigner2
+suggestedsigneremail
+sum
+sumSubtotal
+summaryBelow
+summaryLength
+summaryRight
+sun
+sunrise
+sunset
+sup
+supHide
+superscript
+supportAdvancedDrill
+supportSubquery
+suppressAutoHyphens
+suppressBottomSpacing
+suppressLineNumbers
+suppressOverlap
+suppressSpBfAfterPgBrk
+suppressSpacingAtTopOfPage
+suppressTopSpacing
+suppressTopSpacingWP
+surface3DChart
+surfaceChart
+swAng
+swCell
+swapBordersFacingPages
+swirligig
+swiss
+switch
+swooshArrow
+sx
+sy
+sym
+symbol
+syncBehavior
+syncHorizontal
+syncRef
+syncVertical
+sysClr
+sysDash
+sysDashDot
+sysDashDotDot
+sysDot
+sz
+szCs
+t
+t1
+t2
+tCtr
+tCtrCh
+tCtrDes
+tIns
+tL
+tMarg
+tOff
+tR
+tab
+tabColor
+tabLst
+tabRatio
+tabSelected
+table
+tableBorderDxfId
+tableCellDelete
+tableCellInsert
+tableColumn
+tableColumnId
+tableColumns
+tablePart
+tableParts
+tableRowDelete
+tableRowInsert
+tableStyle
+tableStyleElement
+tableStyleId
+tableStyleInfo
+tableStyles
+tableType
+tablelimits
+tableproperties
+tables
+tabs
+tag
+tagLst
+tags
+tailEnd
+taiwan
+taiwaneseCounting
+taiwaneseCountingThousand
+taiwaneseDigital
+tan
+target
+targetScreenSize
+targetScreenSz
+targetscreensize
+tav
+tavLst
+tbLrV
+tbRl
+tbRlV
+tbl
+tblBg
+tblBorders
+tblCaption
+tblCellMar
+tblCellSpacing
+tblDescription
+tblGrid
+tblGridChange
+tblHeader
+tblInd
+tblLayout
+tblLook
+tblOfContents
+tblOverlap
+tblPr
+tblPrChange
+tblPrEx
+tblPrExChange
+tblStyle
+tblStyleColBandSize
+tblStyleLst
+tblStylePr
+tblStyleRowBandSize
+tblW
+tblpPr
+tblpX
+tblpXSpec
+tblpY
+tblpYSpec
+tbls
+tc
+tcBdr
+tcBorders
+tcFitText
+tcMar
+tcPr
+tcPrChange
+tcStyle
+tcTxStyle
+tcW
+teal
+teardrop
+temporary
+tenMillions
+tenThousands
+tentative
+text
+text1
+text2
+textAlignment
+textAndBackground
+textArchDown
+textArchDownPour
+textArchUp
+textArchUpPour
+textButton
+textButtonPour
+textCanDown
+textCanUp
+textCascadeDown
+textCascadeUp
+textChevron
+textChevronInverted
+textCircle
+textCirclePour
+textCurveDown
+textCurveUp
+textDates
+textDeflate
+textDeflateBottom
+textDeflateInflate
+textDeflateInflateDeflate
+textDeflateTop
+textDirection
+textDoubleWave1
+textFadeDown
+textFadeLeft
+textFadeRight
+textFadeUp
+textField
+textFields
+textFile
+textFill
+textFit
+textHAlign
+textInflate
+textInflateBottom
+textInflateTop
+textInput
+textLength
+textNoShape
+textOutline
+textPlain
+textPr
+textRingInside
+textRingOutside
+textRotation
+textSlantDown
+textSlantUp
+textStop
+textTriangle
+textTriangleInverted
+textVAlign
+textWave1
+textWave2
+textWave4
+textWrapping
+textborder
+textbox
+textboxTightWrap
+textboxrect
+textdata
+textlink
+textpath
+textpathok
+tgtEl
+tgtFrame
+thai
+thaiAlphaParenBoth
+thaiAlphaParenR
+thaiAlphaPeriod
+thaiCounting
+thaiDist
+thaiDistribute
+thaiLetters
+thaiNumParenBoth
+thaiNumParenR
+thaiNumPeriod
+thaiNumbers
+theme
+themeColor
+themeElements
+themeFill
+themeFillShade
+themeFillTint
+themeFontLang
+themeManager
+themeOverride
+themeShade
+themeTint
+thick
+thickBetweenThin
+thickBetweenThinLarge
+thickBetweenThinSmall
+thickBot
+thickBottom
+thickThin
+thickThinLarge
+thickThinLargeGap
+thickThinMediumGap
+thickThinSmall
+thickThinSmallGap
+thickTop
+thicket
+thickness
+thin
+thinDiagCross
+thinDiagStripe
+thinHorzCross
+thinHorzStripe
+thinReverseDiagStripe
+thinThick
+thinThickLarge
+thinThickLargeGap
+thinThickMediumGap
+thinThickSmall
+thinThickSmallGap
+thinThickThinLargeGap
+thinThickThinMediumGap
+thinThickThinSmallGap
+thinThin
+thinVertStripe
+thirdColumnSubheading
+thirdRowSubheading
+thirdSubtotalColumn
+thirdSubtotalRow
+thisMonth
+thisQuarter
+thisWeek
+thisYear
+thistle
+thousands
+threeDEmboss
+threeDEngrave
+threePt
+thresh
+through
+thruBlk
+tickLblPos
+tickLblSkip
+tickMarkSkip
+tight
+tile
+tileRect
+time
+timePeriod
+timing
+tint
+title
+titleOnly
+titlePg
+titleStyle
+tl
+tl2br
+tm
+tmAbs
+tmFilter
+tmPct
+tmRoot
+tmpl
+tmplLst
+tn
+tnLst
+to
+today
+token
+tomato
+tomorrow
+toolbar
+tooltip
+top
+top10
+topAndBottom
+topAutoShow
+topFromText
+topLabels
+topLeft
+topLeftCell
+topLinePunct
+topMargin
+topRight
+tornPaper
+tornPaperBlack
+totalRow
+totalsRowBorderDxfId
+totalsRowCellStyle
+totalsRowCount
+totalsRowDxfId
+totalsRowFormula
+totalsRowFunction
+totalsRowLabel
+totalsRowShown
+tp
+tpl
+tplc
+tpls
+tr
+tr2bl
+trHeight
+trPr
+trPrChange
+track
+trackRevisions
+trackedChanges
+trans
+transition
+transitionEntry
+transitionEvaluation
+translucentPowder
+transp
+trapezoid
+tree
+trees
+trellis
+trend
+trendline
+trendlineLbl
+trendlineType
+tri
+triangle
+triangleParty
+triangles
+tribal1
+tribal2
+tribal3
+tribal4
+tribal5
+tribal6
+trillions
+trim
+triple
+true
+truncateFontHeightsLikeWP6
+tupleCache
+turquoise
+twistedLines1
+twistedLines2
+twoCell
+twoCellAnchor
+twoColTx
+twoDigitTextYear
+twoObj
+twoObjAndObj
+twoObjAndTx
+twoObjOverTx
+twoPt
+twoTxTwoObj
+tx
+tx1
+tx2
+txAnchorHorz
+txAnchorHorzCh
+txAnchorVert
+txAnchorVertCh
+txAndChart
+txAndClipArt
+txAndMedia
+txAndObj
+txAndTwoObj
+txBlDir
+txBody
+txBox
+txDef
+txDir
+txEffectClrLst
+txEl
+txFillClrLst
+txLinClrLst
+txOverObj
+txPr
+txSp
+txStyles
+txXfrm
+txbx
+txbxContent
+txtBox
+ty
+type
+typeAny
+typeface
+types
+u
+uBounds
+uFill
+uFillTx
+uLn
+uLnTx
+ua
+udl
+ui1
+ui2
+ui4
+ui8
+uiCompat97To2003
+uiExpand
+uiPriority
+uid
+uint
+ulTrailSpace
+un
+unbalanced
+unbalancedGroup
+unboundColumnsLeft
+unboundColumnsRight
+uncheckedState
+undOvr
+underDot
+underlineTabInNumList
+underscore
+undo
+undone
+undrawn
+ungrouping
+unhideWhenUsed
+uniqueCount
+uniqueId
+uniqueList
+uniqueMemberProperty
+uniqueName
+uniqueParent
+uniqueTag
+uniqueValues
+unknown
+unknownRelationship
+unlocked
+unlockedFormula
+unsignedByte
+unsignedInt
+unsignedLong
+unsignedShort
+up
+upArrow
+upArrowCallout
+upBars
+upDiag
+upDownArrow
+upDownArrowCallout
+upDownBars
+updateAutomatic
+updateFields
+updateLinks
+updatedVersion
+upgradeOnRefresh
+upperLetter
+upperRoman
+upr
+upright
+uri
+url
+usb0
+usb1
+usb2
+usb3
+useA
+useAltKinsokuLineBreakRules
+useAnsiKerningPairs
+useAutoFormatting
+useBgFill
+useDef
+useFELayout
+useFirstPageNumber
+useLongFilenames
+useNormalStyleForList
+usePrinterDefaults
+usePrinterMetrics
+useSingleBorderforContiguousCells
+useSpRect
+useTimings
+useWord2002TableStyleRules
+useWord97LineBreakRules
+useXSLTWhenSaving
+user
+userA
+userB
+userC
+userD
+userDrawn
+userE
+userF
+userG
+userH
+userI
+userInfo
+userInterface
+userJ
+userK
+userL
+userM
+userN
+userName
+userO
+userP
+userQ
+userR
+userS
+userSet
+userShapes
+userT
+userU
+userV
+userW
+userX
+userY
+userZ
+userdrawn
+userhidden
+users
+uturnArrow
+v
+v2
+v3
+v3v4
+v4
+vAlign
+vAnchor
+vMerge
+vMergeOrig
+vSpace
+vacatedStyle
+val
+valAx
+value
+valueBetween
+valueEqual
+valueGreaterThan
+valueGreaterThanOrEqual
+valueLessThan
+valueLessThanOrEqual
+valueMetadata
+valueNotBetween
+valueNotEqual
+valueType
+values
+vanish
+var
+varLst
+varP
+varPSubtotal
+varScale
+varSubtotal
+variable
+variant
+varp
+varyColors
+vbProcedure
+vc
+vector
+vendorID
+venn
+verb
+version
+vert
+vert270
+vertAlign
+vertAnchor
+vertBarState
+vertCompress
+vertJc
+vertOverflow
+vertStripe
+vertTitleAndTx
+vertTitleAndTxOverChart
+vertTx
+vertical
+verticalCentered
+verticalDpi
+verticalScroll
+verticies
+veryHidden
+video
+videoFile
+vietnameseCounting
+view
+view3D
+viewMergedData
+viewPr
+viewpoint
+viewpointorigin
+vine
+violet
+visibility
+visible
+visualTotals
+vm
+vml
+vocabulary
+vol
+volType
+volTypes
+vortex
+vstream
+vt
+w
+w10
+w14
+w15
+wAfter
+wArH
+wBefore
+wMode
+wOff
+wR
+warmMatte
+warning
+warp
+watermarks
+wavAudioFile
+wave
+waveline
+wavy
+wavyDbl
+wavyDouble
+wavyHeavy
+wd
+wd10
+wd12
+wd2
+wd3
+wd32
+wd4
+wd5
+wd6
+wd8
+wdDnDiag
+wdUpDiag
+weave
+weavingAngles
+weavingBraid
+weavingRibbon
+weavingStrips
+web
+webHidden
+webPr
+webPublishItem
+webPublishItems
+webPublishObject
+webPublishObjects
+webPublishing
+webSettings
+wedge
+wedgeEllipseCallout
+wedgeRectCallout
+wedgeRoundRectCallout
+weight
+wgp
+wheat
+wheel
+wheelReverse
+whenNotActive
+white
+whiteFlowers
+whiteSmoke
+whiteTextOnBlack
+whole
+wholeTable
+wholeTbl
+wide
+widowControl
+width
+win
+window
+windowFrame
+windowHeight
+windowProtection
+windowText
+windowWidth
+wipe
+wireFrame
+wireframe
+withEffect
+withGroup
+woodwork
+wordArtVert
+wordArtVertRtl
+wordWrap
+words
+workbook
+workbookParameter
+workbookPassword
+workbookPr
+workbookProtection
+workbookView
+workbookViewId
+worksheet
+worksheetSource
+wp
+wp14
+wpJustification
+wpSpaceWidth
+wpg
+wps
+wrap
+wrapIndent
+wrapNone
+wrapPolygon
+wrapRight
+wrapSquare
+wrapText
+wrapThrough
+wrapTight
+wrapTopAndBottom
+wrapTrailSpaces
+wrapcoords
+writeProtection
+wsDr
+wsp
+x
+x12ac
+x14
+xAlign
+xIllusions
+xMode
+xSplit
+xVal
+xWindow
+xdr
+xf
+xfDxf
+xfId
+xfrm
+xfrmType
+xl2000
+xl97
+xlm
+xm
+xml
+xmlBased
+xmlCellPr
+xmlColumnPr
+xmlDataType
+xmlPr
+xmlns
+xpath
+xr2
+xrange
+xsc
+xscale
+xsi
+xy
+y
+yAlign
+yMode
+ySplit
+yVal
+yWindow
+year
+yearLong
+yearShort
+yearToDate
+years
+yellow
+yellowGreen
+yesterday
+yrange
+z
+zOrder
+zOrderOff
+zanyTriangles
+zero
+zeroAsc
+zeroDesc
+zeroHeight
+zeroValues
+zeroWid
+zigZag
+zigZagStitch
+zoom
+zoomContents
+zoomScale
+zoomScaleNormal
+zoomScalePageLayoutView
+zoomScaleSheetLayoutView
+zoomToFit
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
new file mode 100644
index 000000000..081322a46
--- /dev/null
+++ b/oox/source/vml/vmldrawing.cxx
@@ -0,0 +1,346 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/vml/vmldrawing.hxx>
+
+#include <algorithm>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <osl/diagnose.h>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <oox/ole/axcontrol.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/gen.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+
+using ::oox::core::XmlFilterBase;
+
+namespace {
+
+/** Returns the textual representation of a numeric VML shape identifier. */
+OUString lclGetShapeId( sal_Int32 nShapeId )
+{
+ // identifier consists of a literal NUL character, a lowercase 's', and the id
+ static constexpr OUStringLiteral aStr = u"\0s";
+ return aStr + OUString::number( nShapeId );
+}
+
+/** Returns the numeric VML shape identifier from its textual representation. */
+sal_Int32 lclGetShapeId( const OUString& rShapeId )
+{
+ // identifier consists of a literal NUL character, a lowercase 's', and the id
+ return ((rShapeId.getLength() >= 3) && (rShapeId[ 0 ] == '\0') && (rShapeId[ 1 ] == 's')) ? o3tl::toInt32(rShapeId.subView( 2 )) : -1;
+}
+
+} // namespace
+
+OleObjectInfo::OleObjectInfo( bool bDmlShape ) :
+ mbAutoLoad( false ),
+ mbDmlShape( bDmlShape )
+{
+}
+
+void OleObjectInfo::setShapeId( sal_Int32 nShapeId )
+{
+ maShapeId = lclGetShapeId( nShapeId );
+}
+
+ControlInfo::ControlInfo()
+ : mbTextContentShape(false)
+{
+}
+
+void ControlInfo::setShapeId( sal_Int32 nShapeId )
+{
+ maShapeId = lclGetShapeId(nShapeId);
+}
+
+Drawing::Drawing( XmlFilterBase& rFilter, const Reference< XDrawPage >& rxDrawPage, DrawingType eType ) :
+ mrFilter( rFilter ),
+ mxDrawPage( rxDrawPage ),
+ mxShapes( new ShapeContainer( *this ) ),
+ meType( eType )
+{
+ OSL_ENSURE( mxDrawPage.is(), "Drawing::Drawing - missing UNO draw page" );
+}
+
+Drawing::~Drawing()
+{
+}
+
+::oox::ole::EmbeddedForm& Drawing::getControlForm() const
+{
+ if (!mxCtrlForm)
+ mxCtrlForm.reset( new ::oox::ole::EmbeddedForm(
+ mrFilter.getModel(), mxDrawPage, mrFilter.getGraphicHelper() ) );
+ return *mxCtrlForm;
+}
+
+void Drawing::registerBlockId( sal_Int32 nBlockId )
+{
+ OSL_ENSURE( nBlockId > 0, "Drawing::registerBlockId - invalid block index" );
+ if( nBlockId > 0 )
+ {
+ // lower_bound() returns iterator pointing to element equal to nBlockId, if existing
+ BlockIdVector::iterator aIt = ::std::lower_bound( maBlockIds.begin(), maBlockIds.end(), nBlockId );
+ if( (aIt == maBlockIds.end()) || (nBlockId != *aIt) )
+ maBlockIds.insert( aIt, nBlockId );
+ }
+}
+
+void Drawing::registerOleObject( const OleObjectInfo& rOleObject )
+{
+ OSL_ENSURE( !rOleObject.maShapeId.isEmpty(), "Drawing::registerOleObject - missing OLE object shape id" );
+ OSL_ENSURE( maOleObjects.count( rOleObject.maShapeId ) == 0, "Drawing::registerOleObject - OLE object already registered" );
+ maOleObjects.emplace( rOleObject.maShapeId, rOleObject );
+}
+
+void Drawing::registerControl( const ControlInfo& rControl )
+{
+ OSL_ENSURE( !rControl.maShapeId.isEmpty(), "Drawing::registerControl - missing form control shape id" );
+ OSL_ENSURE( !rControl.maName.isEmpty(), "Drawing::registerControl - missing form control name" );
+ OSL_ENSURE( maControls.count( rControl.maShapeId ) == 0, "Drawing::registerControl - form control already registered" );
+ maControls.emplace( rControl.maShapeId, rControl );
+}
+
+void Drawing::finalizeFragmentImport()
+{
+ mxShapes->finalizeFragmentImport();
+}
+
+void Drawing::convertAndInsert() const
+{
+ Reference< XShapes > xShapes( mxDrawPage );
+ mxShapes->convertAndInsert( xShapes );
+
+ // Group together form control radio buttons that are in the same groupBox
+ std::map<OUString, tools::Rectangle> GroupBoxMap;
+ std::map<Reference< XPropertySet >, tools::Rectangle> RadioButtonMap;
+ for ( sal_Int32 i = 0; i < xShapes->getCount(); ++i )
+ {
+ try
+ {
+ Reference< XControlShape > xCtrlShape( xShapes->getByIndex(i), UNO_QUERY );
+ if (!xCtrlShape.is())
+ continue;
+ Reference< XControlModel > xCtrlModel( xCtrlShape->getControl(), UNO_SET_THROW );
+ Reference< XServiceInfo > xModelSI (xCtrlModel, UNO_QUERY_THROW );
+ Reference< XPropertySet > aProps( xCtrlModel, UNO_QUERY_THROW );
+
+ OUString sName;
+ aProps->getPropertyValue("Name") >>= sName;
+ const ::Point aPoint( xCtrlShape->getPosition().X, xCtrlShape->getPosition().Y );
+ const ::Size aSize( xCtrlShape->getSize().Width, xCtrlShape->getSize().Height );
+ const tools::Rectangle aRect( aPoint, aSize );
+ if ( !sName.isEmpty()
+ && xModelSI->supportsService("com.sun.star.awt.UnoControlGroupBoxModel") )
+ {
+ GroupBoxMap[sName] = aRect;
+ }
+ else if ( xModelSI->supportsService("com.sun.star.awt.UnoControlRadioButtonModel") )
+ {
+ OUString sGroupName;
+ aProps->getPropertyValue("GroupName") >>= sGroupName;
+ // only Form Controls are affected by Group Boxes - see drawingfragment.cxx
+ if ( sGroupName == "autoGroup_formControl" )
+ RadioButtonMap[aProps] = aRect;
+ }
+ }
+ catch (uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("oox.vml");
+ }
+ }
+ for ( const auto& BoxItr : GroupBoxMap )
+ {
+ const uno::Any aGroup( "autoGroup_" + BoxItr.first );
+ for ( auto RadioItr = RadioButtonMap.begin(); RadioItr != RadioButtonMap.end(); )
+ {
+ if ( BoxItr.second.Contains(RadioItr->second) )
+ {
+ RadioItr->first->setPropertyValue("GroupName", aGroup );
+ // If conflict, first created GroupBox wins
+ RadioItr = RadioButtonMap.erase(RadioItr);
+ }
+ else
+ ++RadioItr;
+ }
+ }
+
+}
+
+sal_Int32 Drawing::getLocalShapeIndex( const OUString& rShapeId ) const
+{
+ sal_Int32 nShapeId = lclGetShapeId( rShapeId );
+ if( nShapeId <= 0 ) return -1;
+
+ /* Shapes in a drawing are counted per registered shape identifier blocks
+ as stored in the o:idmap element. The contents of this element have
+ been stored in our member maBlockIds. Each block represents 1024 shape
+ identifiers, starting with identifier 1 for the block #0. This means,
+ block #0 represents the identifiers 1-1024, block #1 represents the
+ identifiers 1025-2048, and so on. The local shape index has to be
+ calculated according to all blocks registered for this drawing.
+
+ Example:
+ Registered for this drawing are blocks #1 and #3 (shape identifiers
+ 1025-2048 and 3073-4096).
+ Shape identifier 1025 -> local shape index 1.
+ Shape identifier 1026 -> local shape index 2.
+ ...
+ Shape identifier 2048 -> local shape index 1024.
+ Shape identifier 3073 -> local shape index 1025.
+ ...
+ Shape identifier 4096 -> local shape index 2048.
+ */
+
+ // get block id from shape id and find its index in the list of used blocks
+ sal_Int32 nBlockId = (nShapeId - 1) / 1024;
+ BlockIdVector::iterator aIt = ::std::lower_bound( maBlockIds.begin(), maBlockIds.end(), nBlockId );
+ sal_Int32 nIndex = static_cast< sal_Int32 >( aIt - maBlockIds.begin() );
+
+ // block id not found in set -> register it now (value of nIndex remains valid)
+ if( (aIt == maBlockIds.end()) || (*aIt != nBlockId) )
+ maBlockIds.insert( aIt, nBlockId );
+
+ // get one-based offset of shape id in its block
+ sal_Int32 nBlockOffset = (nShapeId - 1) % 1024 + 1;
+
+ // calculate the local shape index
+ return 1024 * nIndex + nBlockOffset;
+}
+
+const OleObjectInfo* Drawing::getOleObjectInfo( const OUString& rShapeId ) const
+{
+ return ContainerHelper::getMapElement( maOleObjects, rShapeId );
+}
+
+const ControlInfo* Drawing::getControlInfo( const OUString& rShapeId ) const
+{
+ return ContainerHelper::getMapElement( maControls, rShapeId );
+}
+
+Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService,
+ const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ OSL_ENSURE( !rService.isEmpty(), "Drawing::createAndInsertXShape - missing UNO shape service name" );
+ OSL_ENSURE( rxShapes.is(), "Drawing::createAndInsertXShape - missing XShapes container" );
+ Reference< XShape > xShape;
+ if( !rService.isEmpty() && rxShapes.is() ) try
+ {
+ Reference< XMultiServiceFactory > xModelFactory( mrFilter.getModelFactory(), UNO_SET_THROW );
+ xShape.set( xModelFactory->createInstance( rService ), UNO_QUERY_THROW );
+ if ( rService != "com.sun.star.text.TextFrame" )
+ {
+ // insert shape into passed shape collection (maybe drawpage or group shape)
+ rxShapes->add( xShape );
+ xShape->setPosition( awt::Point( rShapeRect.X, rShapeRect.Y ) );
+ }
+ else
+ {
+ Reference< XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( "HoriOrient", Any( HoriOrientation::NONE ) );
+ xPropSet->setPropertyValue( "VertOrient", Any( VertOrientation::NONE ) );
+ xPropSet->setPropertyValue( "HoriOrientPosition", Any( rShapeRect.X ) );
+ xPropSet->setPropertyValue( "VertOrientPosition", Any( rShapeRect.Y ) );
+ xPropSet->setPropertyValue( "HoriOrientRelation", Any( RelOrientation::FRAME ) );
+ xPropSet->setPropertyValue( "VertOrientRelation", Any( RelOrientation::FRAME ) );
+ }
+ xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) );
+ }
+ catch( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "oox", "Drawing::createAndInsertXShape - error during shape object creation" );
+ }
+ OSL_ENSURE( xShape.is(), "Drawing::createAndInsertXShape - cannot instantiate shape object" );
+ return xShape;
+}
+
+Reference< XShape > Drawing::createAndInsertXControlShape( const ::oox::ole::EmbeddedControl& rControl,
+ const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect, sal_Int32& rnCtrlIndex ) const
+{
+ Reference< XShape > xShape;
+ try
+ {
+ // create control model and insert it into the form of the draw page
+ Reference< XControlModel > xCtrlModel( getControlForm().convertAndInsert( rControl, rnCtrlIndex ), UNO_SET_THROW );
+
+ // create the control shape
+ xShape = createAndInsertXShape( "com.sun.star.drawing.ControlShape", rxShapes, rShapeRect );
+
+ // set the control model at the shape
+ Reference< XControlShape >( xShape, UNO_QUERY_THROW )->setControl( xCtrlModel );
+ }
+ catch (Exception const&)
+ {
+ TOOLS_WARN_EXCEPTION("oox", "exception inserting Shape");
+ }
+ return xShape;
+}
+
+bool Drawing::isShapeSupported( const ShapeBase& /*rShape*/ ) const
+{
+ return true;
+}
+
+OUString Drawing::getShapeBaseName( const ShapeBase& /*rShape*/ ) const
+{
+ return OUString();
+}
+
+bool Drawing::convertClientAnchor( awt::Rectangle& /*orShapeRect*/, const OUString& /*rShapeAnchor*/ ) const
+{
+ return false;
+}
+
+Reference< XShape > Drawing::createAndInsertClientXShape( const ShapeBase& /*rShape*/,
+ const Reference< XShapes >& /*rxShapes*/, const awt::Rectangle& /*rShapeRect*/ ) const
+{
+ return Reference< XShape >();
+}
+
+void Drawing::notifyXShapeInserted( const Reference< XShape >& /*rxShape*/,
+ const awt::Rectangle& /*rShapeRect*/, const ShapeBase& /*rShape*/, bool /*bGroupChild*/ )
+{
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmldrawingfragment.cxx b/oox/source/vml/vmldrawingfragment.cxx
new file mode 100644
index 000000000..cb7936baf
--- /dev/null
+++ b/oox/source/vml/vmldrawingfragment.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/vml/vmldrawingfragment.hxx>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlinputstream.hxx>
+#include <oox/vml/vmlshapecontext.hxx>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+using namespace ::oox::core;
+
+DrawingFragment::DrawingFragment( XmlFilterBase& rFilter, const OUString& rFragmentPath, Drawing& rDrawing ) :
+ FragmentHandler2( rFilter, rFragmentPath, false ), // do not trim whitespace, has been preprocessed by the input stream
+ mrDrawing( rDrawing )
+{
+}
+
+Reference< XInputStream > DrawingFragment::openFragmentStream() const
+{
+ // #i104719# create an input stream that preprocesses the VML data
+ return new InputStream( getFilter().getComponentContext(), FragmentHandler2::openFragmentStream() );
+}
+
+ContextHandlerRef DrawingFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( mrDrawing.getType() )
+ {
+ // DOCX filter handles plain shape elements with this fragment handler
+ case VMLDRAWING_WORD:
+ if ( getNamespace( nElement ) == NMSP_vml
+ || nElement == W_TOKEN(control) ) // Control shape also defined as a vml shape
+ return ShapeContextBase::createShapeContext( *this, mrDrawing.getShapes(), nElement, rAttribs );
+ break;
+
+ // XLSX and PPTX filters load the entire VML fragment
+ case VMLDRAWING_EXCEL:
+ case VMLDRAWING_POWERPOINT:
+ switch( getCurrentElement() )
+ {
+ case XML_ROOT_CONTEXT:
+ if( nElement == XML_xml ) return this;
+ break;
+ case XML_xml:
+ return ShapeContextBase::createShapeContext( *this, mrDrawing.getShapes(), nElement, rAttribs );
+ }
+ break;
+ }
+ return nullptr;
+}
+
+void DrawingFragment::finalizeImport()
+{
+ // resolve shape template references for all shapes
+ mrDrawing.finalizeFragmentImport();
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
new file mode 100644
index 000000000..8f00eb47b
--- /dev/null
+++ b/oox/source/vml/vmlformatting.cxx
@@ -0,0 +1,1001 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <cstdlib>
+
+#include <oox/vml/vmlformatting.hxx>
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <o3tl/float_int_conversion.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <rtl/strbuf.hxx>
+#include <sal/log.hxx>
+#include <osl/diagnose.h>
+#include <oox/drawingml/color.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <svx/svdtrans.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <o3tl/string_view.hxx>
+#include <vcl/virdev.hxx>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::geometry;
+
+using ::oox::drawingml::Color;
+using ::oox::drawingml::FillProperties;
+using ::oox::drawingml::LineArrowProperties;
+using ::oox::drawingml::LineProperties;
+using ::oox::drawingml::ShapePropertyMap;
+using ::com::sun::star::awt::Point;
+using ::com::sun::star::drawing::PolygonFlags;
+using ::com::sun::star::drawing::PolygonFlags_NORMAL;
+using ::com::sun::star::drawing::PolygonFlags_CONTROL;
+
+namespace {
+
+bool lclExtractDouble( double& orfValue, size_t& ornEndPos, std::u16string_view aValue )
+{
+ // extract the double value and find start position of unit characters
+ rtl_math_ConversionStatus eConvStatus = rtl_math_ConversionStatus_Ok;
+ sal_Int32 nEndPos;
+ orfValue = ::rtl::math::stringToDouble( aValue, '.', '\0', &eConvStatus, &nEndPos );
+ ornEndPos = nEndPos;
+ return eConvStatus == rtl_math_ConversionStatus_Ok;
+}
+
+} // namespace
+
+bool ConversionHelper::separatePair( std::u16string_view& orValue1, std::u16string_view& orValue2,
+ std::u16string_view rValue, sal_Unicode cSep )
+{
+ size_t nSepPos = rValue.find( cSep );
+ if( nSepPos != std::u16string_view::npos )
+ {
+ orValue1 = o3tl::trim(rValue.substr( 0, nSepPos ));
+ orValue2 = o3tl::trim(rValue.substr( nSepPos + 1 ));
+ }
+ else
+ {
+ orValue1 = o3tl::trim(rValue);
+ orValue2 = std::u16string_view();
+ }
+ return !orValue1.empty() && !orValue2.empty();
+}
+
+bool ConversionHelper::decodeBool( std::u16string_view rValue )
+{
+ sal_Int32 nToken = AttributeConversion::decodeToken( rValue );
+ // anything else than 't' or 'true' is considered to be false, as specified
+ return (nToken == XML_t) || (nToken == XML_true);
+}
+
+double ConversionHelper::decodePercent( std::u16string_view rValue, double fDefValue )
+{
+ if( rValue.empty() )
+ return fDefValue;
+
+ double fValue = 0.0;
+ size_t nEndPos = 0;
+ if( !lclExtractDouble( fValue, nEndPos, rValue ) )
+ return fDefValue;
+
+ if( nEndPos == rValue.size() )
+ return fValue;
+
+ if( (nEndPos + 1 == rValue.size()) && (rValue[ nEndPos ] == '%') )
+ return fValue / 100.0;
+
+ if( (nEndPos + 1 == rValue.size()) && (rValue[ nEndPos ] == 'f') )
+ return fValue / 65536.0;
+
+ OSL_FAIL( "ConversionHelper::decodePercent - unknown measure unit" );
+ return fDefValue;
+}
+
+Degree100 ConversionHelper::decodeRotation( std::u16string_view rValue )
+{
+ if( rValue.empty() )
+ return 0_deg100;
+
+ double fValue = 0.0;
+ double fRotation = 0.0;
+ size_t nEndPos = 0;
+ if( !lclExtractDouble(fValue, nEndPos, rValue) )
+ return 0_deg100;
+
+ if( nEndPos == rValue.size() )
+ fRotation = fValue;
+ else if( (nEndPos + 2 == rValue.size()) && (rValue[nEndPos] == 'f') && (rValue[nEndPos+1] == 'd') )
+ fRotation = fValue / 65536.0;
+ else
+ {
+ OSL_FAIL("ConversionHelper::decodeRotation - unknown measure unit");
+ return 0_deg100;
+ }
+
+ return NormAngle36000(Degree100(static_cast<sal_Int32>(fRotation * -100)));
+}
+
+sal_Int64 ConversionHelper::decodeMeasureToEmu( const GraphicHelper& rGraphicHelper,
+ std::u16string_view rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel )
+{
+ // default for missing values is 0
+ if( rValue.empty() )
+ return 0;
+
+ // TODO: according to spec, value may contain "auto"
+ if ( rValue == u"auto" )
+ {
+ OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - special value 'auto' must be handled by caller" );
+ return nRefValue;
+ }
+
+ // extract the double value and find start position of unit characters
+ double fValue = 0.0;
+ size_t nEndPos = 0;
+ if( !lclExtractDouble( fValue, nEndPos, rValue ) || (fValue == 0.0) )
+ return 0;
+
+ // process trailing unit, convert to EMU
+ std::u16string_view aUnit;
+ if( (0 < nEndPos) && (nEndPos < rValue.size()) )
+ aUnit = rValue.substr( nEndPos );
+ else if( bDefaultAsPixel )
+ aUnit = u"px";
+ // else default is EMU
+
+ if( aUnit.size() == 2 )
+ {
+ sal_Unicode cChar1 = aUnit[ 0 ];
+ sal_Unicode cChar2 = aUnit[ 1 ];
+ if ((cChar1 == 'i') && (cChar2 == 'n'))
+ fValue = o3tl::convert(fValue, o3tl::Length::in, o3tl::Length::emu);
+ else if ((cChar1 == 'c') && (cChar2 == 'm'))
+ fValue = o3tl::convert(fValue, o3tl::Length::cm, o3tl::Length::emu);
+ else if ((cChar1 == 'm') && (cChar2 == 'm'))
+ fValue = o3tl::convert(fValue, o3tl::Length::mm, o3tl::Length::emu);
+ else if ((cChar1 == 'p') && (cChar2 == 't'))
+ fValue = o3tl::convert(fValue, o3tl::Length::pt, o3tl::Length::emu);
+ else if ((cChar1 == 'p') && (cChar2 == 'c'))
+ fValue = o3tl::convert(fValue, o3tl::Length::pc, o3tl::Length::emu);
+ else if( (cChar1 == 'p') && (cChar2 == 'x') ) // 1 pixel, dependent on output device
+ fValue = o3tl::convert(bPixelX ? rGraphicHelper.convertScreenPixelXToHmm(fValue)
+ : rGraphicHelper.convertScreenPixelYToHmm(fValue),
+ o3tl::Length::mm100, o3tl::Length::emu);
+ }
+ else if( (aUnit.size() == 1) && (aUnit[ 0 ] == '%') )
+ {
+ fValue *= nRefValue / 100.0;
+ }
+ else if( bDefaultAsPixel || !aUnit.empty() ) // default as EMU and no unit -> do nothing
+ {
+ OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - unknown measure unit" );
+ fValue = nRefValue;
+ }
+ return o3tl::saturating_cast< sal_Int64 >( fValue + 0.5 );
+}
+
+sal_Int32 ConversionHelper::decodeMeasureToHmm( const GraphicHelper& rGraphicHelper,
+ std::u16string_view rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel )
+{
+ return ::oox::drawingml::convertEmuToHmm( decodeMeasureToEmu( rGraphicHelper, rValue, nRefValue, bPixelX, bDefaultAsPixel ) );
+}
+
+sal_Int32 ConversionHelper::decodeMeasureToTwip(const GraphicHelper& rGraphicHelper,
+ std::u16string_view rValue, sal_Int32 nRefValue,
+ bool bPixelX, bool bDefaultAsPixel)
+{
+ return ::o3tl::convert(
+ decodeMeasureToEmu(rGraphicHelper, rValue, nRefValue, bPixelX, bDefaultAsPixel),
+ o3tl::Length::emu, o3tl::Length::twip);
+}
+
+Color ConversionHelper::decodeColor( const GraphicHelper& rGraphicHelper,
+ const OptValue< OUString >& roVmlColor, const OptValue< double >& roVmlOpacity,
+ ::Color nDefaultRgb, ::Color nPrimaryRgb )
+{
+ Color aDmlColor;
+
+ // convert opacity
+ const sal_Int32 DML_FULL_OPAQUE = ::oox::drawingml::MAX_PERCENT;
+ double fOpacity = roVmlOpacity.get( 1.0 );
+ sal_Int32 nOpacity = getLimitedValue< sal_Int32, double >( fOpacity * DML_FULL_OPAQUE, 0, DML_FULL_OPAQUE );
+ if( nOpacity < DML_FULL_OPAQUE )
+ aDmlColor.addTransformation( XML_alpha, nOpacity );
+
+ // color attribute not present - set passed default color
+ if( !roVmlColor.has() )
+ {
+ aDmlColor.setSrgbClr( nDefaultRgb );
+ return aDmlColor;
+ }
+
+ // separate leading color name or RGB value from following palette index
+ std::u16string_view aColorName, aColorIndex;
+ separatePair( aColorName, aColorIndex, roVmlColor.get(), ' ' );
+
+ // RGB colors in the format '#RRGGBB'
+ if( (aColorName.size() == 7) && (aColorName[ 0 ] == '#') )
+ {
+ aDmlColor.setSrgbClr( o3tl::toUInt32(aColorName.substr( 1 ), 16) );
+ return aDmlColor;
+ }
+
+ // RGB colors in the format '#RGB'
+ if( (aColorName.size() == 4) && (aColorName[ 0 ] == '#') )
+ {
+ sal_Int32 nR = o3tl::toUInt32(aColorName.substr( 1, 1 ), 16 ) * 0x11;
+ sal_Int32 nG = o3tl::toUInt32(aColorName.substr( 2, 1 ), 16 ) * 0x11;
+ sal_Int32 nB = o3tl::toUInt32(aColorName.substr( 3, 1 ), 16 ) * 0x11;
+ aDmlColor.setSrgbClr( (nR << 16) | (nG << 8) | nB );
+ return aDmlColor;
+ }
+
+ /* Predefined color names or system color names (resolve to RGB to detect
+ valid color name). */
+ sal_Int32 nColorToken = AttributeConversion::decodeToken( aColorName );
+ ::Color nRgbValue = Color::getVmlPresetColor( nColorToken, API_RGB_TRANSPARENT );
+ if( nRgbValue == API_RGB_TRANSPARENT )
+ nRgbValue = rGraphicHelper.getSystemColor( nColorToken );
+ if( nRgbValue != API_RGB_TRANSPARENT )
+ {
+ aDmlColor.setSrgbClr( nRgbValue );
+ return aDmlColor;
+ }
+
+ // try palette colors enclosed in brackets
+ if( (aColorIndex.size() >= 3) && (aColorIndex[ 0 ] == '[') && (aColorIndex[ aColorIndex.size() - 1 ] == ']') )
+ {
+ aDmlColor.setPaletteClr( o3tl::toInt32(aColorIndex.substr( 1, aColorIndex.size() - 2 )) );
+ return aDmlColor;
+ }
+
+ // try fill gradient modificator 'fill <modifier>(<amount>)'
+ if( (nPrimaryRgb != API_RGB_TRANSPARENT) && (nColorToken == XML_fill) )
+ {
+ size_t nOpenParen = aColorIndex.find( '(' );
+ size_t nCloseParen = aColorIndex.find( ')' );
+ if( nOpenParen != std::u16string_view::npos && nCloseParen != std::u16string_view::npos &&
+ (2 <= nOpenParen) && (nOpenParen + 1 < nCloseParen) && (nCloseParen + 1 == aColorIndex.size()) )
+ {
+ sal_Int32 nModToken = XML_TOKEN_INVALID;
+ switch( AttributeConversion::decodeToken( aColorIndex.substr( 0, nOpenParen ) ) )
+ {
+ case XML_darken: nModToken = XML_shade;break;
+ case XML_lighten: nModToken = XML_tint;
+ }
+ sal_Int32 nValue = o3tl::toInt32(aColorIndex.substr( nOpenParen + 1, nCloseParen - nOpenParen - 1 ));
+ if( (nModToken != XML_TOKEN_INVALID) && (0 <= nValue) && (nValue < 255) )
+ {
+ /* Simulate this modifier color by a color with related transformation.
+ The modifier amount has to be converted from the range [0;255] to
+ percentage [0;100000] used by DrawingML. */
+ aDmlColor.setSrgbClr( nPrimaryRgb );
+ aDmlColor.addTransformation( nModToken, static_cast< sal_Int32 >( nValue * ::oox::drawingml::MAX_PERCENT / 255 ) );
+ return aDmlColor;
+ }
+ }
+ }
+
+ OSL_FAIL( OStringBuffer( "lclGetColor - invalid VML color name '" +
+ OUStringToOString( roVmlColor.get(), RTL_TEXTENCODING_ASCII_US ) + "'" ).getStr() );
+ aDmlColor.setSrgbClr( nDefaultRgb );
+ return aDmlColor;
+}
+
+void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& rPointLists, ::std::vector< ::std::vector< PolygonFlags > >& rFlagLists, const OUString& rPath )
+{
+ ::std::vector< sal_Int32 > aCoordList;
+ Point aCurrentPoint;
+ sal_Int32 nTokenStart = 0;
+ sal_Int32 nTokenLen = 0;
+ sal_Int32 nParamCount = 0;
+ bool bCommand = false;
+ enum VML_State { START, MOVE_REL, MOVE_ABS, BEZIER_REL, BEZIER_ABS,
+ LINE_REL, LINE_ABS, CLOSE, END, UNSUPPORTED };
+ VML_State state = START;
+
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
+
+ for ( sal_Int32 i = 0; i < rPath.getLength(); i++ )
+ {
+ // Keep track of current integer token
+ if ( ( rPath[ i ] >= '0' && rPath[ i ] <= '9' ) || rPath[ i ] == '-' )
+ nTokenLen++;
+ else if ( rPath[ i ] != ' ' )
+ {
+ // Store coordinate from current token
+ if ( state != START && state != UNSUPPORTED )
+ {
+ if ( nTokenLen > 0 )
+ aCoordList.push_back( o3tl::toInt32(rPath.subView( nTokenStart, nTokenLen )) );
+ else
+ aCoordList.push_back( 0 );
+ nTokenLen = 0;
+ }
+
+ if (rPath[ i ] == ',' )
+ {
+ nParamCount--;
+ }
+
+ // Upon finding the next command code, deal with stored
+ // coordinates for previous command and reset parameters counter if needed.
+ // See http://www.w3.org/TR/NOTE-VML#_Toc416858382 for params count reference
+ if ( rPath[ i ] != ',' || nParamCount == 0 )
+ {
+ switch ( state )
+ {
+ case MOVE_REL:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
+ if ( !rPointLists.empty() && !rPointLists.back().empty() )
+ {
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
+ }
+ rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ nParamCount = 2;
+ break;
+
+ case MOVE_ABS:
+ aCoordList.resize(2, 0); // 2 params -> no param count reset
+ if ( !rPointLists.empty() && !rPointLists.back().empty() )
+ {
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
+ }
+ rPointLists.back().emplace_back( (aCoordList[ 0 ]), aCoordList[ 1 ] );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ break;
+
+ case BEZIER_REL:
+ aCoordList.resize(6, 0); // 6* params -> param count reset
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ],
+ aCurrentPoint.Y + aCoordList[ 1 ] );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 2 ],
+ aCurrentPoint.Y + aCoordList[ 3 ] );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 4 ],
+ aCurrentPoint.Y + aCoordList[ 5 ] );
+ rFlagLists.back().push_back( PolygonFlags_CONTROL );
+ rFlagLists.back().push_back( PolygonFlags_CONTROL );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ nParamCount = 6;
+ break;
+
+ case BEZIER_ABS:
+ aCoordList.resize(6, 0); // 6* params -> param count reset
+ rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] );
+ rPointLists.back().emplace_back( aCoordList[ 2 ], aCoordList[ 3 ] );
+ rPointLists.back().emplace_back( aCoordList[ 4 ], aCoordList[ 5 ] );
+ rFlagLists.back().push_back( PolygonFlags_CONTROL );
+ rFlagLists.back().push_back( PolygonFlags_CONTROL );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ nParamCount = 6;
+ break;
+
+ case LINE_REL:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ],
+ aCurrentPoint.Y + aCoordList[ 1 ] );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ nParamCount = 2;
+ break;
+
+ case LINE_ABS:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
+ rPointLists.back().emplace_back( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) );
+ rFlagLists.back().push_back( PolygonFlags_NORMAL );
+ aCurrentPoint = rPointLists.back().back();
+ nParamCount = 2;
+ break;
+
+ case CLOSE: // 0 param
+ SAL_WARN_IF(rPointLists.back().empty() || rFlagLists.back().empty(), "oox", "empty pointlists at close");
+ if (!rPointLists.back().empty() && !rFlagLists.back().empty())
+ {
+ rPointLists.back().push_back( rPointLists.back()[ 0 ] );
+ rFlagLists.back().push_back( rFlagLists.back()[ 0 ] );
+ aCurrentPoint = rPointLists.back().back();
+ }
+ break;
+
+ case END: // 0 param
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
+ break;
+
+ case START:
+ case UNSUPPORTED:
+ break;
+ }
+
+ aCoordList.clear();
+ }
+
+ // Allow two-char commands to peek ahead to the next character
+ sal_Unicode nextChar = '\0';
+ if (i+1 < rPath.getLength())
+ nextChar = rPath[i+1];
+
+ // Move to relevant state upon finding a command
+ bCommand = true;
+ switch ( rPath[ i ] )
+ {
+ // Single-character commands
+ case 't': // rmoveto
+ state = MOVE_REL; nParamCount = 2; break;
+ case 'm': // moveto
+ state = MOVE_ABS; nParamCount = 2; break;
+ case 'v': // rcurveto
+ state = BEZIER_REL; nParamCount = 6; break;
+ case 'c': // curveto
+ state = BEZIER_ABS; nParamCount = 6; break;
+ case 'r': // rlineto
+ state = LINE_REL; nParamCount = 2; break;
+ case 'l': // lineto
+ state = LINE_ABS; nParamCount = 2; break;
+ case 'x': // close
+ state = CLOSE; break;
+ case 'e': // end
+ state = END; break;
+
+ // Two-character commands
+ case 'n':
+ {
+ switch ( nextChar )
+ {
+ case 'f': // nf - nofill
+ case 's': // ns - nostroke
+ state = UNSUPPORTED; i++; break;
+ }
+ break;
+ }
+ case 'a': // Elliptical curves
+ {
+ switch ( nextChar )
+ {
+ case 'e': // ae - angleellipseto
+ case 'l': // al - angleellipse
+ state = UNSUPPORTED; i++; break;
+ case 't': // at - arcto
+ case 'r': // ar - arc
+ state = UNSUPPORTED; i++; break;
+ }
+ break;
+ }
+ case 'w': // Clockwise elliptical arcs
+ {
+ switch ( nextChar )
+ {
+ case 'a': // wa - clockwisearcto
+ case 'r': // wr - clockwisearc
+ state = UNSUPPORTED; i++; break;
+ }
+ break;
+ }
+ case 'q':
+ {
+ switch ( nextChar )
+ {
+ case 'x': // qx - ellipticalquadrantx
+ case 'y': // qy - ellipticalquadranty
+ state = UNSUPPORTED; i++; break;
+ case 'b': // qb - quadraticbezier
+ state = UNSUPPORTED; i++; break;
+ }
+ break;
+ }
+ case 'h': // behaviour extensions
+ {
+ switch ( nextChar )
+ {
+ case 'a': // ha - AutoLine
+ case 'b': // hb - AutoCurve
+ case 'c': // hc - CornerLine
+ case 'd': // hd - CornerCurve
+ case 'e': // he - SmoothLine
+ case 'f': // hf - SmoothCurve
+ case 'g': // hg - SymmetricLine
+ case 'h': // hh - SymmetricCurve
+ case 'i': // hi - Freeform
+ state = UNSUPPORTED; i++; break;
+ }
+ break;
+ }
+ default:
+ bCommand = false;
+ break;
+ }
+
+ if (bCommand) nTokenLen = 0;
+ nTokenStart = i+1;
+ }
+ }
+}
+
+namespace {
+
+sal_Int64 lclGetEmu( const GraphicHelper& rGraphicHelper, const OptValue< OUString >& roValue, sal_Int64 nDefValue )
+{
+ return roValue.has() ? ConversionHelper::decodeMeasureToEmu( rGraphicHelper, roValue.get(), 0, false, false ) : nDefValue;
+}
+
+void lclGetDmlLineDash( OptValue< sal_Int32 >& oroPresetDash, LineProperties::DashStopVector& orCustomDash, const OptValue< OUString >& roDashStyle )
+{
+ if( !roDashStyle.has() )
+ return;
+
+ const OUString& rDashStyle = roDashStyle.get();
+ switch( AttributeConversion::decodeToken( rDashStyle ) )
+ {
+ case XML_solid: oroPresetDash = XML_solid; return;
+ case XML_shortdot: oroPresetDash = XML_sysDot; return;
+ case XML_shortdash: oroPresetDash = XML_sysDash; return;
+ case XML_shortdashdot: oroPresetDash = XML_sysDashDot; return;
+ case XML_shortdashdotdot: oroPresetDash = XML_sysDashDotDot; return;
+ case XML_dot: oroPresetDash = XML_dot; return;
+ case XML_dash: oroPresetDash = XML_dash; return;
+ case XML_dashdot: oroPresetDash = XML_dashDot; return;
+ case XML_longdash: oroPresetDash = XML_lgDash; return;
+ case XML_longdashdot: oroPresetDash = XML_lgDashDot; return;
+ case XML_longdashdotdot: oroPresetDash = XML_lgDashDotDot; return;
+
+ // try to convert user-defined dash style
+ default:
+ {
+ ::std::vector< sal_Int32 > aValues;
+ sal_Int32 nIndex = 0;
+ while( nIndex >= 0 )
+ aValues.push_back( o3tl::toInt32(o3tl::getToken(rDashStyle, 0, ' ', nIndex )) );
+ size_t nPairs = aValues.size() / 2; // ignore last value if size is odd
+ for( size_t nPairIdx = 0; nPairIdx < nPairs; ++nPairIdx )
+ orCustomDash.emplace_back( aValues[ 2 * nPairIdx ], aValues[ 2 * nPairIdx + 1 ] );
+ }
+ }
+}
+
+sal_Int32 lclGetDmlArrowType( const OptValue< sal_Int32 >& roArrowType )
+{
+ if( roArrowType.has() ) switch( roArrowType.get() )
+ {
+ case XML_none: return XML_none;
+ case XML_block: return XML_triangle;
+ case XML_classic: return XML_stealth;
+ case XML_diamond: return XML_diamond;
+ case XML_oval: return XML_oval;
+ case XML_open: return XML_arrow;
+ }
+ return XML_none;
+}
+
+sal_Int32 lclGetDmlArrowWidth( const OptValue< sal_Int32 >& roArrowWidth )
+{
+ if( roArrowWidth.has() ) switch( roArrowWidth.get() )
+ {
+ case XML_narrow: return XML_sm;
+ case XML_medium: return XML_med;
+ case XML_wide: return XML_lg;
+ }
+ return XML_med;
+}
+
+sal_Int32 lclGetDmlArrowLength( const OptValue< sal_Int32 >& roArrowLength )
+{
+ if( roArrowLength.has() ) switch( roArrowLength.get() )
+ {
+ case XML_short: return XML_sm;
+ case XML_medium: return XML_med;
+ case XML_long: return XML_lg;
+ }
+ return XML_med;
+}
+
+void lclConvertArrow( LineArrowProperties& orArrowProp, const StrokeArrowModel& rStrokeArrow )
+{
+ orArrowProp.moArrowType = lclGetDmlArrowType( rStrokeArrow.moArrowType );
+ orArrowProp.moArrowWidth = lclGetDmlArrowWidth( rStrokeArrow.moArrowWidth );
+ orArrowProp.moArrowLength = lclGetDmlArrowLength( rStrokeArrow.moArrowLength );
+}
+
+sal_Int32 lclGetDmlLineCompound( const OptValue< sal_Int32 >& roLineStyle )
+{
+ if( roLineStyle.has() ) switch( roLineStyle.get() )
+ {
+ case XML_single: return XML_sng;
+ case XML_thinThin: return XML_dbl;
+ case XML_thinThick: return XML_thinThick;
+ case XML_thickThin: return XML_thickThin;
+ case XML_thickBetweenThin: return XML_tri;
+ }
+ return XML_sng;
+}
+
+sal_Int32 lclGetDmlLineCap( const OptValue< sal_Int32 >& roEndCap )
+{
+ if( roEndCap.has() ) switch( roEndCap.get() )
+ {
+ case XML_flat: return XML_flat;
+ case XML_square: return XML_sq;
+ case XML_round: return XML_rnd;
+ }
+ return XML_flat; // different defaults in VML (flat) and DrawingML (square)
+}
+
+sal_Int32 lclGetDmlLineJoint( const OptValue< sal_Int32 >& roJoinStyle )
+{
+ if( roJoinStyle.has() ) switch( roJoinStyle.get() )
+ {
+ case XML_round: return XML_round;
+ case XML_bevel: return XML_bevel;
+ case XML_miter: return XML_miter;
+ }
+ return XML_round;
+}
+
+} // namespace
+
+void StrokeArrowModel::assignUsed( const StrokeArrowModel& rSource )
+{
+ moArrowType.assignIfUsed( rSource.moArrowType );
+ moArrowWidth.assignIfUsed( rSource.moArrowWidth );
+ moArrowLength.assignIfUsed( rSource.moArrowLength );
+}
+
+void StrokeModel::assignUsed( const StrokeModel& rSource )
+{
+ moStroked.assignIfUsed( rSource.moStroked );
+ maStartArrow.assignUsed( rSource.maStartArrow );
+ maEndArrow.assignUsed( rSource.maEndArrow );
+ moColor.assignIfUsed( rSource.moColor );
+ moOpacity.assignIfUsed( rSource.moOpacity );
+ moWeight.assignIfUsed( rSource.moWeight );
+ moDashStyle.assignIfUsed( rSource.moDashStyle );
+ moLineStyle.assignIfUsed( rSource.moLineStyle );
+ moEndCap.assignIfUsed( rSource.moEndCap );
+ moJoinStyle.assignIfUsed( rSource.moJoinStyle );
+}
+
+void StrokeModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const
+{
+ /* Convert VML line formatting to DrawingML line formatting and let the
+ DrawingML code do the hard work. */
+ LineProperties aLineProps;
+
+ if( moStroked.get( true ) )
+ {
+ aLineProps.maLineFill.moFillType = XML_solidFill;
+ lclConvertArrow( aLineProps.maStartArrow, maStartArrow );
+ lclConvertArrow( aLineProps.maEndArrow, maEndArrow );
+ aLineProps.maLineFill.maFillColor = ConversionHelper::decodeColor( rGraphicHelper, moColor, moOpacity, API_RGB_BLACK );
+ aLineProps.moLineWidth = getLimitedValue< sal_Int32, sal_Int64 >( lclGetEmu( rGraphicHelper, moWeight, 1 ), 0, SAL_MAX_INT32 );
+ lclGetDmlLineDash( aLineProps.moPresetDash, aLineProps.maCustomDash, moDashStyle );
+ aLineProps.moLineCompound = lclGetDmlLineCompound( moLineStyle );
+ aLineProps.moLineCap = lclGetDmlLineCap( moEndCap );
+ aLineProps.moLineJoint = lclGetDmlLineJoint( moJoinStyle );
+ }
+ else
+ {
+ aLineProps.maLineFill.moFillType = XML_noFill;
+ }
+
+ aLineProps.pushToPropMap( rPropMap, rGraphicHelper );
+}
+
+void FillModel::assignUsed( const FillModel& rSource )
+{
+ moFilled.assignIfUsed( rSource.moFilled );
+ moColor.assignIfUsed( rSource.moColor );
+ moOpacity.assignIfUsed( rSource.moOpacity );
+ moColor2.assignIfUsed( rSource.moColor2 );
+ moOpacity2.assignIfUsed( rSource.moOpacity2 );
+ moType.assignIfUsed( rSource.moType );
+ moAngle.assignIfUsed( rSource.moAngle );
+ moFocus.assignIfUsed( rSource.moFocus );
+ moFocusPos.assignIfUsed( rSource.moFocusPos );
+ moFocusSize.assignIfUsed( rSource.moFocusSize );
+ moBitmapPath.assignIfUsed( rSource.moBitmapPath );
+ moRotate.assignIfUsed( rSource.moRotate );
+}
+
+static void lcl_setGradientStop( std::multimap< double, Color >& rMap, const double fKey, const Color& rValue ) {
+ auto aElement = rMap.find( fKey );
+
+ if (aElement != rMap.end())
+ aElement->second = rValue;
+ else
+ rMap.emplace( fKey, rValue );
+}
+
+void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const
+{
+ /* Convert VML fill formatting to DrawingML fill formatting and let the
+ DrawingML code do the hard work. */
+ FillProperties aFillProps;
+
+ if( moFilled.get( true ) )
+ {
+ sal_Int32 nFillType = moType.get( XML_solid );
+ switch( nFillType )
+ {
+ case XML_gradient:
+ case XML_gradientRadial:
+ {
+ aFillProps.moFillType = XML_gradFill;
+ aFillProps.maGradientProps.moRotateWithShape = moRotate.get( false );
+ double fFocus = moFocus.get( 0.0 );
+
+ // prepare colors
+ Color aColor1 = ConversionHelper::decodeColor( rGraphicHelper, moColor, moOpacity, API_RGB_WHITE );
+ Color aColor2 = ConversionHelper::decodeColor( rGraphicHelper, moColor2, moOpacity2, API_RGB_WHITE, aColor1.getColor( rGraphicHelper ) );
+
+ // type XML_gradient is linear or axial gradient
+ if( nFillType == XML_gradient )
+ {
+ // normalize angle to range [0;360) degrees
+ sal_Int32 nVmlAngle = getIntervalValue< sal_Int32, sal_Int32 >( moAngle.get( 0 ), 0, 360 );
+
+ // focus of -50% or 50% is axial gradient
+ if( ((-0.75 <= fFocus) && (fFocus <= -0.25)) || ((0.25 <= fFocus) && (fFocus <= 0.75)) )
+ {
+ /* According to spec, focus of 50% is outer-to-inner,
+ and -50% is inner-to-outer (color to color2).
+ BUT: For angles >= 180 deg., the behaviour is
+ reversed... that's not spec'ed of course. So,
+ [0;180) deg. and 50%, or [180;360) deg. and -50% is
+ outer-to-inner in fact. */
+ bool bOuterToInner = (fFocus > 0.0) == (nVmlAngle < 180);
+ // simulate axial gradient by 3-step DrawingML gradient
+ const Color& rOuterColor = bOuterToInner ? aColor1 : aColor2;
+ const Color& rInnerColor = bOuterToInner ? aColor2 : aColor1;
+
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 0.0, rOuterColor);
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 1.0, rOuterColor);
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 0.5, rInnerColor );
+ }
+ else // focus of -100%, 0%, and 100% is linear gradient
+ {
+ /* According to spec, focus of -100% or 100% swaps the
+ start and stop colors, effectively reversing the
+ gradient. BUT: For angles >= 180 deg., the
+ behaviour is reversed. This means that in this case
+ a focus of 0% swaps the gradient. */
+ if( fFocus < -0.5 || fFocus > 0.5 )
+ nVmlAngle = (nVmlAngle + 180) % 360;
+ // set the start and stop colors
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 0.0, aColor1 );
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 1.0, aColor2 );
+ }
+
+ // VML counts counterclockwise from bottom, DrawingML clockwise from left
+ sal_Int32 nDmlAngle = (630 - nVmlAngle) % 360;
+ aFillProps.maGradientProps.moShadeAngle = nDmlAngle * ::oox::drawingml::PER_DEGREE;
+ }
+ else // XML_gradientRadial is rectangular gradient
+ {
+ aFillProps.maGradientProps.moGradientPath = XML_rect;
+ // convert VML focus position and size to DrawingML fill-to-rect
+ DoublePair aFocusPos = moFocusPos.get( DoublePair( 0.0, 0.0 ) );
+ DoublePair aFocusSize = moFocusSize.get( DoublePair( 0.0, 0.0 ) );
+ double fLeft = getLimitedValue< double, double >( aFocusPos.first, 0.0, 1.0 );
+ double fTop = getLimitedValue< double, double >( aFocusPos.second, 0.0, 1.0 );
+ double fRight = getLimitedValue< double, double >( fLeft + aFocusSize.first, fLeft, 1.0 );
+ double fBottom = getLimitedValue< double, double >( fTop + aFocusSize.second, fTop, 1.0 );
+ aFillProps.maGradientProps.moFillToRect = IntegerRectangle2D(
+ static_cast< sal_Int32 >( fLeft * ::oox::drawingml::MAX_PERCENT ),
+ static_cast< sal_Int32 >( fTop * ::oox::drawingml::MAX_PERCENT ),
+ static_cast< sal_Int32 >( (1.0 - fRight) * ::oox::drawingml::MAX_PERCENT ),
+ static_cast< sal_Int32 >( (1.0 - fBottom) * ::oox::drawingml::MAX_PERCENT ) );
+
+ // set the start and stop colors (focus of 0% means outer-to-inner)
+ bool bOuterToInner = (-0.5 <= fFocus) && (fFocus <= 0.5);
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 0.0, bOuterToInner ? aColor2 : aColor1 );
+ lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 1.0, bOuterToInner ? aColor1 : aColor2 );
+ }
+ }
+ break;
+
+ case XML_pattern:
+ case XML_tile:
+ case XML_frame:
+ {
+ if( moBitmapPath.has() && !moBitmapPath.get().isEmpty() )
+ {
+ aFillProps.maBlipProps.mxFillGraphic = rGraphicHelper.importEmbeddedGraphic(moBitmapPath.get());
+ if (aFillProps.maBlipProps.mxFillGraphic.is())
+ {
+ aFillProps.moFillType = XML_blipFill;
+ aFillProps.maBlipProps.moBitmapMode = (nFillType == XML_frame) ? XML_stretch : XML_tile;
+ break; // do not break if bitmap is missing, but run to XML_solid instead
+ }
+ }
+ }
+ [[fallthrough]]; // to XML_solid in case of missing bitmap path intended!
+
+ case XML_solid:
+ default:
+ {
+ aFillProps.moFillType = XML_solidFill;
+ // fill color (default is white)
+ aFillProps.maFillColor = ConversionHelper::decodeColor( rGraphicHelper, moColor, moOpacity, API_RGB_WHITE );
+ }
+ }
+ }
+ else
+ {
+ aFillProps.moFillType = XML_noFill;
+ }
+
+ aFillProps.pushToPropMap( rPropMap, rGraphicHelper );
+}
+
+ShadowModel::ShadowModel()
+ : mbHasShadow(false)
+{
+}
+
+void ShadowModel::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper) const
+{
+ if (!mbHasShadow || (moShadowOn.has() && !moShadowOn.get()))
+ return;
+
+ drawingml::Color aColor = ConversionHelper::decodeColor(rGraphicHelper, moColor, moOpacity, API_RGB_GRAY);
+ // nOffset* is in mm100, default value is 35 twips, see DffPropertyReader::ApplyAttributes() in msfilter.
+ sal_Int32 nOffsetX = 62, nOffsetY = 62;
+ if (moOffset.has())
+ {
+ std::u16string_view aOffsetX, aOffsetY;
+ ConversionHelper::separatePair(aOffsetX, aOffsetY, moOffset.get(), ',');
+ if (!aOffsetX.empty())
+ nOffsetX = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aOffsetX, 0, false, false );
+ if (!aOffsetY.empty())
+ nOffsetY = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aOffsetY, 0, false, false );
+ }
+
+ table::ShadowFormat aFormat;
+ aFormat.Color = sal_Int32(aColor.getColor(rGraphicHelper));
+ aFormat.Location = nOffsetX < 0
+ ? nOffsetY < 0 ? table::ShadowLocation_TOP_LEFT : table::ShadowLocation_BOTTOM_LEFT
+ : nOffsetY < 0 ? table::ShadowLocation_TOP_RIGHT : table::ShadowLocation_BOTTOM_RIGHT;
+ // The width of the shadow is the average of the x and y values, see SwWW8ImplReader::MatchSdrItemsIntoFlySet().
+ aFormat.ShadowWidth = ((std::abs(nOffsetX) + std::abs(nOffsetY)) / 2);
+ rPropMap.setProperty(PROP_ShadowFormat, aFormat);
+}
+
+TextpathModel::TextpathModel()
+{
+}
+
+static beans::PropertyValue lcl_createTextpathProps()
+{
+ uno::Sequence<beans::PropertyValue> aTextpathPropSeq( comphelper::InitPropertySequence({
+ { "TextPath", uno::Any(true) },
+ { "TextPathMode", uno::Any(drawing::EnhancedCustomShapeTextPathMode_SHAPE) },
+ { "ScaleX", uno::Any(false) },
+ { "SameLetterHeights", uno::Any(false) }
+ }));
+
+ beans::PropertyValue aRet;
+ aRet.Name = "TextPath";
+ aRet.Value <<= aTextpathPropSeq;
+ return aRet;
+}
+
+void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Reference<drawing::XShape>& xShape, const GraphicHelper& rGraphicHelper) const
+{
+ OUString sFont = "";
+
+ if (moString.has())
+ {
+ uno::Reference<text::XTextRange> xTextRange(xShape, uno::UNO_QUERY);
+ xTextRange->setString(moString.get());
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGeomPropSeq = xPropertySet->getPropertyValue("CustomShapeGeometry").get< uno::Sequence<beans::PropertyValue> >();
+ bool bFound = false;
+ for (beans::PropertyValue& rProp : asNonConstRange(aGeomPropSeq))
+ {
+ if (rProp.Name == "TextPath")
+ {
+ bFound = true;
+ rProp = lcl_createTextpathProps();
+ }
+ }
+ if (!bFound)
+ {
+ sal_Int32 nSize = aGeomPropSeq.getLength();
+ aGeomPropSeq.realloc(nSize+1);
+ aGeomPropSeq.getArray()[nSize] = lcl_createTextpathProps();
+ }
+ rPropMap.setAnyProperty(PROP_CustomShapeGeometry, uno::Any(aGeomPropSeq));
+ }
+ if (moStyle.has())
+ {
+ OUString aStyle = moStyle.get(OUString());
+
+ sal_Int32 nIndex = 0;
+ while( nIndex >= 0 )
+ {
+ std::u16string_view aName, aValue;
+ if (ConversionHelper::separatePair(aName, aValue, o3tl::getToken(aStyle, 0, ';', nIndex), ':'))
+ {
+ if (aName == u"font-family")
+ {
+ // remove " (first, and last character)
+ if (aValue.size() > 2)
+ aValue = aValue.substr(1, aValue.size() - 2);
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("CharFontName", uno::Any(OUString(aValue)));
+ sFont = aValue;
+ }
+ else if (aName == u"font-size")
+ {
+ oox::OptValue<OUString> aOptString {OUString(aValue)};
+ float nSize = drawingml::convertEmuToPoints(lclGetEmu(rGraphicHelper, aOptString, 1));
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("CharHeight", uno::Any(nSize));
+ }
+ }
+ }
+ }
+ if (moTrim.has() && moTrim.get())
+ return;
+
+ OUString sText = moString.get();
+ ScopedVclPtrInstance<VirtualDevice> pDevice;
+ vcl::Font aFont = pDevice->GetFont();
+ aFont.SetFamilyName(sFont);
+ aFont.SetFontSize(Size(0, 96));
+ pDevice->SetFont(aFont);
+
+ auto nTextWidth = pDevice->GetTextWidth(sText);
+ if (nTextWidth)
+ {
+ sal_Int32 nNewHeight = (static_cast<double>(pDevice->GetTextHeight()) / nTextWidth) * xShape->getSize().Width;
+ xShape->setSize(awt::Size(xShape->getSize().Width, nNewHeight));
+ }
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
new file mode 100644
index 000000000..4f9420761
--- /dev/null
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -0,0 +1,393 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/vml/vmlinputstream.hxx>
+
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/io/XTextInputStream2.hpp>
+#include <map>
+#include <string.h>
+#include <rtl/strbuf.hxx>
+#include <osl/diagnose.h>
+#include <oox/helper/textinputstream.hxx>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+const char* lclFindCharacter( const char* pcBeg, const char* pcEnd, char cChar )
+{
+ sal_Int32 nIndex = rtl_str_indexOfChar_WithLength( pcBeg, static_cast< sal_Int32 >( pcEnd - pcBeg ), cChar );
+ return (nIndex < 0) ? pcEnd : (pcBeg + nIndex);
+}
+
+bool lclIsWhiteSpace( char cChar )
+{
+ return cChar >= 0 && cChar <= 32;
+}
+
+const char* lclFindWhiteSpace( const char* pcBeg, const char* pcEnd )
+{
+ for( ; pcBeg < pcEnd; ++pcBeg )
+ if( lclIsWhiteSpace( *pcBeg ) )
+ return pcBeg;
+ return pcEnd;
+}
+
+const char* lclFindNonWhiteSpace( const char* pcBeg, const char* pcEnd )
+{
+ for( ; pcBeg < pcEnd; ++pcBeg )
+ if( !lclIsWhiteSpace( *pcBeg ) )
+ return pcBeg;
+ return pcEnd;
+}
+
+const char* lclTrimWhiteSpaceFromEnd( const char* pcBeg, const char* pcEnd )
+{
+ while( (pcBeg < pcEnd) && lclIsWhiteSpace( pcEnd[ -1 ] ) )
+ --pcEnd;
+ return pcEnd;
+}
+
+void lclAppendToBuffer( OStringBuffer& rBuffer, const char* pcBeg, const char* pcEnd )
+{
+ rBuffer.append( pcBeg, static_cast< sal_Int32 >( pcEnd - pcBeg ) );
+}
+
+void lclProcessAttribs( OStringBuffer& rBuffer, const char* pcBeg, const char* pcEnd )
+{
+ /* Map attribute names to char-pointer of all attributes. This map is used
+ to find multiple occurrences of attributes with the same name. The
+ mapped pointers are used as map key in the next map below. */
+ typedef ::std::map< OString, const char* > AttributeNameMap;
+ AttributeNameMap aAttributeNames;
+
+ /* Map the char-pointers of all attributes to the full attribute definition
+ string. This preserves the original order of the used attributes. */
+ typedef ::std::map< const char*, OString > AttributeDataMap;
+ AttributeDataMap aAttributes;
+
+ bool bOk = true;
+ const char* pcNameBeg = pcBeg;
+ while( bOk && (pcNameBeg < pcEnd) )
+ {
+ // pcNameBeg points to begin of attribute name, find equality sign
+ const char* pcEqualSign = lclFindCharacter( pcNameBeg, pcEnd, '=' );
+ bOk = (pcEqualSign < pcEnd);
+ if (bOk)
+ {
+ // find end of attribute name (ignore whitespace between name and equality sign)
+ const char* pcNameEnd = lclTrimWhiteSpaceFromEnd( pcNameBeg, pcEqualSign );
+ bOk = (pcNameBeg < pcNameEnd);
+ if( bOk )
+ {
+ // find begin of attribute value (must be single or double quote)
+ const char* pcValueBeg = lclFindNonWhiteSpace( pcEqualSign + 1, pcEnd );
+ bOk = (pcValueBeg < pcEnd) && ((*pcValueBeg == '\'') || (*pcValueBeg == '"'));
+ if( bOk )
+ {
+ // find end of attribute value (matching quote character)
+ const char* pcValueEnd = lclFindCharacter( pcValueBeg + 1, pcEnd, *pcValueBeg );
+ bOk = (pcValueEnd < pcEnd);
+ if( bOk )
+ {
+ ++pcValueEnd;
+ OString aAttribName( pcNameBeg, static_cast< sal_Int32 >( pcNameEnd - pcNameBeg ) );
+ OString aAttribData( pcNameBeg, static_cast< sal_Int32 >( pcValueEnd - pcNameBeg ) );
+ // search for an existing attribute with the same name
+ AttributeNameMap::iterator aIt = aAttributeNames.find( aAttribName );
+ // remove its definition from the data map
+ if( aIt != aAttributeNames.end() )
+ aAttributes.erase( aIt->second );
+ // insert the attribute into both maps
+ aAttributeNames[ aAttribName ] = pcNameBeg;
+ aAttributes[ pcNameBeg ] = aAttribData;
+ // continue with next attribute (skip whitespace after this attribute)
+ pcNameBeg = pcValueEnd;
+ if( pcNameBeg < pcEnd )
+ {
+ bOk = lclIsWhiteSpace( *pcNameBeg );
+ if( bOk )
+ pcNameBeg = lclFindNonWhiteSpace( pcNameBeg + 1, pcEnd );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // if no error has occurred, build the resulting attribute list
+ if( bOk )
+ for (auto const& attrib : aAttributes)
+ rBuffer.append( ' ' ).append( attrib.second );
+ // on error, just append the complete passed string
+ else
+ lclAppendToBuffer( rBuffer, pcBeg, pcEnd );
+}
+
+void lclProcessElement( OStringBuffer& rBuffer, const OString& rElement )
+{
+ // check that passed string starts and ends with the brackets of an XML element
+ sal_Int32 nElementLen = rElement.getLength();
+ if( nElementLen == 0 )
+ return;
+
+ const char* pcOpen = rElement.getStr();
+ const char* pcClose = pcOpen + nElementLen - 1;
+
+ // no complete element found
+ if( (pcOpen >= pcClose) || (*pcOpen != '<') || (*pcClose != '>') )
+ {
+ // just append all passed characters
+ rBuffer.append( rElement );
+ }
+
+ // skip parser instructions: '<![...]>'
+ else if( (nElementLen >= 5) && (pcOpen[ 1 ] == '!') && (pcOpen[ 2 ] == '[') && (pcClose[ -1 ] == ']') )
+ {
+ // do nothing
+ }
+
+ // just append any xml prolog (text directive) or processing instructions: <?...?>
+ else if( (nElementLen >= 4) && (pcOpen[ 1 ] == '?') && (pcClose[ -1 ] == '?') )
+ {
+ rBuffer.append( rElement );
+ }
+
+ // replace '<br>' element with newline
+ else if( (nElementLen >= 4) && (pcOpen[ 1 ] == 'b') && (pcOpen[ 2 ] == 'r') && (lclFindNonWhiteSpace( pcOpen + 3, pcClose ) == pcClose) )
+ {
+ rBuffer.append( '\n' );
+ }
+
+ // check start elements and simple elements for repeated attributes
+ else if( pcOpen[ 1 ] != '/' )
+ {
+ // find positions of text content inside brackets, exclude '/' in '<simpleelement/>'
+ const char* pcContentBeg = pcOpen + 1;
+ bool bIsEmptyElement = pcClose[ -1 ] == '/';
+ const char* pcContentEnd = bIsEmptyElement ? (pcClose - 1) : pcClose;
+ // append opening bracket and element name to buffer
+ const char* pcWhiteSpace = lclFindWhiteSpace( pcContentBeg, pcContentEnd );
+ lclAppendToBuffer( rBuffer, pcOpen, pcWhiteSpace );
+ // find begin of attributes, and process all attributes
+ const char* pcAttribBeg = lclFindNonWhiteSpace( pcWhiteSpace, pcContentEnd );
+ if( pcAttribBeg < pcContentEnd )
+ lclProcessAttribs( rBuffer, pcAttribBeg, pcContentEnd );
+ // close the element
+ if( bIsEmptyElement )
+ rBuffer.append( '/' );
+ rBuffer.append( '>' );
+ }
+
+ // append end elements without further processing
+ else
+ {
+ rBuffer.append( rElement );
+ }
+}
+
+bool lclProcessCharacters( OStringBuffer& rBuffer, const OString& rChars )
+{
+ /* MSO has a very weird way to store and handle whitespaces. The stream
+ may contain lots of spaces, tabs, and newlines which have to be handled
+ as single space character. This will be done in this function.
+
+ If the element text contains a literal line break, it will be stored as
+ <br> tag (without matching </br> element). This input stream wrapper
+ will replace this element with a literal LF character (see below).
+
+ A single space character for its own is stored as is. Example: The
+ element
+ <font> </font>
+ represents a single space character. The XML parser will ignore this
+ space character completely without issuing a 'characters' event. The
+ VML import filter implementation has to react on this case manually.
+
+ A single space character following another character is stored
+ literally and must not be stripped away here. Example: The element
+ <font>abc </font>
+ contains the three letters a, b, and c, followed by a space character.
+
+ Consecutive space characters, or a leading single space character, are
+ stored in a <span> element. If there are N space characters (N > 1),
+ then the <span> element contains exactly (N-1) NBSP (non-breaking
+ space) characters, followed by a regular space character. Examples:
+ The element
+ <font><span style='mso-spacerun:yes'>\xA0\xA0\xA0 </span></font>
+ represents 4 consecutive space characters. Has to be handled by the
+ implementation. The element
+ <font><span style='mso-spacerun:yes'> abc</span></font>
+ represents a space characters followed by the letters a, b, c. These
+ strings have to be handled by the VML import filter implementation.
+ */
+
+ // passed string ends with the leading opening bracket of an XML element
+ const char* pcBeg = rChars.getStr();
+ const char* pcEnd = pcBeg + rChars.getLength();
+ bool bHasBracket = (pcBeg < pcEnd) && (pcEnd[ -1 ] == '<');
+ if( bHasBracket ) --pcEnd;
+
+ // skip leading whitespace
+ const char* pcContentsBeg = lclFindNonWhiteSpace( pcBeg, pcEnd );
+ while( pcContentsBeg < pcEnd )
+ {
+ const char* pcWhitespaceBeg = lclFindWhiteSpace( pcContentsBeg + 1, pcEnd );
+ lclAppendToBuffer( rBuffer, pcContentsBeg, pcWhitespaceBeg );
+ if( pcWhitespaceBeg < pcEnd )
+ rBuffer.append( ' ' );
+ pcContentsBeg = lclFindNonWhiteSpace( pcWhitespaceBeg, pcEnd );
+ }
+
+ return bHasBracket;
+}
+
+} // namespace
+
+constexpr OStringLiteral gaOpeningCData( "<![CDATA[" );
+constexpr OStringLiteral gaClosingCData( "]]>" );
+
+InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) :
+ // use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters
+ mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
+ maOpeningBracket{ '<' },
+ maClosingBracket{ '>' },
+ mnBufferPos( 0 )
+{
+ if (!mxTextStrm.is())
+ throw IOException();
+}
+
+InputStream::~InputStream()
+{
+}
+
+sal_Int32 SAL_CALL InputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
+{
+ if( nBytesToRead < 0 )
+ throw IOException();
+
+ rData.realloc( nBytesToRead );
+ sal_Int8* pcDest = rData.getArray();
+ sal_Int32 nRet = 0;
+ while( (nBytesToRead > 0) && !mxTextStrm->isEOF() )
+ {
+ updateBuffer();
+ sal_Int32 nReadSize = ::std::min( nBytesToRead, maBuffer.getLength() - mnBufferPos );
+ if( nReadSize > 0 )
+ {
+ memcpy( pcDest + nRet, maBuffer.getStr() + mnBufferPos, static_cast< size_t >( nReadSize ) );
+ mnBufferPos += nReadSize;
+ nBytesToRead -= nReadSize;
+ nRet += nReadSize;
+ }
+ }
+ if( nRet < rData.getLength() )
+ rData.realloc( nRet );
+ return nRet;
+}
+
+sal_Int32 SAL_CALL InputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
+{
+ return readBytes( rData, nMaxBytesToRead );
+}
+
+void SAL_CALL InputStream::skipBytes( sal_Int32 nBytesToSkip )
+{
+ if( nBytesToSkip < 0 )
+ throw IOException();
+
+ while( (nBytesToSkip > 0) && !mxTextStrm->isEOF() )
+ {
+ updateBuffer();
+ sal_Int32 nSkipSize = ::std::min( nBytesToSkip, maBuffer.getLength() - mnBufferPos );
+ mnBufferPos += nSkipSize;
+ nBytesToSkip -= nSkipSize;
+ }
+}
+
+sal_Int32 SAL_CALL InputStream::available()
+{
+ updateBuffer();
+ return maBuffer.getLength() - mnBufferPos;
+}
+
+void SAL_CALL InputStream::closeInput()
+{
+ mxTextStrm->closeInput();
+}
+
+// private --------------------------------------------------------------------
+
+void InputStream::updateBuffer()
+{
+ while( (mnBufferPos >= maBuffer.getLength()) && !mxTextStrm->isEOF() )
+ {
+ // collect new contents in a string buffer
+ OStringBuffer aBuffer;
+
+ // read and process characters until the opening bracket of the next XML element
+ OString aChars = readToElementBegin();
+ bool bHasOpeningBracket = lclProcessCharacters( aBuffer, aChars );
+
+ // read and process characters until (and including) closing bracket (an XML element)
+ OSL_ENSURE( bHasOpeningBracket || mxTextStrm->isEOF(), "InputStream::updateBuffer - missing opening bracket of XML element" );
+ if( bHasOpeningBracket && !mxTextStrm->isEOF() )
+ {
+ // read the element text (add the leading opening bracket manually)
+ OString aElement = "<" + readToElementEnd();
+ // check for CDATA part, starting with '<![CDATA['
+ if( aElement.match( gaOpeningCData ) )
+ {
+ // search the end tag ']]>'
+ while( ((aElement.getLength() < gaClosingCData.getLength()) || !aElement.endsWith( gaClosingCData )) && !mxTextStrm->isEOF() )
+ aElement += readToElementEnd();
+ // copy the entire CDATA part
+ aBuffer.append( aElement );
+ }
+ else
+ {
+ // no CDATA part - process the contents of the element
+ lclProcessElement( aBuffer, aElement );
+ }
+ }
+
+ maBuffer = aBuffer.makeStringAndClear();
+ mnBufferPos = 0;
+ }
+}
+
+OString InputStream::readToElementBegin()
+{
+ return OUStringToOString( mxTextStrm->readString( maOpeningBracket, false ), RTL_TEXTENCODING_ISO_8859_1 );
+}
+
+OString InputStream::readToElementEnd()
+{
+ OString aText = OUStringToOString( mxTextStrm->readString( maClosingBracket, false ), RTL_TEXTENCODING_ISO_8859_1 );
+ OSL_ENSURE( aText.endsWith(">"), "InputStream::readToElementEnd - missing closing bracket of XML element" );
+ return aText;
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
new file mode 100644
index 000000000..31fbbade4
--- /dev/null
+++ b/oox/source/vml/vmlshape.cxx
@@ -0,0 +1,1574 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <algorithm>
+
+#include <optional>
+
+#include <o3tl/safeint.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <vcl/wmfexternal.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/SizeType.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
+#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
+#include <sal/log.hxx>
+#include <oox/drawingml/shapepropertymap.hxx>
+#include <oox/helper/graphichelper.hxx>
+#include <oox/helper/propertyset.hxx>
+#include <oox/ole/axcontrol.hxx>
+#include <oox/ole/axcontrolfragment.hxx>
+#include <oox/ole/oleobjecthelper.hxx>
+#include <oox/token/properties.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#include <oox/vml/vmltextbox.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/containerhelper.hxx>
+#include <svx/EnhancedCustomShapeTypeNames.hxx>
+#include <svx/sdtagitm.hxx>
+#include <svx/svdobj.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/storagehelper.hxx>
+#include <o3tl/string_view.hxx>
+
+using ::com::sun::star::beans::XPropertySet;
+using ::com::sun::star::uno::Any;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::text;
+
+namespace oox::vml {
+
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::graphic;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::io;
+
+using ::oox::core::XmlFilterBase;
+
+namespace {
+
+const sal_Int32 VML_SHAPETYPE_PICTUREFRAME = 75;
+const sal_Int32 VML_SHAPETYPE_HOSTCONTROL = 201;
+
+awt::Point lclGetAbsPoint( const awt::Point& rRelPoint, const awt::Rectangle& rShapeRect, const awt::Rectangle& rCoordSys )
+{
+ double fWidthRatio = static_cast< double >( rShapeRect.Width ) / rCoordSys.Width;
+ double fHeightRatio = static_cast< double >( rShapeRect.Height ) / rCoordSys.Height;
+ awt::Point aAbsPoint;
+ aAbsPoint.X = static_cast< sal_Int32 >( rShapeRect.X + fWidthRatio * (rRelPoint.X - rCoordSys.X) + 0.5 );
+ aAbsPoint.Y = static_cast< sal_Int32 >( rShapeRect.Y + fHeightRatio * (rRelPoint.Y - rCoordSys.Y) + 0.5 );
+ return aAbsPoint;
+}
+
+awt::Rectangle lclGetAbsRect( const awt::Rectangle& rRelRect, const awt::Rectangle& rShapeRect, const awt::Rectangle& rCoordSys )
+{
+ double fWidthRatio = static_cast< double >( rShapeRect.Width ) / rCoordSys.Width;
+ double fHeightRatio = static_cast< double >( rShapeRect.Height ) / rCoordSys.Height;
+ awt::Rectangle aAbsRect;
+ aAbsRect.X = static_cast< sal_Int32 >( rShapeRect.X + fWidthRatio * (rRelRect.X - rCoordSys.X) + 0.5 );
+ aAbsRect.Y = static_cast< sal_Int32 >( rShapeRect.Y + fHeightRatio * (rRelRect.Y - rCoordSys.Y) + 0.5 );
+ aAbsRect.Width = static_cast< sal_Int32 >( fWidthRatio * rRelRect.Width + 0.5 );
+ aAbsRect.Height = static_cast< sal_Int32 >( fHeightRatio * rRelRect.Height + 0.5 );
+ return aAbsRect;
+}
+
+/// Count the crop value based on a crop fraction and a reference size.
+sal_Int32 lclConvertCrop(const OUString& rCrop, sal_uInt32 nSize)
+{
+ if (rCrop.endsWith("f"))
+ {
+ // Numeric value is specified in 1/65536-ths.
+ sal_uInt32 nCrop = o3tl::toUInt32(rCrop.subView(0, rCrop.getLength() - 1));
+ return (nCrop * nSize) / 65536;
+ }
+
+ return 0;
+}
+
+} // namespace
+
+ShapeTypeModel::ShapeTypeModel():
+ mbAutoHeight( false ),
+ mbVisible( true )
+{
+}
+
+void ShapeTypeModel::assignUsed( const ShapeTypeModel& rSource )
+{
+ moShapeType.assignIfUsed( rSource.moShapeType );
+ moCoordPos.assignIfUsed( rSource.moCoordPos );
+ moCoordSize.assignIfUsed( rSource.moCoordSize );
+ /* The style properties position, left, top, width, height, margin-left,
+ margin-top are not derived from shape template to shape. */
+ maStrokeModel.assignUsed( rSource.maStrokeModel );
+ maFillModel.assignUsed( rSource.maFillModel );
+ moGraphicPath.assignIfUsed( rSource.moGraphicPath );
+ moGraphicTitle.assignIfUsed( rSource.moGraphicTitle );
+}
+
+ShapeType::ShapeType( Drawing& rDrawing ) :
+ mrDrawing( rDrawing )
+{
+}
+
+ShapeType::~ShapeType()
+{
+}
+
+sal_Int32 ShapeType::getShapeType() const
+{
+ return maTypeModel.moShapeType.get( 0 );
+}
+
+OUString ShapeType::getGraphicPath() const
+{
+ return maTypeModel.moGraphicPath.get( OUString() );
+}
+
+awt::Rectangle ShapeType::getCoordSystem() const
+{
+ Int32Pair aCoordPos = maTypeModel.moCoordPos.get( Int32Pair( 0, 0 ) );
+ Int32Pair aCoordSize = maTypeModel.moCoordSize.get( Int32Pair( 1000, 1000 ) );
+ if( aCoordSize.first == 0 )
+ aCoordSize.first = 1;
+ if( aCoordSize.second == 0 )
+ aCoordSize.second = 1;
+ return awt::Rectangle( aCoordPos.first, aCoordPos.second, aCoordSize.first, aCoordSize.second );
+}
+
+awt::Rectangle ShapeType::getRectangle( const ShapeParentAnchor* pParentAnchor ) const
+{
+ return pParentAnchor ?
+ lclGetAbsRect( getRelRectangle(), pParentAnchor->maShapeRect, pParentAnchor->maCoordSys ) :
+ getAbsRectangle();
+}
+
+awt::Rectangle ShapeType::getAbsRectangle() const
+{
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+
+ sal_Int32 nWidth = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maWidth, 0, true, true );
+ if ( nWidth == 0 )
+ nWidth = 1;
+
+ sal_Int32 nHeight = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maHeight, 0, false, true );
+ if ( nHeight == 0 )
+ nHeight = 1;
+
+ sal_Int32 nLeft;
+ if (o3tl::checked_add<sal_Int32>(ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maLeft, 0, true, true),
+ ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true),
+ nLeft))
+ {
+ SAL_WARN("oox", "overflow in addition");
+ nLeft = 0;
+ }
+ if (nLeft == 0 && maTypeModel.maPosition == "absolute")
+ nLeft = 1;
+
+ return awt::Rectangle(
+ nLeft,
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maTop, 0, false, true ) + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginTop, 0, false, true ),
+ nWidth, nHeight );
+}
+
+awt::Rectangle ShapeType::getRelRectangle() const
+{
+ sal_Int32 nWidth = maTypeModel.maWidth.toInt32();
+ if ( nWidth == 0 )
+ nWidth = 1;
+
+ sal_Int32 nHeight = maTypeModel.maHeight.toInt32();
+ if ( nHeight == 0 )
+ nHeight = 1;
+
+ return awt::Rectangle(
+ maTypeModel.maLeft.toInt32(),
+ maTypeModel.maTop.toInt32(),
+ nWidth, nHeight );
+}
+
+ClientData::ClientData() :
+ mnObjType( XML_TOKEN_INVALID ),
+ mnTextHAlign( XML_Left ),
+ mnTextVAlign( XML_Top ),
+ mnCol( -1 ),
+ mnRow( -1 ),
+ mnChecked( VML_CLIENTDATA_UNCHECKED ),
+ mnDropStyle( XML_Combo ),
+ mnDropLines( 1 ),
+ mnVal( 0 ),
+ mnMin( 0 ),
+ mnMax( 0 ),
+ mnInc( 0 ),
+ mnPage( 0 ),
+ mnSelType( XML_Single ),
+ mnVTEdit( VML_CLIENTDATA_TEXT ),
+ mbPrintObject( true ),
+ mbVisible( false ),
+ mbDde( false ),
+ mbNo3D( false ),
+ mbNo3D2( false ),
+ mbMultiLine( false ),
+ mbVScroll( false ),
+ mbSecretEdit( false )
+{
+}
+
+ShapeModel::ShapeModel()
+ : mbIsSignatureLine(false)
+ , mbSignatureLineShowSignDate(true)
+ , mbSignatureLineCanAddComment(false)
+ , mbInGroup(false)
+{
+}
+
+ShapeModel::~ShapeModel()
+{
+}
+
+TextBox& ShapeModel::createTextBox(ShapeTypeModel& rModel)
+{
+ mxTextBox.reset( new TextBox(rModel) );
+ return *mxTextBox;
+}
+
+ClientData& ShapeModel::createClientData()
+{
+ mxClientData.reset( new ClientData );
+ return *mxClientData;
+}
+
+ShapeBase::ShapeBase( Drawing& rDrawing ) :
+ ShapeType( rDrawing )
+{
+}
+
+void ShapeBase::finalizeFragmentImport()
+{
+ if( maShapeModel.maType.getLength() <= 1 )
+ return;
+
+ OUString aType = maShapeModel.maType;
+ if (aType[ 0 ] == '#')
+ aType = aType.copy(1);
+ if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType ) )
+ {
+ // Make sure that the props from maTypeModel have priority over the props from
+ // the shape type.
+ StrokeModel aMergedStrokeModel;
+ aMergedStrokeModel.assignUsed(pShapeType->getTypeModel().maStrokeModel);
+ aMergedStrokeModel.assignUsed(maTypeModel.maStrokeModel);
+ FillModel aMergedFillModel;
+ aMergedFillModel.assignUsed(pShapeType->getTypeModel().maFillModel);
+ aMergedFillModel.assignUsed(maTypeModel.maFillModel);
+
+ maTypeModel.assignUsed( pShapeType->getTypeModel() );
+ maTypeModel.maStrokeModel = aMergedStrokeModel;
+ maTypeModel.maFillModel = aMergedFillModel;
+ }
+ else {
+ // Temporary fix, shapetype not found if referenced from different substream
+ // FIXME: extend scope of ShapeContainer to store all shapetypes from the document
+ static const OUStringLiteral sShapeTypePrefix = u"shapetype_";
+ OUString tmp;
+ if (aType.startsWith(sShapeTypePrefix)) {
+ maTypeModel.moShapeType = o3tl::toInt32(aType.subView(sShapeTypePrefix.getLength()));
+ }
+ else if (aType.startsWith("_x0000_t", &tmp)) {
+ maTypeModel.moShapeType = tmp.toInt32();
+ }
+ }
+}
+
+OUString ShapeBase::getShapeName() const
+{
+ if( !maTypeModel.maShapeName.isEmpty() )
+ return maTypeModel.maShapeName;
+
+ OUString aBaseName = mrDrawing.getShapeBaseName( *this );
+ if( !aBaseName.isEmpty() )
+ {
+ sal_Int32 nShapeIdx = mrDrawing.getLocalShapeIndex( getShapeId() );
+ if( nShapeIdx > 0 )
+ return aBaseName + OUStringChar(' ') + OUString::number( nShapeIdx );
+ }
+
+ return OUString();
+}
+
+const ShapeType* ShapeBase::getChildTypeById( const OUString& ) const
+{
+ return nullptr;
+}
+
+const ShapeBase* ShapeBase::getChildById( const OUString& ) const
+{
+ return nullptr;
+}
+
+Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxShapes, const ShapeParentAnchor* pParentAnchor ) const
+{
+ Reference< XShape > xShape;
+ if( mrDrawing.isShapeSupported( *this ) )
+ {
+ /* Calculate shape rectangle. Applications may do something special
+ according to some imported shape client data (e.g. Excel cell anchor). */
+ awt::Rectangle aShapeRect = calcShapeRectangle( pParentAnchor );
+
+ if( ((aShapeRect.Width > 0) || (aShapeRect.Height > 0)) && rxShapes.is() )
+ {
+ xShape = implConvertAndInsert( rxShapes, aShapeRect );
+ if( xShape.is() )
+ {
+ // set imported or generated shape name (not supported by form controls)
+ PropertySet aShapeProp( xShape );
+ if( aShapeProp.hasProperty( PROP_Name ) )
+ aShapeProp.setProperty( PROP_Name, getShapeName() );
+ uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
+
+ OUString sLinkChainName = getTypeModel().maLegacyId;
+ sal_Int32 id = 0;
+ sal_Int32 idPos = sLinkChainName.indexOf("_x");
+ sal_Int32 seq = 0;
+ if (idPos >= 0)
+ {
+ sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos);
+ if (idPos < seqPos)
+ {
+ auto idPosEnd = idPos+2;
+ id = o3tl::toInt32(sLinkChainName.subView(idPosEnd, seqPos - idPosEnd));
+ seq = o3tl::toInt32(sLinkChainName.subView(seqPos+2));
+ }
+ }
+
+ OUString s_mso_next_textbox;
+ if( getTextBox() )
+ s_mso_next_textbox = getTextBox()->msNextTextbox;
+ if( s_mso_next_textbox.startsWith("#") )
+ s_mso_next_textbox = s_mso_next_textbox.copy(1);
+
+ if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
+ {
+ uno::Reference<beans::XPropertySet> propertySet (xShape, uno::UNO_QUERY);
+ uno::Any aAny = propertySet->getPropertyValue("FrameInteropGrabBag");
+ auto aGrabBag = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(aAny.get< uno::Sequence<beans::PropertyValue> >());
+
+ aGrabBag.push_back(comphelper::makePropertyValue("VML-Z-ORDER", maTypeModel.maZIndex.toInt32()));
+
+ if( !s_mso_next_textbox.isEmpty() )
+ aGrabBag.push_back(comphelper::makePropertyValue("mso-next-textbox", s_mso_next_textbox));
+
+ if( !sLinkChainName.isEmpty() )
+ {
+ aGrabBag.push_back(comphelper::makePropertyValue("TxbxHasLink", true));
+ aGrabBag.push_back(comphelper::makePropertyValue("Txbx-Id", id));
+ aGrabBag.push_back(comphelper::makePropertyValue("Txbx-Seq", seq));
+ aGrabBag.push_back(comphelper::makePropertyValue("LinkChainName", sLinkChainName));
+ }
+
+ if(!maTypeModel.maRotation.isEmpty())
+ aGrabBag.push_back(comphelper::makePropertyValue("mso-rotation-angle", ConversionHelper::decodeRotation(maTypeModel.maRotation).get()));
+ propertySet->setPropertyValue("FrameInteropGrabBag", uno::Any(comphelper::containerToSequence(aGrabBag)));
+ sal_Int32 backColorTransparency = 0;
+ propertySet->getPropertyValue("BackColorTransparency")
+ >>= backColorTransparency;
+ if (propertySet->getPropertyValue("FillStyle") == FillStyle_NONE &&
+ backColorTransparency == 100)
+ {
+ // If there is no fill, the Word default is 100% transparency.
+ propertySet->setPropertyValue("FillTransparence", Any(sal_Int16(100)));
+ }
+ }
+ else
+ {
+ if( maTypeModel.maZIndex.toInt32() )
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ uno::Reference<beans::XPropertySet> propertySet (xShape, uno::UNO_QUERY);
+ propertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ sal_Int32 length;
+
+ length = aGrabBag.getLength();
+ aGrabBag.realloc( length+1 );
+ auto pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "VML-Z-ORDER";
+ pGrabBag[length].Value <<= maTypeModel.maZIndex.toInt32();
+
+ if( !s_mso_next_textbox.isEmpty() )
+ {
+ length = aGrabBag.getLength();
+ aGrabBag.realloc( length+1 );
+ pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "mso-next-textbox";
+ pGrabBag[length].Value <<= s_mso_next_textbox;
+ }
+
+ if( !sLinkChainName.isEmpty() )
+ {
+ length = aGrabBag.getLength();
+ aGrabBag.realloc( length+4 );
+ pGrabBag = aGrabBag.getArray();
+ pGrabBag[length].Name = "TxbxHasLink";
+ pGrabBag[length].Value <<= true;
+ pGrabBag[length+1].Name = "Txbx-Id";
+ pGrabBag[length+1].Value <<= id;
+ pGrabBag[length+2].Name = "Txbx-Seq";
+ pGrabBag[length+2].Value <<= seq;
+ pGrabBag[length+3].Name = "LinkChainName";
+ pGrabBag[length+3].Value <<= sLinkChainName;
+ }
+ propertySet->setPropertyValue( "InteropGrabBag", uno::Any(aGrabBag) );
+ }
+ }
+ Reference< XControlShape > xControlShape( xShape, uno::UNO_QUERY );
+ if ( xControlShape.is() && !getTypeModel().mbVisible )
+ {
+ PropertySet aControlShapeProp( xControlShape->getControl() );
+ aControlShapeProp.setProperty( PROP_EnableVisible, uno::Any( false ) );
+ }
+
+ xShape = finalImplConvertAndInsert(xShape);
+ /* Notify the drawing that a new shape has been inserted. For
+ convenience, pass the rectangle that contains position and
+ size of the shape. */
+ bool bGroupChild = pParentAnchor != nullptr;
+ mrDrawing.notifyXShapeInserted( xShape, aShapeRect, *this, bGroupChild );
+ }
+ }
+ else
+ SAL_WARN("oox", "not converting shape, as calculated rectangle is empty");
+ }
+ return xShape;
+}
+
+void ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const
+{
+ if( !rxShape.is() )
+ return;
+
+ /* Calculate shape rectangle. Applications may do something special
+ according to some imported shape client data (e.g. Excel cell anchor). */
+ awt::Rectangle aShapeRect = calcShapeRectangle( nullptr );
+
+ // convert the shape, if the calculated rectangle is not empty
+ if( (aShapeRect.Width > 0) || (aShapeRect.Height > 0) )
+ {
+ rxShape->setPosition( awt::Point( aShapeRect.X, aShapeRect.Y ) );
+ rxShape->setSize( awt::Size( aShapeRect.Width, aShapeRect.Height ) );
+ convertShapeProperties( rxShape );
+ }
+}
+
+void ShapeBase::setContainer(ShapeContainer* pContainer) { mpContainer = pContainer; }
+
+ShapeContainer* ShapeBase::getContainer() const { return mpContainer; }
+
+// protected ------------------------------------------------------------------
+
+awt::Rectangle ShapeBase::calcShapeRectangle( const ShapeParentAnchor* pParentAnchor ) const
+{
+ /* Calculate shape rectangle. Applications may do something special
+ according to some imported shape client data (e.g. Excel cell anchor). */
+ awt::Rectangle aShapeRect;
+ const ClientData* pClientData = getClientData();
+ if( !pClientData || !mrDrawing.convertClientAnchor( aShapeRect, pClientData->maAnchor ) )
+ aShapeRect = getRectangle( pParentAnchor );
+ return aShapeRect;
+}
+
+void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) const
+{
+ ::oox::drawingml::ShapePropertyMap aPropMap( mrDrawing.getFilter().getModelObjectHelper() );
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rGraphicHelper );
+ maTypeModel.maFillModel.pushToPropMap( aPropMap, rGraphicHelper );
+
+ uno::Reference<lang::XServiceInfo> xSInfo(rxShape, uno::UNO_QUERY_THROW);
+ if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
+ {
+ // Any other service supporting the ShadowFormat property?
+ maTypeModel.maShadowModel.pushToPropMap(aPropMap, rGraphicHelper);
+ // TextFrames have BackColor, not FillColor
+ if (aPropMap.hasProperty(PROP_FillColor))
+ {
+ aPropMap.setAnyProperty(PROP_BackColor, aPropMap.getProperty(PROP_FillColor));
+ aPropMap.erase(PROP_FillColor);
+ }
+ // TextFrames have BackColorTransparency, not FillTransparence
+ if (aPropMap.hasProperty(PROP_FillTransparence))
+ {
+ aPropMap.setAnyProperty(PROP_BackColorTransparency, aPropMap.getProperty(PROP_FillTransparence));
+ aPropMap.erase(PROP_FillTransparence);
+ }
+ // And no LineColor property; individual borders can have colors and widths
+ std::optional<sal_Int32> oLineWidth;
+ if (maTypeModel.maStrokeModel.moWeight.has())
+ oLineWidth = ConversionHelper::decodeMeasureToHmm(
+ rGraphicHelper, maTypeModel.maStrokeModel.moWeight.get(), 0, false, false);
+ if (aPropMap.hasProperty(PROP_LineColor))
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(rxShape, uno::UNO_QUERY);
+ static const sal_Int32 aBorders[] = {
+ PROP_TopBorder, PROP_LeftBorder, PROP_BottomBorder, PROP_RightBorder
+ };
+ for (sal_Int32 nBorder : aBorders)
+ {
+ table::BorderLine2 aBorderLine = xPropertySet->getPropertyValue(PropertyMap::getPropertyName(nBorder)).get<table::BorderLine2>();
+ aBorderLine.Color = aPropMap.getProperty(PROP_LineColor).get<sal_Int32>();
+ if (oLineWidth)
+ aBorderLine.LineWidth = *oLineWidth;
+ aPropMap.setProperty(nBorder, aBorderLine);
+ }
+ aPropMap.erase(PROP_LineColor);
+ }
+ }
+ else if (xSInfo->supportsService("com.sun.star.drawing.CustomShape"))
+ maTypeModel.maTextpathModel.pushToPropMap(aPropMap, rxShape, rGraphicHelper);
+
+ PropertySet( rxShape ).setProperties( aPropMap );
+}
+
+SimpleShape::SimpleShape( Drawing& rDrawing, const OUString& rService ) :
+ ShapeBase( rDrawing ),
+ maService( rService )
+{
+}
+
+static void lcl_setSurround(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
+{
+ OUString aWrapType = rTypeModel.moWrapType.get();
+
+ // Extreme negative top margin? Then the shape will end up at the top of the page, it's pointless to perform any kind of wrapping.
+ sal_Int32 nMarginTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, rTypeModel.maMarginTop, 0, false, true);
+ if (nMarginTop < -35277) // Less than 1000 points.
+ aWrapType.clear();
+
+ css::text::WrapTextMode nSurround = css::text::WrapTextMode_THROUGH;
+ if ( aWrapType == "square" || aWrapType == "tight" ||
+ aWrapType == "through" )
+ {
+ nSurround = css::text::WrapTextMode_PARALLEL;
+ if ( rTypeModel.moWrapSide.get() == "left" )
+ nSurround = css::text::WrapTextMode_LEFT;
+ else if ( rTypeModel.moWrapSide.get() == "right" )
+ nSurround = css::text::WrapTextMode_RIGHT;
+ }
+ else if ( aWrapType == "topAndBottom" )
+ nSurround = css::text::WrapTextMode_NONE;
+
+ rPropSet.setProperty(PROP_Surround, static_cast<sal_Int32>(nSurround));
+ rPropSet.setProperty(PROP_SurroundContour, aWrapType == "tight");
+}
+
+static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
+{
+ if ( rTypeModel.maPosition == "absolute" )
+ {
+ // Word supports as-character (inline) and at-character only, absolute can't be inline.
+ rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER);
+ // anchor is set after insertion, so reset to NONE
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::NONE));
+
+ if ( rTypeModel.maPositionVerticalRelative == "page" )
+ {
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_FRAME);
+ }
+ else if ( rTypeModel.maPositionVerticalRelative == "margin" )
+ {
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA);
+ }
+ else if (rTypeModel.maPositionVerticalRelative == "top-margin-area")
+ {
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA_TOP);
+ }
+ else if (rTypeModel.maPositionVerticalRelative == "bottom-margin-area")
+ {
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA_BOTTOM);
+ }
+ else
+ {
+ rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME);
+ }
+ }
+ else if( rTypeModel.maPosition == "relative" )
+ { // I'm not very sure this is correct either.
+ rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PARAGRAPH);
+ // anchor is set after insertion, so reset to NONE
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::NONE));
+ }
+ else // static (is the default) means anchored inline
+ {
+ rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AS_CHARACTER);
+ // Use top orientation, this one seems similar to what MSO uses as inline
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP));
+ }
+
+ if ( rTypeModel.maPositionHorizontal == "center" )
+ rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::CENTER));
+ else if ( rTypeModel.maPositionHorizontal == "left" )
+ rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::LEFT));
+ else if ( rTypeModel.maPositionHorizontal == "right" )
+ rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::RIGHT));
+ else if ( rTypeModel.maPositionHorizontal == "inside" )
+ {
+ rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::LEFT));
+ rPropSet.setAnyProperty(PROP_PageToggle, Any(true));
+ }
+ else if ( rTypeModel.maPositionHorizontal == "outside" )
+ {
+ rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::RIGHT));
+ rPropSet.setAnyProperty(PROP_PageToggle, Any(true));
+ }
+
+ if ( rTypeModel.maPositionHorizontalRelative == "page" )
+ rPropSet.setAnyProperty(PROP_HoriOrientRelation, Any(text::RelOrientation::PAGE_FRAME));
+ else if ( rTypeModel.maPositionHorizontalRelative == "margin" )
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_PRINT_AREA);
+ else if (rTypeModel.maPositionHorizontalRelative == "right-margin-area" ||
+ rTypeModel.maPositionHorizontalRelative == "inner-margin-area")
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_RIGHT);
+ else if (rTypeModel.maPositionHorizontalRelative == "left-margin-area" ||
+ rTypeModel.maPositionHorizontalRelative == "outer-margin-area")
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_LEFT);
+ else if ( rTypeModel.maPositionHorizontalRelative == "text" )
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::FRAME);
+
+ if ( rTypeModel.maPositionVertical == "center" )
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::CENTER));
+ else if ( rTypeModel.maPositionVertical == "top" )
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP));
+ else if ( rTypeModel.maPositionVertical == "bottom" )
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::BOTTOM));
+ else if ( rTypeModel.maPositionVertical == "inside" )
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP));
+ else if ( rTypeModel.maPositionVertical == "outside" )
+ rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::BOTTOM));
+
+ lcl_setSurround( rPropSet, rTypeModel, rGraphicHelper );
+}
+
+Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ awt::Rectangle aShapeRect(rShapeRect);
+ std::optional<Degree100> oRotation;
+ bool bFlipX = false, bFlipY = false;
+ // tdf#137765: skip this rotation for line shapes
+ if (!maTypeModel.maRotation.isEmpty() && maService != "com.sun.star.drawing.LineShape")
+ oRotation = ConversionHelper::decodeRotation(maTypeModel.maRotation);
+ if (!maTypeModel.maFlip.isEmpty())
+ {
+ if (maTypeModel.maFlip.startsWith("x"))
+ {
+ bFlipX = true;
+ }
+ if (maTypeModel.maFlip.endsWith("y"))
+ {
+ bFlipY = true;
+ }
+ }
+
+ Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, aShapeRect );
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
+ if( pShape && getShapeType() >= 0 )
+ {
+ OUString aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< MSO_SPT >(getShapeType()) );
+ //The resize autoshape to fit text attr of FontWork/Word-Art should always be false
+ //for the fallback geometry.
+ if(aShapeType.startsWith("fontwork"))
+ {
+ pShape->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
+ pShape->SetMergedItem(makeSdrTextAutoGrowWidthItem(false));
+ }
+ }
+ convertShapeProperties( xShape );
+
+ // Handle left/right/top/bottom wrap distance.
+ // Default value of mso-wrap-distance-left/right is supposed to be 0 (see
+ // 19.1.2.19 of the VML spec), but Word implements a non-zero value.
+ // [MS-ODRAW] says the below default value in 2.3.4.9.
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ OUString aWrapDistanceLeft = OUString::number(0x0001BE7C);
+ if (!maTypeModel.maWrapDistanceLeft.isEmpty())
+ aWrapDistanceLeft = maTypeModel.maWrapDistanceLeft;
+ sal_Int32 nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceLeft, 0, true, false);
+ PropertySet(xShape).setAnyProperty(PROP_LeftMargin, uno::Any(nWrapDistanceLeft));
+ OUString aWrapDistanceRight = OUString::number(0x0001BE7C);
+ if (!maTypeModel.maWrapDistanceRight.isEmpty())
+ aWrapDistanceRight = maTypeModel.maWrapDistanceRight;
+ sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceRight, 0, true, false);
+ PropertySet(xShape).setAnyProperty(PROP_RightMargin, uno::Any(nWrapDistanceRight));
+ sal_Int32 nWrapDistanceTop = 0;
+ if (!maTypeModel.maWrapDistanceTop.isEmpty())
+ nWrapDistanceTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceTop, 0, false, true);
+ PropertySet(xShape).setAnyProperty(PROP_TopMargin, uno::Any(nWrapDistanceTop));
+ sal_Int32 nWrapDistanceBottom = 0;
+ if (!maTypeModel.maWrapDistanceBottom.isEmpty())
+ nWrapDistanceBottom = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceBottom, 0, false, true);
+ PropertySet(xShape).setAnyProperty(PROP_BottomMargin, uno::Any(nWrapDistanceBottom));
+
+ if ( maService == "com.sun.star.text.TextFrame" )
+ {
+ PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, Any( maTypeModel.mbAutoHeight ) );
+ PropertySet( xShape ).setAnyProperty( PROP_SizeType, Any( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) );
+ if( getTextBox()->borderDistanceSet )
+ {
+ PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceLeft )));
+ PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceTop )));
+ PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceRight )));
+ PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceBottom )));
+ }
+
+ sal_Int16 nWritingMode = text::WritingMode2::LR_TB;
+ if (getTextBox()->maLayoutFlow == "vertical" && maTypeModel.maLayoutFlowAlt.isEmpty())
+ {
+ nWritingMode = text::WritingMode2::TB_RL;
+ }
+ else if (maTypeModel.maLayoutFlowAlt == "bottom-to-top")
+ {
+ nWritingMode = text::WritingMode2::BT_LR;
+ }
+ if (nWritingMode != text::WritingMode2::LR_TB)
+ {
+ PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::Any(nWritingMode));
+ }
+ // tdf#123626
+ if (!maShapeModel.maHyperlink.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_HyperLinkURL, Any(maShapeModel.maHyperlink));
+ }
+ else
+ {
+ // FIXME Setting the relative width/height only for everything but text frames as
+ // TextFrames already have relative width/height feature... but currently not working
+ // in the way we need.
+
+ // Set the relative width / height if any
+ if ( !maTypeModel.maWidthPercent.isEmpty( ) )
+ {
+ // Only page-relative width is supported ATM
+ if ( maTypeModel.maWidthRelative.isEmpty() || maTypeModel.maWidthRelative == "page" )
+ {
+ sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10;
+ // Only apply if nWidth != 0
+ if ( nWidth )
+ PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, Any( nWidth ) );
+ }
+ }
+ if ( !maTypeModel.maHeightPercent.isEmpty( ) )
+ {
+ // Only page-relative height is supported ATM
+ if ( maTypeModel.maHeightRelative.isEmpty() || maTypeModel.maHeightRelative == "page" )
+ {
+ sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10;
+ // Only apply if nHeight != 0
+ if ( nHeight )
+ PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, Any( nHeight ) );
+ }
+ }
+
+ // drawinglayer default is center, MSO default is top.
+ drawing::TextVerticalAdjust eTextVerticalAdjust = drawing::TextVerticalAdjust_TOP;
+ if (maTypeModel.maVTextAnchor == "middle")
+ eTextVerticalAdjust = drawing::TextVerticalAdjust_CENTER;
+ else if (maTypeModel.maVTextAnchor == "bottom")
+ eTextVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
+ PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, Any(eTextVerticalAdjust));
+
+ // tdf#97618
+ if(!maTypeModel.maWrapStyle.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_TextWordWrap, Any(maTypeModel.maWrapStyle == "square"));
+
+ // tdf#123626
+ if (!maShapeModel.maHyperlink.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_Hyperlink, Any(maShapeModel.maHyperlink));
+
+ PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight,
+ Any(maTypeModel.mbAutoHeight));
+
+ if (getTextBox())
+ {
+ getTextBox()->convert(xShape);
+ if (getTextBox()->borderDistanceSet)
+ {
+ awt::Size aSize = xShape->getSize();
+ PropertySet(xShape).setAnyProperty(PROP_TextLeftDistance, Any(sal_Int32(getTextBox()->borderDistanceLeft)));
+ PropertySet(xShape).setAnyProperty(PROP_TextUpperDistance, Any(sal_Int32(getTextBox()->borderDistanceTop)));
+ PropertySet(xShape).setAnyProperty(PROP_TextRightDistance, Any(sal_Int32(getTextBox()->borderDistanceRight)));
+ PropertySet(xShape).setAnyProperty(PROP_TextLowerDistance, Any(sal_Int32(getTextBox()->borderDistanceBottom)));
+ xShape->setSize(aSize);
+ }
+ }
+ }
+
+ // Import Legacy Fragments (if any)
+ if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() )
+ {
+ Reference< XInputStream > xInStrm( mrDrawing.getFilter().openInputStream( maShapeModel.maLegacyDiagramPath ), UNO_SET_THROW );
+ if( xInStrm.is() )
+ PropertySet( xShape ).setProperty( PROP_LegacyFragment, xInStrm );
+ }
+
+ PropertySet aPropertySet(xShape);
+ if (xShape.is())
+ {
+ if (oRotation)
+ {
+ aPropertySet.setAnyProperty(PROP_RotateAngle, Any((*oRotation).get()));
+ uno::Reference<lang::XServiceInfo> xServiceInfo(rxShapes, uno::UNO_QUERY);
+ if (!xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
+ {
+ // If rotation is used, simple setPosition() is not enough.
+ aPropertySet.setAnyProperty(PROP_HoriOrientPosition, Any(aShapeRect.X));
+ aPropertySet.setAnyProperty(PROP_VertOrientPosition, Any(aShapeRect.Y));
+ }
+ }
+
+ // custom shape geometry attributes
+ std::vector<css::beans::PropertyValue> aPropVec;
+
+ // When flip has 'x' or 'y', the associated ShapeRect will be changed but direction change doesn't occur.
+ // It might occur internally in SdrObject of "sw" module, not here.
+ // The associated properties "PROP_MirroredX" and "PROP_MirroredY" have to be set here so that direction change will occur internally.
+ if (bFlipX)
+ aPropVec.push_back(comphelper::makePropertyValue("MirroredX", true));
+ if (bFlipY)
+ aPropVec.push_back(comphelper::makePropertyValue("MirroredY", true));
+
+ if (!maTypeModel.maAdjustments.isEmpty())
+ {
+ std::vector<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ std::u16string_view aToken = o3tl::getToken(maTypeModel.maAdjustments, 0, ',', nIndex);
+ drawing::EnhancedCustomShapeAdjustmentValue aAdjustmentValue;
+ if (aToken.empty())
+ aAdjustmentValue.State = css::beans::PropertyState::PropertyState_DEFAULT_VALUE;
+ else
+ aAdjustmentValue.Value <<= o3tl::toInt32(aToken);
+ aAdjustmentValues.push_back(aAdjustmentValue);
+ } while (nIndex >= 0);
+
+ css::beans::PropertyValue aProp;
+ aProp.Name = "AdjustmentValues";
+ aProp.Value <<= comphelper::containerToSequence(aAdjustmentValues);
+ aPropVec.push_back(aProp);
+ }
+
+ if (!aPropVec.empty())
+ aPropertySet.setAnyProperty(PROP_CustomShapeGeometry, Any(comphelper::containerToSequence(aPropVec)));
+ }
+
+ lcl_SetAnchorType(aPropertySet, maTypeModel, rGraphicHelper );
+
+ return xShape;
+}
+
+Reference<XShape> SimpleShape::finalImplConvertAndInsert(const css::uno::Reference<css::drawing::XShape>& rxShape) const
+{
+ // tdf#41466 This setting must be done here, because the position of textbox will be set as an
+ // effect of the PROP_TextBox property setting, and if we do this setting earlier (setting of
+ // properties of position and size) then the position of textbox will be set with wrong data.
+ // TODO: TextShape is set if we have rect shape in group; we should use the shape-with-textbox
+ // mechanism to handle this situation
+ if (getTextBox() && maService != "com.sun.star.text.TextFrame" && maService != "com.sun.star.drawing.TextShape"
+ && !maShapeModel.mbInGroup)
+ {
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ const auto& nLeft = ConversionHelper::decodeMeasureToHmm(
+ rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true);
+ PropertySet aPropertySet(rxShape);
+ aPropertySet.setProperty(PROP_HoriOrientPosition, nLeft);
+ const auto& nTop = ConversionHelper::decodeMeasureToHmm(
+ rGraphicHelper, maTypeModel.maMarginTop, 0, true, true);
+ aPropertySet.setProperty(PROP_VertOrientPosition, nTop);
+ aPropertySet.setProperty(PROP_TextBox, true);
+
+ // And these properties must be set after textbox creation (set PROP_Textbox property).
+ // Note: if you set a new property then you have to handle it in the proper
+ // SwTextBoxHelper::syncProperty function.
+ if (maTypeModel.maLayoutFlowAlt == "bottom-to-top")
+ aPropertySet.setAnyProperty(PROP_TextWritingMode, uno::Any(text::WritingMode2::BT_LR));
+ }
+ return ShapeBase::finalImplConvertAndInsert(rxShape);
+}
+Reference< XShape > SimpleShape::createEmbeddedPictureObject( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect, OUString const & rGraphicPath ) const
+{
+ Reference<XGraphic> xGraphic = mrDrawing.getFilter().getGraphicHelper().importEmbeddedGraphic(rGraphicPath);
+ return SimpleShape::createPictureObject(rxShapes, rShapeRect, xGraphic);
+}
+
+Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >& rxShapes,
+ const awt::Rectangle& rShapeRect,
+ uno::Reference<graphic::XGraphic> const & rxGraphic) const
+{
+ Reference< XShape > xShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.GraphicObjectShape", rxShapes, rShapeRect );
+ if( xShape.is() )
+ {
+ PropertySet aPropSet(xShape);
+ if (rxGraphic.is())
+ {
+ aPropSet.setProperty(PROP_Graphic, rxGraphic);
+ }
+ uno::Reference< lang::XServiceInfo > xServiceInfo(rxShapes, uno::UNO_QUERY);
+ // If the shape has an absolute position, set the properties accordingly, unless we're inside a group shape.
+ if ( maTypeModel.maPosition == "absolute" && !xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
+ {
+ aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X);
+ aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y);
+ aPropSet.setProperty(PROP_Opaque, false);
+ }
+ // fdo#70457: preserve rotation information
+ if ( !maTypeModel.maRotation.isEmpty() )
+ aPropSet.setAnyProperty(PROP_RotateAngle, Any(ConversionHelper::decodeRotation(maTypeModel.maRotation).get()));
+
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ lcl_SetAnchorType(aPropSet, maTypeModel, rGraphicHelper);
+
+ const sal_Int32 nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceLeft, 0, true, true);
+ const sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceRight, 0, true, true);
+ const sal_Int32 nWrapDistanceTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceTop, 0, false, true);
+ const sal_Int32 nWrapDistanceBottom = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceBottom, 0, false, true);
+ aPropSet.setProperty(PROP_LeftMargin, uno::Any(nWrapDistanceLeft));
+ aPropSet.setProperty(PROP_RightMargin, uno::Any(nWrapDistanceRight));
+ aPropSet.setProperty(PROP_TopMargin, uno::Any(nWrapDistanceTop));
+ aPropSet.setProperty(PROP_BottomMargin, uno::Any(nWrapDistanceBottom));
+
+ if (maTypeModel.moCropBottom.has() || maTypeModel.moCropLeft.has() || maTypeModel.moCropRight.has() || maTypeModel.moCropTop.has())
+ {
+ text::GraphicCrop aGraphicCrop;
+ awt::Size aOriginalSize = rGraphicHelper.getOriginalSize(rxGraphic);
+
+ if (maTypeModel.moCropBottom.has())
+ aGraphicCrop.Bottom = lclConvertCrop(maTypeModel.moCropBottom.get(), aOriginalSize.Height);
+ if (maTypeModel.moCropLeft.has())
+ aGraphicCrop.Left = lclConvertCrop(maTypeModel.moCropLeft.get(), aOriginalSize.Width);
+ if (maTypeModel.moCropRight.has())
+ aGraphicCrop.Right = lclConvertCrop(maTypeModel.moCropRight.get(), aOriginalSize.Width);
+ if (maTypeModel.moCropTop.has())
+ aGraphicCrop.Top = lclConvertCrop(maTypeModel.moCropTop.get(), aOriginalSize.Height);
+
+ aPropSet.setProperty(PROP_GraphicCrop, aGraphicCrop);
+ }
+
+ if (maTypeModel.mnGain == -70 && maTypeModel.mnBlacklevel == 70)
+ {
+ // Map MSO 'washout' to our watermark colormode.
+ aPropSet.setProperty(PROP_GraphicColorMode, uno::Any(drawing::ColorMode_WATERMARK));
+ }
+ }
+ return xShape;
+}
+
+RectangleShape::RectangleShape( Drawing& rDrawing ) :
+ SimpleShape( rDrawing, "com.sun.star.drawing.RectangleShape" )
+{
+}
+
+Reference<XShape> RectangleShape::implConvertAndInsert(const Reference<XShapes>& rxShapes, const awt::Rectangle& rShapeRect) const
+{
+ OUString aGraphicPath = getGraphicPath();
+
+ // try to create a picture object
+ if(!aGraphicPath.isEmpty())
+ return SimpleShape::createEmbeddedPictureObject(rxShapes, rShapeRect, aGraphicPath);
+
+ // default: try to create a rectangle shape
+ Reference<XShape> xShape = SimpleShape::implConvertAndInsert(rxShapes, rShapeRect);
+ OUString sArcsize = maTypeModel.maArcsize;
+ if ( !sArcsize.isEmpty( ) )
+ {
+ sal_Unicode cLastChar = sArcsize[sArcsize.getLength() - 1];
+ sal_Int32 nValue = o3tl::toInt32(sArcsize.subView( 0, sArcsize.getLength() - 1 ));
+ // Get the smallest half-side
+ double size = std::min( rShapeRect.Height, rShapeRect.Width ) / 2.0;
+ sal_Int32 nRadius = 0;
+ if ( cLastChar == 'f' )
+ nRadius = size * nValue / 65536;
+ else if ( cLastChar == '%' )
+ nRadius = size * nValue / 100;
+ PropertySet( xShape ).setAnyProperty( PROP_CornerRadius, Any( nRadius ) );
+ }
+ return xShape;
+}
+
+EllipseShape::EllipseShape( Drawing& rDrawing ) :
+ SimpleShape( rDrawing, "com.sun.star.drawing.EllipseShape" )
+{
+}
+
+PolyLineShape::PolyLineShape( Drawing& rDrawing ) :
+ SimpleShape( rDrawing, "com.sun.star.drawing.PolyLineShape" )
+{
+}
+
+Reference< XShape > PolyLineShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ ::std::vector<awt::Point> aAbsPoints;
+ awt::Rectangle aCoordSys = getCoordSystem();
+ if (!maShapeModel.maPoints.empty() && (aCoordSys.Width > 0) && (aCoordSys.Height > 0))
+ {
+ for (auto const& point : maShapeModel.maPoints)
+ aAbsPoints.push_back(lclGetAbsPoint(point, rShapeRect, aCoordSys));
+ // A polyline cannot be filled but only a polygon. We treat first point == last point as
+ // indicator for being closed. In that case we force to type PolyPolygonShape.
+ if (aAbsPoints.size() > 2 && aAbsPoints.front().X == aAbsPoints.back().X
+ && aAbsPoints.front().Y == aAbsPoints.back().Y)
+ {
+ const_cast<PolyLineShape*>(this)->setService("com.sun.star.drawing.PolyPolygonShape");
+ }
+ }
+
+ Reference<XShape> xShape = SimpleShape::implConvertAndInsert(rxShapes, rShapeRect);
+
+ // polygon path
+
+ if (!aAbsPoints.empty())
+ {
+ PointSequenceSequence aPointSeq{ comphelper::containerToSequence( aAbsPoints ) };
+ PropertySet aPropSet( xShape );
+ aPropSet.setProperty( PROP_PolyPolygon, aPointSeq );
+ }
+ return xShape;
+}
+
+namespace
+{
+ void doMirrorX(SdrObject* pShape)
+ {
+ Point aCenter(pShape->GetSnapRect().Center());
+ Point aPoint2(aCenter);
+ aPoint2.setY(aPoint2.getY() + 1);
+ pShape->NbcMirror(aCenter, aPoint2);
+ }
+
+ void doMirrorY(SdrObject* pShape)
+ {
+ Point aCenter(pShape->GetSnapRect().Center());
+ Point aPoint2(aCenter);
+ aPoint2.setX(aPoint2.getX() + 1);
+ pShape->NbcMirror(aCenter, aPoint2);
+ }
+
+ void handleMirroring(const ShapeTypeModel& rTypeModel, const Reference<XShape>& rxShape)
+ {
+ if (!rTypeModel.maFlip.isEmpty())
+ {
+ if (SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rxShape))
+ {
+ if (rTypeModel.maFlip.startsWith("x"))
+ doMirrorX(pShape);
+ if (rTypeModel.maFlip.endsWith("y"))
+ doMirrorY(pShape);
+ }
+ }
+ }
+
+ void handleRotation(const ShapeTypeModel& rTypeModel, const Reference<XShape>& rxShape)
+ {
+ if (!rTypeModel.maRotation.isEmpty())
+ {
+ if (SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rxShape))
+ {
+ // The needed factor -1 for opposite direction and factor 100 for Degree100 is
+ // contained in method decodeRotation().
+ Degree100 nAngle(ConversionHelper::decodeRotation(rTypeModel.maRotation));
+ pShape->NbcRotate(pShape->GetSnapRect().Center(), nAngle);
+ }
+ }
+ }
+}
+
+LineShape::LineShape(Drawing& rDrawing)
+ : SimpleShape(rDrawing, "com.sun.star.drawing.LineShape")
+{
+}
+
+Reference<XShape> LineShape::implConvertAndInsert(const Reference<XShapes>& rxShapes, const awt::Rectangle& rShapeRect) const
+{
+ Reference<XShape> xShape = SimpleShape::implConvertAndInsert(rxShapes, rShapeRect);
+ // tdf#137765
+ handleRotation(maTypeModel, xShape);
+ // tdf#97517 tdf#137678
+ // The MirroredX and MirroredY properties (in the CustomShapeGeometry property) are not
+ // supported for the LineShape by UNO, so we have to make the mirroring here.
+ handleMirroring(maTypeModel, xShape);
+ return xShape;
+}
+
+awt::Rectangle LineShape::getAbsRectangle() const
+{
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ awt::Rectangle aShapeRect;
+ sal_Int32 nIndex = 0;
+
+ aShapeRect.X = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex), 0, true, true);
+ aShapeRect.Y = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex), 0, false, true);
+ nIndex = 0;
+ aShapeRect.Width = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex), 0, true, true) - aShapeRect.X;
+ aShapeRect.Height = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex), 0, false, true) - aShapeRect.Y;
+ return aShapeRect;
+}
+
+awt::Rectangle LineShape::getRelRectangle() const
+{
+ awt::Rectangle aShapeRect;
+ sal_Int32 nIndex = 0;
+
+ aShapeRect.X = o3tl::toInt32(o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex));
+ aShapeRect.Y = o3tl::toInt32(o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex));
+ nIndex = 0;
+ aShapeRect.Width = o3tl::toInt32(o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex)) - aShapeRect.X;
+ aShapeRect.Height = o3tl::toInt32(o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex)) - aShapeRect.Y;
+ return aShapeRect;
+}
+
+BezierShape::BezierShape(Drawing& rDrawing)
+ : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape")
+{
+}
+
+Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ // If we have an 'x' in the last part of the path it means it is closed...
+ sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(',');
+ if ( nPos != -1 && maShapeModel.maVmlPath.indexOf('x', nPos) != -1 )
+ {
+ const_cast<BezierShape*>( this )->setService( "com.sun.star.drawing.ClosedBezierShape" );
+ }
+
+ awt::Rectangle aCoordSys = getCoordSystem();
+ PolyPolygonBezierCoords aBezierCoords;
+
+ if( (aCoordSys.Width > 0) && (aCoordSys.Height > 0) )
+ {
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+
+ // Bezier paths may consist of one or more sub-paths
+ typedef ::std::vector< ::std::vector< PolygonFlags > > FlagsList;
+ std::vector< ::std::vector< awt::Point > > aCoordLists;
+ FlagsList aFlagLists;
+
+ // Curve defined by to, from, control1 and control2 attributes
+ if ( maShapeModel.maVmlPath.isEmpty() )
+ {
+ aCoordLists.emplace_back( );
+ aFlagLists.emplace_back( );
+ sal_Int32 nIndex = 0;
+
+ // Start point
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maFrom, 0, ',', nIndex ), 0, false, true ) );
+ // Control point 1
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maControl1, 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maControl1, 0, ',', nIndex ), 0, false, true ) );
+ // Control point 2
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maControl2, 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maControl2, 0, ',', nIndex ), 0, false, true ) );
+ // End point
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, o3tl::getToken(maShapeModel.maTo, 0, ',', nIndex ), 0, false, true ) );
+
+ // First and last points are normals, points 2 and 4 are controls
+ aFlagLists[ 0 ].resize( aCoordLists[ 0 ].size(), PolygonFlags_CONTROL );
+ aFlagLists[ 0 ][ 0 ] = PolygonFlags_NORMAL;
+ aFlagLists[ 0 ].back() = PolygonFlags_NORMAL;
+ }
+ // Curve defined by path attribute
+ else
+ {
+ // Parse VML path string and convert to absolute coordinates
+ ConversionHelper::decodeVmlPath( aCoordLists, aFlagLists, maShapeModel.maVmlPath );
+
+ for (auto & coordList : aCoordLists)
+ for (auto & point : coordList)
+ {
+ point = lclGetAbsPoint( point, rShapeRect, aCoordSys );
+ }
+ }
+
+ aBezierCoords.Coordinates.realloc( aCoordLists.size() );
+ auto pCoordinates = aBezierCoords.Coordinates.getArray();
+ for ( size_t i = 0; i < aCoordLists.size(); i++ )
+ pCoordinates[i] = comphelper::containerToSequence( aCoordLists[i] );
+
+ aBezierCoords.Flags.realloc( aFlagLists.size() );
+ auto pFlags = aBezierCoords.Flags.getArray();
+ for ( size_t i = 0; i < aFlagLists.size(); i++ )
+ pFlags[i] = comphelper::containerToSequence( aFlagLists[i] );
+
+ if( !aCoordLists.front().empty() && !aCoordLists.back().empty()
+ && aCoordLists.front().front().X == aCoordLists.back().back().X
+ && aCoordLists.front().front().Y == aCoordLists.back().back().Y )
+ { // HACK: If the shape is in fact closed, which can be found out only when the path is known,
+ // force to closed bezier shape (otherwise e.g. fill won't work).
+ const_cast< BezierShape* >( this )->setService( "com.sun.star.drawing.ClosedBezierShape" );
+ }
+ }
+
+ Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, rShapeRect );
+
+ if( aBezierCoords.Coordinates.hasElements())
+ {
+ PropertySet aPropSet( xShape );
+ aPropSet.setProperty( PROP_PolyPolygonBezier, aBezierCoords );
+ }
+
+ // tdf#105875 handle rotation
+ // Note: must rotate before flip!
+ handleRotation(maTypeModel, xShape);
+
+ // Handle horizontal and vertical flip.
+ handleMirroring(maTypeModel, xShape);
+
+ return xShape;
+}
+
+CustomShape::CustomShape( Drawing& rDrawing ) :
+ SimpleShape( rDrawing, "com.sun.star.drawing.CustomShape" )
+{
+}
+
+Reference< XShape > CustomShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ // try to create a custom shape
+ Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, rShapeRect );
+ if( xShape.is() ) try
+ {
+ // create the custom shape geometry
+ Reference< XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY_THROW );
+ xDefaulter->createCustomShapeDefaults( OUString::number( getShapeType() ) );
+ // convert common properties
+ convertShapeProperties( xShape );
+ }
+ catch( Exception& )
+ {
+ }
+ return xShape;
+}
+
+ComplexShape::ComplexShape( Drawing& rDrawing ) :
+ CustomShape( rDrawing )
+{
+}
+
+Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ XmlFilterBase& rFilter = mrDrawing.getFilter();
+ sal_Int32 nShapeType = getShapeType();
+ OUString aGraphicPath = getGraphicPath();
+
+ // try to find registered OLE object info
+ if( const OleObjectInfo* pOleObjectInfo = mrDrawing.getOleObjectInfo( maTypeModel.maShapeId ) )
+ {
+ SAL_WARN_IF(
+ nShapeType != VML_SHAPETYPE_PICTUREFRAME, "oox",
+ "ComplexShape::implConvertAndInsert - unexpected shape type");
+
+ // if OLE object is embedded into a DrawingML shape (PPTX), do not create it here
+ if( pOleObjectInfo->mbDmlShape )
+ return Reference< XShape >();
+
+ PropertyMap aOleProps;
+ awt::Size aOleSize( rShapeRect.Width, rShapeRect.Height );
+ if( rFilter.getOleObjectHelper().importOleObject( aOleProps, *pOleObjectInfo, aOleSize ) )
+ {
+ Reference< XShape > xShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.OLE2Shape", rxShapes, rShapeRect );
+ if( xShape.is() )
+ {
+ // set the replacement graphic
+ if( !aGraphicPath.isEmpty() )
+ {
+ WmfExternal aExtHeader;
+ aExtHeader.mapMode = 8;
+ aExtHeader.xExt = rShapeRect.Width;
+ aExtHeader.yExt = rShapeRect.Height;
+
+ Reference< XGraphic > xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic(aGraphicPath, &aExtHeader);
+ if (xGraphic.is())
+ aOleProps.setProperty( PROP_Graphic, xGraphic);
+ }
+
+ PropertySet aPropSet( xShape );
+ aPropSet.setProperties( aOleProps );
+
+ return xShape;
+ }
+ }
+ }
+
+ // try to find registered form control info
+ const ControlInfo* pControlInfo = mrDrawing.getControlInfo( maTypeModel.maShapeId );
+ if( pControlInfo && !pControlInfo->maFragmentPath.isEmpty() )
+ {
+ if( !pControlInfo->maName.isEmpty() )
+ {
+ // load the control properties from fragment
+ ::oox::ole::EmbeddedControl aControl(pControlInfo->maName);
+ if( rFilter.importFragment( new ::oox::ole::AxControlFragment( rFilter, pControlInfo->maFragmentPath, aControl ) ) )
+ {
+ // create and return the control shape (including control model)
+ sal_Int32 nCtrlIndex = -1;
+ Reference< XShape > xShape = mrDrawing.createAndInsertXControlShape( aControl, rxShapes, rShapeRect, nCtrlIndex );
+
+ if (pControlInfo->mbTextContentShape)
+ {
+ PropertySet aPropertySet(xShape);
+ lcl_SetAnchorType(aPropertySet, maTypeModel, mrDrawing.getFilter().getGraphicHelper());
+ }
+ // on error, proceed and try to create picture from replacement image
+ if( xShape.is() )
+ return xShape;
+ }
+ }
+ }
+
+ // host application wants to create the shape (do not try failed OLE controls again)
+ if( (nShapeType == VML_SHAPETYPE_HOSTCONTROL) && !pControlInfo )
+ {
+ OSL_ENSURE( getClientData(), "ComplexShape::implConvertAndInsert - missing client data" );
+ Reference< XShape > xShape = mrDrawing.createAndInsertClientXShape( *this, rxShapes, rShapeRect );
+ if( xShape.is() )
+ return xShape;
+ }
+
+
+ if( getShapeModel().mbIsSignatureLine )
+ {
+ uno::Reference<graphic::XGraphic> xGraphic;
+ bool bIsSigned(false);
+ try
+ {
+ // Get the document signatures
+ Reference<security::XDocumentDigitalSignatures> xSignatures(
+ security::DocumentDigitalSignatures::createDefault(
+ comphelper::getProcessComponentContext()));
+
+ uno::Reference<embed::XStorage> xStorage
+ = comphelper::OStorageHelper::GetStorageOfFormatFromURL(
+ ZIP_STORAGE_FORMAT_STRING, mrDrawing.getFilter().getFileUrl(),
+ embed::ElementModes::READ);
+ SAL_WARN_IF(!xStorage.is(), "oox.vml", "No xStorage!");
+
+ const uno::Sequence<security::DocumentSignatureInformation> xSignatureInfo
+ = xSignatures->verifyScriptingContentSignatures(xStorage,
+ uno::Reference<io::XInputStream>());
+
+ // Try to find matching signature line image - if none exists that is fine,
+ // then the signature line is not digitally signed.
+ auto pSignInfo = std::find_if(xSignatureInfo.begin(), xSignatureInfo.end(),
+ [this](const security::DocumentSignatureInformation& rSigInfo) {
+ return rSigInfo.SignatureLineId == getShapeModel().maSignatureId; });
+ if (pSignInfo != xSignatureInfo.end())
+ {
+ bIsSigned = true;
+ if (pSignInfo->SignatureIsValid)
+ {
+ // Signature is valid, use the 'valid' image
+ SAL_WARN_IF(!pSignInfo->ValidSignatureLineImage.is(), "oox.vml",
+ "No ValidSignatureLineImage!");
+ xGraphic = pSignInfo->ValidSignatureLineImage;
+ }
+ else
+ {
+ // Signature is invalid, use the 'invalid' image
+ SAL_WARN_IF(!pSignInfo->InvalidSignatureLineImage.is(), "oox.vml",
+ "No InvalidSignatureLineImage!");
+ xGraphic = pSignInfo->InvalidSignatureLineImage;
+ }
+ }
+ }
+ catch (css::uno::Exception&)
+ {
+ // DocumentDigitalSignatures service not available.
+ // We continue by rendering the "unsigned" shape instead.
+ }
+
+ Reference< XShape > xShape;
+ if (xGraphic.is())
+ {
+ // If available, use the signed image from the signature
+ xShape = SimpleShape::createPictureObject(rxShapes, rShapeRect, xGraphic);
+ }
+ else
+ {
+ // Create shape with the fallback "unsigned" image
+ xShape = SimpleShape::createEmbeddedPictureObject(rxShapes, rShapeRect, aGraphicPath);
+ }
+
+ // Store signature line properties
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("IsSignatureLine", uno::Any(true));
+ xPropertySet->setPropertyValue("SignatureLineId",
+ uno::Any(getShapeModel().maSignatureId));
+ xPropertySet->setPropertyValue(
+ "SignatureLineSuggestedSignerName",
+ uno::Any(getShapeModel().maSignatureLineSuggestedSignerName));
+ xPropertySet->setPropertyValue(
+ "SignatureLineSuggestedSignerTitle",
+ uno::Any(getShapeModel().maSignatureLineSuggestedSignerTitle));
+ xPropertySet->setPropertyValue(
+ "SignatureLineSuggestedSignerEmail",
+ uno::Any(getShapeModel().maSignatureLineSuggestedSignerEmail));
+ xPropertySet->setPropertyValue(
+ "SignatureLineSigningInstructions",
+ uno::Any(getShapeModel().maSignatureLineSigningInstructions));
+ xPropertySet->setPropertyValue(
+ "SignatureLineShowSignDate",
+ uno::Any(getShapeModel().mbSignatureLineShowSignDate));
+ xPropertySet->setPropertyValue(
+ "SignatureLineCanAddComment",
+ uno::Any(getShapeModel().mbSignatureLineCanAddComment));
+ xPropertySet->setPropertyValue("SignatureLineIsSigned", uno::Any(bIsSigned));
+
+ if (!aGraphicPath.isEmpty())
+ {
+ xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic(aGraphicPath);
+ xPropertySet->setPropertyValue("SignatureLineUnsignedImage", uno::Any(xGraphic));
+ }
+ return xShape;
+ }
+
+ // try to create a picture object
+ if( !aGraphicPath.isEmpty() )
+ {
+ Reference<XShape> xShape = SimpleShape::createEmbeddedPictureObject(rxShapes, rShapeRect, aGraphicPath);
+ // AS_CHARACTER shape: vertical orientation default is bottom, MSO default is top.
+ if ( maTypeModel.maPosition != "absolute" && maTypeModel.maPosition != "relative" )
+ PropertySet( xShape ).setAnyProperty( PROP_VertOrient, Any(text::VertOrientation::TOP));
+
+ // Apply stroke props from the type model.
+ oox::drawingml::ShapePropertyMap aPropMap(mrDrawing.getFilter().getModelObjectHelper());
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ maTypeModel.maStrokeModel.pushToPropMap(aPropMap, rGraphicHelper);
+ // And, fill-color properties as well...
+ maTypeModel.maFillModel.pushToPropMap(aPropMap, rGraphicHelper);
+ PropertySet(xShape).setProperties(aPropMap);
+
+ return xShape;
+ }
+
+ // default: try to create a custom shape
+ return CustomShape::implConvertAndInsert( rxShapes, rShapeRect );
+}
+
+GroupShape::GroupShape( Drawing& rDrawing ) :
+ ShapeBase( rDrawing ),
+ mxChildren( new ShapeContainer( rDrawing ) )
+{
+}
+
+GroupShape::~GroupShape()
+{
+}
+
+void GroupShape::finalizeFragmentImport()
+{
+ // basic shape processing
+ ShapeBase::finalizeFragmentImport();
+ // finalize all child shapes
+ mxChildren->finalizeFragmentImport();
+}
+
+const ShapeType* GroupShape::getChildTypeById( const OUString& rShapeId ) const
+{
+ return mxChildren->getShapeTypeById( rShapeId );
+}
+
+const ShapeBase* GroupShape::getChildById( const OUString& rShapeId ) const
+{
+ return mxChildren->getShapeById( rShapeId );
+}
+
+Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
+{
+ Reference< XShape > xGroupShape;
+ // check that this shape contains children and a valid coordinate system
+ ShapeParentAnchor aParentAnchor;
+ aParentAnchor.maShapeRect = rShapeRect;
+ aParentAnchor.maCoordSys = getCoordSystem();
+ if( !mxChildren->empty() && (aParentAnchor.maCoordSys.Width > 0) && (aParentAnchor.maCoordSys.Height > 0) ) try
+ {
+ xGroupShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.GroupShape", rxShapes, rShapeRect );
+ Reference< XShapes > xChildShapes( xGroupShape, UNO_QUERY_THROW );
+ mxChildren->convertAndInsert( xChildShapes, &aParentAnchor );
+ if( !xChildShapes->hasElements() )
+ {
+ SAL_WARN("oox", "no child shape has been created - deleting the group shape");
+ rxShapes->remove( xGroupShape );
+ xGroupShape.clear();
+ }
+ }
+ catch( Exception& )
+ {
+ }
+
+ uno::Reference<beans::XPropertySet> xPropertySet;
+ if (!maTypeModel.maEditAs.isEmpty())
+ xPropertySet = uno::Reference<beans::XPropertySet>(xGroupShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ sal_Int32 nLength = aGrabBag.getLength();
+ aGrabBag.realloc(nLength + 1);
+ aGrabBag.getArray()[nLength] = comphelper::makePropertyValue("mso-edit-as", maTypeModel.maEditAs);
+ xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag));
+ }
+ // Make sure group shapes are inline as well, unless there is an explicit different style.
+ PropertySet aPropertySet(xGroupShape);
+ const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
+ lcl_SetAnchorType(aPropertySet, maTypeModel, rGraphicHelper);
+ if (!maTypeModel.maRotation.isEmpty())
+ aPropertySet.setAnyProperty(PROP_RotateAngle, Any(ConversionHelper::decodeRotation(maTypeModel.maRotation).get()));
+ return xGroupShape;
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlshapecontainer.cxx b/oox/source/vml/vmlshapecontainer.cxx
new file mode 100644
index 000000000..d9aa7d9aa
--- /dev/null
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -0,0 +1,138 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/vml/vmlshapecontainer.hxx>
+
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlshape.hxx>
+
+#include <osl/diagnose.h>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::uno;
+
+namespace {
+
+template< typename ShapeType >
+void lclMapShapesById( RefMap< OUString, ShapeType >& orMap, const RefVector< ShapeType >& rVector )
+{
+ for (auto const& elem : rVector)
+ {
+ const OUString& rShapeId = elem->getShapeId();
+ OSL_ENSURE( !rShapeId.isEmpty(), "lclMapShapesById - missing shape identifier" );
+ if( !rShapeId.isEmpty() )
+ {
+ OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(), "lclMapShapesById - shape identifier already used " );
+ orMap[ rShapeId ] = elem;
+ }
+ }
+}
+
+} // namespace
+
+ShapeContainer::ShapeContainer( Drawing& rDrawing ) :
+ mrDrawing( rDrawing )
+{
+}
+
+ShapeContainer::~ShapeContainer()
+{
+}
+
+std::shared_ptr<ShapeType> ShapeContainer::createShapeType()
+{
+ auto xShape = std::make_shared<ShapeType>( mrDrawing );
+ maTypes.push_back( xShape );
+ return xShape;
+}
+
+void ShapeContainer::finalizeFragmentImport()
+{
+ // map all shape templates by shape identifier
+ lclMapShapesById( maTypesById, maTypes );
+ // map all shapes by shape identifier
+ lclMapShapesById( maShapesById, maShapes );
+ /* process all shapes (map all children templates/shapes in group shapes,
+ resolve template references in all shapes) */
+ maShapes.forEachMem( &ShapeBase::finalizeFragmentImport );
+}
+
+const ShapeType* ShapeContainer::getShapeTypeById( const OUString& rShapeId ) const
+{
+ if (maTypesById.empty() && !maTypes.empty())
+ {
+ lclMapShapesById(const_cast<ShapeTypeMap&>(maTypesById), maTypes);
+ }
+
+ // search in own shape template list
+ if( const ShapeType* pType = maTypesById.get( rShapeId ).get() )
+ return pType;
+ // search deep in child shapes
+ for (auto const& shape : maShapes)
+ if( const ShapeType* pType = shape->getChildTypeById( rShapeId ) )
+ return pType;
+ return nullptr;
+}
+
+const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId ) const
+{
+ // search in own shape list
+ if( const ShapeBase* pShape = maShapesById.get( rShapeId ).get() )
+ return pShape;
+ // search deep in child shapes
+ for (auto const& shape : maShapes)
+ if( const ShapeBase* pShape = shape->getChildById( rShapeId ) )
+ return pShape;
+ return nullptr;
+}
+
+std::shared_ptr< ShapeBase > ShapeContainer::takeLastShape()
+{
+ OSL_ENSURE( mrDrawing.getType() == VMLDRAWING_WORD, "ShapeContainer::takeLastShape - illegal call, Word filter only" );
+ assert( !markStack.empty());
+ if( markStack.top() >= maShapes.size())
+ return std::shared_ptr< ShapeBase >();
+ std::shared_ptr< ShapeBase > ret = maShapes.back();
+ maShapes.pop_back();
+ return ret;
+}
+
+void ShapeContainer::pushMark()
+{
+ markStack.push( maShapes.size());
+}
+
+void ShapeContainer::popMark()
+{
+ assert( !markStack.empty());
+ markStack.pop();
+}
+
+void ShapeContainer::convertAndInsert( const Reference< XShapes >& rxShapes, const ShapeParentAnchor* pParentAnchor ) const
+{
+ for (auto const& shape : maShapes)
+ shape->convertAndInsert( rxShapes, pParentAnchor );
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
new file mode 100644
index 000000000..3141cb3aa
--- /dev/null
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -0,0 +1,731 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <oox/vml/vmlshapecontext.hxx>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <oox/vml/vmldrawing.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/vml/vmlshapecontainer.hxx>
+#include <oox/vml/vmltextboxcontext.hxx>
+
+#include <osl/diagnose.h>
+#include <filter/msfilter/escherex.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox::vml {
+
+using namespace ::com::sun::star;
+
+using ::oox::core::ContextHandler2;
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+namespace {
+
+/** Returns the boolean value from the specified VML attribute (if present).
+ */
+OptValue< bool > lclDecodeBool( const AttributeList& rAttribs, sal_Int32 nToken )
+{
+ OptValue< OUString > oValue = rAttribs.getString( nToken );
+ if( oValue.has() ) return OptValue< bool >( ConversionHelper::decodeBool( oValue.get() ) );
+ return OptValue< bool >();
+}
+
+/** Returns the percentage value from the specified VML attribute (if present).
+ The value will be normalized (1.0 is returned for 100%).
+ */
+OptValue< double > lclDecodePercent( const AttributeList& rAttribs, sal_Int32 nToken, double fDefValue )
+{
+ OptValue< OUString > oValue = rAttribs.getString( nToken );
+ if( oValue.has() ) return OptValue< double >( ConversionHelper::decodePercent( oValue.get(), fDefValue ) );
+ return OptValue< double >();
+}
+
+/** #119750# Special method for opacity; it *should* be a percentage value, but there are cases
+ where a value relative to 0xffff (65536) is used, ending with an 'f'
+ */
+OptValue< double > lclDecodeOpacity( const AttributeList& rAttribs, sal_Int32 nToken, double fDefValue )
+{
+ OptValue< OUString > oValue = rAttribs.getString( nToken );
+ double fRetval(fDefValue);
+
+ if( oValue.has() )
+ {
+ const OUString& aString(oValue.get());
+ const sal_Int32 nLength(aString.getLength());
+
+ if(nLength > 0)
+ {
+ if(aString.endsWith("f"))
+ {
+ fRetval = std::clamp(aString.toDouble() / 65536.0, 0.0, 1.0);
+ }
+ else
+ {
+ fRetval = ConversionHelper::decodePercent( aString, fDefValue );
+ }
+ }
+ }
+
+ return OptValue< double >(fRetval);
+}
+
+/** Returns the integer value pair from the specified VML attribute (if present).
+ */
+OptValue< Int32Pair > lclDecodeInt32Pair( const AttributeList& rAttribs, sal_Int32 nToken )
+{
+ OptValue< OUString > oValue = rAttribs.getString( nToken );
+ OptValue< Int32Pair > oRetValue;
+ if( oValue.has() )
+ {
+ std::u16string_view aValue1, aValue2;
+ ConversionHelper::separatePair( aValue1, aValue2, oValue.get(), ',' );
+ oRetValue = Int32Pair( o3tl::toInt32(aValue1), o3tl::toInt32(aValue2) );
+ }
+ return oRetValue;
+}
+
+/** Returns the percentage pair from the specified VML attribute (if present).
+ */
+OptValue< DoublePair > lclDecodePercentPair( const AttributeList& rAttribs, sal_Int32 nToken )
+{
+ OptValue< OUString > oValue = rAttribs.getString( nToken );
+ OptValue< DoublePair > oRetValue;
+ if( oValue.has() )
+ {
+ std::u16string_view aValue1, aValue2;
+ ConversionHelper::separatePair( aValue1, aValue2, oValue.get(), ',' );
+ oRetValue = DoublePair(
+ ConversionHelper::decodePercent( aValue1, 0.0 ),
+ ConversionHelper::decodePercent( aValue2, 0.0 ) );
+ }
+ return oRetValue;
+}
+
+/** Returns the boolean value from the passed string of an attribute in the x:
+ namespace (VML for spreadsheets). Supported values: f, t, False, True.
+ @param bDefaultForEmpty Default value for the empty string.
+ */
+bool lclDecodeVmlxBool( std::u16string_view rValue, bool bDefaultForEmpty )
+{
+ if( rValue.empty() ) return bDefaultForEmpty;
+ sal_Int32 nToken = AttributeConversion::decodeToken( rValue );
+ // anything else than 't' or 'True' is considered to be false, as specified
+ return (nToken == XML_t) || (nToken == XML_True);
+}
+
+} // namespace
+
+ShapeLayoutContext::ShapeLayoutContext( ContextHandler2Helper const & rParent, Drawing& rDrawing ) :
+ ContextHandler2( rParent ),
+ mrDrawing( rDrawing )
+{
+}
+
+ContextHandlerRef ShapeLayoutContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case O_TOKEN( idmap ):
+ {
+ OUString aBlockIds = rAttribs.getString( XML_data, OUString() );
+ sal_Int32 nIndex = 0;
+ while( nIndex >= 0 )
+ {
+ std::u16string_view aToken = o3tl::trim(o3tl::getToken(aBlockIds, 0, ' ', nIndex ));
+ if( !aToken.empty() )
+ mrDrawing.registerBlockId( o3tl::toInt32(aToken) );
+ }
+ }
+ break;
+ }
+ return nullptr;
+}
+
+ClientDataContext::ClientDataContext( ContextHandler2Helper const & rParent,
+ ClientData& rClientData, const AttributeList& rAttribs ) :
+ ContextHandler2( rParent ),
+ mrClientData( rClientData )
+{
+ mrClientData.mnObjType = rAttribs.getToken( XML_ObjectType, XML_TOKEN_INVALID );
+}
+
+ContextHandlerRef ClientDataContext::onCreateContext( sal_Int32 /*nElement*/, const AttributeList& /*rAttribs*/ )
+{
+ if( isRootElement() )
+ {
+ maElementText.clear();
+ return this;
+ }
+ return nullptr;
+}
+
+void ClientDataContext::onCharacters( const OUString& rChars )
+{
+ /* Empty but existing elements have special meaning, e.g. 'true'. Collect
+ existing text and convert it in onEndElement(). */
+ maElementText = rChars;
+}
+
+void ClientDataContext::onEndElement()
+{
+ switch( getCurrentElement() )
+ {
+ case VMLX_TOKEN( Anchor ): mrClientData.maAnchor = maElementText; break;
+ case VMLX_TOKEN( FmlaMacro ): mrClientData.maFmlaMacro = maElementText; break;
+ case VMLX_TOKEN( FmlaPict ): mrClientData.maFmlaPict = maElementText; break;
+ case VMLX_TOKEN( FmlaLink ): mrClientData.maFmlaLink = maElementText; break;
+ case VMLX_TOKEN( FmlaRange ): mrClientData.maFmlaRange = maElementText; break;
+ case VMLX_TOKEN( FmlaGroup ): mrClientData.maFmlaGroup = maElementText; break;
+ case VMLX_TOKEN( TextHAlign ): mrClientData.mnTextHAlign = AttributeConversion::decodeToken( maElementText ); break;
+ case VMLX_TOKEN( TextVAlign ): mrClientData.mnTextVAlign = AttributeConversion::decodeToken( maElementText ); break;
+ case VMLX_TOKEN( Column ): mrClientData.mnCol = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Row ): mrClientData.mnRow = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Checked ): mrClientData.mnChecked = maElementText.toInt32(); break;
+ case VMLX_TOKEN( DropStyle ): mrClientData.mnDropStyle = AttributeConversion::decodeToken( maElementText ); break;
+ case VMLX_TOKEN( DropLines ): mrClientData.mnDropLines = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Val ): mrClientData.mnVal = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Min ): mrClientData.mnMin = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Max ): mrClientData.mnMax = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Inc ): mrClientData.mnInc = maElementText.toInt32(); break;
+ case VMLX_TOKEN( Page ): mrClientData.mnPage = maElementText.toInt32(); break;
+ case VMLX_TOKEN( SelType ): mrClientData.mnSelType = AttributeConversion::decodeToken( maElementText ); break;
+ case VMLX_TOKEN( VTEdit ): mrClientData.mnVTEdit = maElementText.toInt32(); break;
+ case VMLX_TOKEN( PrintObject ): mrClientData.mbPrintObject = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( Visible ): mrClientData.mbVisible = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( DDE ): mrClientData.mbDde = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( NoThreeD ): mrClientData.mbNo3D = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( NoThreeD2 ): mrClientData.mbNo3D2 = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( MultiLine ): mrClientData.mbMultiLine = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( VScroll ): mrClientData.mbVScroll = lclDecodeVmlxBool( maElementText, true ); break;
+ case VMLX_TOKEN( SecretEdit ): mrClientData.mbSecretEdit = lclDecodeVmlxBool( maElementText, true ); break;
+ }
+}
+
+ShapeContextBase::ShapeContextBase( ContextHandler2Helper const & rParent ) :
+ ContextHandler2( rParent )
+{
+}
+
+ContextHandlerRef ShapeContextBase::createShapeContext( ContextHandler2Helper const & rParent,
+ ShapeContainer& rShapes, sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case O_TOKEN( shapelayout ):
+ return new ShapeLayoutContext( rParent, rShapes.getDrawing() );
+
+ case VML_TOKEN( shapetype ):
+ return new ShapeTypeContext( rParent, rShapes.createShapeType(), rAttribs );
+ case VML_TOKEN( group ):
+ return new GroupShapeContext( rParent, rShapes.createShape< GroupShape >(), rAttribs );
+ case VML_TOKEN( shape ):
+ if (rAttribs.hasAttribute(XML_path) &&
+ // tdf#122563 skip in the case of empty path
+ !rAttribs.getString(XML_path, "").isEmpty())
+ return new ShapeContext( rParent, rShapes.createShape< BezierShape >(), rAttribs );
+ else
+ return new ShapeContext( rParent, rShapes.createShape< ComplexShape >(), rAttribs );
+ case VML_TOKEN( rect ):
+ return new RectangleShapeContext( rParent, rAttribs, rShapes.createShape< RectangleShape >() );
+ case VML_TOKEN( roundrect ):
+ return new ShapeContext( rParent, rShapes.createShape< RectangleShape >(), rAttribs );
+ case VML_TOKEN( oval ):
+ return new ShapeContext( rParent, rShapes.createShape< EllipseShape >(), rAttribs );
+ case VML_TOKEN( polyline ):
+ return new ShapeContext( rParent, rShapes.createShape< PolyLineShape >(), rAttribs );
+ case VML_TOKEN( line ):
+ return new ShapeContext( rParent, rShapes.createShape< LineShape >(), rAttribs );
+ case VML_TOKEN( curve ):
+ return new ShapeContext( rParent, rShapes.createShape< BezierShape >(), rAttribs );
+
+ // TODO:
+ case VML_TOKEN( arc ):
+ case VML_TOKEN( diagram ):
+ case VML_TOKEN( image ):
+ return new ShapeContext( rParent, rShapes.createShape< ComplexShape >(), rAttribs );
+
+ case W_TOKEN(control):
+ return new ControlShapeContext( rParent, rShapes, rAttribs );
+ }
+ return nullptr;
+}
+
+ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent,
+ std::shared_ptr<ShapeType> const& pShapeType,
+ const AttributeList& rAttribs)
+ : ShapeContextBase(rParent)
+ , m_pShapeType(pShapeType) // tdf#112311 keep it alive
+ , mrTypeModel( pShapeType->getTypeModel() )
+{
+ // shape identifier and shape name
+ bool bHasOspid = rAttribs.hasAttribute( O_TOKEN( spid ) );
+ mrTypeModel.maShapeId = rAttribs.getXString( bHasOspid ? O_TOKEN( spid ) : XML_id, OUString() );
+ mrTypeModel.maLegacyId = rAttribs.getString( XML_id, OUString() );
+ OSL_ENSURE( !mrTypeModel.maShapeId.isEmpty(), "ShapeTypeContext::ShapeTypeContext - missing shape identifier" );
+ // builtin shape type identifier
+ mrTypeModel.moShapeType = rAttribs.getInteger( O_TOKEN( spt ) );
+ // if the o:spid attribute exists, the id attribute contains the user-defined shape name
+ if( bHasOspid )
+ {
+ mrTypeModel.maShapeName = rAttribs.getXString( XML_id, OUString() );
+ // get ShapeType and ShapeId from name for compatibility
+ static constexpr OUStringLiteral sShapeTypePrefix = u"shapetype_";
+ OUString tmp;
+ if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) )
+ {
+ mrTypeModel.maShapeId = mrTypeModel.maShapeName;
+ mrTypeModel.moShapeType = o3tl::toInt32(mrTypeModel.maShapeName.subView(sShapeTypePrefix.getLength()));
+ }
+ else if (mrTypeModel.maShapeName.startsWith("_x0000_t", &tmp))
+ {
+ mrTypeModel.maShapeId = mrTypeModel.maShapeName;
+ mrTypeModel.moShapeType = tmp.toInt32();
+ }
+ }
+
+ // coordinate system position/size, CSS style
+ mrTypeModel.moCoordPos = lclDecodeInt32Pair( rAttribs, XML_coordorigin );
+ mrTypeModel.moCoordSize = lclDecodeInt32Pair( rAttribs, XML_coordsize );
+ setStyle( rAttribs.getString( XML_style, OUString() ) );
+ if( lclDecodeBool( rAttribs, O_TOKEN( hr )).get( false ))
+ { // MSO's handling of o:hr width is nowhere near what the spec says:
+ // - o:hrpct is not in % but in 0.1%
+ // - if o:hrpct is not given, 100% width is assumed
+ // - given width is used only if explicit o:hrpct="0" is given
+ OUString hrpct = rAttribs.getString( O_TOKEN( hrpct ), "1000" );
+ if( hrpct != "0" )
+ mrTypeModel.maWidthPercent = OUString::number( hrpct.toInt32() );
+ mrTypeModel.maWrapDistanceLeft = "0";
+ mrTypeModel.maWrapDistanceRight = "0";
+ mrTypeModel.maPositionHorizontal = rAttribs.getString( O_TOKEN( hralign ), "left" );
+ mrTypeModel.moWrapType = "topAndBottom";
+ }
+
+ // stroke settings (may be overridden by v:stroke element later)
+ mrTypeModel.maStrokeModel.moStroked = lclDecodeBool( rAttribs, XML_stroked );
+ mrTypeModel.maStrokeModel.moColor = rAttribs.getString( XML_strokecolor );
+ mrTypeModel.maStrokeModel.moWeight = rAttribs.getString( XML_strokeweight );
+
+ // fill settings (may be overridden by v:fill element later)
+ mrTypeModel.maFillModel.moFilled = lclDecodeBool( rAttribs, XML_filled );
+ mrTypeModel.maFillModel.moColor = rAttribs.getString( XML_fillcolor );
+
+ // For roundrect we may have an arcsize attribute to read
+ mrTypeModel.maArcsize = rAttribs.getString(XML_arcsize, OUString());
+ // editas
+ mrTypeModel.maEditAs = rAttribs.getString(XML_editas, OUString());
+
+ mrTypeModel.maAdjustments = rAttribs.getString(XML_adj, OUString());
+}
+
+ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ if( isRootElement() ) switch( nElement )
+ {
+ case VML_TOKEN( stroke ):
+ mrTypeModel.maStrokeModel.moStroked.assignIfUsed( lclDecodeBool( rAttribs, XML_on ) );
+ mrTypeModel.maStrokeModel.maStartArrow.moArrowType = rAttribs.getToken( XML_startarrow );
+ mrTypeModel.maStrokeModel.maStartArrow.moArrowWidth = rAttribs.getToken( XML_startarrowwidth );
+ mrTypeModel.maStrokeModel.maStartArrow.moArrowLength = rAttribs.getToken( XML_startarrowlength );
+ mrTypeModel.maStrokeModel.maEndArrow.moArrowType = rAttribs.getToken( XML_endarrow );
+ mrTypeModel.maStrokeModel.maEndArrow.moArrowWidth = rAttribs.getToken( XML_endarrowwidth );
+ mrTypeModel.maStrokeModel.maEndArrow.moArrowLength = rAttribs.getToken( XML_endarrowlength );
+ mrTypeModel.maStrokeModel.moColor.assignIfUsed( rAttribs.getString( XML_color ) );
+ mrTypeModel.maStrokeModel.moOpacity = lclDecodeOpacity( rAttribs, XML_opacity, 1.0 );
+ mrTypeModel.maStrokeModel.moWeight.assignIfUsed( rAttribs.getString( XML_weight ) );
+ mrTypeModel.maStrokeModel.moDashStyle = rAttribs.getString( XML_dashstyle );
+ mrTypeModel.maStrokeModel.moLineStyle = rAttribs.getToken( XML_linestyle );
+ mrTypeModel.maStrokeModel.moEndCap = rAttribs.getToken( XML_endcap );
+ mrTypeModel.maStrokeModel.moJoinStyle = rAttribs.getToken( XML_joinstyle );
+ break;
+ case VML_TOKEN( fill ):
+ {
+ // in DOCX shapes use r:id for the relationship id
+ // in XLSX they use o:relid
+ bool bHasORelId = rAttribs.hasAttribute( O_TOKEN(relid) );
+ mrTypeModel.maFillModel.moFilled.assignIfUsed( lclDecodeBool( rAttribs, XML_on ) );
+ mrTypeModel.maFillModel.moColor.assignIfUsed( rAttribs.getString( XML_color ) );
+ mrTypeModel.maFillModel.moOpacity = lclDecodeOpacity( rAttribs, XML_opacity, 1.0 );
+ mrTypeModel.maFillModel.moColor2 = rAttribs.getString( XML_color2 );
+ mrTypeModel.maFillModel.moOpacity2 = lclDecodeOpacity( rAttribs, XML_opacity2, 1.0 );
+ mrTypeModel.maFillModel.moType = rAttribs.getToken( XML_type );
+ mrTypeModel.maFillModel.moAngle = rAttribs.getInteger( XML_angle );
+ mrTypeModel.maFillModel.moFocus = lclDecodePercent( rAttribs, XML_focus, 0.0 );
+ mrTypeModel.maFillModel.moFocusPos = lclDecodePercentPair( rAttribs, XML_focusposition );
+ mrTypeModel.maFillModel.moFocusSize = lclDecodePercentPair( rAttribs, XML_focussize );
+ mrTypeModel.maFillModel.moBitmapPath = decodeFragmentPath( rAttribs, bHasORelId ? O_TOKEN(relid) : R_TOKEN(id) );
+ mrTypeModel.maFillModel.moRotate = lclDecodeBool( rAttribs, XML_rotate );
+ break;
+ }
+ case VML_TOKEN( imagedata ):
+ {
+ // shapes in docx use r:id for the relationship id
+ // in xlsx it they use o:relid
+ bool bHasORelId = rAttribs.hasAttribute( O_TOKEN( relid ) );
+ mrTypeModel.moGraphicPath = decodeFragmentPath( rAttribs, bHasORelId ? O_TOKEN( relid ) : R_TOKEN( id ) );
+ mrTypeModel.moGraphicTitle = rAttribs.getString( O_TOKEN( title ) );
+
+ // Get crop attributes.
+ mrTypeModel.moCropBottom = rAttribs.getString(XML_cropbottom);
+ mrTypeModel.moCropLeft = rAttribs.getString(XML_cropleft);
+ mrTypeModel.moCropRight = rAttribs.getString(XML_cropright);
+ mrTypeModel.moCropTop = rAttribs.getString(XML_croptop);
+
+ // Gain / contrast.
+ OptValue<OUString> oGain = rAttribs.getString(XML_gain);
+ sal_Int32 nGain = 0x10000;
+ if (oGain.has() && oGain.get().endsWith("f"))
+ {
+ nGain = oGain.get().toInt32();
+ }
+ if (nGain < 0x10000)
+ {
+ nGain *= 101; // 100 + 1 to round
+ nGain /= 0x10000;
+ nGain -= 100;
+ }
+ mrTypeModel.mnGain = nGain;
+
+ // Blacklevel / brightness.
+ OptValue<OUString> oBlacklevel = rAttribs.getString(XML_blacklevel);
+ sal_Int16 nBlacklevel = 0;
+ if (oBlacklevel.has() && oBlacklevel.get().endsWith("f"))
+ {
+ nBlacklevel = oBlacklevel.get().toInt32();
+ }
+ if (nBlacklevel != 0)
+ {
+ nBlacklevel /= 327;
+ }
+ mrTypeModel.mnBlacklevel = nBlacklevel;
+ }
+ break;
+ case NMSP_vmlWord | XML_wrap:
+ mrTypeModel.moWrapAnchorX = rAttribs.getString(XML_anchorx);
+ mrTypeModel.moWrapAnchorY = rAttribs.getString(XML_anchory);
+ mrTypeModel.moWrapType = rAttribs.getString(XML_type);
+ mrTypeModel.moWrapSide = rAttribs.getString(XML_side);
+ break;
+ case VML_TOKEN( shadow ):
+ {
+ mrTypeModel.maShadowModel.mbHasShadow = true;
+ mrTypeModel.maShadowModel.moShadowOn = lclDecodeBool(rAttribs, XML_on).get(false);
+ mrTypeModel.maShadowModel.moColor.assignIfUsed(rAttribs.getString(XML_color));
+ mrTypeModel.maShadowModel.moOffset.assignIfUsed(rAttribs.getString(XML_offset));
+ mrTypeModel.maShadowModel.moOpacity = lclDecodePercent(rAttribs, XML_opacity, 1.0);
+ }
+ break;
+ case VML_TOKEN( textpath ):
+ mrTypeModel.maTextpathModel.moString.assignIfUsed(rAttribs.getString(XML_string));
+ mrTypeModel.maTextpathModel.moStyle.assignIfUsed(rAttribs.getString(XML_style));
+ mrTypeModel.maTextpathModel.moTrim.assignIfUsed(lclDecodeBool(rAttribs, XML_trim));
+ break;
+ }
+ return nullptr;
+}
+
+OptValue< OUString > ShapeTypeContext::decodeFragmentPath( const AttributeList& rAttribs, sal_Int32 nToken ) const
+{
+ OptValue< OUString > oFragmentPath;
+ OptValue< OUString > oRelId = rAttribs.getString( nToken );
+ if( oRelId.has() )
+ oFragmentPath = getFragmentPathFromRelId( oRelId.get() );
+ return oFragmentPath;
+}
+
+void ShapeTypeContext::setStyle( std::u16string_view rStyle )
+{
+ sal_Int32 nIndex = 0;
+ while( nIndex >= 0 )
+ {
+ std::u16string_view aName, aValue;
+ if( ConversionHelper::separatePair( aName, aValue, o3tl::getToken(rStyle, 0, ';', nIndex ), ':' ) )
+ {
+ if( aName == u"position" ) mrTypeModel.maPosition = aValue;
+ else if( aName == u"z-index" ) mrTypeModel.maZIndex = aValue;
+ else if( aName == u"left" ) mrTypeModel.maLeft = aValue;
+ else if( aName == u"top" ) mrTypeModel.maTop = aValue;
+ else if( aName == u"width" ) mrTypeModel.maWidth = aValue;
+ else if( aName == u"height" ) mrTypeModel.maHeight = aValue;
+ else if( aName == u"margin-left" ) mrTypeModel.maMarginLeft = aValue;
+ else if( aName == u"margin-top" ) mrTypeModel.maMarginTop = aValue;
+ else if( aName == u"mso-position-vertical-relative" ) mrTypeModel.maPositionVerticalRelative = aValue;
+ else if( aName == u"mso-position-horizontal-relative" ) mrTypeModel.maPositionHorizontalRelative = aValue;
+ else if( aName == u"mso-position-horizontal" ) mrTypeModel.maPositionHorizontal = aValue;
+ else if( aName == u"mso-position-vertical" ) mrTypeModel.maPositionVertical = aValue;
+ else if( aName == u"mso-width-percent" ) mrTypeModel.maWidthPercent = aValue;
+ else if( aName == u"mso-width-relative" ) mrTypeModel.maWidthRelative = aValue;
+ else if( aName == u"mso-height-percent" ) mrTypeModel.maHeightPercent = aValue;
+ else if( aName == u"mso-height-relative" ) mrTypeModel.maHeightRelative = aValue;
+ else if( aName == u"mso-fit-shape-to-text" ) mrTypeModel.mbAutoHeight = true;
+ else if( aName == u"rotation" ) mrTypeModel.maRotation = aValue;
+ else if( aName == u"flip" ) mrTypeModel.maFlip = aValue;
+ else if( aName == u"visibility" )
+ mrTypeModel.mbVisible = aValue != u"hidden";
+ else if( aName == u"mso-wrap-style" ) mrTypeModel.maWrapStyle = aValue;
+ else if ( aName == u"v-text-anchor" ) mrTypeModel.maVTextAnchor = aValue;
+ else if ( aName == u"mso-wrap-distance-left" ) mrTypeModel.maWrapDistanceLeft = aValue;
+ else if ( aName == u"mso-wrap-distance-right" ) mrTypeModel.maWrapDistanceRight = aValue;
+ else if ( aName == u"mso-wrap-distance-top" ) mrTypeModel.maWrapDistanceTop = aValue;
+ else if ( aName == u"mso-wrap-distance-bottom" ) mrTypeModel.maWrapDistanceBottom = aValue;
+ }
+ }
+}
+
+ShapeContext::ShapeContext(ContextHandler2Helper const& rParent,
+ const std::shared_ptr<ShapeBase>& pShape, const AttributeList& rAttribs)
+ : ShapeTypeContext(rParent, pShape, rAttribs)
+ , mrShape(*pShape)
+ , mrShapeModel(pShape->getShapeModel())
+{
+ // collect shape specific attributes
+ mrShapeModel.maType = rAttribs.getXString( XML_type, OUString() );
+ // polyline path
+ setPoints( rAttribs.getString( XML_points, OUString() ) );
+ // line start and end positions
+ setFrom(rAttribs.getString(XML_from, OUString()));
+ setTo(rAttribs.getString(XML_to, OUString()));
+ setControl1(rAttribs.getString(XML_control1, OUString()));
+ setControl2(rAttribs.getString(XML_control2, OUString()));
+ setVmlPath(rAttribs.getString(XML_path, OUString()));
+ setHyperlink(rAttribs.getString(XML_href, OUString()));
+}
+
+ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // Excel specific shape client data
+ if( isRootElement() ) switch( nElement )
+ {
+ case VML_TOKEN( textbox ):
+ {
+ // Calculate the shape type: map both <rect> and <v:shape> with a textbox shape type to
+ // a TextShape.
+ sal_Int32 nShapeType = 0;
+ if (ShapeContainer* pShapeContainer = mrShape.getContainer())
+ {
+ OUString aType = mrShapeModel.maType;
+ if (!aType.isEmpty() && aType[0] == '#')
+ {
+ aType = aType.copy(1);
+ }
+ if (const ShapeType* pShapeType = pShapeContainer->getShapeTypeById(aType))
+ {
+ nShapeType = pShapeType->getTypeModel().moShapeType.get();
+ }
+ }
+ mrShapeModel.mbInGroup = (getParentElement() == VML_TOKEN(group));
+
+ // FIXME: the shape with textbox should be used for the next cases
+ if (getCurrentElement() == VML_TOKEN(rect) || nShapeType == ESCHER_ShpInst_TextBox)
+ {
+ if (mrShapeModel.mbInGroup)
+ // FIXME: without this a text will be added into the group-shape instead of its
+ // parent shape
+ dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.drawing.TextShape");
+ else
+ // FIXME: without this we does not handle some properties like shadow
+ dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.text.TextFrame");
+ }
+ return new TextBoxContext( *this, mrShapeModel.createTextBox(mrShape.getTypeModel()), rAttribs,
+ mrShape.getDrawing().getFilter().getGraphicHelper());
+ }
+ case VMLX_TOKEN( ClientData ):
+ // tdf#41466 ActiveX control shapes with a textbox are transformed into a frame
+ // (see unit test testActiveXOptionButtonGroup)
+ dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.text.TextFrame");
+ return new ClientDataContext( *this, mrShapeModel.createClientData(), rAttribs );
+ case VMLPPT_TOKEN( textdata ):
+ // Force RectangleShape, this is ugly :(
+ // and is there because of the lines above which change it to TextFrame
+ dynamic_cast< SimpleShape& >( mrShape ).setService(
+ "com.sun.star.drawing.RectangleShape");
+ mrShapeModel.maLegacyDiagramPath = getFragmentPathFromRelId(rAttribs.getString(XML_id, OUString()));
+ break;
+ case O_TOKEN( signatureline ):
+ mrShapeModel.mbIsSignatureLine = true;
+ mrShapeModel.maSignatureId = rAttribs.getString(XML_id, OUString());
+ mrShapeModel.maSignatureLineSuggestedSignerName
+ = rAttribs.getString(O_TOKEN(suggestedsigner), OUString());
+ mrShapeModel.maSignatureLineSuggestedSignerTitle
+ = rAttribs.getString(O_TOKEN(suggestedsigner2), OUString());
+ mrShapeModel.maSignatureLineSuggestedSignerEmail
+ = rAttribs.getString(O_TOKEN(suggestedsigneremail), OUString());
+ mrShapeModel.maSignatureLineSigningInstructions
+ = rAttribs.getString(O_TOKEN(signinginstructions), OUString());
+ mrShapeModel.mbSignatureLineShowSignDate = ConversionHelper::decodeBool(
+ rAttribs.getString(XML_showsigndate, "t")); // default is true
+ mrShapeModel.mbSignatureLineCanAddComment = ConversionHelper::decodeBool(
+ rAttribs.getString(XML_allowcomments, "f")); // default is false
+ break;
+ case O_TOKEN( lock ):
+ // TODO
+ break;
+ }
+ // handle remaining stuff in base class
+ return ShapeTypeContext::onCreateContext( nElement, rAttribs );
+}
+
+void ShapeContext::setPoints(std::u16string_view rPoints)
+{
+ mrShapeModel.maPoints.clear();
+ sal_Int32 nIndex = 0;
+
+ while (nIndex >= 0)
+ {
+ sal_Int32 nX = ConversionHelper::decodeMeasureToTwip(
+ mrShape.getDrawing().getFilter().getGraphicHelper(), o3tl::getToken(rPoints, 0, ',', nIndex),
+ 0, true, true);
+ sal_Int32 nY = ConversionHelper::decodeMeasureToTwip(
+ mrShape.getDrawing().getFilter().getGraphicHelper(), o3tl::getToken(rPoints, 0, ',', nIndex),
+ 0, false, true);
+ mrShapeModel.maPoints.emplace_back(nX, nY);
+ }
+ // VML polyline has no size in its style attribute. Word writes the size to attribute
+ // coordsize with values in twip but without unit. For others we get size from points.
+ if (!mrShape.getTypeModel().maWidth.isEmpty() || !mrShape.getTypeModel().maHeight.isEmpty())
+ return;
+
+ if (mrShape.getTypeModel().moCoordSize.has())
+ {
+ double fWidth = mrShape.getTypeModel().moCoordSize.get().first;
+ fWidth = o3tl::convert(fWidth, o3tl::Length::twip, o3tl::Length::pt);
+ double fHeight = mrShape.getTypeModel().moCoordSize.get().second;
+ fHeight = o3tl::convert(fHeight, o3tl::Length::twip, o3tl::Length::pt);
+ mrShape.getTypeModel().maWidth = OUString::number(fWidth) + "pt";
+ mrShape.getTypeModel().maHeight = OUString::number(fHeight) + "pt";
+ }
+ else if (mrShapeModel.maPoints.size())
+ {
+ double fMinX = mrShapeModel.maPoints[0].X;
+ double fMaxX = mrShapeModel.maPoints[0].X;
+ double fMinY = mrShapeModel.maPoints[0].Y;
+ double fMaxY = mrShapeModel.maPoints[0].Y;
+ for (const auto& rPoint : mrShapeModel.maPoints)
+ {
+ if (rPoint.X < fMinX)
+ fMinX = rPoint.X;
+ else if (rPoint.X > fMaxX)
+ fMaxX = rPoint.X;
+ if (rPoint.Y < fMinY)
+ fMinY = rPoint.Y;
+ else if (rPoint.Y > fMaxY)
+ fMaxY = rPoint.Y;
+ }
+ mrShape.getTypeModel().maWidth
+ = OUString::number(
+ o3tl::convert(fMaxX - fMinX, o3tl::Length::twip, o3tl::Length::pt))
+ + "pt";
+ mrShape.getTypeModel().maHeight
+ = OUString::number(
+ o3tl::convert(fMaxY - fMinY, o3tl::Length::twip, o3tl::Length::pt))
+ + "pt";
+ // Set moCoordSize, otherwise default (1000,1000) is used.
+ mrShape.getTypeModel().moCoordSize.set(
+ Int32Pair(basegfx::fround(fMaxX - fMinX), basegfx::fround(fMaxY - fMinY)));
+ }
+}
+
+void ShapeContext::setFrom( const OUString& rPoints )
+{
+ if (!rPoints.isEmpty())
+ mrShapeModel.maFrom = rPoints;
+}
+
+void ShapeContext::setTo( const OUString& rPoints )
+{
+ if (!rPoints.isEmpty())
+ mrShapeModel.maTo = rPoints;
+}
+
+void ShapeContext::setControl1( const OUString& rPoints )
+{
+ if (!rPoints.isEmpty())
+ mrShapeModel.maControl1 = rPoints;
+}
+
+void ShapeContext::setControl2( const OUString& rPoints )
+{
+ if (!rPoints.isEmpty())
+ mrShapeModel.maControl2 = rPoints;
+}
+void ShapeContext::setVmlPath( const OUString& rPath )
+{
+ if (!rPath.isEmpty())
+ mrShapeModel.maVmlPath = rPath;
+}
+
+void ShapeContext::setHyperlink( const OUString& rHyperlink )
+{
+ if (!rHyperlink.isEmpty())
+ mrShapeModel.maHyperlink = rHyperlink;
+}
+
+GroupShapeContext::GroupShapeContext(ContextHandler2Helper const& rParent,
+ const std::shared_ptr<GroupShape>& pShape,
+ const AttributeList& rAttribs)
+ : ShapeContext(rParent, pShape, rAttribs)
+ , mrShapes(pShape->getChildren())
+{
+}
+
+ContextHandlerRef GroupShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // try to create a context of an embedded shape
+ ContextHandlerRef xContext = createShapeContext( *this, mrShapes, nElement, rAttribs );
+ // handle remaining stuff of this shape in base class
+ return xContext ? xContext : ShapeContext::onCreateContext( nElement, rAttribs );
+}
+
+RectangleShapeContext::RectangleShapeContext(ContextHandler2Helper const& rParent,
+ const AttributeList& rAttribs,
+ const std::shared_ptr<RectangleShape>& pShape)
+ : ShapeContext(rParent, pShape, rAttribs)
+{
+}
+
+ContextHandlerRef RectangleShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ // The parent class's context is fine
+ return ShapeContext::onCreateContext( nElement, rAttribs );
+}
+
+ControlShapeContext::ControlShapeContext( ::oox::core::ContextHandler2Helper const & rParent, ShapeContainer& rShapes, const AttributeList& rAttribs )
+ : ShapeContextBase (rParent)
+{
+ ::oox::vml::ControlInfo aInfo;
+ aInfo.maShapeId = rAttribs.getXString( W_TOKEN( shapeid ), OUString() );
+ aInfo.maFragmentPath = getFragmentPathFromRelId(rAttribs.getString( R_TOKEN(id), OUString() ));
+ aInfo.maName = rAttribs.getString( W_TOKEN( name ), OUString() );
+ aInfo.mbTextContentShape = true;
+ rShapes.getDrawing().registerControl(aInfo);
+}
+
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx
new file mode 100644
index 000000000..1162eb2aa
--- /dev/null
+++ b/oox/source/vml/vmltextbox.cxx
@@ -0,0 +1,204 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/vml/vmltextbox.hxx>
+
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/text/XTextAppend.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <comphelper/sequence.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+
+namespace oox::vml {
+
+using namespace com::sun::star;
+
+TextFontModel::TextFontModel()
+{
+}
+
+TextPortionModel::TextPortionModel( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText ) :
+ maParagraph( rParagraph ),
+ maFont( rFont ),
+ maText( rText )
+{
+}
+
+TextBox::TextBox(ShapeTypeModel& rTypeModel)
+ : mrTypeModel(rTypeModel)
+ , borderDistanceSet( false )
+ , borderDistanceLeft(0)
+ , borderDistanceTop(0)
+ , borderDistanceRight(0)
+ , borderDistanceBottom(0)
+{
+}
+
+void TextBox::appendPortion( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText )
+{
+ maPortions.emplace_back( rParagraph, rFont, rText );
+}
+
+const TextFontModel* TextBox::getFirstFont() const
+{
+ return maPortions.empty() ? nullptr : &maPortions.front().maFont;
+}
+
+OUString TextBox::getText() const
+{
+ OUStringBuffer aBuffer;
+ for (auto const& portion : maPortions)
+ aBuffer.append( portion.maText );
+ return aBuffer.makeStringAndClear();
+}
+
+void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const
+{
+ uno::Reference<text::XTextAppend> xTextAppend(xShape, uno::UNO_QUERY);
+ OUString sParaStyle;
+ bool bAmbiguousStyle = true;
+
+ for (auto const& portion : maPortions)
+ {
+ beans::PropertyValue aPropertyValue;
+ std::vector<beans::PropertyValue> aPropVec;
+ const TextParagraphModel& rParagraph = portion.maParagraph;
+ const TextFontModel& rFont = portion.maFont;
+ if (rFont.moName.has())
+ {
+ aPropertyValue.Name = "CharFontName";
+ aPropertyValue.Value <<= rFont.moName.get();
+ aPropVec.push_back(aPropertyValue);
+
+ aPropertyValue.Name = "CharFontNameAsian";
+ aPropertyValue.Value <<= rFont.moNameAsian.get();
+ aPropVec.push_back(aPropertyValue);
+
+ aPropertyValue.Name = "CharFontNameComplex";
+ aPropertyValue.Value <<= rFont.moNameComplex.get();
+ aPropVec.push_back(aPropertyValue);
+ }
+ if (rFont.mobBold.has())
+ {
+ aPropertyValue.Name = "CharWeight";
+ aPropertyValue.Value <<= rFont.mobBold.get() ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL;
+ aPropVec.push_back(aPropertyValue);
+ }
+ if (rFont.monSize.has())
+ {
+ aPropertyValue.Name = "CharHeight";
+ aPropertyValue.Value <<= double(rFont.monSize.get()) / 2.;
+ aPropVec.push_back(aPropertyValue);
+ }
+ if (rFont.monSpacing.has())
+ {
+ aPropertyValue.Name = "CharKerning";
+ // Value is not converted to mm100: SvxKerningItem::PutValue() gets
+ // called with nMemberId = 0, so no mm100 -> twips conversion will
+ // be done there.
+ aPropertyValue.Value <<= sal_Int16(rFont.monSpacing.get());
+ aPropVec.push_back(aPropertyValue);
+ }
+ if (rParagraph.moParaAdjust.has())
+ {
+ style::ParagraphAdjust eAdjust = style::ParagraphAdjust_LEFT;
+ if (rParagraph.moParaAdjust.get() == "center")
+ eAdjust = style::ParagraphAdjust_CENTER;
+ else if (rParagraph.moParaAdjust.get() == "right")
+ eAdjust = style::ParagraphAdjust_RIGHT;
+
+ aPropertyValue.Name = "ParaAdjust";
+ aPropertyValue.Value <<= eAdjust;
+ aPropVec.push_back(aPropertyValue);
+ }
+
+ // All paragraphs should be either undefined (default) or the same style,
+ // because it will only be applied to the entire shape, and not per-paragraph.
+ if (sParaStyle.isEmpty() )
+ {
+ if ( rParagraph.moParaStyleName.has() )
+ sParaStyle = rParagraph.moParaStyleName.get();
+ if ( bAmbiguousStyle )
+ bAmbiguousStyle = false; // both empty parastyle and ambiguous can only be true at the first paragraph
+ else
+ bAmbiguousStyle = rParagraph.moParaStyleName.has(); // ambiguous if both default and specified style used.
+ }
+ else if ( !bAmbiguousStyle )
+ {
+ if ( !rParagraph.moParaStyleName.has() )
+ bAmbiguousStyle = true; // ambiguous if both specified and default style used.
+ else if ( rParagraph.moParaStyleName.get() != sParaStyle )
+ bAmbiguousStyle = true; // ambiguous if two different styles specified.
+ }
+ if (rFont.moColor.has())
+ {
+ aPropertyValue.Name = "CharColor";
+ aPropertyValue.Value <<= rFont.moColor.get().toUInt32(16);
+ aPropVec.push_back(aPropertyValue);
+ }
+ xTextAppend->appendTextPortion(portion.maText, comphelper::containerToSequence(aPropVec));
+ }
+
+ try
+ {
+ // Track the style in a grabBag for use later when style details are known.
+ comphelper::SequenceAsHashMap aGrabBag;
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY_THROW);
+ aGrabBag.update( xPropertySet->getPropertyValue("CharInteropGrabBag") );
+ aGrabBag["mso-pStyle"] <<= sParaStyle;
+ xPropertySet->setPropertyValue("CharInteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ }
+ catch (const uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION( "oox.vml","convert() grabbag exception" );
+ }
+
+ // Remove the last character of the shape text, if it would be a newline.
+ uno::Reference< text::XTextCursor > xCursor = xTextAppend->createTextCursor();
+ xCursor->gotoEnd(false);
+ xCursor->goLeft(1, true);
+ if (xCursor->getString() == "\n")
+ xCursor->setString("");
+
+ if ( maLayoutFlow != "vertical" )
+ return;
+
+ uno::Reference<beans::XPropertySet> xProperties(xShape, uno::UNO_QUERY);
+
+ // VML has the text horizontally aligned to left (all the time),
+ // v-text-anchor for vertical alignment, and vertical mode to swap the
+ // two. drawinglayer supports both horizontal and vertical alignment,
+ // but no vertical mode: we use T->B, R->L instead.
+ // As a result, we need to set horizontal adjustment here to 'right',
+ // that will result in vertical 'top' after writing mode is applied,
+ // which matches the VML behavior.
+ xProperties->setPropertyValue("TextHorizontalAdjust", uno::Any(drawing::TextHorizontalAdjust_RIGHT));
+
+ xProperties->setPropertyValue( "TextWritingMode", uno::Any( text::WritingMode_TB_RL ) );
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx
new file mode 100644
index 000000000..d043ebc87
--- /dev/null
+++ b/oox/source/vml/vmltextboxcontext.cxx
@@ -0,0 +1,287 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <oox/helper/attributelist.hxx>
+#include <oox/vml/vmlformatting.hxx>
+#include <oox/vml/vmltextboxcontext.hxx>
+#include <oox/vml/vmlshape.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+#include <osl/diagnose.h>
+#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
+
+namespace oox::vml {
+
+using ::oox::core::ContextHandler2;
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+TextPortionContext::TextPortionContext( ContextHandler2Helper const & rParent,
+ TextBox& rTextBox, TextParagraphModel const & rParagraph, const TextFontModel& rParentFont,
+ sal_Int32 nElement, const AttributeList& rAttribs ) :
+ ContextHandler2( rParent ),
+ mrTextBox( rTextBox ),
+ maParagraph( rParagraph ),
+ maFont( rParentFont ),
+ mnInitialPortions( rTextBox.getPortionCount() )
+{
+ switch( nElement )
+ {
+ case XML_font:
+ maFont.moName = rAttribs.getXString( XML_face );
+ maFont.moColor = rAttribs.getXString( XML_color );
+ maFont.monSize = rAttribs.getInteger( XML_size );
+ break;
+ case XML_u:
+ OSL_ENSURE( !maFont.monUnderline, "TextPortionContext::TextPortionContext - nested <u> elements" );
+ maFont.monUnderline = (rAttribs.getToken( XML_class, XML_TOKEN_INVALID ) == XML_font4) ? XML_double : XML_single;
+ break;
+ case XML_sub:
+ case XML_sup:
+ OSL_ENSURE( !maFont.monEscapement, "TextPortionContext::TextPortionContext - nested <sub> or <sup> elements" );
+ maFont.monEscapement = nElement;
+ break;
+ case XML_b:
+ OSL_ENSURE( !maFont.mobBold, "TextPortionContext::TextPortionContext - nested <b> elements" );
+ maFont.mobBold = true;
+ break;
+ case XML_i:
+ OSL_ENSURE( !maFont.mobItalic, "TextPortionContext::TextPortionContext - nested <i> elements" );
+ maFont.mobItalic = true;
+ break;
+ case XML_s:
+ OSL_ENSURE( !maFont.mobStrikeout, "TextPortionContext::TextPortionContext - nested <s> elements" );
+ maFont.mobStrikeout = true;
+ break;
+ case OOX_TOKEN(dml, blip):
+ {
+ OptValue<OUString> oRelId = rAttribs.getString(R_TOKEN(embed));
+ if (oRelId.has())
+ mrTextBox.mrTypeModel.moGraphicPath = getFragmentPathFromRelId(oRelId.get());
+ }
+ break;
+ case VML_TOKEN(imagedata):
+ {
+ OptValue<OUString> oRelId = rAttribs.getString(R_TOKEN(id));
+ if (oRelId.has())
+ mrTextBox.mrTypeModel.moGraphicPath = getFragmentPathFromRelId(oRelId.get());
+ }
+ break;
+ case XML_span:
+ case W_TOKEN(r):
+ break;
+ default:
+ OSL_ENSURE( false, "TextPortionContext::TextPortionContext - unknown element" );
+ }
+}
+
+ContextHandlerRef TextPortionContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ OSL_ENSURE( nElement != XML_font, "TextPortionContext::onCreateContext - nested <font> elements" );
+ if (getNamespace(getCurrentElement()) == NMSP_doc)
+ return this;
+ return new TextPortionContext( *this, mrTextBox, maParagraph, maFont, nElement, rAttribs );
+}
+
+void TextPortionContext::onCharacters( const OUString& rChars )
+{
+ if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != W_TOKEN(t))
+ return;
+
+ switch( getCurrentElement() )
+ {
+ case XML_span:
+ // replace all NBSP characters with SP
+ mrTextBox.appendPortion( maParagraph, maFont, rChars.replace( 0xA0, ' ' ) );
+ break;
+ default:
+ mrTextBox.appendPortion( maParagraph, maFont, rChars );
+ }
+}
+
+void TextPortionContext::onStartElement(const AttributeList& rAttribs)
+{
+ switch (getCurrentElement())
+ {
+ case W_TOKEN(b):
+ maFont.mobBold = true;
+ break;
+ case W_TOKEN(sz):
+ maFont.monSize = rAttribs.getInteger( W_TOKEN(val) );
+ break;
+ case W_TOKEN(br):
+ mrTextBox.appendPortion( maParagraph, maFont, "\n" );
+ break;
+ case W_TOKEN(color):
+ maFont.moColor = rAttribs.getString( W_TOKEN(val) );
+ break;
+ case W_TOKEN(spacing):
+ maFont.monSpacing = rAttribs.getInteger(W_TOKEN(val));
+ break;
+ case W_TOKEN(r):
+ case W_TOKEN(rPr):
+ case W_TOKEN(t):
+ break;
+ case W_TOKEN(rFonts):
+ // See https://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.runfonts(v=office.14).aspx
+ maFont.moName = rAttribs.getString(W_TOKEN(ascii));
+ maFont.moNameAsian = rAttribs.getString(W_TOKEN(eastAsia));
+ maFont.moNameComplex = rAttribs.getString(W_TOKEN(cs));
+ break;
+ default:
+ SAL_INFO("oox", "unhandled: 0x" << std::hex<< getCurrentElement());
+ break;
+ }
+}
+
+void TextPortionContext::onEndElement()
+{
+ if (getNamespace(getCurrentElement()) == NMSP_doc && getCurrentElement() != W_TOKEN(t))
+ return;
+
+ /* A child element without own child elements may contain a single space
+ character, for example:
+
+ <div>
+ <font><i>abc</i></font>
+ <font> </font>
+ <font><b>def</b></font>
+ </div>
+
+ represents the italic text 'abc', an unformatted space character, and
+ the bold text 'def'. Unfortunately, the XML parser skips the space
+ character without issuing a 'characters' event. The class member
+ 'mnInitialPortions' contains the number of text portions existing when
+ this context has been constructed. If no text has been added in the
+ meantime, the space character has to be added manually.
+ */
+ if( mrTextBox.getPortionCount() == mnInitialPortions )
+ mrTextBox.appendPortion( maParagraph, maFont, OUString( ' ' ) );
+}
+
+TextBoxContext::TextBoxContext( ContextHandler2Helper const & rParent, TextBox& rTextBox, const AttributeList& rAttribs,
+ const GraphicHelper& graphicHelper ) :
+ ContextHandler2( rParent ),
+ mrTextBox( rTextBox )
+{
+ if( rAttribs.getString( XML_insetmode ).get() != "auto" )
+ {
+ OUString inset = rAttribs.getString( XML_inset ).get();
+ std::u16string_view value;
+ std::u16string_view remainingStr;
+
+ ConversionHelper::separatePair( value, remainingStr, inset, ',' );
+ rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToHmm( graphicHelper,
+ value.empty() ? u"0.1in" : value, 0, false, false );
+
+ inset = remainingStr;
+ ConversionHelper::separatePair( value, remainingStr, inset, ',' );
+ rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToHmm( graphicHelper,
+ value.empty() ? u"0.05in" : value, 0, false, false );
+
+ inset = remainingStr;
+ ConversionHelper::separatePair( value, remainingStr, inset, ',' );
+ rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToHmm( graphicHelper,
+ value.empty() ? u"0.1in" : value, 0, false, false );
+
+ inset = remainingStr;
+ ConversionHelper::separatePair( value, remainingStr, inset, ',' );
+ rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToHmm( graphicHelper,
+ value.empty() ? u"0.05in" : value, 0, false, false );
+
+ rTextBox.borderDistanceSet = true;
+ }
+
+ OUString sStyle = rAttribs.getString( XML_style, OUString() );
+ sal_Int32 nIndex = 0;
+ while( nIndex >= 0 )
+ {
+ std::u16string_view aName, aValue;
+ if( ConversionHelper::separatePair( aName, aValue, o3tl::getToken(sStyle, 0, ';', nIndex ), ':' ) )
+ {
+ if( aName == u"layout-flow" ) rTextBox.maLayoutFlow = aValue;
+ else if (aName == u"mso-fit-shape-to-text")
+ rTextBox.mrTypeModel.mbAutoHeight = true;
+ else if (aName == u"mso-layout-flow-alt")
+ rTextBox.mrTypeModel.maLayoutFlowAlt = aValue;
+ else if (aName == u"mso-next-textbox")
+ rTextBox.msNextTextbox = aValue;
+ else
+ SAL_WARN("oox", "unhandled style property: " << OUString(aName));
+ }
+ }
+}
+
+ContextHandlerRef TextBoxContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( getCurrentElement() )
+ {
+ case VML_TOKEN( textbox ):
+ if( nElement == XML_div ) return this;
+ else if (nElement == W_TOKEN(txbxContent)) return this;
+ break;
+ case XML_div:
+ if( nElement == XML_font ) return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs );
+ break;
+ case W_TOKEN(txbxContent):
+ if (nElement == W_TOKEN(p)) return this;
+ break;
+ case W_TOKEN(p):
+ case W_TOKEN(sdtContent):
+ case W_TOKEN(smartTag):
+ if (nElement == W_TOKEN(r))
+ return new TextPortionContext( *this, mrTextBox, maParagraph, TextFontModel(), nElement, rAttribs );
+ else
+ return this;
+ case W_TOKEN(pPr):
+ case W_TOKEN(sdt):
+ return this;
+ default:
+ SAL_INFO("oox", "unhandled 0x" << std::hex << getCurrentElement());
+ break;
+ }
+ return nullptr;
+}
+
+void TextBoxContext::onStartElement(const AttributeList& rAttribs)
+{
+ switch (getCurrentElement())
+ {
+ case W_TOKEN(jc):
+ maParagraph.moParaAdjust = rAttribs.getString( W_TOKEN(val) );
+ break;
+ case W_TOKEN(pStyle):
+ maParagraph.moParaStyleName = rAttribs.getString( W_TOKEN(val) );
+ break;
+ }
+}
+
+void TextBoxContext::onEndElement()
+{
+ if (getCurrentElement() == W_TOKEN(p))
+ {
+ mrTextBox.appendPortion( maParagraph, TextFontModel(), "\n" );
+ maParagraph = TextParagraphModel();
+ }
+}
+
+} // namespace oox::vml
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/util/oox.component b/oox/util/oox.component
new file mode 100644
index 000000000..3d717a469
--- /dev/null
+++ b/oox/util/oox.component
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.oox.core.FastTokenHandler"
+ constructor="com_sun_star_comp_oox_core_FastTokenHandler_get_implementation">
+ <service name="com.sun.star.xml.sax.FastTokenHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.oox.FormatDetector"
+ constructor="com_sun_star_comp_oox_FormatDetector_get_implementation">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.oox.docprop.DocumentPropertiesImporter"
+ constructor="com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation">
+ <service name="com.sun.star.document.OOXMLDocumentPropertiesImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.oox.ppt.PowerPointImport"
+ constructor="com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation">
+ <service name="com.sun.star.document.ImportFilter"/>
+ <service name="com.sun.star.document.ExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.oox.crypto.StrongEncryptionDataSpace"
+ constructor="com_sun_star_comp_oox_crypto_StrongEncryptionDataSpace_get_implementation">
+ <service name="com.sun.star.packages.PackageEncryption"/>
+ </implementation>
+</component>