summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2015-04-20Fix build with boost-1.56.0.Jörg Sonnenberger1-2/+2
Change-Id: I61686bf61ff1e0561c385492c563e4495456ca47 Signed-off-by: Thomas Klausner <wiz@NetBSD.org> (cherry picked from commit 45dfbdca6a9afba1a6aef21623ec025ded635a4d) Reviewed-on: https://gerrit.libreoffice.org/15446 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-04-17fix crash on export of fdo60365-2.ods to xlsxCaolán McNamara1-2/+2
Change-Id: I1a281b096e4d1831bcf67ca03180afff043fbcfd (cherry picked from commit 135907f2061550624ee1859745d94eee01849070) Reviewed-on: https://gerrit.libreoffice.org/15321 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-04-09tdf#90403 PPTX import: use real table sizeAndras Timar1-0/+17
PowerPoint ignores a:ext cx and cy value of p:xfrm, and uses real table width and height. PowerPoint 2010 saves files where cx and cy contains good values, but I found files in the wild whose cx and cy values did not match to actual table width and height, and there was a visible difference between rendering of Impress and PowerPoint. Reviewed-on: https://gerrit.libreoffice.org/15123 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 037fe3671cbdad51f52d2f69f72f47f463dba7c2) Conflicts: oox/source/drawingml/shape.cxx sd/qa/unit/import-tests.cxx Change-Id: I3f80c0cea4cac46763d449f918bb78dca1a6562d Reviewed-on: https://gerrit.libreoffice.org/15133 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-03-31bnc#910045 wrong cell fill color defined by table styleZolnai Tamás1-0/+11
Problems were with those table styles which used color themes to define cell fill color. Reviewed-on: https://gerrit.libreoffice.org/15089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit debf3ffb87d607704ddea97f6710c3ceaa9a243d) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8
2015-03-31bnc#902652 OOXML: fix import of insets when shape and/or shape text is rotatedAndras Timar2-5/+5
5ac575ee3e109 did not get it right, the vert attribute (i.e. the rotation of text) is relevant, not the rotation of the shape. In that case both text and shape rotation were 270 degrees. I checked that the bugdoc of bnc#773048 looked good after this. Reviewed-on: https://gerrit.libreoffice.org/15076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit af686aa8694903bde5952656cd69993c8c8393d7) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4 Reviewed-on: https://gerrit.libreoffice.org/15085 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-31fdo#87488 Wrong text rotation inside a preset shape from docxGary Houston3-6/+12
Preset shape text rotation values are read in a few places and stored in moRotation. With these changes, moRotation is always read unchanged, but multiplied by -1 when it's used. Change-Id: I633d665c21daa69e15fa828a43300f10d2bf2054 Reviewed-on: https://gerrit.libreoffice.org/13561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 921cea89da8adbe714ea8f71169dd6afc42354c4) Signed-off-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/15084
2015-03-26tdf#89774 oox: TotalTime is in minutesMiklos Vajna1-1/+2
(cherry picked from commit 302f413eec4da8c8572911d08e939186c5ac57cf) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport5.cxx Change-Id: Ie65a8adbd077997f4a13914dd8e0ba4d55afd7b7 Reviewed-on: https://gerrit.libreoffice.org/15017 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-01-05bnc#862510: PPTX import: Wrong text horizontal adjustment inside shape.Zolnai Tamás2-1/+16
When alignment is not specified, it should be set to the default "left" value just on time, when properties are pushed to the property set, otherwise uninitialized value is better. (cherry picked from commit 7a64988dbc7a1542aa38f0e8f9a8a47941fbc67d) Conflicts: sd/qa/unit/import-tests.cxx Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ic294c5d7cc477f7515aea1c071ad9b67275c012d Reviewed-on: https://gerrit.libreoffice.org/13607 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-01-05bnc#862510: PPTX import: Wrong text color inside shapeZolnai Tamás1-5/+8
When theme index is 0, it means it's unset so we should not apply that. (cherry picked from commit 89206c472ecf18bfde6824cea8004921cd404365) Conflicts: sd/qa/unit/import-tests.cxx Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I62a9cd2a9b4c19f5acffc334d5e8263fe24fc8fd Reviewed-on: https://gerrit.libreoffice.org/13606 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-01-05bnc#822341: PPTX export of embedded text documentsZolnai Tamás1-28/+86
-Make embedded text documents exported by analogy with spreadsheet embedded documents. -Convert MS ole objects to LO sepcific objecst to allow exporting those ole objects too. Plus use gb_CppunitTest_use_rdb instead of wasting time on finding out which missing components cause test failing. Especcially when we have platform dependent components (e.g. related to embedded object) (cherry picked from commit 0c3d5fb0ad35ff7fc18917fc86fa58d9312fe3ae) Conflicts: sd/CppunitTest_sd_export_tests.mk sd/qa/unit/export-tests.cxx ERROR: Attribute 'spid' must appear on element 'p:oleObj'. As pointed out by CppunitTest_sd_export_tests. (cherry picked from commit 124c33dd1d6bf2040f0153de8c9ecaebe759c3bd) ERROR: Invalid content was found starting with element 'p:pic'. Again, as pointed out by CppunitTest_sd_export_tests. Sadly it seems that the spec and PowerPoint is not in sync here, so just do what makes both happy. This fixes the --with-export-validation build. (cherry picked from commit cf15306ccf49da290b391517e2c5dd22a4f1be45) Change-Id: Ic76d659b51274777a1669c215344a1169ebcba81 Reviewed-on: https://gerrit.libreoffice.org/13601 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-12-04Resolves: fdo#70157 fix crash on loadingCaolán McNamara1-3/+7
Change-Id: I0d248a195852c14cd95d4e337823076dd2fbc19d (cherry picked from commit 8302d048653d9ac25d3cb9ab9277df715053ad6a) (cherry picked from commit a757e1b1300dde12fb865c1efd64bfd2bef00e2c) Reviewed-on: https://gerrit.libreoffice.org/13272 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-12-01PPTX import: fix import of shape line properties defined by themeZolnai Tamás1-1/+4
See also: 81cd386facedfbb15be6dffc10351262abf733f3 (cherry picked from commit 664a56b3c81503bdf199edf1806676f0a35b956f) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ibb21d3e5b52a4d4996202acd4a989910fa223632
2014-12-01bnc#904423: Text(box) is rendered white on white when it is notZolnai Tamás1-1/+6
The problem was that the background color defined by theme was not imported correctly, because the different fill style comes from different sources (master slide, theme, direct formatting) were applied on the shape in wrong order. To solve this we need to store master slide defined fill style in a different variable so theme style can be applied after master slide defined style but before direct formatting. (cherry picked from commit 81cd386facedfbb15be6dffc10351262abf733f3) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I99ea981858b9fa391915570187c8ddfdf2be1f7a
2014-11-12fdo#79731 fdo#85813 drawingML export: fix handling of impress tablesMiklos Vajna1-5/+8
(cherry picked from commit 02e52b15908a6d89b4aeb3c349e7414240eb9563) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: oox/source/export/drawingml.cxx sd/qa/unit/export-tests.cxx Change-Id: Ia17b14c4b27e808ceab388aa33602875e67433a5
2014-11-09fdo#54361: Chart background in XLSX is transparent instead of white.Muthu Subramanian1-11/+10
Conflicts: oox/source/drawingml/chart/objectformatter.cxx Change-Id: I116e7e8c9046009cfcadc04b5367a6fe25f88d96 Reviewed-on: https://gerrit.libreoffice.org/11910 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-10-08oox: fix spurious rebuilds of namespacemap.cxxMichael Stahl1-0/+1
There is a missing dependency on one of the generated header files. Change-Id: Id3fa2ccf2c2a31527b795861afdf557882f56972 (cherry picked from commit 63e6cbc3180047000787a9071513152fdd9ce942) Reviewed-on: https://gerrit.libreoffice.org/11844 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-07bnc#584721: invisible text because of wrong color (white)Zolnai Tamás1-10/+20
Color::getColor() method uses some caching mechanism which works wrong when the result depend on one of the input parameters. So avoid caching in these cases. (cherry picked from commit cfe658c289de030dc3a8fecd3bac0a0004a18061) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ifa9221e21e685715454de86d5cec09ff6c266307 Reviewed-on: https://gerrit.libreoffice.org/11724 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-10-01Resolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShapeCaolán McNamara1-1/+9
Change-Id: I0bafd2c43d29806eea0ff0cb165e67aece53488f Reviewed-on: https://gerrit.libreoffice.org/11726 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-10-01fix/improve handling of mso-position-(horizontal|vertical)(-relative)Luboš Luňák2-1/+27
This is a squash of commits f6fa787 to e5bbc721 . Change-Id: Ieb76ccb2fe8a425af3204de144021b7a731d0778 Reviewed-on: https://gerrit.libreoffice.org/11701 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-09-26Resolves: fdo#84261 unexpected exception -> clang builds terminateCaolán McNamara1-1/+1
Change-Id: I545ed112b54fb3d81e67b0f42230811cd48de626 (cherry picked from commit 4652700776666e385946c47235363c1120846d5d) Reviewed-on: https://gerrit.libreoffice.org/11653 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-09-26bnc#897769: OOXML import: Import border lines using reference too.Matúš Kukan1-22/+33
Do not ignore 'lnRef' element. Also fix typo to apply 'seCell' properties to the right cell (southeast). Change-Id: Ia45f7016f358b70e6db06a232c569335ce9d7051 (cherry picked from commit 18898e13fda25fe6dc85318dd0711355c7b2cc26) Reviewed-on: https://gerrit.libreoffice.org/11652 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-17bnc#591147: OOXML import: Import video file too.Matúš Kukan1-13/+27
Change-Id: Ie9b6c5ff866269e5d7a26d025cb1c0d884ff1134 (cherry picked from commit b7006f3c2f8f71f4d4721c6e5cdc122628c756f0) Reviewed-on: https://gerrit.libreoffice.org/11469 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-09-17loplugin:staticcallStephan Bergmann1-1/+1
Change-Id: I1d428ccd434b7b6f61461ea29447291759c3a7bf (cherry picked from commit 732e7bdfa2d0e7b0296599517f53d194c02acfee)
2014-09-12bnc#892610: OOXML import: Improve chart number formats.Matúš Kukan5-26/+23
If sourceLinked is used, do not set "PercentageNumberFormat" even if showPercent is true. The format string should be used for "NumberFormat". c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7 unnecessarily disabled "LinkNumberFormatToSource". Use that for data labels but not for axis. Also, actually make attaching number format supplier work for Calc. Previously, non standard formats were added into wrong supplier, and they were thrown away later because it was attached too late. (See also ChartModel::attachNumberFormatsSupplier) (cherry picked from commit d22a4d945ccf1456fbdb2c39802d956afa583a2a) Conflicts: chart2/qa/extras/chart2import.cxx oox/source/drawingml/chart/chartconverter.cxx Change-Id: Iaf9945abc3d82d0ac63d9f36b8888eb49f39ab57 Reviewed-on: https://gerrit.libreoffice.org/11414 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-09-10bnc#480256: OOXML import: Respect table background properties a bit moreMatúš Kukan2-6/+38
Only getBackgroundFillProperties() (fill) was used. Use also getBackgroundFillStyleRef() (fillRef). Also, do not replace table background color value with cell color, we have to interpolate the two colors (if cell color is transparent). Unfortunately, we don't use background table property in LibreOffice, so this seems to be a best workaround. (cherry picked from commit 43efd9b40d40b791a2c2deedcac36b99f7efb2cf) And add unit test. (cherry picked from commit 5681725f1a2535a13b86104d8b8a33f750f34efc) Change-Id: I21bcc87a149c9f6d865ebee4012132ccc3a54af2 Reviewed-on: https://gerrit.libreoffice.org/11353 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-09-09Rewrite import and export of custom dashes in ooxml filter (fix)Adam Co3-18/+92
The import mechanism of custom-dash (a:custDash) was wrong, and imported wrong values, which causes that if you would import-export-import-export - you would get inflated values, which might cause a corruption. The attributes for custom-dash nodes (a:ds) are of type 'PositivePercentage'. Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign, but only write percentages as 1000th's of a percent without a trailing percent sign. During import - LO did not check if it was in '%' format or in '1000th of a percent' format. So that was fixed. Also - when exporting - it always exports now in '1000th of a percent' format. Reviewed-on: https://gerrit.libreoffice.org/9681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 2211a67cc5e577f8abdcc96c9c63865be5fb988d) Conflicts: oox/source/export/drawingml.cxx Change-Id: I6bd74df26951974f85173227c832386c70034afb
2014-09-05MSO finally decided to follow the spec, fdo#83312Markus Mohrhard1-1/+11
Change-Id: I8c611b49e3bf4645736425bd33c2994ae2c28337 Reviewed-on: https://gerrit.libreoffice.org/11270 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-29bnc#822347: if number type is not set, skip numberingTomaž Vajngerl1-1/+4
If numbering is detected then (level is > 0) and the number type is not set, the defult bullet symbol is written. This is not correct as the default should be SVX_NUM_NUMBER_NONE which should skip numbering or set it to none. With this change the numbering is skipped (as in MSO). (cherry picked from commit 14fa2698f2f651343675761e75be01b84c4c5ff1) Conflicts: oox/source/export/drawingml.cxx Change-Id: I8d08a6325509c7bd6f96f64c8d29e5f3045458ca Reviewed-on: https://gerrit.libreoffice.org/11181 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-08-28PPTX import: fix missing document metadataMiklos Vajna1-0/+2
Without this, the creation / modification date is lost on import. (cherry picked from commit ef2668bad976f1fbb70759887cafd35ea7833655) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I0b74ac91aee7b8b3e0bc763247086a3a39816bc1 Reviewed-on: https://gerrit.libreoffice.org/11167 Reviewed-by: Zolnai Tamás <tamas.zolnai@collabora.com> Tested-by: Zolnai Tamás <tamas.zolnai@collabora.com>
2014-08-25bnc#880448: Improved handling of placeholder shapesMatúš Kukan2-19/+26
If subTitle placeholder is not found, try body instead of title. And use body text styles instead of title, for subTitle. Also improve PPTShape::findPlaceholder to find placeholder with just nSecondSubType type without the same index. (cherry picked from commit 2a7119021edea8346e4673d57cac3f051a5d0968) Conflicts: oox/source/ppt/pptshape.cxx Change-Id: I470e7268088eb989fb934007dfcf704f67d8cb1d Reviewed-on: https://gerrit.libreoffice.org/11065 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-12bnc#887227: Do not set TextAutoGrowHeight for vertical text.Matúš Kukan1-1/+5
It's horribly broken and it would resize text box horizontally which is not supposed to happen. Change-Id: I201ec8dbcddca56d21bf46ea8ee838d01923c442 (cherry picked from commit d068f13596f6d1023a70d98ec2059d38ad6fd777) Reviewed-on: https://gerrit.libreoffice.org/10541 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-11bnc#821916: Better algorithm to find placeholder shape.Matúš Kukan3-74/+71
Placeholder type seems to be more relevant than index. Change-Id: I9d6c6cad8e0a51b2385801f65d7d1c697ad7998e Reviewed-on: https://gerrit.libreoffice.org/10844 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-11Fix some number format issues, bnc#862510Matúš Kukan3-6/+6
Set "LinkNumberFormatToSource" to false, so that format code is not ignored. Also, do not inherit format code common for all labels, if there is specific format code for a data label. Change-Id: I505311d5df641d61e616e354734bd332609fa122 (cherry picked from commit c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7) Reviewed-on: https://gerrit.libreoffice.org/10780 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-11bnc#862510: PPTX import: Properly show data labels in percent format.Matúš Kukan1-2/+5
Usually, "General" is "0.00" number format, but in this case, when we want to show percent value, MSO writes that instead of "0%". Change-Id: I748719765f58e66f9f3fb43c2b527c6823ef6fa1 (cherry picked from commit 5f47e319428a703ea53ce49d166e7628aaa60789) Reviewed-on: https://gerrit.libreoffice.org/10779 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-06bnc#886540: Default chart background for pptx docs should be transparent.Kohei Yoshida3-1/+18
Charts in docx and xlsx OTOH use solid white as the default fill style. (cherry picked from commit 4a8f2431718f99de6fd9ee3461d703d007261c03) (cherry picked from commit 013744a5b475e151ca0918565fb369e22dfbc1db) Conflicts: oox/source/drawingml/chart/chartspaceconverter.cxx Change-Id: Ic4351fe65cabc12d60214b67c7026a317841f2c7 Reviewed-on: https://gerrit.libreoffice.org/10736 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-07-30bnc#885825: OOXML import and export of data label borders.Kohei Yoshida3-137/+113
(cherry picked from commit 48f31a924280a418046f0c816f8a7d20b672dac6) Conflicts: oox/source/export/chartexport.cxx Change-Id: I0fd808145aaeb0aa36d3ec30d7b977890642dcff Reviewed-on: https://gerrit.libreoffice.org/10562 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-07-25bnc#862510: PPTX import: bullets have color as following text by default.Matúš Kukan1-0/+2
aTextCharacterStyle contains font theme color set in Shape::createAndInsert. Change-Id: I55e66aeaa7176fbd3f64dcdf075d411f460947d4 (cherry picked from commit d60cec0e60c5c0880f8098d39443c391abed80b2) Reviewed-on: https://gerrit.libreoffice.org/10516 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-23fdo#54361: Chart background in XLSX is transparent instead of whiteHeena Gupta1-1/+4
Cherry-picked from 53b9adc135f4abb086c740582e5f85cea710287d and 6d3269ad94bbad8abae5703edc86d8888356bf14 Change-Id: I96d86854484deb7b5c0b99739fed60a430f2f957 Reviewed-on: https://gerrit.libreoffice.org/10468 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-21bnc#887230: always use theme color for hyperlinks in ImpressMatúš Kukan1-2/+1
Change-Id: I888f107c61037162439ad2d1ba99ad8185532f71 (cherry picked from commit 92f74f6ccb5a55807724db85815f7ea0c49370e0) Reviewed-on: https://gerrit.libreoffice.org/10384 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-18use rtl::math::round here to get the same number on 32/64bit platformsMatúš Kukan1-1/+2
This fixes sd_import_tests where 100*0.35 was 34 on 32bit platform. Change-Id: I45705326e91892beb814bd94e074b0a652709768 (cherry picked from commit ba6da9545764f2545313ba085ed4a096165180fd) Reviewed-on: https://gerrit.libreoffice.org/10385 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-07-17Do not prefer bandRow over firstCol/lastCol, nor the same with bandCol.Matúš Kukan1-2/+6
Change-Id: I0c573d721212c870e9ecc99ba5e8494073e09aaf (cherry picked from commit 5d2f12a44d2af3e42e0c3a17ff556f5ada27b1b8) Reviewed-on: https://gerrit.libreoffice.org/10332 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-17bnc#887225: OOXML import: Correctly apply table style for lastRow.Matúš Kukan1-1/+1
nMaxColumn and nMaxRow are indexes, so use size() - 1. Change-Id: I20055e55cf2464710fe553fb8067bad13a339084 (cherry picked from commit 47645734c350f244b4a5642a709132ca1b7dc75d) Reviewed-on: https://gerrit.libreoffice.org/10331 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-07-17bnc#862510: Improve handling of OOXML gradientsTor Lillqvist2-26/+192
OOXML gradients can have an arbitrary number of "stops". LibreOffice gradients have just a start and end colour, plus an optional uniformly coloured border (on the "start" side). In addition, LibreOffice has the "axial" gradient mode, which means the gradient is reflected in the middle. It is thus obviously impossible in general to losslessly map OOXML gradients to LibreOffice ones. But let's try a bit harder than earlier to get visually more similar result, in at least some simple sample cases. We look for the widest gradient segment and use that for the start and end colours of the LibreOffice gradient. Also, map an OOXML gradient to an axial LibreOffice gradient only if it is symmetrical. Also, use the border property when suitable. In general, look for the widest OOXML gradient segment (once a segment corresponding to the LibreOffice gradient border, if any, has been accounted for) and use that as the LibreOffice gradient. Possibly some perceptionally better heuristic should be used... Like, if we have a three-segment gradient, with a wide gradient segment between two visually very similar colours (for example, two shades of red), and a narrower segment ending with a visually very different colour (for example, yellow), it probably would be best to represent that in LibreOffice as a gradient from the first red shade to yellow, instead of as a gradient between the two shades of red. Or even, if a first or last gradient segment is between very similar colours, equalize those start and end colours, thus using a border colour in LibreOffice instead. The possibilities for bikeshedding are endless. I am sure there are instances where the old code (by accident?) produced visually more pleasing results... But hopefully this works more pleasingly and consistently in a larger number of cases. Change-Id: If153e986ad943454307e3ba718479d5ac4cdc7ab (cherry picked from commit f4a2f1e647354efb75be8c90384d6cd3e5f9b9bd) Signed-off-by: Andras Timar <andras.timar@collabora.com>
2014-07-15Related: fdo#52226 ensure graphics are swapped in on DrawingML::WriteImageCaolán McNamara1-8/+26
I imagine it would be best that the Graphics were delivered pre-swapped in by higher levels in case there are second level caches or more complex caching systemed wrapped around it, so warn about it in debug mode but give it a last-ditch shot anyway. i.e. while the .docx problem should be fixed there is a report of a very similar .xlsx problem Change-Id: Ie40ee10fe5cba8ff9c321f47b83e33ee2c1425fd (cherry picked from commit 6e580f3f53ae2de086a08c8ba1958b67874eb9c5) Reviewed-on: https://gerrit.libreoffice.org/10299 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-07-10bnc#882383: Do not ignore themeOverride for charts in .pptxMatúš Kukan3-1/+68
Otherwise wrong colors are displayed. (cherry picked from commit 08818d8a45e034ad825c7fafbb76766f106f1d1d) Conflicts: oox/source/drawingml/shape.cxx Change-Id: I5d7444100355fdbc5fcd2aaa1c01202ace54312d Reviewed-on: https://gerrit.libreoffice.org/10134 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-07-09bnc#881025: Mark axis a percent axis only when all data series are percent.Kohei Yoshida2-10/+34
(cherry picked from commit b8c444a46b2f41dae673c6118d84276be0e6c87d) Conflicts: oox/inc/drawingml/chart/axisconverter.hxx Change-Id: I302cc1e5b164b2ce9999087293b034ec930951af Reviewed-on: https://gerrit.libreoffice.org/10124 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-07-09Adjust for the splitting of number format properties in chart.Kohei Yoshida3-12/+5
Since 1d38cb365543924f9c50014e6b2227e77de1d0c9, "number format" and "link number format to source" properties are 2 separate properties. Adjust OOXML import code for that split. Also, always set axis' number format via NumberFormat property even when it's a percent format. The axis object doesn't keep a non-percent and percent number formats separately. Change-Id: I8667b6f1a78d88cc37d059518919ad1b37f154e1 (cherry picked from commit af5a6615dfdbe5c2cacdcacb00fc6f418b925c06) Reviewed-on: https://gerrit.libreoffice.org/10123 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-07-07fix crash loading ooo100546-1.xlsCaolán McNamara1-2/+3
regressions around inserted extra enum values into ShapePropertyId (cherry picked from commit aacfd5038d05a02f8b1eade3a5896d3d7e959f3d) Conflicts: oox/source/drawingml/chart/objectformatter.cxx Change-Id: I06696c8cfe4acc3836723c31d5e714bd7d8439b3 Reviewed-on: https://gerrit.libreoffice.org/10108 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-07-03bnc#812796: Correctly handle static value array for OOXML charts.Kohei Yoshida3-5/+7
We need to pass the role of the data sequence in order to avoid unreliable guess work when importing static value array. Also, not all Excel's scatter plots have real numeric X values; some have textural X values in which case Excel switch to generating 1, 2, 3, ... as X values. When importing to our chart implementation, using "categories" role in such cases instead of "values-x" results in a more faithful chart rendering. (cherry picked from commit 6c4e21a234f12e1310ba06f9859e08b424acf8bf) Conflicts: chart2/source/inc/InternalDataProvider.hxx chart2/source/tools/InternalDataProvider.cxx Change-Id: If4bc1f650bb024dcd1b1b36537f457fb38404a78 Reviewed-on: https://gerrit.libreoffice.org/10040 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-07-03bnc#812796: Don't create data series when the series has no values.Kohei Yoshida1-0/+4
Change-Id: I92e2d7a3fab0948aea0557cf3cb65d57d48f3f59 (cherry picked from commit 5e2b7e37a29edf45f829ccee2302a942b54568a1) Reviewed-on: https://gerrit.libreoffice.org/10039 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>