• Caolán McNamara's avatar
    Related: tdf#93135 adjust the ui to reflect the text fit options entanglement · 8d51397b
    Caolán McNamara yazdı
    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
    8d51397b
Adı
Son kayıt (commit)
Son güncelleme
.git-hooks Loading commit data...
UnoControls Loading commit data...
accessibility Loading commit data...
android Loading commit data...
animations Loading commit data...
apple_remote Loading commit data...
avmedia Loading commit data...
basctl Loading commit data...
basegfx Loading commit data...
basic Loading commit data...
bean Loading commit data...
bin Loading commit data...
binaryurp Loading commit data...
bridges Loading commit data...
canvas Loading commit data...
chart2 Loading commit data...
cli_ure Loading commit data...
codemaker Loading commit data...
comphelper Loading commit data...
compilerplugins Loading commit data...
config_host Loading commit data...
configmgr Loading commit data...
connectivity Loading commit data...
cppcanvas Loading commit data...
cppu Loading commit data...
cppuhelper Loading commit data...
cpputools Loading commit data...
cui Loading commit data...
dbaccess Loading commit data...
desktop Loading commit data...
dictionaries @ 697bbfa6
distro-configs Loading commit data...
drawinglayer Loading commit data...
dtrans Loading commit data...
editeng Loading commit data...
embeddedobj Loading commit data...
embedserv Loading commit data...
eventattacher Loading commit data...
extensions Loading commit data...
external Loading commit data...
extras Loading commit data...
filter Loading commit data...
forms Loading commit data...
formula Loading commit data...
fpicker Loading commit data...
framework Loading commit data...
helpcompiler Loading commit data...
helpcontent2 @ 6343e2e9
hwpfilter Loading commit data...
i18nlangtag Loading commit data...
i18npool Loading commit data...
i18nutil Loading commit data...
icon-themes Loading commit data...
idl Loading commit data...
idlc Loading commit data...
include Loading commit data...
instsetoo_native Loading commit data...
io Loading commit data...
ios Loading commit data...
javaunohelper Loading commit data...
jurt Loading commit data...
jvmaccess Loading commit data...
jvmfwk Loading commit data...
l10ntools Loading commit data...
librelogo Loading commit data...
libreofficekit Loading commit data...
lingucomponent Loading commit data...
linguistic Loading commit data...
lotuswordpro Loading commit data...
m4 Loading commit data...
mysqlc Loading commit data...
nlpsolver Loading commit data...
o3tl Loading commit data...
odk Loading commit data...
offapi Loading commit data...
officecfg Loading commit data...
onlineupdate Loading commit data...
oovbaapi Loading commit data...
oox Loading commit data...
opencl Loading commit data...
osx Loading commit data...
package Loading commit data...
postprocess Loading commit data...
pyuno Loading commit data...
qadevOOo Loading commit data...
readlicense_oo Loading commit data...
registry Loading commit data...
remotebridges Loading commit data...
reportbuilder Loading commit data...
reportdesign Loading commit data...
ridljar Loading commit data...
rsc Loading commit data...
sal Loading commit data...
salhelper Loading commit data...
sax Loading commit data...
sc Loading commit data...
scaddins Loading commit data...
sccomp Loading commit data...
scp2 Loading commit data...
scripting Loading commit data...
sd Loading commit data...
sdext Loading commit data...
setup_native Loading commit data...
sfx2 Loading commit data...
shell Loading commit data...
slideshow Loading commit data...
smoketest Loading commit data...
solenv Loading commit data...
soltools Loading commit data...
sot Loading commit data...
starmath Loading commit data...
stoc Loading commit data...
store Loading commit data...
svgio Loading commit data...
svl Loading commit data...
svtools Loading commit data...
svx Loading commit data...
sw Loading commit data...
swext Loading commit data...
sysui Loading commit data...
test Loading commit data...
testtools Loading commit data...
toolkit Loading commit data...
tools Loading commit data...
translations @ 5a19b0e2
tubes Loading commit data...
ucb Loading commit data...
ucbhelper Loading commit data...
udkapi Loading commit data...
unodevtools Loading commit data...
unoidl Loading commit data...
unoil Loading commit data...
unotest Loading commit data...
unotools Loading commit data...
unoxml Loading commit data...
ure Loading commit data...
uui Loading commit data...
vbahelper Loading commit data...
vcl Loading commit data...
winaccessibility Loading commit data...
windows Loading commit data...
wizards Loading commit data...
writerfilter Loading commit data...
writerperfect Loading commit data...
xmerge Loading commit data...
xmlhelp Loading commit data...
xmloff Loading commit data...
xmlreader Loading commit data...
xmlscript Loading commit data...
xmlsecurity Loading commit data...
.buckconfig Loading commit data...
.buckversion Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.gitreview Loading commit data...
BUCK Loading commit data...
COPYING Loading commit data...
COPYING.LGPL Loading commit data...
COPYING.MPL Loading commit data...
Library_merged.mk Loading commit data...
Makefile.fetch Loading commit data...
Makefile.gbuild Loading commit data...
Makefile.in Loading commit data...
README.Solaris Loading commit data...
README.cross Loading commit data...
README.md Loading commit data...
Repository.mk Loading commit data...
RepositoryExternal.mk Loading commit data...
RepositoryFixes.mk Loading commit data...
RepositoryModule_build.mk Loading commit data...
RepositoryModule_host.mk Loading commit data...
TEMPLATE.SOURCECODE.HEADER Loading commit data...
autogen.sh Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
config_host.mk.in Loading commit data...
config_host_lang.mk.in Loading commit data...
configure.ac Loading commit data...
download.lst Loading commit data...
g Loading commit data...
install-sh Loading commit data...
leak-suppress.txt Loading commit data...
lo.xcent.in Loading commit data...
logerrit Loading commit data...
sanitize-ubsan-blacklist Loading commit data...
unusedcode.README Loading commit data...
unusedcode.easy Loading commit data...
unusedcode.exclude Loading commit data...