summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
AgeCommit message (Collapse)AuthorFilesLines
2019-09-17SmartArt: separate data model from diagram.cxxGrzegorz Araminowicz6-562/+628
data model is having more and more code, so separate it from diagram.cxx as this file is getting too big Change-Id: I05193c518c47958d24739d97f7b6afbf821b5361 Reviewed-on: https://gerrit.libreoffice.org/79067 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-09-05Fix typosAndrea Gelmini1-2/+2
Change-Id: Ibfff5af316a2c18b5735245caf5a27a562bc0f52 Reviewed-on: https://gerrit.libreoffice.org/78664 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-05tdf#127166, tdf#123903 improve import/export of line stylesRegina Henschel1-52/+116
I have added import and export of prstDash line styles, for OOXML and for binary MS Office formats. This includes: Corrected Dot <--> Dash confusion, corrected some wrong defaults, added support for hairlines tdf#127267, take care of treating length 0 as 100%. tdf#108064 has introduced some mapping from our standard line styles to OOXML prstDash. I have removed that and implemented to export our styles as custDash and recover them back on import. That way the dashing looks initially the same in MS Office. I have removed the now wrong test. Binary MS Office formats have no custom dash styles AFAIK, therefore I have not changed the export of our styles there, but only added support for prstDash styles. Change-Id: Ia8cc8f90df6fdbe42adfc0236cc52becc670b333 Reviewed-on: https://gerrit.libreoffice.org/78372 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-09-03Fix typosAndrea Gelmini1-1/+1
Change-Id: I71bacf86938af2b89a706c435c4f72a194ec8343 Reviewed-on: https://gerrit.libreoffice.org/78417 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-02loplugin:constmethod in ooxNoel Grandin1-1/+1
Change-Id: Ie6c9c60288accf7096288aa67d091548e43687cd Reviewed-on: https://gerrit.libreoffice.org/78397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-02SmartArt edit UI: add new nodeGrzegorz Araminowicz2-0/+78
First approach to adding new node. Currently it's possible only to add top-level node to the end of diagram. Change-Id: Icd9530ab2fb8987a1690ffc96c244cc845b72eba Reviewed-on: https://gerrit.libreoffice.org/78286 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-09-01Fix '..'Andrea Gelmini1-1/+1
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-27SmartArt edit UI: change plain text widget to tree viewGrzegorz Araminowicz2-0/+19
Added getChildren() data interface method, so that it's possible to recursively fill tree view with (id, text) pairs Change-Id: Ic100ded3a3e125bf79f5caa421cd8f91e5210954 Reviewed-on: https://gerrit.libreoffice.org/78169 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-27Simplify Sequence iterations in ooxArkadiy Illarionov5-58/+40
Use range-based loops, STL and comphelper functions Change-Id: Ic3a186e7381bd8391ab85a2602a30f06fe5db740 Reviewed-on: https://gerrit.libreoffice.org/78089 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-23loplugin:returnconstval in ooxNoel Grandin1-1/+1
Change-Id: Id83744fcb90d1bf6e6fe048858f48a4944351494 Reviewed-on: https://gerrit.libreoffice.org/78013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23tdf#126741 - fix dash dot dot line style import problem, for pptxnd1011-1/+1
To make it consistent with MS PowerPoint, make the dash dot dot line start with dash instead of dots. Based on Regina Henschel's technical analysis and code pointers, but only make change to the lgDashDotDot case and leave everything else untouched. Change-Id: Ide533a562005c617eca9d556a63b6aec39017e93 Reviewed-on: https://gerrit.libreoffice.org/77443 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-08-20loplugin:constvars in i18npool..openclNoel Grandin3-6/+6
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-18SmartArt: implement DiagramData::getString()Grzegorz Araminowicz2-1/+41
Allows to get data representation of diagram as text. It will be useful as a starting point for displaying data on diagram dialog. Change-Id: I9765d7de64a68224a6d36b7c3bc4862ce6610bdf Reviewed-on: https://gerrit.libreoffice.org/77669 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin2-4/+2
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15tdf#126746 Add support for import/export line caps for .pptx formatBartosz Kosiorek4-3/+29
With this commit I have added importing and exporting line caps, which could be (for pptx format: rnd Round Line Cap sq Square Line Cap flat Flat Line Cap Also exporting of these caps are added. Change-Id: I799485048a2a7ac8df89f004e177d507f86ce99d Reviewed-on: https://gerrit.libreoffice.org/77233 Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2019-08-15replace ".get->" with "->"Noel Grandin1-1/+1
Change-Id: I327a6fda1fe0170da33e06b735f09a39421c8a58 Reviewed-on: https://gerrit.libreoffice.org/77469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini1-2/+2
Change-Id: Ic981076f76c92fb3112932bb7b5d97d6ec3d3c67 Reviewed-on: https://gerrit.libreoffice.org/77307 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I4bd004af206813b9dc01c50ab20f2e8b954b8dca Reviewed-on: https://gerrit.libreoffice.org/77323 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-07tdf#125337 Chart DOCX Import: fix missing empty data series columnsBalazs Varga1-1/+1
Create an empty column for a data series with NAN values, ie. where only "ptCount" was defined without explicit data. Also data series appear in the right order. Change-Id: I4eac94c2b9f34c84c4c19e4717cafbd440b20087 Reviewed-on: https://gerrit.libreoffice.org/77026 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-07crashtesting: null deref on import of fdo62183-3.pptxCaolán McNamara1-2/+2
Change-Id: I5b713584a8d6442e01fbcf98d43ea34073087cc6 Reviewed-on: https://gerrit.libreoffice.org/77080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-05SmartArt: store diagram data model in SdrObjectGrzegorz Araminowicz3-44/+52
It will allow modifying loaded diagram and exporting it. This data is used for regenerating diagram instead of parsing xml fragment every time. Also provided an interface for UI that can be extended to show, add and remove nodes from data model. It is stored as SdrObject field because diagram top-level shape is group shape. Item set doesn't exist for them and storing data in child shapes is not possible here because children are removed and recreated on every diagram reload. Change-Id: I84e5ec955f638b254fef9ef9d1731ca7938982b7 Reviewed-on: https://gerrit.libreoffice.org/76121 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): ooxStephan Bergmann3-198/+198
Change-Id: I177f9dd57fb3195db87a6b5ce3a231ab602b61f9 Reviewed-on: https://gerrit.libreoffice.org/76662 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-24tdf#114166 DOCX chart import: fix missing complex categoriesBalazs Varga3-14/+43
Now complex category labels are visible, and the inner data table contains the correct texts of the category columns. Note: repeating call of createDataSequenceByValueArray() API function can create all columns of the complex categories. See also commit 6c4e21a234f12e1310ba06f9859e08b424acf8bf "bnc#812796: Correctly handle static value array for OOXML charts." Change-Id: I333b79be35a24a912bb9e662116d0c85809a8fb2 Reviewed-on: https://gerrit.libreoffice.org/75776 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-07-20loplugin:referencecasting in oox..pyunoNoel Grandin4-6/+5
Change-Id: Ie920c154aef3074016704c632b15d99110b219aa Reviewed-on: https://gerrit.libreoffice.org/75974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17tdf#42949 Fix IWYU warnings in include/ooxGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I89303217fd1141b2cfe248e5e6c0818ba01cf9d9 Reviewed-on: https://gerrit.libreoffice.org/75178 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-15make tools::Rectangle::getBottom return 0 when emptyNoel Grandin1-8/+8
LayoutConverter::calcAbsRectangle needed to be tweaked because we now end up with a zero width/height instead of a large negative number. Change-Id: I81f04759a1d5bf6f44753a1701596796fad40567 Reviewed-on: https://gerrit.libreoffice.org/75610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-14tdf#126192 Translate automatic axis labelsGabor Kelemen1-1/+3
Change-Id: I7f5e765536198a7ac216e1ff9df55102e23cb1d7 Reviewed-on: https://gerrit.libreoffice.org/75294 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-11Fix typoAndrea Gelmini1-1/+1
Change-Id: Ib3f29c89be059609baf104b4f59ec55248aa7e75 Reviewed-on: https://gerrit.libreoffice.org/75373 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-07-10SmartArt: hide connectors in org chart as they don't work correctlyGrzegorz Araminowicz1-29/+1
Fixing them would require a lot of effort. Changes are needed in data part (connector shapes are not created in group shapes associated with data shapes) and in layout part - routing them differently in all 4 or 5 hierBranch styles, with assistants and without. Change-Id: I48840454b0272dff9ba42db2eb5d65945642459a Reviewed-on: https://gerrit.libreoffice.org/75339 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-09SmartArt: improve organization chart layoutGrzegorz Araminowicz5-36/+102
layout shapes in two steps: * first calculate vertical child shapes count for every shape (taking into accout hierBranch alg variable) * then actual layout using that count to calculate size for subtrees Change-Id: I2e5ca34ed3383aa9502c52511cc1fb2bee215572 Reviewed-on: https://gerrit.libreoffice.org/75195 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-09mxShape.is() is always true hereMike Kaganski1-1/+1
Change-Id: I30b11b0291ef4cbf793352b0b23b04857892a714 Reviewed-on: https://gerrit.libreoffice.org/75297 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-07-09tdf#126030 Translate automatic chart title in OOXML chartsGabor Kelemen1-1/+3
Add l10n support to oox module to achieve this Change-Id: I7bece62bdf5ef0f0d1ef424074f16cef94649d77 Reviewed-on: https://gerrit.libreoffice.org/74819 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-07Revert "SmartArt: support multiple levels of shapes in LayoutNodes"Grzegorz Araminowicz5-24/+12
As we have presentation node - shape mapping, keeping shape level information is no longer needed. This reverts commit 596a03b65e1b870be671ea1a44f4fba9fc66e4ae. Change-Id: Ibde1b4afde41778304138253c1548422c5b173c3 Reviewed-on: https://gerrit.libreoffice.org/75173 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-07-05SmartArt: remove calculateHierChildOffsetScale() from org chart algorithmGrzegorz Araminowicz1-53/+2
Its purpose was to center subtree if sibling parent has no children. It was not working correctly for complex charts causing shapes to overlap. Without it chart is still readable (just sometimes not centered). Remove it for now until more universal solution is found. Change-Id: I397bd4264d6ce0fadf5c5fa1352f22e72d5d163a Reviewed-on: https://gerrit.libreoffice.org/75092 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-07-02SmartArt: make if-node functions relative to current presentation nodeGrzegorz Araminowicz5-38/+27
* maxDepth calculates maximum depth of associated data node children (instead of per-diagram max depth) * cnt counts children of associated data node (instead of looking up presOf node and if not found counting presentation node children) Change-Id: Ifb50510acb9e6a3d2655197102060ec1c207075b Reviewed-on: https://gerrit.libreoffice.org/75000 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-07-01SmartArt: all visitors follow data presentation nodesGrzegorz Araminowicz8-325/+402
* visitors now are keeping track of current presentation node instead of looking it up by name * extracted visitor base class that follows if/else and for-each nodes * moved condition logic from ConditionAtom to visitor, as it depends on visitor state Change-Id: Iede86cd74a6098f2398a77b6cb3e9c6272dbfe4b Reviewed-on: https://gerrit.libreoffice.org/74732 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-26tdf#125573 Scale text to path for TextWarp, use fromWordArtRegina Henschel2-8/+11
LO uses not exactly the algorithm from DrawingML for Warp, but using 'ScaleX=false' gives similar results. MS Office uses scaling to path too for legacy shapes from category 'Follow Path', which were imported from binary ppt. It sets attribute 'fromWordArt' in that cases. This attribute is now interpreted on import and generated on export. Only in case of new 'Follow Path' shapes, the text is not scaled. 'ScaleX=true' is used in that case. Change-Id: I6fbc02eda436ef3bbc44783a16d79ce4bcd66f29 Reviewed-on: https://gerrit.libreoffice.org/74644 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-06-25SmartArt: move setting shape aspect ratio to alg atom visitGrzegorz Araminowicz3-11/+1
it allows to correctly follow if/else nodes instead of using once assigned alg atom Change-Id: I8c321b638524df3ca68242da6300bc8c2a838bbf Reviewed-on: https://gerrit.libreoffice.org/74648 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin1-2/+2
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21tdf#124817 OOXML chart import: fix missing symbolsBalazs Varga1-1/+9
OOXML chart symbols with undefined fill color attribute were imported as invisible white symbols. Fixed by using line color of these symbols. Change-Id: Ie4314ed56b63daa82fe30b111aeae9e358ff2b4b Reviewed-on: https://gerrit.libreoffice.org/74286 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-06-18loplugin:passstuffbyrefNoel Grandin1-1/+1
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb Reviewed-on: https://gerrit.libreoffice.org/74246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18SmartArt: support ForEach referencesGrzegorz Araminowicz5-1/+48
ForEach 'ref' parameter causes specified ForEach node to be used instead. Used to create recursive structures like organisation charts. Change-Id: Iee61b2e103759355b59beb8d3f33eb3cce47c590 Reviewed-on: https://gerrit.libreoffice.org/74271 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-06-18tdf#42949 Fix IWYU warnings in include/svx/[t-v]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I345b8c54890b5bc27f51addd2e6e73ba68b6b327 Reviewed-on: https://gerrit.libreoffice.org/73977 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-17tdf#51195, tdf#100348 Convert Fontwork to TextWarp on exportRegina Henschel1-0/+21
LibreOffice has Fontwork as property text-path in enhanced-custom- geometry. OOXML has the similar TextWarp as property of a textbox. The patch converts the custom shape to a textbox and sets the attribute prstTxWarp. Fill and outline of the Fontwork is lost. The import and export of fill and outline is tracked in tdf#119221 and still needs to be fixed. Change-Id: I8ea7b305d7d0a8367d61c1789f22b56d274a311d Reviewed-on: https://gerrit.libreoffice.org/74057 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-06-17SmartArt: support multiple levels of shapes in LayoutNodesGrzegorz Araminowicz4-17/+38
it is needed for recurrent ForEach node, so that shapes on different levels are divided and can be layouted separately Change-Id: Iefbc82925078fe2346858748259680fa8ea252d6 Reviewed-on: https://gerrit.libreoffice.org/74043 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-06-17Add comphelper::getUnoTunnelImplementation templateArkadiy Illarionov1-2/+2
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-15loplugin:logexceptionnicely in linguistic..ooxNoel Grandin2-10/+11
Change-Id: I3f96494f5fecb2f1011578b768198c1204147202 Reviewed-on: https://gerrit.libreoffice.org/74099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-11tdf#42949 Fix IWYU warnings in include/svx/[sS][v-Z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie2a4122d67d2d40732e6fd00b584f33edd802c5b Reviewed-on: https://gerrit.libreoffice.org/73476 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-08Fix typoAndrea Gelmini1-1/+1
Change-Id: I1728ab5cb25cb96e764f21e7c750ca6b91a92b15 Reviewed-on: https://gerrit.libreoffice.org/73682 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-07tdf#125563 Adapt adjustment values to binary shape geometryRegina Henschel1-19/+58
All presetTextWarp shapes are mapped to MS binary WordArt geometry in current implementation. But they use different reference systems for coordinates and different unit for angles. So _all_ adjustment values have to be adapted. Error was, that only angles were treated. Correct test file to actually contain the claimed 213.25 degree. Other bugs than adjustment values will be addressed in separate issues. Change-Id: I719b364af23887e50f003cf9878665755b8989ae Reviewed-on: https://gerrit.libreoffice.org/73624 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>