summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin1-4/+4
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14tdf#125191: Disable Undo during pptx saveMike Kaganski1-8/+20
Change-Id: I07fe6895cc2ba43dfa1716e67bdbb4e697e3420c Reviewed-on: https://gerrit.libreoffice.org/80727 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-10-13tdf#128096: pptx: export highlightXisco Fauli1-0/+11
Change-Id: If3084f7ffaceb774dba1b1f195229313a8f1d04a Reviewed-on: https://gerrit.libreoffice.org/80670 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-10-12tdf#127129: pptx: map highlight to CharBackColorXisco Fauli2-0/+4
Change-Id: I033c15db6848e96ba6b6bd7a2852c9e4d1524a8e Reviewed-on: https://gerrit.libreoffice.org/80630 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-10-12tdf#128016 Chart OOXML Import: fix duplicated category labelsBalazs Varga4-3/+7
Do not create category labels if the category axis is deleted. Regression from commit: fa0a981af41a2606541eec1cb20a379a739691e0 (tdf#114166 DOCX chart import: fix missing complex categories) Change-Id: If357b95956fccbbc6142879f22ebe1b6d715e850 Reviewed-on: https://gerrit.libreoffice.org/80443 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-10Removed duplicated includeAndrea Gelmini1-1/+0
Change-Id: I1a9653fae13c2f515c7f36c9632b8e8ad58ab45c Reviewed-on: https://gerrit.libreoffice.org/80624 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-10tdf#98603 export runs with correct lang attribute (2/2).Mark Hung1-5/+43
Obtain lang attribute of rPr element from CharLocale, CharLocaleAsian, or CharLocaleComplex based on the script type of exported text. There are several other call sites of WriteRunProperties, like those in chartexport, and those for text fields, Here I leave the default to CharLocale so it fallback to western locale as it did before. Change-Id: I33679517dd88f9e415933decc02f10afc807ad3b Reviewed-on: https://gerrit.libreoffice.org/79973 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-10-10More loplugin:redundantpointeropsStephan Bergmann1-1/+1
...same as 7d361e96c9ea822790db21806e9fc05279423833 "loplugin:redundantpointerops" (that were presumably missed by that commit because I only pulled 682fdbf1312cf6ca70fe209bf4d7051dad8f5008 "loplugin:redundantpointerops check other pointer types" halfway through my local build) Change-Id: I1497e4fca2046cbcd107bb2ac5ed6f41bd68de98 Reviewed-on: https://gerrit.libreoffice.org/80569 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-10tdf#98603 fix the missing char property (1/2).Mark Hung1-4/+14
- moLang is missed from assignUsed, so the attribute was never processed. - Set CharLocale, CharLocaleAsian, or CharLocaleComplex based on lang attribute of rPr (run property). Change-Id: I6a9a636d790d244d19e7b661a1a63b1249c2bd37 Reviewed-on: https://gerrit.libreoffice.org/79972 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-10-09loplugin:redundantpointeropsStephan Bergmann1-4/+4
(All related to uses of std::shared_ptr, which builds against libstdc++ apparently missed (fix forthcoming) and which I only now found with my macOS build against libc++.) Change-Id: If581e689f0e5ff62d9ce35513c9ff87b00328766 Reviewed-on: https://gerrit.libreoffice.org/80548 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-07tdf#127777 OOXML chart export: fix "CrossBetween" for not imported chartsBalazs Varga2-3/+1
Newly created or ODF charts were still exported incorrectly, because ShiftedCategoryPosition was stored in the view code. Now it is removed to the model using ChartTypeTemplate::adaptScales. See also commit 6027ec08fd5df2e09e34ff61b3777ad2cc8304b3 'tdf#127777 OOXML chart export: fix X axis position setting "CrossBetween"' Change-Id: I7cd69e311833bf9f24f3a600ee7c6312285a7738 Reviewed-on: https://gerrit.libreoffice.org/80160 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-07cid#1454626 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: I953bf3828cf3c5df5335dbc9b1ee2142aff4047b Reviewed-on: https://gerrit.libreoffice.org/80329 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-07enable -Wrange-loop-analysis on clangNoel Grandin1-1/+1
Change-Id: I2095308943c94ad16c110d5fac47715398eb5d39 Reviewed-on: https://gerrit.libreoffice.org/80187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-04Deduplicate some serializer writing code, and simplify writing OStringMike Kaganski1-2/+2
Change-Id: I391f8cb499a83f1f774fdcaa794169a218bdc7e5 Reviewed-on: https://gerrit.libreoffice.org/80189 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-04always use gb_LinkTarget__get_cxxflags for cxxobjectsLuboš Luňák1-2/+2
E.g. gb_LinkTarget_add_exception_object adds it explicitly, but gb_LinkTarget_add_cxxobject itself does not, even though other variants (c,objc,objcxx) do it. This means that when compiling tools/qa/cppunit/test_cpuid.cxx it doesn't get the correct -O/-g flags, because CppunitTest_tools_test.mk uses gb_CppunitTest_add_cxxobjects to add $(INTRINSICS_CXXFLAGS). And that in its own actually should use the add_exception_objects variant, it didn't presumably because that one used to have cxxflags passing broken until I fixed it in 4bbdab901eb3c7d32d28910fb830f4b0422eee91. The usage in Library_cpp_uno.mk even explicitly works around the lack of debug symbols. Change-Id: Idc794e95bb817cd2ba2942b8e1f04f80d6722f97 Reviewed-on: https://gerrit.libreoffice.org/80119 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-03tdf#127907 tdf#126724 Chart DOCX import: fix axis title positionBalazs Varga2-6/+11
Custom position of axis title reset to default when the document is opened in LibreOffice. Also fix tdf#126724 which was a regression from commit: 48480d4f19d2fb92ca4ae0527eec4753cdc439c0 (make tools::Rectangle::getBottom return 0 when empty) Note: The y coordinate of Y axis title position is still wrong because of another older bug. Change-Id: I449ad3b2252e05ab38d6752512d822c355ff8606 Reviewed-on: https://gerrit.libreoffice.org/79966 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-02tdf#127901: pptx export image greyscale, watermark, black/whiteXisco Fauli1-0/+18
Similar to 0db96caf0fcce09b87621c11b584a6d81cc7df86 Change-Id: I5c3ec17c7a3472629ba8a63ab500175add36ee8e Reviewed-on: https://gerrit.libreoffice.org/79994 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-10-02tdf#79007: PPTX: reset Contrast and Brightness when we map...Xisco Fauli1-2/+6
...MSO 'washout' to our watermark colormode After d151ed35ad4c4e7aa9fbb807930fcf91dea2eba7, Contrast and Brightness was reset only in writer, so do it earlier for Impress and Writer Change-Id: Icaf2b565880e31d86e09e2f56bac25eba52c8467 Reviewed-on: https://gerrit.libreoffice.org/79905 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-10-01SmartArt edit UI: fix crash on empty node textGrzegorz Araminowicz3-5/+13
Change-Id: Idacbbb50cbdd8ae4c78f3159bc362c7ee2137149 Reviewed-on: https://gerrit.libreoffice.org/79848 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-10-01tdf#127777 OOXML chart export: fix X axis position setting "CrossBetween"Balazs Varga2-7/+51
Export ShiftedCategoryPosition value into the CrossBetween OOXML tag. Change-Id: I3d8b298ed47c5326ee4faf0e8663c8c79d5a1d86 Reviewed-on: https://gerrit.libreoffice.org/79502 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-01loplugin:stringadd in helpcompiler..ooxNoel Grandin2-4/+2
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-27Deduplicate O(U)StringNumber definitions; add toAsciiUpperCaseMike Kaganski1-1/+1
Change-Id: I00e7ce62940907b5f4efc2b7f23f355c3e43ed6b Reviewed-on: https://gerrit.libreoffice.org/79686 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-26add property name when throwing css::uno::UnknownPropertyExceptionNoel Grandin2-3/+3
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-25Fix typoAndrea Gelmini1-1/+1
Change-Id: Ibc6bedab293b93920b2e829ed348d068670b7f8f Reviewed-on: https://gerrit.libreoffice.org/79514 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-25SmartArt Edit UI: remove nodeGrzegorz Araminowicz2-4/+67
Removes data node from data model including associated presentation nodes, transition nodes and all connections between them (child-parent and presentation-of). It still doesn't update order of remaining connections after removal, so empty entries can happen. Additional step is needed or using better data structures. Change-Id: I96e0752b6ec5a19ae8e972dbd421314e6c442b53 Reviewed-on: https://gerrit.libreoffice.org/79279 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák1-1/+1
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-23tdf#127393 OOXML chart import: fix X axis position setting "CrossBetween"Balazs Varga3-2/+3
Set ShiftedCategoryPosition according to OOXML value CrossBetween. Change-Id: I6445c94507de83f84b08fd3380cbbf03886b5aa3 Reviewed-on: https://gerrit.libreoffice.org/79142 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák1-1/+1
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-17SmartArt: separate data model from diagram.cxxGrzegorz Araminowicz7-562/+629
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 Grandin10-13/+13
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>