summaryrefslogtreecommitdiff
path: root/oox/source
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-13tdf#117274 XLSX export: fix VML comment shape type idLászló Németh1-1/+1
to avoid shape multiplication in a mixed environment. MSO needs the special unescaped VML comment shape type id "_x0000_t202" to avoid of generating also DrawingML shapes from the VML ones. Calc export escaped the shape type ids ("_x005F_x0000_t202"), keeping also the DrawingML shapes, so every round trip between LO and MSO resulted more and more broken shapes in the document. See also commit ea7274259a211170ee9f5a8714a2f9acd8bed6d8 "tdf#114842 Fix comment shape export for Calc". Change-Id: I55b29146ebcdc20cf4f53464bf318fb34bfc5934 Reviewed-on: https://gerrit.libreoffice.org/78831 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-09-06Fixing '....'Andrea Gelmini2-2/+2
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9 Reviewed-on: https://gerrit.libreoffice.org/78695 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-05Fix typosAndrea Gelmini2-3/+3
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 Henschel2-155/+204
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 Grandin7-10/+10
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 Gelmini2-2/+2
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for ".." instead of "..." between words. It passed "make check" on Linux. Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8 Reviewed-on: https://gerrit.libreoffice.org/78357 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
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-30tdf#103988 OOXML export: fix bubble chart MSO interoperabilityBalazs Varga1-2/+4
Write <c:bubble3D val="0"/> into each <CT_BubbleSer> OOXML element to allow file opening in MSO without removing the (previously "corrupted") bubble chart. Change-Id: Idf31a0d3d8f98a3be4c9a3b29e65d4d4c582be53 Reviewed-on: https://gerrit.libreoffice.org/78259 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-30tdf#114657 OOXML chart export: fix broken chart with NaN X valueBalazs Varga1-18/+6
Export c:pt elements only for numbers instead of replace the correct X values with the sequence 1, 2, 3..., when the X values contain a NaN value. This reverts commit a211c754003f98bc8f7761224a0b265bd224f61f "fdo77216-Charts-Scattered chart: Chart gets distorted on RT" Change-Id: I6d0bec870b5317575d93eff407b3ec2ada56431e Reviewed-on: https://gerrit.libreoffice.org/78221 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-28tdf#118169: ActiveX form control saved incorrectly with accented lettersTamás Zolnai1-2/+2
Write out unicode strings without any compression. Change-Id: I93cadc40bacbd679724c3404fd870cba48065650 Reviewed-on: https://gerrit.libreoffice.org/78234 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
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 Illarionov19-590/+482
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-23tdf#99497 CircleKind ARC, CUT, SECTION to OOXML arc, chord, pieRegina Henschel1-3/+71
Before this patch, a classical ellipse or circle was exported as OOXML preset type 'ellipse', regardless of the value of property CircleKind. Now the property is evaluated and the corresponding preset type is used. Change-Id: I49ff43cf7e2ce02654979e82f7d83d60ace39e23 Reviewed-on: https://gerrit.libreoffice.org/77785 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-08-23loplugin:returnconstval in ooxNoel Grandin3-3/+3
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 pptxnd1012-2/+2
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-22tdf#127085: FILESAVE: Transparency is lost after RTTamás Zolnai1-3/+7
Change-Id: I22ba83b5cc00f84112a3755898ee2be58337afd6 Reviewed-on: https://gerrit.libreoffice.org/77963 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-08-22tdf#127030 PPTX export: keep fixed size of legacy shapesBalazs Varga1-1/+2
Classical/legacy shapes lost their fixed size by exporting them with the option "Resize shape to fit text". Regression from commit 86b14cc8bd910651cef422a0f7408adc0fc51a17 (tdf#119617 Fix export of Autofit property of shapes to PPTX) Change-Id: Iab67db113edc61f4c94a89ec1bb8df0736c26f21 Reviewed-on: https://gerrit.libreoffice.org/77888 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-21Better use DecodeMechanims ToIUri rather than Unambiguous hereStephan Bergmann1-1/+1
...to avoid erroneously un-escaping input like "file:///%3C" to "file:///<" Change-Id: I973208dac38799794216e1ee36a63662d434e8cf Reviewed-on: https://gerrit.libreoffice.org/77886 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-21tdf#127070 DOCX export:fix encoding of hyperlinks with non-ASCII lettersTünde Tóth1-1/+2
Non-ASCII file links in DOCX documents created with Microsoft Word didn't work in Word after export. non_ascii_link.docx: Test file from Word 2016. Change-Id: Ib8c4e2e7b0402b88419d200c55cc1b881a4cde86 Reviewed-on: https://gerrit.libreoffice.org/77450 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-08-21tdf#101322 Chart OOXML Export: fix missing subtitleBalazs Varga1-8/+25
Concatenate subtitle and main title texts, if both exist, just like at the XLS/DOC export, because OOXML does not support subtitles. If we only have a subtitle, export the whole subtitle shape instead of the title shape, keeping its properties. Change-Id: If6a27c023fcce58f4549a0edad44027bb0348b93 Reviewed-on: https://gerrit.libreoffice.org/77499 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-20loplugin:constvars in i18npool..openclNoel Grandin4-7/+7
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-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet1-4/+1
in hwpfilter, include/test, io, linguistic, oox, pyuno, reportdesign Change-Id: I5c265c4fde85dd6d7faab8ae82809c4a0e6dd69b Reviewed-on: https://gerrit.libreoffice.org/77646 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin6-22/+11
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 Kosiorek6-3/+38
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-15loplugin:sequenceloop in forms..ooxNoel Grandin3-5/+6
Change-Id: Id742001211e916e7709918e7112902a0c35bac95 Reviewed-on: https://gerrit.libreoffice.org/77501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-13warn on load when a document binds an event to a macroCaolán McNamara1-0/+4
a) treat shared/Scripts equivalently to document scripts This doesn't automatically warn/block running those scripts when used in a freshly loaded document on its own however because DocumentMacroMode::checkMacrosOnLoading will see at... if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() ) that the document contains no macros and flip the allow macros flag to true so that potentially new uses of macros added by the user during the edit are allowed to run b) so, add an additional flag to indicate existence of use of macros in a document c) for odf import, set it when a script:event-listener tag is encountered d) for html import when registerScriptEvents or SwFormatINetFormat::SetMacroTable is called e) for doc import when Read_F_Macro or StoreMacroCmds is called as well for good measure f) for xls import when registerScriptEvent or ScMacroInfo::SetMacro is called g) for oox import when VbaProject::attachMacros is called Change-Id: Ic1203d8ec7dfc217aa217135033ae9db2888e19b Reviewed-on: https://gerrit.libreoffice.org/77131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-12Fix typosAndrea Gelmini2-2/+2
Change-Id: Ibd0e9ca0dbef5cf998d9d73cbd8a59708175e252 Reviewed-on: https://gerrit.libreoffice.org/77306 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini3-7/+7
Change-Id: Ic981076f76c92fb3112932bb7b5d97d6ec3d3c67 Reviewed-on: https://gerrit.libreoffice.org/77307 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini2-2/+2
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-09tdf#126746 Fix exporting closed Polylines to PPTXBartosz Kosiorek2-5/+7
In previous implementation the closed shapes was imported as a polylines without closing joint. As a result the joint style was not applied. This patch fixes that, and allow proper PPTX export. TODO The same issue needs to be fixed for PPT export Change-Id: I557daac1ba02330d8923f7eda3476e67d8711384 Reviewed-on: https://gerrit.libreoffice.org/77179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
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 Bergmann12-249/+249
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 Varga4-16/+49
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-23Fix typosAndrea Gelmini3-3/+3
Change-Id: Iea3bd498b1c8934f37085bdf6df71b073e4a871c Reviewed-on: https://gerrit.libreoffice.org/76203 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-20loplugin:referencecasting in oox..pyunoNoel Grandin12-33/+31
Change-Id: Ie920c154aef3074016704c632b15d99110b219aa Reviewed-on: https://gerrit.libreoffice.org/75974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19cid#1448460 Unchecked return valueCaolán McNamara1-1/+1
Change-Id: I5984923062338b54e016e46a8f12be72deff6822 Reviewed-on: https://gerrit.libreoffice.org/75895 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-19cid#1448264 silence Out-of-bounds accessCaolán McNamara1-1/+2
Change-Id: I12267e8709d8f36acbbd6c70bfdb80a2a500e5d3 Reviewed-on: https://gerrit.libreoffice.org/75910 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-17tdf#42949 Fix IWYU warnings in include/ooxGabor Kelemen6-0/+9
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-15tdf#126193 Chart OOXML: Export Multi-level category labelsBalazs Varga1-41/+227
Fix export of Multi-level category axis labels with the correct OOXML tags (as the OOXML Standard requested) in the correct order. Also fix tdf#126195: but only the export part of the whole fault, which combined (united) the text of the category axis labels at different levels. Change-Id: Iefcef00818a3bb2ee1671bf693335904be471722 Reviewed-on: https://gerrit.libreoffice.org/75299 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-07-15tdf#126310 Disable lazy loading of WMF imagesGabor Kelemen1-2/+2
Change-Id: I70d271e29bedc640cbfeab187ddb9ffce3e779e6 Reviewed-on: https://gerrit.libreoffice.org/75599 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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>