summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2018-03-31Use for-range loops in oox (part2)Julien Nabet
Change-Id: I7cbeb67a1adcdb9b0003e22b61789a882fc336c9 Reviewed-on: https://gerrit.libreoffice.org/52182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-31No need to test var at each loop (oox/typegroupconverter)Julien Nabet
Just test it when its value may change Change-Id: Id721e04d436f0d1d33b8fb45ccfe0eb3896eea43 Reviewed-on: https://gerrit.libreoffice.org/52179 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-31Use for-range loops in oox (part1)Julien Nabet
Change-Id: I3b8b3cdc818509598bc766f7eed27454c74c4e2d Reviewed-on: https://gerrit.libreoffice.org/52175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-26forcepoint #31 survive missing control modelCaolán McNamara
Change-Id: I37e4af560b46b4f6d9e0b87fe58493818f366d3c Reviewed-on: https://gerrit.libreoffice.org/51857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-22oox: don't segfault when failing to open a custom fragmentAshod Nakashian
Change-Id: Ie05d1feea2e930b117b3754c6e0db86bdb85bc61 Reviewed-on: https://gerrit.libreoffice.org/51681 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-21ofz#7012 Integer-overflowCaolán McNamara
and fix negative rounding code, which results in changing tet of from -996 to -1002 which is closer to the original -1000 Change-Id: Ie992e61bf4d14d0cd4194e773479feba96b6d68e Reviewed-on: https://gerrit.libreoffice.org/51576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-17OperationSmiley: Secured quite some places using CustomShapeArmin Le Grand
Changed quite some places of SdrObjCustomShape usage to use references instead of pointers, thus forcing to more secure handling. Changed some test and change methods, even found a memory leak by doing so. Change-Id: Iba76037a3c54af50bb05e6bd63d7ad04624665a7
2018-03-14tdf#104792 Double check for target shapeSzymon Kłos
Change-Id: Ibe23377c7752d9ce97c7b100af4b2759b3ce946f Reviewed-on: https://gerrit.libreoffice.org/51241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl
This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10oox: remove unused methods that rely on GraphicObject URLTomaž Vajngerl
Change-Id: Ie68ccfa8d802bb284da8bb4af69882f4b66a3dac Reviewed-on: https://gerrit.libreoffice.org/51010 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-08tdf#116283 oox customXml: Don't write the Relationship to DOCX files twice.Jan Holesovsky
Change-Id: Id3da40138e86c142707e377aa897df372aacb704 Reviewed-on: https://gerrit.libreoffice.org/50947 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-08loplugin:constantparam in linguistic..sfx2Noel Grandin
Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08oox: preserve the ContentType of custom filesAshod Nakashian
Generic logic to preserve custom files with their correct ContentType. Standard default file extensions with respective ContentType preserved in [Content_Types].xml. Change-Id: I651ed691e9a4745cd2cb4b3c4d4c5fd7287b66c2 Reviewed-on: https://gerrit.libreoffice.org/50856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07oox: use GraphicLoader to load from external URLTomaž Vajngerl
Change-Id: Iff267f53ccc33105ff35149b1fde688616ad0b4f Reviewed-on: https://gerrit.libreoffice.org/50870 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07oox: adapt graphic transformer, cleanup, remove try catchTomaž Vajngerl
Change-Id: I96862c571f1e1de901e0d4d3fd167e418d0f6dea Reviewed-on: https://gerrit.libreoffice.org/50869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07oox: BlipFillProperties rename mxGraphic to mxFillGraphicTomaž Vajngerl
Change-Id: Iea4b48e79c7c727bbd7dafd816538f6c1dd25bf8 Reviewed-on: https://gerrit.libreoffice.org/50868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07oox: rename FillBitmapUrl to FillBitmap, remove obsolete methodsTomaž Vajngerl
Change-Id: I597aaa280ef12e46cf2d060cef1b042413d838d4 Reviewed-on: https://gerrit.libreoffice.org/50851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07oox: remove property FillBitmapURL, BackGraphicURL and GraphicURLTomaž Vajngerl
Change-Id: I1f75b1775fec4b47ad78a32724785333a90d3baf Reviewed-on: https://gerrit.libreoffice.org/50809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07oox: remove use of "GraphicURL" propertyTomaž Vajngerl
Change-Id: I9e65eecf9a1065015ab0872734a41afdd04abb8d Reviewed-on: https://gerrit.libreoffice.org/50792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07Move BackGraphicURL property & friends to BackGraphic + fixesTomaž Vajngerl
This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic, FooterBackGraphic and ParaBackGraphic. With this the property type changes from String to XGraphic. This change also fixes a bunch of test failures, changes the tests to use the new properties and the correct type, changes the import and export filters like xmloff and oox, to make the tests happy. Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e Reviewed-on: https://gerrit.libreoffice.org/50760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-05drop sax::tools::*base64 methodsNoel Grandin
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05use more Color in ooxNoel Grandin
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-03-04tdf#116163: Limit label height in chart if neededSzymon Kłos
Change-Id: Ia84fd0c3b76886bc6124dc3b59035465aa31b020 Reviewed-on: https://gerrit.libreoffice.org/50700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-02delete colordata.hxxNoel Grandin
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01make Color::GetRGBColor return Color instead of ColorDataNoel Grandin
Change-Id: I532959a7103c3857510f26ecce2f942d676a233b Reviewed-on: https://gerrit.libreoffice.org/50487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28tdf#115859 Export number format for chart seriesSzymon Kłos
Change-Id: I65d30c6b92a530eadbd6fabe87fa8bd3416fee20 Reviewed-on: https://gerrit.libreoffice.org/50385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27Switch AgileEngine::calculateHashFinal() to GetOoxHashAsVector()Eike Rathke
... to de-duplicate implementation and cut some overhead. Also, it seems UTF-16BE password was never handled. Change-Id: I46cae8516c6f2d1568aabc8d993c883f424c7d12 Reviewed-on: https://gerrit.libreoffice.org/50401 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-02-27tdf#111789: TextBox shadow propeties are not saved to PPTXTamás Zolnai
Change-Id: I0c858676e1fc02a72b4b6bfd10f512d8e9166061 Reviewed-on: https://gerrit.libreoffice.org/50402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-27convert remaining WarningBox to weld::MessageDialogCaolán McNamara
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-25oox: Remove setting the GraphicURL in fillpropertiesTomaž Vajngerl
Change-Id: I543b77bce7232d56a4cf107992e1c006b75b63bd Reviewed-on: https://gerrit.libreoffice.org/50168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25When exporting a shape, use "Graphic" property from imagesTomaž Vajngerl
We still used "GraphicURL" when exporting a shape, but as it is being replaced, change that to use "Graphic" property instead. Change-Id: Ia2b6bdacf0e28de6cfe2eaa36e5b558250ebee8e Reviewed-on: https://gerrit.libreoffice.org/50142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25Use "Graphic" instead of "GraphicURL" property for SimpleShapeTomaž Vajngerl
We don't need to create an URL when we get the XGraphic from the signatures, that use SimpleShape. We can just use the XGraphic directly and set the "Graphic" property on creation of SimpleShape. Change-Id: I82b1f76cd358fca29f5b9dfbed0e735bd1f38e15 Reviewed-on: https://gerrit.libreoffice.org/50141 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25use "Graphic" property to transport Graphic for controlsTomaž Vajngerl
Currently "ImageURL" property is used to transport the Graphic (as an string URL), which is being replaced by transporting XGraphic directly. There is already a property that all controls use - "Graphic", so use that instead. Change-Id: I2514b475735f3e430c2baa9b1685a231fc694b28 Reviewed-on: https://gerrit.libreoffice.org/50139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25fix import of graphic bulletsTomaž Vajngerl
When changing to use "GraphicBitmap" property instead of "ImageURL", the import wasn't adapted and there was no test which would warn of such an situation. This also changes the difference between writer and impress where impress used "Graphic" and not "GraphicBitmap" property. Also adds missing tests for both writer and impress Change-Id: Ieed629d2d37f7806d63e729b6ef23cd848593071 Reviewed-on: https://gerrit.libreoffice.org/50140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-20Fix typoAndrea Gelmini
Change-Id: Ic98bcf3b32f012e0ae101fd3e8697d7ffaf65cc3 Reviewed-on: https://gerrit.libreoffice.org/50017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-19Add export of the side wall for 3D chart, during .xlsx exportBartosz Kosiorek
LibreOffice doens't distinguish between sideWall and backWall. It is controlled by the same Wall property. Change-Id: If1919cf0a9bad3e80544cc5b2ae0f40f606febeb Reviewed-on: https://gerrit.libreoffice.org/49429 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-02-18in numbering use "GraphicBitmap" property for image transportTomaž Vajngerl
Change-Id: I43abef3fe4a177f9f7867fe86e18beac812c626b Reviewed-on: https://gerrit.libreoffice.org/49923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-18remove use of FillBitmapURL and use FillBitmap as the alternativeTomaž Vajngerl
This is under the ongoing work to get rit of all usage of GraphicObject URLs Change-Id: I900e435ac36a4012ec36a2f0c1d909982c82660a Reviewed-on: https://gerrit.libreoffice.org/49895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-17tdf#114139 Don't export Plot Area shape property fot 3D chartsBartosz Kosiorek
For 2D charts Plot Area equivalent is Chart Wall. Unfortunately LibreOffice doesn't have Plot Area equivalent for 3D chart. It means that Plot Area couldn't be displayed and changed for 3D chars in LibreOffice. We cannot write Wall attributes into Plot Area for 3D charts, because Wall us used as background wall. Change-Id: I16d3b326571c1e411a094ec799e20c7aeeb2c1d4 Reviewed-on: https://gerrit.libreoffice.org/49428 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-02-16PPTX export scale for TextFitToSizeSzymon Kłos
MSO requires to save fontScale attribute to have all the text shown properly (with FitToSize property) Values are approximated, after any modification in MSO scale is recalculated. Change-Id: I73657fdd663b540b436747cfeeef3c76e8fe388c Reviewed-on: https://gerrit.libreoffice.org/49742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-02-16Revert "loplugin:changetoolsgen in oox,reportdesign" and reapply..Noel Grandin
the plugin because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit 457220bc2c0142c5b6f4135cb688ccfc99fec792. Change-Id: I2c6b1092c8bfa4fa14acbc7445f546d43cb2a86e Reviewed-on: https://gerrit.libreoffice.org/49833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-15loplugin:changetoolsgen in oox,reportdesignNoel Grandin
Change-Id: I8112ae6bb92ef96b4229ab53b7002ae3c0ba865c Reviewed-on: https://gerrit.libreoffice.org/49702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14Removed duplicated includeAndrea Gelmini
Change-Id: I53d98e814d9f4760390b9b0a9e826ee91efe6fe8 Reviewed-on: https://gerrit.libreoffice.org/49698 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-14shapes: don't use "GraphicURL" property, always use "Graphic"Tomaž Vajngerl
With GraphicURL property on shapes (XShape) we transported the external or internal URL to the model, which also included the GraphicObject uniqueID style URLs. This changes that - now we always use "Graphic" property and transfer XGraphic to and from graphic filters. "Graphic" property is already present for XShape so it wasn't needed to add it. Filters changed are: OOXML (oox), ODF (xmloff), RTF and binary MS (esherex). Also start using originURL on Graphic which now transports the URL of the external (linked) graphic/image if it was created that way. Change-Id: Ic338c60b7cfaaae354cf1e1ca3ae7a6373220230 Reviewed-on: https://gerrit.libreoffice.org/49648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-14tdf#51340: Line spacing is imported incorrectly from PPTXTamás Zolnai
Move the line spacing member to the TextParagraphProperties class which is used to do the inheritance from master / layout slides. Change-Id: I0bf92420963163eae78e06ebc7fdfa1f2c72fdf8 Reviewed-on: https://gerrit.libreoffice.org/49692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-14oox: cosmetic cleanupAshod Nakashian
Change-Id: Ifafd7338ddfec8b707b5ddf4acb39512faf186da Reviewed-on: https://gerrit.libreoffice.org/49325 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-14oox: preserve custom oox fragments and packagesAshod Nakashian
Change-Id: Ic4c75d136601a9b7d772aab577c9fbebc7391eaf Reviewed-on: https://gerrit.libreoffice.org/49236 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-14oox: move putPropertiesToDocumentGrabBag to XmlFilterBaseAshod Nakashian
Change-Id: Ic3cbabc420c7856682b889528043563622997c14 Reviewed-on: https://gerrit.libreoffice.org/49235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>