summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2018-10-23clang-tidy performance-unnecessary-copy-init in idl..reportdesignNoel Grandin
Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-21tdf#120703 (PVS): redundant nullptr checkMike Kaganski
V668 There is no sense in testing the 'pBackgroundPropertiesPtr' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I728ffa74ec5e1f1f428224c79bd17c53b3ad3829 Reviewed-on: https://gerrit.libreoffice.org/62150 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19oox smartart: fix width of shapes with agl=lin, linDir=fromTMiklos Vajna
Smaller width only makes sense in the fromL/fromR cases, I think. Change-Id: I21c643b90556e47593b62abc2466e808d1ef31e5 Reviewed-on: https://gerrit.libreoffice.org/62024 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-19oox WpsContext: bTextFrame is always falseMiklos Vajna
Since commit d379d18666aa42031359ca8eb34b0021960347ae (oox: import WPS shape with text as shape with textbox, 2014-06-18). Change-Id: I5cc1f9938a2c091c868e6e1572e7ae35e87109a7 Reviewed-on: https://gerrit.libreoffice.org/62016 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18oox: ignore SmartArt "fallback" with empty shape listMiklos Vajna
This way at least something shows up in the import result. Far from perfect, though. Change-Id: Iae5a073d458598e7b5059ebdf435d50ce7c7df80 Reviewed-on: https://gerrit.libreoffice.org/61925 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-18tdf#120573 export media type for .wav properly.Mark Hung
Only video files were handled before. .wav files had wrong mime type in [Content Types].xml, used videoFile tag in slide1.xml, and incorrect type in rel file. Change-Id: I92bded52eb9f366103a10334c6a92fda9648076e Reviewed-on: https://gerrit.libreoffice.org/61885 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18loplugin:staticvar in hwpfilter..salNoel Grandin
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe Reviewed-on: https://gerrit.libreoffice.org/61881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17oox: add an environment variable to bypass the SmartArt warningMiklos Vajna
That dialog is counter-productive if you develop that feature itself. Change-Id: Ia635a2ff0ecc29a0d11be5c621a7c2a76469f9ba Reviewed-on: https://gerrit.libreoffice.org/61880 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-17tdf#42949 Fix IWYU warnings in include/tools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-16crashtesting: exception on exporting fdo77519-2.odt to docxCaolán McNamara
since... commit 761308edb65a6cf44ef84cebc387e77af8b70f83 Date: Thu Sep 13 04:04:41 2018 -0400 tdf#108064 OOXML export: fixing linestyle export in charts Change-Id: I3b1a43246adaa1476ddba1b67f37d0e933a44345 Reviewed-on: https://gerrit.libreoffice.org/61842 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-15loplugin:constfields in ooxNoel Grandin
Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439 Reviewed-on: https://gerrit.libreoffice.org/61728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-11tdf#111980 oox optionbutton autoGroup inside GroupBoxJustin Luth
The area of a GroupBox indicates which radio buttons are considered to be part of the same group. The button needs to be fully inside of the groupbox in order to participate. This patch resolves the last worry of commit 9f969799629fe6bdf8b922d8cb922846aa646ece Change-Id: Ie6057337c63bf9eb173a0615e30c8d4e4d0c7a19 Reviewed-on: https://gerrit.libreoffice.org/61131 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09tdf#120341 OOXML export: fix export of Pie Chart Wall BorderlineBalazs Varga
Export LineStyle_NONE instead of default linestyle of PlotArea border, because LibreOffice make invisible the Wall shape properties in case of PIE/NET/FILLED_NET charts. Or other solution in the future is set the default LineStyle of these charts to LineStyle_NONE. Change-Id: I59e6f18058713f4a0d4c77da8760a319f9c25152 Reviewed-on: https://gerrit.libreoffice.org/61547 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-08tdf#108064 OOXML export: convert LO preset dashes to equivalent MSO presetsAdam Kovacs
Change-Id: I967dfdc6a49cf04d98ea9fa9b57bf4669126a585 Reviewed-on: https://gerrit.libreoffice.org/61417 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-04tdf#120301 oox: lclIsWhiteSpace should return true for a spaceJustin Luth
Change-Id: I72c79c1fed4d9a91bf02024eef23cd3b1a58632e Reviewed-on: https://gerrit.libreoffice.org/61388 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-03tdf#108064 OOXML export: keep preset dashes with mso preset linewidthsAdam Kovacs
Change-Id: Ie87544850c494d946ea43b984aeff8666e08d738 Reviewed-on: https://gerrit.libreoffice.org/60874 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-02Related: tdf#120028 PPTX import: fix font color of multi-col shape textMiklos Vajna
Not just font color, anything defined via list styles were not imported. Change-Id: I95e6fc52e30a09ff93fb55d0836e45e177a7b099 Reviewed-on: https://gerrit.libreoffice.org/61230 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-28oox: create ShapeContextHandler instances with an uno constructorMiklos Vajna
Change-Id: Ie780ff9f3a8c61d13ad10cc2dbe24d3ec165470e Reviewed-on: https://gerrit.libreoffice.org/61063 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-28tdf#111980 oox: connect empty radio groupsJustin Luth
affects doc, docx, xls, xlsx (at least). Handling optionbutton groups is new since 2017, so incremental enhancements are OK. In LO, if an option button with an empty groupName (like any form control which has no groupName option), then it stands alone, which is a ridiculous position to be in for a radio button. So, lets put them all together into an automatic group. In MSO, buttons without any explicit group stick together, so the effective group is the entire document, or entire sheet. One complication is that ActiveX radio buttons don't interact with Form radio buttons, even if all of them have no group name. That situation is not handled by this patch (and not very likely to happen since ActiveX defaults the group name to the sheet name). (A Group Box can also be used, which automatically groups all buttons fully within its area. That will be much harder to implement since every object will need to first be categorized as groupbox or optionControl - meaning that everything must first be imported. That implies a function call from every application doing the import.) Change-Id: I204adaea75ce99999a16c0cc4e9c3b8b08da9433 Reviewed-on: https://gerrit.libreoffice.org/61064 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-09-26Fix preset_maping -> preset_mappingAndrea Gelmini
It passed "make check" on Linux Change-Id: I37c9af2a0687e292475d43a37b85e222c187f711 Reviewed-on: https://gerrit.libreoffice.org/60690 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-21Related: tdf#120028 PPTX import: fix font size of multi-col shape textMiklos Vajna
Normal shapes have a TextFitToSize property for this, but table cell content has to be scaled manually, as the rendering has no automatic support for them. Luckily the file format has the info we need to scale at import time. Change-Id: Ibbcc4b8685995261536cce88b8c0774e148f708e Reviewed-on: https://gerrit.libreoffice.org/60880 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-21tdf#120028 PPTX import: map shapes with multiple columns to table shapesMiklos Vajna
Longer term the core Impress shape has to be improved so that it can have text in multiple columns. Shorter term, map text with multiple columns to table shapes, that gives correct layout in many cases and requires changes to the import filter only. Change-Id: Id7942b16882ab1f083ded2f0e577e8c9e128697c Reviewed-on: https://gerrit.libreoffice.org/60859 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-21oox: create QuickDiagrammingLayout instances with an uno constructorMiklos Vajna
This is effectively dead code as commit 547217ecf2348cf511b1f058ecbab6f15f2bceff (Document seemingly dead QuickDiagrammingImport, QuickDiagrammingLayout, 2013-06-03) found, so the primary motivation is to just get this out of oox_component_getFactory(). Change-Id: Ibfee57202f0a3b02847b1298ce8895c8cf312322 Reviewed-on: https://gerrit.libreoffice.org/60840 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17ofz#10395 Null-dereferenceCaolán McNamara
Change-Id: I7bde5987a51949d60174335327652186e0ad8998 Reviewed-on: https://gerrit.libreoffice.org/60559 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14oox: create QuickDiagrammingImport instances with an uno constructorMiklos Vajna
This is effectively dead code as commit 547217ecf2348cf511b1f058ecbab6f15f2bceff (Document seemingly dead QuickDiagrammingImport, QuickDiagrammingLayout, 2013-06-03) found, so the primary motivation is to just get this out of oox_component_getFactory(). Change-Id: If0a585c2fc4b87ceb00e6f772fef2ac65d10dc67 Reviewed-on: https://gerrit.libreoffice.org/60470 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-14tdf#108064 OOXML export: fixing linestyle export in chartsAdam Kovacs
getLineDash function copy paste from ChartLinePanel.cxx. We query the actual linedash value associated to the LineDashName of the chart line via DashTable service. Thanks for the guidance of László Németh! Change-Id: I565fc968ce009803f9872da1f01dd56cfe07ddb3 Reviewed-on: https://gerrit.libreoffice.org/60424 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-09-13crashtesting: divide by zeroCaolán McNamara
since... commit f3d6c44c9cb533fe4f1cd28fc95adc36cac4bfd5 Date: Mon Sep 3 11:05:44 2018 -0400 tdf#108064 OOXML export: keep preset dashes with any line width Change-Id: I948123977f48d1f1005788f6a2c117e8971cab6f Reviewed-on: https://gerrit.libreoffice.org/60423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-11tdf#119617 Fix export of Autofit property of shapes to PPTXBalazs Varga
With this patch the "Resize shape to fit text" property (TextAutoGrowHeight-->spAutofit/noAutofit) will be exported correctly to PPTX format. Change-Id: I5fa975c6390a17bad30c360b3b17aa944bbe72af Reviewed-on: https://gerrit.libreoffice.org/60043 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-09-11clang-tidy bugprone-copy-constructor-initNoel Grandin
Change-Id: Idd435b3a4d081f6d3af26ff8add69ad4af50db57 warning: calling a base constructor other than the copy constructor Reviewed-on: https://gerrit.libreoffice.org/60239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-10tdf#108064 OOXML export: keep preset dashes with any line widthAdam Kovacs
Change-Id: I496e1cbac527383837a4e8fcdee42967ecf555e4 Reviewed-on: https://gerrit.libreoffice.org/59968 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-09-09Avoid getTokenCountMatteo Casalin
Change-Id: I60d11dab9bc04462cf3cc0412a356ec51212fb6e
2018-09-09loplugin:simplifyconstruct in l10ntools..packageNoel Grandin
Change-Id: I8dba8ef1e7455af1e55bbd6086b49c0606bf4927 Reviewed-on: https://gerrit.libreoffice.org/60212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-09Revert "clang-tidy performance-move-const-arg"Noel Grandin
This reverts commit 3d604d1cd6cc70ef96782ef769f0479b509987a8. comments from sberg: I assume dropping the std::move from aCurSel(std::move(aSel)) is caused by performance-move-const-arg's warning "if std::move() is called with an argument of a trivially-copyable type" (<https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html>). For my taste, that approach is too tightly tied to a class's current implementation details, something that may change over time. Imagine a trivially copyable class C with a raw pointer member (where the lifecycle of the pointed-to object is tracked by some higher-level, likely broken protocol). Now, that protocol is fixed and the raw pointer member is replaced with a std::shared_ptr. C is no longer trivially copyable, and the dropped std::move would turn out to be beneficial again. (Also, if Clang and clang-tidy did implement the fixed rules for trivially copyable classes from CWG1734/C++17, where a subset of a trivially copyable class's copy/move members may be deleted, the above rule to warn "if std::move() is called with an argument of a trivially-copyable type" would no longer make sense as written; consider a trivially copyable class whose copy ctor has been deleted.) Change-Id: Icb91610e50ed98b8f55fe6323bdfa48c8cb9b4b9 Reviewed-on: https://gerrit.libreoffice.org/60166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-07tdf#108691, tdf#119639 Don't print hidden objects in XLS(X)Aron Budea
In Excel hidden drawing objects aren't printed. When not hidden, printing is controlled by a separate 'Print object' setting. Only rely visibility setting for now, but properly: visible means also printed, hidden means not printed. Ie. import visible property also as printable, and only output visible property in XLS(X) formats. For the future, in XLSX format printability is controlled by attribute 'fPrintsWithSheet' of element 'clientData', don't know about XLS, there fUsefPrint/fPrint bits don't appear to be used anymore (see note in tdf#119639). Change-Id: I728107b30056f7bf073f2fefddece1bef1eb2e7a Reviewed-on: https://gerrit.libreoffice.org/59915 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-09-07oox: create PowerPointImport instances with an uno constructorMiklos Vajna
PowerPointImport_getSupportedServiceNames() was copy&pasted from oox::core::FilterBase::getSupportedServiceNames(), so it can go away entirely. Change-Id: Ia6352cea1c2d65ba94cae66b500de951d82f455a Reviewed-on: https://gerrit.libreoffice.org/60124 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-move-const-argNoel Grandin
Change-Id: I607891e120688b746c8a4c577018d97147a79217 Reviewed-on: https://gerrit.libreoffice.org/60029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31oox: create DocumentPropertiesImporter instances with an uno constructorMiklos Vajna
Change-Id: I2600a59e4eac7375882aff0491ecf16bad449520 Reviewed-on: https://gerrit.libreoffice.org/59841 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-30tdf#115670 vml shadow: shadow is off unless explicitly set onJustin Luth
The absence of "on=" is treated in Word (tested 2003) as off. Change-Id: Ibc6b0e5ca0f25a9c3ca1b9505fa24c4d821bfd0 Reviewed-on: https://gerrit.libreoffice.org/59457 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-30tdf#119562 Fix export of AutoFit property of shapes to XLSXBalazs Varga
With this patch the "Resize shape to fit text" property (TextAutoGrowHeight) will be exported correctly to XLSX format. Change-Id: I488ceead452aef9096e7766f957de425c8486f85 Reviewed-on: https://gerrit.libreoffice.org/59778 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-08-29loplugin:constantparam (2)Noel Grandin
Change-Id: I528f22876497f87159e3b9453362ebbfb55b7092
2018-08-28tdf#39593 deduplicate code using existing functionArkadiy Illarionov
Change-Id: I437becdb0ed4840738d6c45d88cd3be2ff1243fb Reviewed-on: https://gerrit.libreoffice.org/59591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-27Fix build in the !(USE_TLS_OPENSSL + USE_TLS_NSS > 0) caseTor Lillqvist
Change-Id: I746f0f322082e81cc47322989634322a0659aa73