summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2015-09-29tdf#91293: Preserve hyperlink on URL field OOXML exportKatarina Behrens
The fix is twofold: 1.Get URL property from the underlying text field, not from the text run -- put text field properties into rXPropSet (that's what GETA macro later queries), not into rRun 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 does s/rXPropSet/rRun/ afaics for no good reason 2. Retrieve string content from URL field early, so that the test for empty text content doesn't fire Reviewed-on: https://gerrit.libreoffice.org/18031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Conflicts: oox/source/export/drawingml.cxx sd/qa/unit/export-tests.cxx Change-Id: I4317e4a2f6f2e6f15c30932adc80f1227e010af0 Reviewed-on: https://gerrit.libreoffice.org/18709 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-15tdf#83227 oox: reuse RelId in DML/VML export for the same graphicMiklos Vajna
So that large images are written only once to the ZIP container when they are exported using both markups. This affects drawinglayer images, the Writer ones are handled directly in sw and were already deduplicated. (cherry picked from commit b484e9814c66d8d51cea974390963a6944bc9d73) Conflicts: oox/source/export/drawingml.cxx Change-Id: Iff7c769329b42939833056b727b070f6a60da5e3 Reviewed-on: https://gerrit.libreoffice.org/18581 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-11tdf#93097 oox: fix import of metadata from non-relative stream pathsMiklos Vajna
Commit ef2668bad976f1fbb70759887cafd35ea7833655 (PPTX import: fix missing document metadata, 2014-08-28) implemented metadata import for the PPTX filter, but in case the metadata stream is not an existing one, then OHierarchyHolder_Impl::GetListPathFromString() invoked by OStorage::openStreamElementByHierarchicalName() throws. The bugdoc is generated by a 3rd-party tool that always starts the stream path with a slash, and MSO seems to just ignore that: so let's do the same to be able to open the document. (cherry picked from commit 46cf9bb76b29f2bfa6639d9aaf4f26dee365bc0c) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I6c0715adeb19b9055669f6a45055415dd2c44e28 Reviewed-on: https://gerrit.libreoffice.org/18372 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-03tdf#87924 DOCX import: rot=90 and vert=vert270 means no text rotationMiklos Vajna
If the shape is rotated 90 degrees clockwise and the text is further rotated 270 degrees clockwise that means we shouldn't do anything with the text and the result will be correct. Also: cid#1315264 incorrect expression (cherry picked from commit dbfed66eebde65f5844a0f1a2cfe548ad4eda962 and 1c09657c5c25cf941588610eeab653217399f9b5) Change-Id: I7c65319258136288520bd24fa2bf8e3c598b0878 Reviewed-on: https://gerrit.libreoffice.org/18274 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-02Resolves: tdf#91060 don't crash on loading certain pptxCaolán McNamara
Change-Id: Ibf32ef644222a59c5fe6a9736ff64739ab24b74f (cherry picked from commit c874bf3f7bd6bbe31416506d9b4213bcbbbac4fa) Reviewed-on: https://gerrit.libreoffice.org/18227 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-17oox: fix invalid mime type "image/tif"Michael Stahl
(regression from ccfc02f7691848284403d339ee17054169fbff1d) Change-Id: I29a366228bf08f29edfa4a8e963889e34aa3d2ea (cherry picked from commit f18ca153aac53408284062309db513ab73f7dd2c) Reviewed-on: https://gerrit.libreoffice.org/17143 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-07-07tdf#87348 implement nonsequential and mso-next-textbox textbox chainingJustin Luth
Change-Id: I017049a8f3578ad4c2a1f549be1c683f98c20318 Reviewed-on: https://gerrit.libreoffice.org/16691 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-04-17fix crash on export of fdo60365-2.ods to xlsxCaolán McNamara
Change-Id: I1a281b096e4d1831bcf67ca03180afff043fbcfd (cherry picked from commit 135907f2061550624ee1859745d94eee01849070) Reviewed-on: https://gerrit.libreoffice.org/15322 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-04-12tdf#90403 PPTX import: use real table sizeAndras Timar
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. Change-Id: I3f80c0cea4cac46763d449f918bb78dca1a6562d 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) Reviewed-on: https://gerrit.libreoffice.org/15132 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-03-31bnc#910045 wrong cell fill color defined by table styleZolnai Tamás
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 Timar
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. Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4 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) Reviewed-on: https://gerrit.libreoffice.org/15082 Tested-by: Andras Timar <andras.timar@collabora.com> 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 Houston
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/15083
2015-03-17handle MSO 2007 vs OOXML in auto title chart importMarkus Mohrhard
Conflicts: oox/source/drawingml/chart/chartspacefragment.cxx oox/source/drawingml/chart/chartspacemodel.cxx Change-Id: Id884a4c90c24b38a1dd22a41d271dcc551b59adc Reviewed-on: https://gerrit.libreoffice.org/14878 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-03-17detect MSO 2007 OOXML documentsMarkus Mohrhard
Change-Id: I4052c6f1e5dde71ce4cede1ec9a313f461861d71 Reviewed-on: https://gerrit.libreoffice.org/14877 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-03-13tdf#89774 oox: TotalTime is in minutesMiklos Vajna
(cherry picked from commit 302f413eec4da8c8572911d08e939186c5ac57cf) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport5.cxx Change-Id: Ie65a8adbd077997f4a13914dd8e0ba4d55afd7b7 Reviewed-on: https://gerrit.libreoffice.org/14852 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-03-10tdf#89791: DOCX: don't save custom.xml if it's emptyJulien Nabet
Change-Id: I90f8e6c4de383b05345b8df9118000167bd20d2f Reviewed-on: https://gerrit.libreoffice.org/14735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 97c9bc9fada9cdfff956101a4a5e264b4dba58be) Reviewed-on: https://gerrit.libreoffice.org/14815 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-02-19implement fill based on style also for chart area, tdf#89451Markus Mohrhard
Change-Id: I7b488e222cd44e75d1e0ff7f8e545e9399f418b5 better way to set default for chart area fill style, related tdf#89451 Change-Id: Iee7fea0f55cf54d43a349b6cc0ffa25995069e40 no need for that anymore Change-Id: I53002c0b97da66c44429b5ace0fc709b5e8a325f Reviewed-on: https://gerrit.libreoffice.org/14547 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-19this should be [-90, 90] and not (-90, 90), tdf#89454Markus Mohrhard
Change-Id: I943be2cf660d2dc77eebd776208af96c0b5f67a4 Reviewed-on: https://gerrit.libreoffice.org/14546 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-05bnc#822341: PPTX export of embedded text documentsZolnai Tamás
-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/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 8ecbc3ef4ea9dc84ebf88506967d02de04ded852 c76d659b51274777a1669c215344a1169ebcba81 Reviewed-on: https://gerrit.libreoffice.org/13600 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-01-05bnc#862510: PPTX import: Wrong text horizontal adjustment inside shape.Zolnai Tamás
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/13604 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ás
When theme index is 0, it means it's unset so we should not apply that. (cherry picked from commit 89206c472ecf18bfde6824cea8004921cd404365) Change-Id: I62a9cd2a9b4c19f5acffc334d5e8263fe24fc8fd Reviewed-on: https://gerrit.libreoffice.org/13603 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-12-15Resolves: fdo#87281 Crash on importing diagram in .docx fileGary Houston
Change-Id: Ic2c7326ab83258e2e9dcbac88aa9f76f771a9b12 (cherry picked from commit de41a2038ac44f71a9adef97e6ccea83c99dd1c2)
2014-12-02Resolves: fdo#70157 fix crash on loadingCaolán McNamara
Change-Id: I0d248a195852c14cd95d4e337823076dd2fbc19d (cherry picked from commit 8302d048653d9ac25d3cb9ab9277df715053ad6a)
2014-11-30PPTX import: fix import of shape line properties defined by themeZolnai Tamás
See also: 81cd386facedfbb15be6dffc10351262abf733f3 (cherry picked from commit 664a56b3c81503bdf199edf1806676f0a35b956f) Change-Id: Ibb21d3e5b52a4d4996202acd4a989910fa223632
2014-11-30bnc#904423: Text(box) is rendered white on white when it is notZolnai Tamás
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. Change-Id: I99ea981858b9fa391915570187c8ddfdf2be1f7a (cherry picked from commit 81cd386facedfbb15be6dffc10351262abf733f3)
2014-11-18cppuhelper: clean up public headers with include-what-you-useMichael Stahl
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17Add rtl::OUString::toUtf8()Miklos Vajna
There is rtl::OUStringToOString() already to do OUString to OString conversion using UTF-8 encoding on a best effort basis. However multiple modules have code where we assume that such a conversion is perfect. Add a new method that asserts such an expected success instead of duplicating it at multiple places. Change-Id: I0e55b53f558df82b67af6a463c8144655cf0ca74
2014-11-15oox: these are expected to be UTF-8Miklos Vajna
Change-Id: I2e9cb96948d7f990dd8be5f4505f00306fa62f8f
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11build fixCaolán McNamara
Change-Id: I9d4dc8a165bc042a674eb472162292a486f3761c
2014-11-11coverity#1187643 Unchecked return valueCaolán McNamara
Change-Id: I2ba56fbff1ae05d1185d08d4fbd0285954fed38b
2014-11-10coverity#1130169 Unchecked return valueCaolán McNamara
Change-Id: I62ed42412a0cafa33ddafe536723f5e336c92a7a
2014-11-07Swapping Graphic is a privilage of GraphicObject.Zolnai Tamás
This means more things: * Graphic won't swap out itself, so those classes which uses Graphic without GraphicObject won't need to deal with swapping. * When a Graphic is queried from GraphicObject the caller won't need to deal with swapping, because GraphicObject swaps it in before return. * GraphicObject will swap in the Graphic always when a swapping dependent data is queried (e.g. whole graphic, transformed graphic or AnimationNotifyHdl) Change-Id: I2bf6e37291ec94146f10aac4a35084682437ed16
2014-11-07MS export: don't need to manually swapout images after swapin themZolnai Tamás
We have some good auto mechanisms for that. Change-Id: I487dbf4a5fc69c7563dfbc5c21f9ebdb05ba6b9e
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05fdo#85813 drawingML export: fix handling of impress tablesMiklos Vajna
Change-Id: Ia17b14c4b27e808ceab388aa33602875e67433a5
2014-11-05oox: document PPTX export entry pointMiklos Vajna
Change-Id: I8102f31d46257c96837b6c9497e9c49f92ac29b1
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-04Actually we shouldn't always set Overlap flag on for all xlsx charts...Kohei Yoshida
The correct fix unfortunately would require making the axis label layout smarter, to avoid overlapping of angled text label objects. Change-Id: I92198dbb90fd4a206ee226307992343d064f733a
2014-11-03typo: geomtery -> geometryAndras Timar
Change-Id: I20263c836dd55e663cdad9fc8283fe8fbf02b1f1
2014-11-02unused includes in RTF filter and related filesMiklos Vajna
Change-Id: Id13e10f2ceed3985c78ccc542e6677eccc0cb1c7
2014-11-01oox: introduce W_TOKEN() macroMiklos Vajna
It was inconsistent that when parsing <a:foo> elements, A_TOKEN(foo) was available, but for <w:foo> elements there was no W_TOKEN() macro. Also, there were two manual variants (NMSP_doc|XML_foo or via OOX_TOKEN(doc, foo)), replace both of them with W_TOKEN() for easier searching. Change-Id: Ic5cd027f07518535b92671ffe3c486016a3f9f0a
2014-10-31Removed duplicated includesAndrea Gelmini
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-29constStephan Bergmann
Change-Id: Ia76df719b2f76a993e65e0bf6d55723b1a2f5b93
2014-10-29constStephan Bergmann
Change-Id: I0d89cc99a1d8f7b3c17986b45653dce5e4b436d7
2014-10-28coverity#735309 Unchecked return valueCaolán McNamara
Change-Id: I15cbfb15054962998a058da1381a84bb667944ef
2014-10-24-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I2cc9884b23b49eb3e2afd27e5610bf96998a3c7f