• Miklos Vajna's avatar
    Related: tdf#117761 oox smartart: backport fixes related to org chart · 53c3cbd7
    Miklos Vajna yazdı
    This is a combination of 10 commits.
    
    This is the 1st commit:
    
    oox smartart, org chart: add initial hierChild/Root algorithms
    
    hierChild is supposed to align and position its child layout nodes in a
    linear path under the hierRoot layout node, so initially just use a
    simple vertical layout algorithm.
    
    (cherry picked from commit 3103f9f9)
    
    This is the commit #2:
    
    oox smartart, org chart: handle multiple elements in hierChild
    
    In case one manager has multiple employees, then we laid out only the
    first one. Recognize non-assistant type as the node type (as a start) to
    get the correct number of employees (when there are no assistants), and
    also render employees on a horizontal (and not on a vertical) path.
    
    With this, the 1 manager and multiple employees case looks reasonable.
    
    (cherry picked from commit dcd378bf)
    
    This is the commit #3:
    
    oox smartart, org chart: fix font color when defined with quick styles
    
    createStyleMatrixContext() assumed that <dgm:style> contains
    <dgm:fontRef>, but it contains <a:fontRef> instead.
    
    This resulted in a 0 mnThemedIdx, which meant that since commit
    89206c47 (bnc#862510: PPTX import: Wrong
    text color inside shape, 2014-12-21) we ignored the theme color in
    oox::drawingml::Shape::createAndInsert().
    
    (cherry picked from commit 5dfd5755)
    
    This is the commit #4:
    
    oox smartart, org chart: fix vertical order of assistant nodes
    
    It seems the manager -> assistant -> employees ordering is not part of
    the file format. The order is stored twice in the file: the hierRoot
    algorithm has 3 layout nodes as a children, and also the data model has
    an order of the presentation nodes: both describe that employees go
    before assistant nodes.
    
    In contrast to that, PowerPoint orders XML_asst nodes before XML_node
    ones, so teach the hierRoot algorithm about this.
    
    This requires tracking the data model node type for each in-diagram
    drawingML shape, so that layout can determine if a hierRoot algorithm
    children has an assistant node or not.
    
    (cherry picked from commit 22086e70)
    
    This is the commit #5:
    
    oox smartart, org chart: handle multiple paragraphs on data node
    
    This problem was similar to the one fixed in
    cfa76f53 (oox smartart, accent process:
    handle multiple runs from a data point, 2018-11-21), but this there we
    handled multiple runs and this handles multiple paragraphs.
    
    It seems some smartart types allow multiple paragraphs in a diagram
    node, others only allow multiple runs. Org chart is in the former
    category.
    
    (cherry picked from commit dfc97dd3)
    
    This is the commit #6:
    
    oox smartart, org chart: fix height of manager nodes without employees
    
    Employees and/or assistants reduce the height of managers -- this effect
    is wanted even if there are no employees/assistants.
    
    (cherry picked from commit 8638cc1b)
    
    This is the commit #7:
    
    oox smartart, org chart: improve width of non-manager nodes
    
    The default case is that all managers have assistants/employees, so
    nodes under a manager can only use the horizontal space under the
    manager to avoid overlapping.
    
    But in case the previous / next sibling of the manager have no child
    nodes (assistant/employee) then we can use that space to make the child
    nodes larger. This improves readability of the chart's text a lot and
    brings the layout closer to what PowerPoint does for the same input.
    
    Handle all this in the hierChild algorithm, i.e. the container for a
    list of assistants or a list of employees, which means "parent" in this
    context always refers to a manager node.
    
    (cherry picked from commit 3a655975)
    
    This is the commit #8:
    
    oox smartart, org chart: implement support for hierBranch conditions
    
    The relevant part of the layout is the <dgm:layoutNode
    name="hierChild2"> element that has a <dgm:choose> with two branches:
    
    <dgm:if name="Name34" func="var" arg="hierBranch" op="equ" val="std">
    <dgm:if name="Name36" func="var" arg="hierBranch" op="equ" val="init">
    
    The connectors were missing as we took the first branch
    (ConditionAtom::getDecision() returned true if the arg was hierBranch),
    even hierBranch on the parent layout node was set to "init".
    
    With this, the correct number of connectors are created, previously all
    employee connectors were missing. Their size / position is still
    incorrect, though.
    
    (cherry picked from commit ae34f471)
    
    This is the commit #9:
    
    oox smartart, org chart: fix shape type of connectors
    
    PowerPoint renders these as bent connectors, not as arrow shapes.
    
    Also add a bit of vertical spacing between the nodes, otherwise the
    connectors have no way to be visible. Their position is still incorrect,
    though.
    
    (cherry picked from commit 1791e08e)
    
    This is the commit #10:
    
    oox smartart, org chart: fix position and size of connector shapes
    
    Finally the bugdoc rendering result is reasonable and even looks like a
    tree as it should.
    
    (cherry picked from commit 2bfb9117b287a371066a157267614b9bdb367d71)
    
    Change-Id: I4e7a729afd3d2c5af2e7f41903737bd56be406fa
    Reviewed-on: https://gerrit.libreoffice.org/66693
    Tested-by: Jenkins
    Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
    Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
    53c3cbd7
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 @ 2d1a77e4
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...
emfio 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 @ 2a1a5437
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...
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...
sal Loading commit data...
salhelper Loading commit data...
sax Loading commit data...
sc Loading commit data...
scaddins Loading commit data...
sccomp Loading commit data...
schema 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 @ c9b0b78a
ucb Loading commit data...
ucbhelper Loading commit data...
udkapi Loading commit data...
uitest 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...
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...
.clang-format Loading commit data...
.editorconfig 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...
setup.cfg Loading commit data...