summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2014-07-21Most certainly meant to be plural.Kohei Yoshida
Change-Id: I3772091c77307892b13d75cc6a5a191ec07c7bf5
2014-07-21WaE: passing class rtl::OUString by value, rather pass by referenceTor Lillqvist
Change-Id: Ib332d04fa27501ec35267b5e389c2979c9c55be2
2014-07-21fdo#78663 : The File gets corrupted when saved in LOBisal Nayal
Problem Description: The docx file contains a word art inside a drawing tool. After RT, nesting of <txbxContent> tag is happening which is causing the corruption. Solution: Created a service in util.cxx for checking few shapetypes for which textbox with content is not allowed. This check also helps to find that if we are already inside a DML then we should purely read VML Information.An existing UT testWordArtWithinDraingtool was failing. The UT is related to same issue (word art inside drawing tool) hence changed it accordingly. Following is the commit id of the UT-Change-Id: I00e94712e912ad1977fcb65a945fefb927795d77 Change-Id: I7e456c9f6a69af80da443e29eb02a64ba7d59468 Reviewed-on: https://gerrit.libreoffice.org/10229 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2014-07-21fdo#80897: Preservation of text warp properties.Rohit Deshmukh
- Generic fix for all warp properties Change-Id: I77c37759aa49706fc3cd1a80770a85face53f0a2
2014-07-20cppcheck: Prefer prefix ++/-- operatorsJulien Nabet
Change-Id: If9fa06958c4ebb45a5d4acf3b2994dd3b79f81bf
2014-07-18coverity#1038295 Unchecked dynamic_castCaolán McNamara
Change-Id: I0206983f7dd57626a7d33a95d5025af1b12ed9d3
2014-07-18coverity#1202900 Uncaught exceptionCaolán McNamara
Change-Id: I9e49abc490935710b471c79d19385bda37f038b0
2014-07-18coverity#1226484 Using invalid iteratorCaolán McNamara
Change-Id: I30e4d365fb2a851ea8d81e9f45a6f4d0bf6d7ec7
2014-07-18coverity#1226480 Unchecked dynamic_castCaolán McNamara
Change-Id: I07c0ee479a384d213a1b9b9252846bd9873b0bdc
2014-07-18Use comphelper::SequenceAsHashMapMiklos Vajna
Change-Id: I5e4dc99c86b696d2c00392fdb47c4d9ebb7f14ff
2014-07-18oox: write Company in docProps/app.xmlMiklos Vajna
Change-Id: I8474b8ec7415b4d8e067343295ea985319c34834
2014-07-18use rtl::math::round here to get the same number on 32/64bit platformsMatúš Kukan
This fixes sd_import_tests where 100*0.35 was 34 on 32bit platform. Change-Id: I45705326e91892beb814bd94e074b0a652709768
2014-07-18bnc#887230: always use theme color for hyperlinks in ImpressMatúš Kukan
Change-Id: I888f107c61037162439ad2d1ba99ad8185532f71
2014-07-17coverity#735310 Unchecked return valueCaolán McNamara
Change-Id: I1a35da4b23b9ff8efa8f500eaf18e4c259cc0177
2014-07-17fdo#80894 : Rotation value for textframe was missing after RT.sushil_shinde
- Rotation property is not available for TextFrame in LO. - Hence grabbaged this value. - Roundtripped rotation value by converting it properly for both dml and vml textbox. - Added UT for it. Change-Id: Ia040d55dc2ea79500df76877ba44a02971c872a8 Reviewed-on: https://gerrit.libreoffice.org/10190 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-07-16Try to fix compilation with pre-C++11 compilerTor Lillqvist
Change-Id: Ic014db043a08fc2b82c56e6a1f944c9403c441d0
2014-07-16bnc#862510: Improve handling of OOXML gradientsTor Lillqvist
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
2014-07-15fdo#80569:FILEOPEN:4.4 Regression .docx chart not rendered properlyHeena Gupta
Change-Id: Ic3304c1bd11fcd372a0859a70a531675effe7af0 Reviewed-on: https://gerrit.libreoffice.org/10322 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2014-07-15Do not prefer bandRow over firstCol/lastCol, nor the same with bandCol.Matúš Kukan
Change-Id: I0c573d721212c870e9ecc99ba5e8494073e09aaf
2014-07-15bnc#887225: OOXML import: Correctly apply table style for lastRow.Matúš Kukan
nMaxColumn and nMaxRow are indexes, so use size() - 1. Change-Id: I20055e55cf2464710fe553fb8067bad13a339084
2014-07-15DOCX FILEOPEN VML Shape (image) is lost on import fdo#81031Vinaya Mandke
ShapeContextHandler::getDrawingShapeContext mxDrawingShapeContext is set once and never reset. So in a file which has numPicBullets and vml shapes in document.xml there is a problem. First the fragment path is set as word/numbering.xml. But when msRelationFragmentPath changes to word/document.xml, mxDrawingShapeContext is not reset and hence the relationships are not resolved. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/10180 Change-Id: I4a1401103797972731257145430f2048b94a04bc
2014-07-14oh for the love of...Caolán McNamara
Change-Id: I5cb90f10112afda77e68035d89cb7026d6e32eec
2014-07-14Related: fdo#52226 ensure graphics are swapped in on DrawingML::WriteImageCaolán McNamara
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
2014-07-10coverity#1224995 Uncaught exceptionCaolán McNamara
and coverity#1224994 Uncaught exception Change-Id: I7f25e3829dbd1e5d68561ca9853ab8fc10c79484
2014-07-10coverity#1224997 Uncaught exceptionCaolán McNamara
and coverity#1224996 Uncaught exception Change-Id: I36ea602a93471d826859bef739c4165117cc4cd9
2014-07-09remove no longer needed http://sprm nonsenseMiklos Vajna
Change-Id: I2f8d473ab564c9849963d937690fc48bc04a17b9
2014-07-07bnc#881025: Mark axis a percent axis only when all data series are percent.Kohei Yoshida
Change-Id: I302cc1e5b164b2ce9999087293b034ec930951af
2014-07-07Adjust for the splitting of number format properties in chart.Kohei Yoshida
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
2014-07-07bnc#882383: Do not ignore themeOverride for charts in .pptxMatúš Kukan
Otherwise wrong colors are displayed. Change-Id: I5d7444100355fdbc5fcd2aaa1c01202ace54312d
2014-07-07bnc#882383: Add chart unit test for GradientName property.Matúš Kukan
It needs to be set, so that the chart has colors. It was grey before. The bug was fixed already in aacfd5038d05a02f8b1eade3a5896d3d7e959f3d, which got pushed sooner, so this commit only changes the property name from 'INVALID' to 'FillTransparenceGradientName'. Change-Id: If06899258a4307d583480538338480ba5bb830b9
2014-07-07fix crash loading ooo100546-1.xlsCaolán McNamara
regressions around inserted extra enum values into ShapePropertyId Change-Id: I06696c8cfe4acc3836723c31d5e714bd7d8439b3
2014-07-04don't inherit the style from the title, related bnc#880488Markus Mohrhard
It seems that inheriting the style from the title for the subtitle is just wrong. Change-Id: Icbedf3e934b13514e50a1354552e5d6a8d139095
2014-07-02bnc#812796: Correctly handle static value array for OOXML charts.Kohei Yoshida
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. Change-Id: If4bc1f650bb024dcd1b1b36537f457fb38404a78
2014-07-02bnc#812796: Don't create data series when the series has no values.Kohei Yoshida
Change-Id: I92e2d7a3fab0948aea0557cf3cb65d57d48f3f59
2014-06-30Use a new fast parser instance for each XML fragment.Kohei Yoshida
Otherwise a crash ensues when the threaded XML parsing kicks in. Change-Id: Ic41e5a29bbb860d7b63b70f2f0d8896264d9d53e
2014-06-27tweak assert so comment appears in abort messageCaolán McNamara
Change-Id: Ibf78e5cd1620f0b61cae030e3870be4a6f87e71d
2014-06-25Move more oox/drawingml/ internal headers to oox/inc.Matúš Kukan
Change-Id: I0963c92356f8388ce02fb36e172ad3b2af8ba8f8
2014-06-25remove whitespacesMarkus Mohrhard
Change-Id: Ie14ba3dcb97f20479a04538748ef2c1c9e6c5dac
2014-06-23Move oox/drawingml/table/ internal headers to oox/inc.Matúš Kukan
Change-Id: I9de33fdcd8b1ef73d57884033f502ac4a03f63d3
2014-06-22use the correct default value, fdo#78080Markus Mohrhard
Change-Id: I8b01bf22e8e3b98ef013b947f617905d558d3554
2014-06-20fdo#79591 Values for docPr name and shape ID attributes were set invalidDinesh Patil
Values set for docPr name and shape ID attributes in RT file were not valid as per UTF-8 encoding format and hence was showing RT document as corrupt with error message "invalid character". Calling add() function with current parameters is causing issue and setting invalid values so modified the second parameter which will set valid values to the specified parameters. Reviewed on: https://gerrit.libreoffice.org/9746 Change-Id: I3b48e53adbe5ed844235e596bb98eb396133845a
2014-06-19indentation fixesMiklos Vajna
Change-Id: Ia391ccc9889a135730f0fead11eb0b6c2f748ec4
2014-06-18oox: import WPS shape with text as shape with textboxMiklos Vajna
This allows having real shapes (like having rounded corners) and complex content (like containing a table) at the same time. WPS shapes are wrappers around drawingML markup in DOCX files, so this only affects the DOCX import. Change-Id: Iad1c1c61233be1c17efa1821e680927aa9587215
2014-06-18DocxSdrExport::writeDMLAndVMLDrawing: fix handling of inline VML shapesMiklos Vajna
In general Writer supports having objects inside a TextFrame, Word does not. It turns out that Word allows having certain shapes inside other shapes, as long as they are VML-only. So do that for now: if we receive a shape when we're already inside a shape, then just export it as VML, not the usual drawingml+VML pair. Also, blacklist one more VML shape type, where the shape text is already exported inside <v:textpath>, so no dedicated <v:textbox> is needed. Change-Id: I5786bd6827eae9756e7c179bb2ef5a5741a91878
2014-06-17DOCX filter: preserve AnchorId on shapes having a textboxMiklos Vajna
CppunitTest_sw_ooxmlsdrexport's testAnchorIdForWP14AndW14 would fail without this, when "shape with text" is imported as "shape with textbox". Change-Id: I8705aee16270aa68416f0c830c429880fc76d85d
2014-06-17These headers are private, also do not export symbols.Matúš Kukan
Change-Id: Ic63372285fecb6f1be22e92c36cdb6f94733f5c1
2014-06-17fdo#54361 - FILEOPEN: Chart background in XLSX is transparent instead of whiteHeena Gupta
Change-Id: I2b932c9f09a010a4f999707fb6299c392a89550a Reviewed-on: https://gerrit.libreoffice.org/9806 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2014-06-17drawingML export: recognize <a:prstDash val="dash"/>Miklos Vajna
We used to write out a custom dash definition all the time, even in case it was imported from a dash preset. Recognize at least "dash", and write that on export if the parameters match. Change-Id: Ifaaec51be9ecf1e7667a8c8f85fbd4fb9636a325
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17VML export: handle textbox textMiklos Vajna
Previously, we always exported the text of the shape itself. Bring the VML export in sync with the drawingML export, where we only do that if the shape doesn't have an associated textbox -- if that's the case, then export the textbox's text instead. CppunitTest_sw_ooxmlsdrexport's testFdo69636 is a reproducer for this problem, the VML assert failed because of the lack of this. Change-Id: Icb236579da4e3b74e983a95aa5675fed7862d1e1