summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2018-08-16tdf#116350 Better text layout for big shapesSzymon Kłos1-0/+8
Added some horizontal padding - for bigger shapes and vertical adjustment for multi-line labels. Change-Id: I665b238b0d08a499cd846952d831fe449f72f575 Reviewed-on: https://gerrit.libreoffice.org/58975 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-15ofz#9892 Null-dereferenceCaolán McNamara1-1/+3
Change-Id: I8ab1948e5760da365bdddaf45955912a18b20ead Reviewed-on: https://gerrit.libreoffice.org/59055 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14tdf#119234 OOXML Shapes from Word fail to renderNoel Grandin1-1/+1
regression from commit 65e4a776e8315fd61fd67ad00d28985b11f0b79e simplify some OUString::copy calls I got the params switched around Change-Id: I68da0ae681f2b886e35f74bd72de0c482c843ae9 Reviewed-on: https://gerrit.libreoffice.org/58986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin2-4/+4
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14Revert "Work around what looks like MSVC 2013 miscompilation"Stephan Bergmann1-6/+1
This reverts commit e58f9cad29404670085803a8010729a735759088 (plus follow-up 5378963b262ade09f5a55ecb185164b2eac8c782 "Turns out this was a non-debug build" that merely tweaked the comment). Lets hope that the alleged MSVC 2013 miscompile is no longer an issue with our current MSVC 2017 baseline. (And Clang's new -fsanitize=implicit-conversion complained about return nProjKey; truncating from sal_uInt32 2271 to sal_uInt8 223 during CppunitTest_oox_vba_encryption.) Change-Id: I0dd55e658899833899a8da1ce2111edb1524e7d5 Reviewed-on: https://gerrit.libreoffice.org/58944 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-13loplugin:returnconstant in oox,packageNoel Grandin2-7/+4
Change-Id: I1dade7ddde6b1e226861d32f24f65be5bb9d9352 Reviewed-on: https://gerrit.libreoffice.org/58880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-10tdf#119160 remove fill from all fontwork shapesSzymon Kłos1-1/+1
Change-Id: I66cd5ab39c3f3b8635eb4e9b5261e100a8037abf Reviewed-on: https://gerrit.libreoffice.org/58817 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-10tdf#91999 export/drawingml: shape rotate 180 is not specialJustin Luth1-32/+4
This commit reverts the first (LO 4.3ish) regression commit 6063555744ed89d8a757b667cddcdd4357839466 and most of the two commits that tried to fix that: commit 9ae1e094d5a8a5b4432c88ebea0ca9fc1c79f602 and commit ee45d881efab230e7682f964d6ad4d00f85b0006 in LO6.0/6.2. The ooxmlexport6 unit test shows that there is nothing special about 180degrees. So, all transformations need to be avoided in docx format - not just 180 degree ones. I removed IsInGroupShape() since it is no longer being used - as per standard procedures. Change-Id: Id2bba5bc542875a10ac21fbb67f29b2d59705493 Reviewed-on: https://gerrit.libreoffice.org/58434 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-10Resolves: rhbz#1614419 FIPS mode PK11_ImportSymKey failureCaolán McNamara1-13/+86
use rhbz#1461450 style workaround Change-Id: I9e3b17deb9bac6af76ac253634c91d5e8ccd4963 Reviewed-on: https://gerrit.libreoffice.org/58816 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-10oox: create FilterDetect instances with an uno constructorMiklos Vajna4-30/+14
Change-Id: Ic9baba6a4ca37af18c5f5175aadcc59bf47c7b64 Reviewed-on: https://gerrit.libreoffice.org/58798 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-10unnecessary null check before dynamic_cast, in variousNoel Grandin1-1/+1
Change-Id: I76ad0b3152030c29ee28f6a6cc80d0832188d02b Reviewed-on: https://gerrit.libreoffice.org/58774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-10tdf#96469 Export Data Point properties in Charts on DOCX/XLSXBalazs Varga1-0/+51
If the color or other property of a datapoint in the chart deviates from the dataseries property, this patch will write it into a separate dPt tag and fixing the lost properies during OOXML export. Change-Id: I3d975675ac3691fcafe76de16e46851561eb2807 Reviewed-on: https://gerrit.libreoffice.org/58752 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-08-08tdf#116350 Fix export of fontworkSzymon Kłos1-1/+6
Change-Id: Icf3a07c6b79296feb233bbe08a6d69ab21a41414 Reviewed-on: https://gerrit.libreoffice.org/58746 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-08tdf#116350 Correctly display text on arcSzymon Kłos1-1/+10
Change-Id: Ice8c141db20d43ccc8d6e2b56004a4a28d2b257a Reviewed-on: https://gerrit.libreoffice.org/58729 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-07ofz#9747 Indirect-leakCaolán McNamara2-7/+7
Change-Id: I1063fbe9f41833c70e28343dd8d2392acd579d6d Reviewed-on: https://gerrit.libreoffice.org/58665 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-06tdf#113822 handle letter-by-letter animations in pptx documents.Mark Hung2-8/+28
Unlike odp that has anim:iterate (IterateContainer) node, both parallel time container and interate container appear as p:par in ooxml so that we have to alter the node type in the end. We also have to set the target of the iterate container to make animation work. Change-Id: Ic50b5f1d85716a67712ed1e812bcb0e7f25fb5a8 Reviewed-on: https://gerrit.libreoffice.org/58576 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-08-05coverity#1438225 Improper use of negative valueCaolán McNamara1-4/+4
and coverity#1438221 Argument cannot be negative coverity#1438213 Argument cannot be negative coverity#1438227 Argument cannot be negative coverity#1438223 Argument cannot be negative coverity#1438222 Argument cannot be negative coverity#1438215 Improper use of negative value coverity#1438220 Improper use of negative value coverity#1438217 Improper use of negative value Change-Id: I398ae9901b27f6b65f03aad03638939b5880a671 Reviewed-on: https://gerrit.libreoffice.org/58626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-05coverity#1438224 Dereference null return valueCaolán McNamara1-0/+1
Change-Id: I794c54867b83d738a075f9fa0dbd31fe62de49b9 Reviewed-on: https://gerrit.libreoffice.org/58610 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski5-7/+7
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03Move angle normalization code from various places to toolsMike Kaganski4-6/+6
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000; NormAngle360 -> NormAngle36000. Some places were fixed that previously returned inclusive ranges (i.e., both 0 and 360), see changes in these files: chart2/source/view/main/PlottingPositionHelper.cxx chart2/source/view/main/PolarLabelPositionHelper.cxx chart2/source/view/main/ShapeFactory.cxx filter/source/graphicfilter/idxf/dxf2mtf.cxx sw/source/core/graphic/grfatr.cxx (the latter now matches the comment in the function). Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59 Reviewed-on: https://gerrit.libreoffice.org/58556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03oox: create FastTokenHandler instances with an uno constructorMiklos Vajna4-27/+14
Change-Id: I1d7bca67c493d31a2a833a8254a9c01c76f1d286 Reviewed-on: https://gerrit.libreoffice.org/58495 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-03tdf#116350 Export preset text geometry (text effects)Szymon Kłos1-1/+6
Change-Id: Ifb921b56387ca183b5a57126f6e88e2f9a4ecb3d Reviewed-on: https://gerrit.libreoffice.org/58430 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-02tdf#116350 Import preset text geometry (text effects)Szymon Kłos12-5/+370
"Font effect" implementation, instead of normal text, content is converted to "fontwork". Change-Id: I5d02c7faedb66a4b919e64ae1b830bffb69984c1 Reviewed-on: https://gerrit.libreoffice.org/58358 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-02tdf#119029: also export rotation for data seriesMike Kaganski1-7/+21
Change-Id: I6a9895145e0c54d35bf404f209721a0c718e4446 Reviewed-on: https://gerrit.libreoffice.org/58401 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-01Use temporaries for dummy argumentsMike Kaganski1-3/+3
Change-Id: Idd91a4dedc3a37aac572343580da9587d58b0810 Reviewed-on: https://gerrit.libreoffice.org/58405 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-01forcepoint#59 the "matrix" is always one row in heightCaolán McNamara1-22/+16
so it can be a vector instead, and by using vector::at() instead of matrix::at() vector bounds checking is performed, unlike matrix::at() which does no checking Change-Id: Ic767c2dd884bffbf1cdff65c0980b21170612f4d Reviewed-on: https://gerrit.libreoffice.org/58396 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-01forcepoint#54 null derefCaolán McNamara1-0/+2
Change-Id: I9ca04647b16f90bb2d2d4aa0d25b08a09c408fe0 Reviewed-on: https://gerrit.libreoffice.org/58382 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-30tdf#108078 OOXML Export Chart shapes area fill propertiesBalazs Varga2-17/+14
Verified with color, gradient, bitmap for: Chart Title in DOCX, XLSX and PPTX. Also verified with gradient, bitmap for Chart Legend, Plot Area, Dataseries and Background in DOCX, XLSX and PPTX. Change-Id: I15d29f3ca2d75f45f612766b635d50a29d8551ae Reviewed-on: https://gerrit.libreoffice.org/57880 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-07-30sw doc model xml dump: dump float value of user fieldsMiklos Vajna2-2/+2
Change-Id: Ie59070254eb293cbfdd688d97bf4bb6c06e77a79 Reviewed-on: https://gerrit.libreoffice.org/58339 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-30Add missing sal/log.hxx headersGabor Kelemen55-0/+62
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29crashtesting: additional crash on export to pptxCaolán McNamara1-21/+42
Change-Id: I4fb2b69aaf53ecef7aae325108bc6a78f62336d4 Reviewed-on: https://gerrit.libreoffice.org/58264 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26oox: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann8-20/+5
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: Id05e85ac8ac4155e6345b6f96ddf9449f640dc98 Reviewed-on: https://gerrit.libreoffice.org/58083 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-25-Werror,-Wformat (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I5b292aa58e14a2bc46ec9b2ecc93eaca2f03502d Reviewed-on: https://gerrit.libreoffice.org/58001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-25Fix typoAndrea Gelmini1-1/+1
Change-Id: I77f793b789952d12ca07e9d218396090bb3cd427 Reviewed-on: https://gerrit.libreoffice.org/57993 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-25tdf#50499 convert by, from, and to of AnimContext.Mark Hung1-14/+30
Also change testTdf104788 because the expected value is taken as a double and decimal places are omitted if there isn't any. Change-Id: I16cb363b1ce0ff09da2df361849d47819bf9ced4 Reviewed-on: https://gerrit.libreoffice.org/57413 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-24tdf#113818 convert formula of AnimContext.Mark Hung1-8/+8
Change-Id: I0f6f08247eaf8099d84c0e8201d22fc507b1cac4 Reviewed-on: https://gerrit.libreoffice.org/57414 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-24tdf#118835 fix missing attribute name conversion.Mark Hung1-1/+1
LineColor and LineStyle are missing from the switch-case. Just reuse the conversion list from oox::ppt::getAttributeConversionList(), also reoder the list so that fillcolor is prior than fillColor. Change-Id: Ia78553ad2fc908923da56bc58baf96dbb7d40863 Reviewed-on: https://gerrit.libreoffice.org/57819 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-24tdf#118890 subtract 100% from by values of animScale.Mark Hung1-1/+5
Despite that by values should be offset values instead of ending values, what we got from pptx seems to be the later, that we have to subtract 100% from the by values to get offset values for slideshow. Change-Id: I7eb9981210ea9998dae0de8f22c155b394e5abeb Reviewed-on: https://gerrit.libreoffice.org/57860 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-23Fix typosAndrea Gelmini1-1/+1
Change-Id: I22c02c9d4e121d3cb3b68be9a5c845e9e45cc123 Reviewed-on: https://gerrit.libreoffice.org/57603 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-23loplugin:unusedfieldsNoel Grandin2-3/+2
Change-Id: I1827262ad95942cacff589929f9436f8383cf142 Reviewed-on: https://gerrit.libreoffice.org/57642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-22Fix typosAndrea Gelmini1-1/+1
Change-Id: I326827c394347cbe9fad242e9da5702cba7a4d95 Reviewed-on: https://gerrit.libreoffice.org/57761 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-20tdf#118150 Fix displaying of chart where Legend is set manuallyBartosz Kosiorek1-3/+5
By default Legend's position is automatic and it is located at the right side of the chart. Unfortunately even if layout with manualLayout is set: http://www.datypic.com/sc/ooxml/e-draw-chart_manualLayout-1.html the empty space for the automatic legend on the right side of the chart, was left. This is issue with opening of the OOXML charts by LibreOffice, as MS Word is opening the same document properly. This patch fixes issue with wrong chart displaying, when manual position of the legend is set. Change-Id: Id5363d48b049c469b6761b43cecfbb56514bf7d8 Reviewed-on: https://gerrit.libreoffice.org/57762 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-19use sequenceToContainer and simplify iterator usageLászló Németh1-14/+5
clean up commit 9a5c56a9c4e04589b0a6bb710573922e459d9685 (OOXML import/export of setting "Open as read-only"), as suggested by Eike Rathke. Change-Id: I2a176261fa729038b5be4649b6a53d0bcc35840d Reviewed-on: https://gerrit.libreoffice.org/57726 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-07-19tdf#98477 convert to, from, by of AnimScaleContext.Mark Hung2-10/+14
To, from, by of AimScaleContext used to use return value of oox::draingml::GetPointPercent(), which is in 1000th of a percent, but slideshow need ratio to work. Make a conversion here, also fix the obvious error in oox::draingml::GetPointPercent() that y coordinate is always converted incorrectly. Change-Id: I061d2ce89341a4e88f3ffada03954734fafad985 Reviewed-on: https://gerrit.libreoffice.org/57434 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-18tdf#118651 OOXML ActiveX textbox: fix multiline supportBalazs Varga1-2/+7
of textfield component in DOCX/PPTX by handling properties AX_FLAGS_MULTILINE and AX_FLAGS_WORDWRAP during the import and export. Both of them need to be enabled to get multiline textfield in MSO, but LibreOffice has got only one multiline property. With this fix, LibreOffice imports only really multiline textfields as multiline, and it doesn't export multiline textfields as single line anymore. Change-Id: I9b567c3fcdc5d01a5838a3ec2517579f8d788954 Reviewed-on: https://gerrit.libreoffice.org/57552 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-07-18tdf#113822 convert animation value in SetTimeNodeContext.Mark Hung3-48/+46
Convert 'to' value of SetTimeNodeContext based on attribute name and move conversion code in its destructor to convertAnimationValue. Value conversion in AnimVariantContext is also included in convertAnimationValue and is removed together. Change-Id: I5dc693a1bbc7df57f7506e7704f9cd4693bf2056 Reviewed-on: https://gerrit.libreoffice.org/57412 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-16oox: refactor CommonBehaviorContext to inherit from FragmentHandler2.Mark Hung2-3/+5
Although it's convenient to inherit from TimeNodeContext, but only mpNode is used so it's really not necessary. Change-Id: I922774df4c420ee9982f1c31e720f4fd85991e02 Reviewed-on: https://gerrit.libreoffice.org/57395 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-16oox: enum MS_AttributeNames -> enum class AnimationAttributeEnumMark Hung2-44/+44
It's the attribute enum for the target animation. Remove MS_ prefix since it is in oox::ppt namespace and prepend Animation to make the purpose more clear. Change-Id: I0b6bbaf30ae4e2cf1cb0f6d5d24ba9f31e0b0773 Reviewed-on: https://gerrit.libreoffice.org/57353 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-07-15coverity#1437958 Uninitialized pointer fieldCaolán McNamara1-0/+1
Change-Id: I569c4367cc968f968c0f864bb3e231a7417d7560 Reviewed-on: https://gerrit.libreoffice.org/57454 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-14fix oss-fuzz buildCaolán McNamara1-1/+1
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9301 Change-Id: Iceb25764c483e20f09fe976d1271987643990aaf