Draw: set Adjustment Values for Custom shapes

From Apache OpenOffice Wiki
Revision as of 15:55, 13 August 2012 by Oooforum (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

See Issue 120519

Many shapes like ring, smiley or callout had a yellow handle to modify a specific parameter.

But it only set up with mouse. It unable to set up with a dialogbox if you need a fine adjustment.

Custom shape

These shape are designed by a specific handle (yellow colored).

Each shape can have one or more yellow handles.

Custom shape one handle.png

Some shapes with one handle

Custom shape more handle.png

Some shapes with two or more handles

API Analysis

If you inspect the SvxShapeText object through API, you have a CustomShapeGeometry property.

  • This property result a structure of 6 arrays com.sun.star.beans.PropertyValue.
  • The 3th array is named AdjustmentValues
  • This structure contains a variant named Value
  • This Value is a com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue structure
  • Depending on the number of handles, the number of structures varies.
  • Each structure contains a default Value (type variant).

Default value of shape with one handle:

  • For a ring shape, the default value is: 5400
  • For a smiley shape: 17520.
  • For a frame shape: 2000.

Default values of shape with more handles:

The "left-right-arrow-callout" with 3 yellow handles match to 4 structures:

  • Array(0): 5400
  • Array(1): 5500
  • Array(2): 2700
  • Array(3): 8100

==

Personal tools