summaryrefslogtreecommitdiff
path: root/oox/source
AgeCommit message (Collapse)Author
2019-11-05tdf#108065 tdf#128609 OOXML chart export: fix transparent color gradientBalazs Varga
Linear and axial color gradients keep their solid or gradient transparencies. Change-Id: I37dfe016864bded49c767cea5c8c865455281de0 Reviewed-on: https://gerrit.libreoffice.org/81308 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03find symbols that can be privateNoel Grandin
update the script and make private standalone functions Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1 Reviewed-on: https://gerrit.libreoffice.org/81879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-31tdf#128447 sc/vml: accept <? ?> xml prologJustin Luth
... or processing instruction, or text directive. The inability to parse this was exposed in LO 6.2 with commit 2cae2ecfef47d8dd10647c10f9577392c1887d3a I added <?xml version="1.0" encoding="UTF-8" standalone="yes"?> to the top of vmlDrawing1.vml from the unit test, which invalidates the entire .vml file and the two controls are lost without this fix. Change-Id: Ia1e6d5f9bb932756f70dca59fa8b32004c9e8013 Reviewed-on: https://gerrit.libreoffice.org/81730 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2019-10-25tdf#126324 Import custom date as custom XTextFieldTamas Bunth
Change-Id: I89f96490a47210e7daa3b21b2399e0dfe0cf3abf Reviewed-on: https://gerrit.libreoffice.org/81513 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-10-24Introduce OStringCharStephan Bergmann
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22tdf#127908 tdf#128193 Chart OOXML: Fix Custom Y axis title positionBalazs Varga
Import part: set the anchor position to the TOP_LEFT corner of the rectangle during the import, if the textbox is rotated with 90 or 270 degree. Because the OOXML files always contains the TOP_LEFT coordinates of a textbox, even if they are rotated. Note: Unfortunatelly we do not know the shape size, so this fix cannot handle rotations different than 0, 90 or 270 degrees. Export part: export the top left corner coordinates of axis title shape as the OOXML Standerd requires. Change-Id: Id0875d65884f6bfef8726135a7c03418d2ce3f23 Reviewed-on: https://gerrit.libreoffice.org/80939 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-22Rather not put unencrypted doc in a tempfileSamuel Mehrbrodt
Keep it in memory instead Change-Id: I25e5cb7183a4d192938110323e27f2f5d1d006fc Reviewed-on: https://gerrit.libreoffice.org/81253 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-18tdf#128209 Add check for crash handling 3D rotation.Gülşah Köse
Handling text 3D z rotation works only for custom shapes. Prevent to use it for other services. Change-Id: I99971bccc2f7a4b08e212e467343cb661869804a Reviewed-on: https://gerrit.libreoffice.org/80974 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16tdf#126060 Handle text camera z rotation while pptx import.Gülşah Köse
Change-Id: Ifa4589fb50affc4c5ffb52288db8533c98ec6dd9 Reviewed-on: https://gerrit.libreoffice.org/80587 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15tdf#79007: Do not overwrite if only one of nBrightness...Xisco Fauli
...or nContrast is != 0 Thanks to M. Stahl Change-Id: I28a08f31ca1e93d7b06f56700baea0d8ab6c7de4 Reviewed-on: https://gerrit.libreoffice.org/80818 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-15tdf#128096: only use CharBackColor for highlight if exporting to pptxXisco Fauli
Just in case, making sure highlight in docx export works as before Change-Id: Ied42da1c5f286b80fc754a06357960e8334a765f Reviewed-on: https://gerrit.libreoffice.org/80780 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-10-15tdf#127964 PPTX import: fix shape fill handling: style vs slide backgroundMiklos Vajna
Regression from commit 943a534ac7cb3df513583e226c986dafd8ba246b (tdf#123684 PPTX import: fix wrong background color for <p:sp useBgFill="1">, 2019-04-23), the problem was that we didn't handle the case when a shape had an XML fragment like this: <p:sp useBgFill="1"> <p:style> <a:fillRef idx="1"> <a:schemeClr val="accent1"/> </a:fillRef> </p:style> </p:sp> i.e. the shape both wants to use background fill and it has a style declaring how to fill it as well. We gave the style a priority, while PowerPoint gives the background fill a priority. Fix the problem by not setting the fill from the style in case the background fill is already set. Change-Id: Ie1b56e5615219138a5b7ddd7a2b25295b991bc05 Reviewed-on: https://gerrit.libreoffice.org/80804 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-14New loplugin:getstrStephan Bergmann
...to find matches of ... << s.getStr() (for the rtl string classes) that can be written as just ... << s Some notes: * The OUStringToOString(..., RTL_TEXTENCODING_UTF8) is left explicit in desktop/source/app/crashreport.cxx (even though that would also be done internally by the "<< OUString" operator) to clarify that these values are written out as UTF-8 (and not as what that operator << happens to use, which just also happens to be UTF-8). * OUSTRING_TO_CSTR (include/oox/helper/helper.hxx) is no longer used now. * Just don't bother to use osl_getThreadTextEncoding() in the SAL_WARN in lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx. * The toUtf8() in the SAL_DEBUG in pyuno/source/module/pyuno_module.cxx can just go, too. Change-Id: I4602f0379ef816bff310f1e51b57c56b7e3f0136 Reviewed-on: https://gerrit.libreoffice.org/80762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
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 Kaganski
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 Fauli
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 Fauli
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 Varga
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 Gelmini
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 Hung
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 Bergmann
...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 Hung
- 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 Bergmann
(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 Varga
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 McNamara
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 Grandin
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 Kaganski
Change-Id: I391f8cb499a83f1f774fdcaa794169a218bdc7e5 Reviewed-on: https://gerrit.libreoffice.org/80189 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-03tdf#127907 tdf#126724 Chart DOCX import: fix axis title positionBalazs Varga
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 Fauli
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 Fauli
...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 Araminowicz
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 Varga
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 Grandin
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 Kaganski
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 Grandin
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 Gelmini
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 Araminowicz
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ňák
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 Varga
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-17SmartArt: separate data model from diagram.cxxGrzegorz Araminowicz
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émeth
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 Gelmini
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9 Reviewed-on: https://gerrit.libreoffice.org/78695 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-05Fix typosAndrea Gelmini
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 Henschel
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 Gelmini
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 Grandin
Change-Id: Ie6c9c60288accf7096288aa67d091548e43687cd Reviewed-on: https://gerrit.libreoffice.org/78397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>