summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-03-05use more Color in ooxNoel Grandin1-3/+3
Change-Id: I8fdc6742de5af9101e246411e7208650bae2c4c7 Reviewed-on: https://gerrit.libreoffice.org/50617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: ooxStephan Bergmann1-1/+1
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I8fd61e3220a4b9e08d4f97acde28600f31d448ca
2017-10-26vcl: make MapMode constructor explicitMichael Stahl1-1/+1
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: ooxStephan Bergmann1-20/+20
Change-Id: I9f1cc9940f5b31370394f789ebfaddfd6d30ca61
2017-10-05tdf#100065 RefactoringPaul Trojahn1-6/+4
Change-Id: I842f90b655ccf195185bf8bae2d93b5b187954aa Reviewed-on: https://gerrit.libreoffice.org/43137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-3/+3
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-26tdf#100065 Fix scale of transformationPaul Trojahn1-0/+2
The shape needs to be flipped to compensate the change of mbFlipH/mbFlipV. Change-Id: I7b680497fee6ae9ed7bbd6f4ed9089d1a25a1deb Reviewed-on: https://gerrit.libreoffice.org/42766 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-18tdf#112088 gradient stop map -> multimapSzymon Kłos1-1/+1
When two gradientstops were set to position 50% only one was stored and the exported file was detected as broken by MSO. Change-Id: I5fd1acde6051f734a5f3e4cff9bde01b675e1984 Reviewed-on: https://gerrit.libreoffice.org/42210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-16tdf#100065 PPTX Fix import of custom shapes in groupsPaul Trojahn1-16/+33
A negative scale of the parent matrix indicates that the shape needs to be flipped. This commit fixes text rotation as well, so d742c0019435d0bc90c9342492583636099a057f is no longer needed. Change-Id: I67bba34519b3af9215fe64a71f5137aa510edf7a Reviewed-on: https://gerrit.libreoffice.org/42250 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-23SmartArt: shape rotation supportGrzegorz Araminowicz1-0/+11
Change-Id: I13bfbd3fafff5335ce8bc23b2579182aa5a94a80 Reviewed-on: https://gerrit.libreoffice.org/41393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-23SmartArt: basic support for layout constraintsGrzegorz Araminowicz1-0/+1
Change-Id: Ie234bfd9760cdacb6a25c04d73a260e7e59ef7d6 Reviewed-on: https://gerrit.libreoffice.org/41273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-10tdf#109317 Fix incorrect rotation of flipped custom OOXML shapesPaul Trojahn1-1/+14
The shape wasn't imported correctly because IsPostRotateAngle wasn't set. As a result the shape was flipped after it was rotated instead of before. This commit removes 1c44b263 and converts the rotation to the internal format instead. This also fixes that ooxml preset shapes can't be exported to odf correctly and that ooxml preset shapes rotate in the wrong direction when rotated in LO. Change-Id: I9691902fdfb2cfecc8fe50d6eb66ac3880ddd4e8 Reviewed-on: https://gerrit.libreoffice.org/40789 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-02remove unnecessary use of 'this->'Noel Grandin1-4/+4
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-07-31loplugin:constparams in ooxNoel Grandin1-3/+3
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-29tdf#109223: PPTX: Vertical flip of child shape is not imported correctlyTamás Zolnai1-0/+6
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-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand1-1/+1
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-06-26loplugin:oncevar in oox..saxNoel Grandin1-4/+1
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>
2017-06-08oox: replace PUT_PROP macro with comphelper::makePropertyValue() callsMiklos Vajna1-67/+58
This way it's not necessary to state the size of the array in advance, which is kind of redundant. It's also easy to forget to adjust it when adding new elements. Change-Id: I5fe24fd24954afb69ead014941b8f8b90bcaeac3
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin1-1/+1
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29getUtf8TokenName can return by const refNoel Grandin1-1/+1
and avoid some reference-counting in a hot path Change-Id: I7f5fd7f8f5f9076eb5f8d60118afa8e3ac8a5e6c Reviewed-on: https://gerrit.libreoffice.org/38129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-25loplugin:constantparamNoel Grandin1-1/+1
add the results files so I can just see the diff in future Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1 Reviewed-on: https://gerrit.libreoffice.org/37988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in ooxNoel Grandin1-10/+4
Change-Id: I95bce82654bd0da7ed76ebd22b107b870ed15a1f Reviewed-on: https://gerrit.libreoffice.org/37144 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11Passing shaperect to addShape function is uselessTamás Zolnai1-5/+3
Shaperect is ignored by createAndInsert() so it has no effect at all. Also when this parameter is set the size and position is set using the same shaperect, so don't need to pass it also as a parameter. Change-Id: I35a7953f3eda1bdd19af6f3e77c55b5c7e1f7161 Reviewed-on: https://gerrit.libreoffice.org/35073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-02-28Fix incorrect function name in SAL_INFOTor Lillqvist1-1/+1
Change-Id: I75ee5f1a20fadef7c20103278bc03abd41b815cf
2017-02-28new loplugin unoanyNoel Grandin1-18/+21
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-27Clean up a few SAL_INFOs a bit and add useful note about the ==cscode== etcTor Lillqvist1-12/+13
I dislike OSL_THIS_FUNC, it is too verbose, at least with Clang on Linux. Just use the Class::Name without parameters and namespaces. Change-Id: Ic8722a131463762ab70ff35d64ae7040c67bf595
2017-01-24Move two include files to oox/inc as they are used only in ooxTor Lillqvist1-2/+2
Change-Id: Ie13614c1977f45aa8086f4db65ca86b7d9212735
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin1-1/+1
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-27tdf#104201: PPTX: Group solid fill is not importedTamás Zolnai1-3/+3
Change-Id: Iec273714108598d7017e73a9e7d384f8410d6ee1 Reviewed-on: https://gerrit.libreoffice.org/31263 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-18tdf#104015: PPTX import: Title shape does not inherit fill propertiesTamás Zolnai1-26/+85
...from slide master. The problem caused by that PPTX files contains not a one-level master slide set, but has two levels: one called slide master, other called slide layout. Slide layout inherit properties from slide master and normal slide inherit propetries from slide layout. Bug appeared because, slide layout inherited properties were not forwarded to the normal slide. Change-Id: I587582498cf4315087f9a576c1b7fc41ee23e2fd Reviewed-on: https://gerrit.libreoffice.org/30969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-13drop extra semicolonsDavid Tardon1-1/+1
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-10tdf#103792: No placeholder text imported for empty title shapeTamás Zolnai1-1/+1
Change-Id: I95b4358f0d4311e8f427c8de18863049fb718d9b Reviewed-on: https://gerrit.libreoffice.org/30731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-10-17fix wrong usages of setProperty vs setAnyProperty...Jochen Nitschke1-6/+6
and remove some useless casts. setAnyProperty takes an Any for property value. setProperty takes any value and creates an Any. Change-Id: Ida0a80bd679775c08925309bfbc695630af2225f Reviewed-on: https://gerrit.libreoffice.org/29917 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-05convert MapUnit to scoped enumNoel Grandin1-1/+1
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30loplugin:constantparamNoel Grandin1-3/+2
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-07-27improve passstuffbyref return analysisNoel Grandin1-2/+2
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#42949: clean up includes in include/oox/ppt with iwyuJorenz Paragas1-0/+1
Change-Id: Ib2cf76418e8406b925113ae7a9e3c5b07ffd2de2 Reviewed-on: https://gerrit.libreoffice.org/25011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-18clang-tidy modernize-make-sharedNoel Grandin1-6/+6
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10tdf#42949: clean up includes in include/oox/helper with iwyuJorenz Paragas1-0/+1
...and fix the many compiler errors that occurred as a result. Change-Id: I497c326272b2f02737ca3765720d6815b735423b Reviewed-on: https://gerrit.libreoffice.org/24735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin1-3/+3
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-8/+8
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-21new plugin stylepoliceNoel Grandin1-4/+4
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-5/+5
Change-Id: I379e89e1e6b9fd8668ba7ac59af33f63487a4f66
2016-03-29tdf#95932: PPTX import: Incorrect inheritance of shape styleMatus Uzak1-1/+0
Inheritance Order: 1. Reference Shape's properties, 2. Shape style, 3. Shape properties. You MUST NOT inherit reference shape's style, because it's already part of inherited reference shape's properties. That would overwrite shape properties applied at point 3, at slide layout/master level. Change-Id: Id1ab550295988b0087a67c6819dfe32f84825e4e Reviewed-on: https://gerrit.libreoffice.org/23182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-10tdf#89927: PPTX import: Incorrect inheritance of text run fill propertiesMatus Uzak1-1/+5
Make use of FillProperties in TextCharacterProperties. DrawingML: Fill related elements in Text Run Properties are in sync with Table Cell Properties and all of Line Properties. Change-Id: I7c513ecfc5f94cf49e98a657384b5c0f5dddc1c7 Reviewed-on: https://gerrit.libreoffice.org/22979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-02-22loplugin:write only fieldsNoel Grandin1-3/+1
Change-Id: I45895e9845a9037da207f001fece427452ed499f
2016-01-31unnecessary use of OUString constructorNoel Grandin1-2/+2
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-21oox: import Math objects from PPTX filesMichael Stahl1-1/+50
This is quite hacky and limited: in OOXML these are not OLE objects but occur inside text boxes, and PPT 2010 allows inserting multiple Math objects into one text box but Impress does not have as-character anchored objects, so we can't import that properly; for now only import Math if there is nothing else in the text box. Also for now only import them as children of TextParagraphContext (a:p); it's not clear what the possible parent elements could be since the OOXML standard only lists WordProcessingML parent elements :( Change-Id: I847f810084c9ddae4b60f93896fb73a742683cc2
2016-01-15oox: coverity#1348468 copy-paste errorMichael Stahl1-1/+1
Change-Id: Ibea6944c4e61e9848aac936e399ed08192ec5812
2016-01-05tdf#96674 drawingML import: fix handling of zero width/height linesMiklos Vajna1-1/+12
Change-Id: If3d9f6272031e08ab228cfa58963d60ceede2498