summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
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>
2018-02-09tdf#115394 correct transition in case of 0sSzymon Kłos
Change-Id: I23d18acef0bd5db4a4ad6fc67d409e7ed5c93949 Reviewed-on: https://gerrit.libreoffice.org/49462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-02-08tdf#114168 If minor axis unit is automatic, then set it to 5Bartosz Kosiorek
Based on OOXML implementation in MS Excel, if Minor axis Unit is set to automatic, then during chart import, LibreOffice should set Interval Count to 5, to mimic behaviour of MS Excel. Becaues default Interval Count for LibreOffice is 2, we need to override it to 5. With that solution, the Minor axis unit is preserved also after saving to .ods file format. During .xlsx export, if Interval Count is set to 5, then treat is as automatic axis unit. Change-Id: Iab9209fb3950ef73e79229329606363b528d35fe Reviewed-on: https://gerrit.libreoffice.org/49327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-02-07tdf#114842 Fix comment shape export for CalcBartosz Kosiorek
When we have shape definition for commend, eg.: <v:shape id="_x0000_s1026" type="#_x0000_t202" the "type" must be specified previously, eg: <v:shapetype id="shapetype_202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe"> <v:stroke joinstyle="miter"/> <v:path gradientshapeok="t" o:connecttype="rect"/> </v:shapetype Unfortunately here is the problem, "id" of "v:shapetype" is "shapetype_202". It means that type used by shape type="#_x0000_t202" is not exisiting. To fix that issue I have changed "v:shapetype" id to be exactly the same as it is used: <v:shapetype id="_x005F_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe"> <v:stroke joinstyle="miter"/> <v:path gradientshapeok="t" o:connecttype="rect"/> </v:shapetype> After that fix, comments are displayed correctly. I also added unit test, to make sure that shape is using already defined "shapetype". Change-Id: I8faf1befe7573aa33ee8a294eb192e5e255f37a1 Reviewed-on: https://gerrit.libreoffice.org/47821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-02-07tdf#115394 import custom slide transition time in PPTXSzymon Kłos
* custom values are imported correctly * standard (fast, slow, medium) values are changed to match values in the MSO Change-Id: I004242afbbf641fe414abc8df248a2844c104502 Reviewed-on: https://gerrit.libreoffice.org/49139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-02-01Change bitmap table to store XBitmap instead of GraphicObject URLTomaž Vajngerl
As we want to get rid of GraphicObject URLs for the more robust image life-cycle handling, it was necessary to change the way bitmap table stores and handles images, so that they always store a Graphic object (wrapped in UNO object that provides the XGraphic and XBitmap interface). In addition this changes loading and saving from ODF (xmloff) and OOXML (oox) filters so they don't depend on GraphicObject URL anymore, but load or save directly to / from XGraphic or XBitmap. Change-Id: I2b88e10056e7d6c920249d59188f86b1a5a32d21 Reviewed-on: https://gerrit.libreoffice.org/49074 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-31tdf#111417 Import read only property on ActiveX text boxbrian houston morrow
Change-Id: I45d933ef308fbad31695cfc9f668eced4cd8e1f1 Reviewed-on: https://gerrit.libreoffice.org/48872 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-30tdf#114821 calculate better label positionSzymon Kłos
Positioning hack was improved. It calculates position depending on direct chart size factor. Preffered label positions are: top - vertical, and center - horizontal Change-Id: Ic25f08cd0bc3105fe34841dbc3f8aacacb694d43 Reviewed-on: https://gerrit.libreoffice.org/48909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-30Revert "tdf#114821 calculate correct label position"Szymon Kłos
This reverts commit 1ede9f7ff6f2250fa2c75bc4dc099246a59dcec0, because it caused division-by-zero errors, see comment at <https://gerrit.libreoffice.org/#/c/48242/6> "tdf#114821 calculate correct label position". Change-Id: Ifca811bda04721898387b4799de2d2da31290fa0 Reviewed-on: https://gerrit.libreoffice.org/48860 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-29tdf#114821 export complex data labels in chartsSzymon Kłos
Change-Id: I9b0893dfde4efc10bb05e6e17b7128b016efeb71 Reviewed-on: https://gerrit.libreoffice.org/48788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-29tdf#114821 import complex data labels in bar chartSzymon Kłos
* import static text & fields: VALUE, SERIESNAME, COLUMNNAME * text is formatted * DataPointCustomLabelField with field type (DataPointCustomLabelFieldType) was introduced. * text can have many portions & multiple lines * unit tests for import data labels with formatting Not implemented: CELLREF field support which needs importing some additional data from extLst Shows custom text as a label for data points. Change-Id: Iba8fd508eb16356b05586b93d7b8da32240d2b91 Reviewed-on: https://gerrit.libreoffice.org/48243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-29Fix typosAndrea Gelmini
Change-Id: Iedd82d035454c940d76a94c7e910c81827c1389c Reviewed-on: https://gerrit.libreoffice.org/48828 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-28tdf#111786: PPTX export: Shape's line transparency is not exportedTamás Zolnai
Change-Id: Iab11906e6ed79e1e39bba1b07b50a25887517f3a Reviewed-on: https://gerrit.libreoffice.org/48763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-28tdf#114821 calculate correct label positionSzymon Kłos
Max is now equal to whole surface size, not only point pos. Change-Id: If231fb7224b23e9993fcf575f5a020ca8e2b04ab Reviewed-on: https://gerrit.libreoffice.org/48242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-26tdf#107608: PPTX: Import pattern fill background colorTamás Zolnai
Change-Id: Ic7e9dc314c961605fc8467eebd465fa286993e17 Reviewed-on: https://gerrit.libreoffice.org/48633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-24sal_Bool -> bool (remaining uses of css::uno::Any::has)Stephan Bergmann
Change-Id: I041540307d48083955a74d20f73219ac458037fe Reviewed-on: https://gerrit.libreoffice.org/48482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-24tdf#114913 Use master if char size wasn't setPaul Trojahn
The size returned by insertAt falls back to the master size if needed. Change-Id: I741b48616c6c848fc641c597cc72bf8b17e3cad4 Reviewed-on: https://gerrit.libreoffice.org/48456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-19refactor to look prettierCaolán McNamara
Change-Id: I3bf7ce76516f7c930e564791109ff72fb5b87d52
2018-01-19new loplugin:emptyifNoel Grandin
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42 Reviewed-on: https://gerrit.libreoffice.org/48128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18Include android/compatibility.hxx from ubiquitous sal/config.hStephan Bergmann
...instead of having to add it to more and more individual .cxx files, as the need arises. Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94 Reviewed-on: https://gerrit.libreoffice.org/48108 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18crashtesting: multiple export failuresCaolán McNamara
since... commit 84392651d2731cce91c3b2e144bed4ac07e4ddf1 Date: Wed Jan 3 23:27:16 2018 +0100 tdf#114173 Preserve size of chart legend during xlsx export Change-Id: Iebc936a0f490d6b707dfee0343732753f56728e7 Reviewed-on: https://gerrit.libreoffice.org/48147 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-17Fix typosAndrea Gelmini
Change-Id: I6f2822e7068754a1b5e70e401247a36b214147e3 Reviewed-on: https://gerrit.libreoffice.org/48079 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-17Fix typosAndrea Gelmini
Change-Id: I18ce04cbaa79c827a52e2441e98ee2e3377b5877 Reviewed-on: https://gerrit.libreoffice.org/48077 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16Fix typosAndrea Gelmini
Change-Id: Ia976371bf52eb1216d8abe728d80bbb87a3c38a2 Reviewed-on: https://gerrit.libreoffice.org/47858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15Fix typoAndrea Gelmini
Change-Id: I51c97356c9c2939f2d94d6388c829a179ca00daa Reviewed-on: https://gerrit.libreoffice.org/47853 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15More loplugin:cstylecast: ooxStephan Bergmann
Change-Id: I281f3f65e138316ba856d3036fd06b26896af901
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-14Use = for initializationStephan Bergmann
...so that an automatic loplugin:cstylecast rewrite (with a to-be-committed enhanced loplugin) won't rewrite that to -Werror,-Wvexing-parse sal_Int16 nTmp( sal_Int16(style::ParagraphAdjust_LEFT) ); Change-Id: I62072864cb879ca3d45bf941d3dfabdd1c2cabd0 Reviewed-on: https://gerrit.libreoffice.org/47867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-14ofz#5293 Null-dereference READCaolán McNamara
Change-Id: Ie2f9127a903a07e26cf64672476cdfcc1f247eae Reviewed-on: https://gerrit.libreoffice.org/47862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-14fix indentCaolán McNamara
Change-Id: Ic806f41607c201d9b68074244203c6020d4985c7
2018-01-12More loplugin:cstylecast: ooxStephan Bergmann
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
2018-01-11Fix typo in codeAndrea Gelmini
Just to have devs attention on this. It passed the "make check" on Linux. No idea if it's really a typo. Change-Id: Ifa73de9fcb2859c89c83873f5090020a83ad3353 Reviewed-on: https://gerrit.libreoffice.org/47263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-10tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.ekuiitr
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48 Reviewed-on: https://gerrit.libreoffice.org/47082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-09tdf#114173 Preserve size of chart legend during xlsx exportBartosz Kosiorek
During export chart into .xlsx file, the information about size of legend was not saved. Example of proper size: <c:w val="0.41459448854442293"/> <c:h val="0.23161616722845749"/> another issue was hardcoded "layoutTarget" which was always "inner": <c:layoutTarget val="inner"/> also properties regarding default text style was not preserved: <c:txPr> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr sz="900" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0"> <a:solidFill> <a:schemeClr val="tx1"> <a:lumMod val="65000"/> <a:lumOff val="35000"/> </a:schemeClr> </a:solidFill> </a:defRPr> </a:pPr> <a:endParaRPr lang="pl-PL"/> </a:p> </c:txPr> With this patch all these issues was resolved, and in case of layoutTarget "outer", the field is not availble at all, according to specification. Change-Id: I2c9b7a112bdd911542b5273e660222d7fefa2d88 Reviewed-on: https://gerrit.libreoffice.org/47358 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-08support exporting of hatch for chart background, tdf#114180Markus Mohrhard
It seems that the hatch properties can not easily be exported. MSO just knows some hard-coded patterns. Change-Id: Ib1d0bbe503d77bfeb90faf90367bd5fdb477af64 Reviewed-on: https://gerrit.libreoffice.org/47156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>