summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2017-08-02remove unnecessary use of 'this->'Noel Grandin
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01loplugin:checkunusedparamsNoel Grandin
the "check for taking address of function" part was generating false+ Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f Reviewed-on: https://gerrit.libreoffice.org/40613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:constparams in ooxNoel Grandin
Change-Id: I43984b4ece82da39ca61a91fa14e4660298509dd Reviewed-on: https://gerrit.libreoffice.org/40581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-29tdf#109223: PPTX: Vertical flip of child shape is not imported correctlyTamás Zolnai
Group shape level vertical flip is not handled well. Recent handling of group shape's transformation makes it hard to import this attribute, but we can import the right text direction at least. Change-Id: Ib9e39e3dcb28a95fabc61c13152a3f7296fbd4c3 Reviewed-on: https://gerrit.libreoffice.org/40554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-07-28tdf#107723 Import font name from text portions in shapesSamuel Mehrbrodt
Change-Id: Ib9b73b5c05ec2e6846ea3adc950ccab5d1c0a9b0 Reviewed-on: https://gerrit.libreoffice.org/40439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-26tdf#100491 fix DOCX import shape line with arrow markerVasily Melenchuk
Line shape with arrow end markers was rendering rather thick arrow, not connected to main line. Moreover, arrow width should depend on actual line width. Change-Id: I8d9a6e7f5d89a1645dcc5939ecc592e86e6fe34f Reviewed-on: https://gerrit.libreoffice.org/40286 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-24SmartArt: text alignmentGrzegorz Araminowicz
Change-Id: I0be75971af8bc2906c9054848d4429d544b94f0c Reviewed-on: https://gerrit.libreoffice.org/40317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-24SmartArt: cycle layout algorithmGrzegorz Araminowicz
Change-Id: Ia6863ed6ee8f8bc3240f0ab16a58e59141b2a2d1 Reviewed-on: https://gerrit.libreoffice.org/40314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-23coverity#1415611 Result is not floating-pointCaolán McNamara
Change-Id: Icaeeb835e9a3c8ab6917fe15297ad884db792299
2017-07-22loplugin:unusedfields in oox,reportdesignNoel Grandin
Change-Id: I0201d76cb3d4605bdc00c81cfa9d91f98341c7f3 Reviewed-on: https://gerrit.libreoffice.org/40290 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21Rename InitAnySequence -> InitAnyPropertySequence, and convert some callers.Jan Holesovsky
Change-Id: I410fef49679360f3308ec0f00bb032a2de0d7931 Reviewed-on: https://gerrit.libreoffice.org/40282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-21sd pptm: Preserve the VBA stream on export.Jan Holesovsky
This actually implements the reading of the VBA stream in Impress too, so the user will get a warning when opening such a file (that the it contains macros). Change-Id: I1638199529196ed217cbd9ebef88eb7c88f2179a Reviewed-on: https://gerrit.libreoffice.org/40197 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/40267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-21sd pptm: Add a separate PPTM filter.Jan Holesovsky
Similarly to commit 697173f6fdfae581022cfdb5ec5171c5a3be58f0, we have to preserve the correct content-type which is not the same for PPTX and PPTM. This commit also changes sdfilt.component to use the constructor feature. Change-Id: I4b334540ec07a53d308e6b9dd6403294842bddf8 Reviewed-on: https://gerrit.libreoffice.org/40195 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/40265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-21Fix typosAndrea Gelmini
Change-Id: I43f38b4dda6b1999d84d9f9760d0fae4c0358394 Reviewed-on: https://gerrit.libreoffice.org/40277 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-21oox: fix inconsistent param naming in interface/implementationMiklos Vajna
Make sure they match. Change-Id: Ib3ce948a29472281705e361792c924893ad97b32 Reviewed-on: https://gerrit.libreoffice.org/40259 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20SmartArt: support hideGeom shape attrbuteGrzegorz Araminowicz
Change-Id: I970024ec2b28fd6f004acdc67acbc39067b5efe2 Reviewed-on: https://gerrit.libreoffice.org/40224 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-07-20SmartArt: shape stylingGrzegorz Araminowicz
Change-Id: I7e9ab4c2286fd803cd518dd01ab8ebd5ac2d8428
2017-07-20SmartArt: more layout workGrzegorz Araminowicz
* basic layout algorithms implementation * change layouting order to "from top" Change-Id: I8ef397fa0e39bb6d8cda2d1387b663980f134a59
2017-07-20SmartArt: add ShapeAtom to store shape template instead of LayoutNodeGrzegorz Araminowicz
it allows to load shapes inside choose/if Change-Id: I8040967d1f769796f6ad6b2d0c7b5ce698f89ee3
2017-07-18Clean up android specific template functions defined in std namespacebrainbreaker
Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b Reviewed-on: https://gerrit.libreoffice.org/39890 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17tdf#109067 Fix default value of rotWithShapePaul Trojahn
According to the OOXML standard the default value is true, so for the export of gradients and blips it has to be set explicitly to false. Change-Id: I06f6f2a00fca88ec79e2eb956c3c780f037a9d1e Reviewed-on: https://gerrit.libreoffice.org/39973 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-17tdf#89926 Fix OOXML gradient angle importPaul Trojahn
The rotation of the shape needs to be added to get the correct angle. Due to this nDmlAngle can be twice as big. The conversion to LO angles needs to be updated to prevent negative results. Change-Id: I3a13cb268af41a55cd8b9df3084d028008aed4f2 Reviewed-on: https://gerrit.libreoffice.org/39648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17tdf#104743: Export transparency for bitmap fill/backgroundKatarina Behrens
Change-Id: I951ce974320f2eb5a6d3304b66f89ce71b38982c Reviewed-on: https://gerrit.libreoffice.org/39880 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14Remove unused [m]sChartAddressStephan Bergmann
...as found by an improved loplugin:oncevar (to be pushed later). The code's effectively been like that ever since its introduction in a41687b62b0a6f2b79e44311ddf74c52e844ee36 "New files from xlsx-shared-oox-chart-export-part1.diff", and (as Bubli states) is apparently a poor copy/paste from xmloff/source/chart/SchXMLExport.cxx. The equally-unused [m]sTableNumberList had previously been removed with f9cd73ebe116cd95247aff1963e2f5b4ec671dfa "remove a few more unused variables". Change-Id: I1e0e14b4d79cd34437b0061fc9ea3ce4d5636b31 Reviewed-on: https://gerrit.libreoffice.org/39756 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-14Revert "tdf#109067 Fix default value of rotWithShape"Miklos Vajna
This reverts commit 1b08f129677c1109aae1fadc72ae68ebb7df7cb0. The change was Jenkins-verified, but just rebasing it on top of latest master (without getting conflicts) broke the test added in the commit. So let's revert it for now to have time to find out why does the test fail on top of latest master. Change-Id: I3bce24e54fb07df2dd460fb0f01d44516b3fcd0d
2017-07-14tdf#109067 Fix default value of rotWithShapePaul Trojahn
According to the OOXML standard the default value is true, so for the export of gradients and blips it has to be set explicitly to false. Change-Id: I3c9f67787cb11d6d9b58f07377b03167df669ed8 Reviewed-on: https://gerrit.libreoffice.org/39725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-13use more OUString::operator== in forms..salNoel Grandin
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11replace 'resize(size+1)' with emplace_backNoel Grandin
which is considerably faster if we're dealing with a std::list, and just easier on the eyes if we're dealing with a std::vector Change-Id: I373689205ebc048689f29ab80a7ee8551b20cc96 Reviewed-on: https://gerrit.libreoffice.org/39816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify some OUString::concat usageNoel Grandin
Change-Id: Ifa150dc9d694981ffe03c254ea8c3fd820c99795 Reviewed-on: https://gerrit.libreoffice.org/39812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)Noel Grandin
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify some OUString::copy callsNoel Grandin
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11SmartArt: reuse existing diagram shape for root shapeGrzegorz Araminowicz
it prevents creating unnecessary expanded shape hierarchy and allows layout algorithm to know parent's size Change-Id: Ieb991a74bd662e359f5cf479a7480893e0b13d45 Reviewed-on: https://gerrit.libreoffice.org/39410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-11Helper function to cast to FastAttributeList:Mohammed Abdul Azeem
Refactoring codes that cast XFastAttributeList reference to FastAttributeList pointer using the helper function. Change-Id: Iecf4b815d6556b0992d638b633260fbd459c0dc4 Reviewed-on: https://gerrit.libreoffice.org/39723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-11tdf#108945 Correctly import default value in VML shape adjustmentsGrzegorz Araminowicz
Change-Id: Ia585572c911a268f68e611935a1d5264dd0790c5 Reviewed-on: https://gerrit.libreoffice.org/39504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07merge BS and ToPsz10, etcCaolán McNamara
Change-Id: I25d4efe816bf6ae4ba456bb42a827b9a70f503c7 Reviewed-on: https://gerrit.libreoffice.org/39689 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03use begin()/end() when working with SequenceNoel Grandin
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-02loplugin:casttovoid: ooxStephan Bergmann
Change-Id: If0d0e801beae55c0cee1e6b5d18a494066090800
2017-06-29SmartArt: undo diagram elements' size changeGrzegorz Araminowicz
it should fix integer overflow in fdo79822.docx until we have proper layout algorithm implemented Change-Id: I7645ff0844ac47a004a309d1a9d3b19eeb3708dc Reviewed-on: https://gerrit.libreoffice.org/39371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-27SmartArt: std::for_each -> range-based for loop.Jan Holesovsky
Change-Id: Ie2b36175a52c897bcf39da0ac2daa35979aac923 Reviewed-on: https://gerrit.libreoffice.org/39285 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-26SmartArt: separate LayoutAtomVisitors from LayoutAtomsGrzegorz Araminowicz
Change-Id: Ifbed15c881e4c0b987cd2fdbb903709a0b8b0e36 Reviewed-on: https://gerrit.libreoffice.org/39269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-06-26SmartArt: layout diagramGrzegorz Araminowicz
Change-Id: I854703ea3cb09ace2d0b01a47d9f07bb7a98b70e Reviewed-on: https://gerrit.libreoffice.org/39172 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-06-26loplugin:oncevar in oox..saxNoel Grandin
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>