diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-09 13:03:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-13 11:28:19 +0100 |
commit | 8d51397bfd98615e74e116582a50e29846ecb76e (patch) | |
tree | 3f9654a0ee5f51ae85efeec013eaa2ff5ced1061 /include/svx | |
parent | a924d8f4c031504592a53e69c7c79c1359daa88a (diff) |
Related: tdf#93135 adjust the ui to reflect the text fit options entanglement
We have two major groups of text fitting options in draw/impress
ones that apply only to custom shapes
* Word wrap text in shape
* Resize shape to fit text
those that apply to other elements, e.g. text boxes, legacy rectangles and lines
* Fit width to text
* Fit height to text
* Fit to frame
* Adjust to contour
Of the second group, only "fit to frame" is always available. Text boxes
have "Fit width to text" and "Fit height to text", while stuff like legacy
rectangles and lines etc have "Adjust to contour" instead.
A fun issue is that (currently anyway) the bit for "resize shape to
fit text" in custom shapes and the bit for "fit height to text" in text boxes
is the same bit, SDRATTR_TEXT_AUTOGROWHEIGHT.
So before this change in all circumstances the same collection of checkboxes
for all settings was visible. With context used to enable or disable which
ones could be set according to the type of shape it was. Simultaneously there
is logic to enable/disable checkboxes depending on if other checkboxes that
control contradictionary options were checked/unchecked. e.g. "Fit to frame"
disabled if "fit height to text" is enabled. So its not apparently why some
can be enabled and some disabled by clicking about the place in the shared
collection.
In this commit we split the sizing options into their two families, one frame and
column for each of "custom shapes" and "everything else". When adjusting
a single selected object we use context to determine which column to show
or hide. When editing multiple objects or the underlying graphic styles we show
both columns. When editing a presentation style we show just the text box
column. (The use of HasText in the original code is a concern, cause it doesn't
make sense to me, using it like that means that in the original dialog
format->text on an empty text box from F2 shows the contour option, but after
entering text and then format->text it shows a set of different text box sizing
options, so that's dropped here)
Because (currently) the same SDRATTR_TEXT_AUTOGROWHEIGHT bit it used for two
apparently different things then we visually toggle on all things that use that
bit in multi-column mode when its togged on, i.e. on editing a style visually
both "fit height to text" and "resize shape to fix text" are kept in sync when
you toggle one or the other. We don't disable the "resize shape to fit text"
checkbox (unlike the fit height to text checkbox which controls the same bit)
if "fit to frame" and "adjust to contour" are set, and give it additional
powers to unset those if clicked.
This hopefully makes the ui describe the way things actually are.
Because this SDRATTR_TEXT_AUTOGROWHEIGHT is currently sort of doing two purposes
selecting a freshly drawn custom rectangle and using format->default formatting
will cause it to change properties because the underlying
SDRATTR_TEXT_AUTOGROWHEIGHT bit is cleared.
The way things should probably be I guess is that there should be a
SDRATTR_TEXT_AUTOGROWSIZE property (which used to exist but wasn't hooked up to
anything) just for custom shapes which overrides the old family of options if
set.
Change-Id: I49241c90d919eeb5caa8775beab57746d5c6df04
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/svxids.hrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 8f9bcf776860..c5e891860913 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -851,7 +851,7 @@ #define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET ( SID_SVX_START + 1030 ) #define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST ( SID_SVX_START + 1031 ) #define SID_SVXTABULATORTABPAGE_DISABLEFLAGS ( SID_SVX_START + 1032 ) -#define SID_SVXTEXTATTRPAGE_VIEW ( SID_SVX_START + 1033 ) +#define SID_SVXTEXTATTRPAGE_OBJKIND ( SID_SVX_START + 1033 ) #define SID_FLAG_TYPE ( SID_SVX_START + 1034 ) #define SID_SWMODE_TYPE ( SID_SVX_START + 1035 ) #define SID_DISABLE_CTL ( SID_SVX_START + 1036 ) |