Difference between revisions of "Draw: set Adjustment Values for Custom shapes"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Created page with "== Introduction == See [https://issues.apache.org/ooo/show_bug.cgi?id=120519 Issue 120519] Many shapes like ring, smiley or callout had a yellow handle to modify a specific para…")
(No difference)

Revision as of 15:55, 13 August 2012

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