summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
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
2014-06-17oox: drawingML import/export of <wps:bodyPr vert="vert270"> for textboxesMiklos Vajna
As in, for shapes which have textboxes. CppunitTest_sw_ooxmlsdrexport's testFdo69636 is a reproducer for this problem. Change-Id: I6575d21b0802ada7f334ca9fbbea796605708ddd
2014-06-13DOCX import: implement linking for shapes having textboxesMiklos Vajna
Change-Id: I90deb68ab6a1029cf5df8170676638bf7e3cb469
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: I1d428ccd434b7b6f61461ea29447291759c3a7bf
2014-06-12coverity#735762 Unchecked dynamic_castCaolán McNamara
Change-Id: If5ce403d9a216847532d5a2898e95c9bbde71570
2014-06-12coverity#735763 Unchecked dynamic_castCaolán McNamara
Change-Id: I4b8a0ebc846ee91530d28821643b3d2f98c0d4f2
2014-06-11DOCX drawingML filter: handle TextAutoGrowHeight for shapes having textboxesMiklos Vajna
Change-Id: I0cdc7edf851915f7fbc772eb42edd6ec08b09025
2014-06-10Rewrite import and export of custom dashes in ooxml filter (fix)Adam Co
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. Change-Id: I6bd74df26951974f85173227c832386c70034afb Reviewed-on: https://gerrit.libreoffice.org/9681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-10Related bnc#862510: extend handling of txXfrmZolnai Tamás
We don't actually need to check mbAnchorCtr to change text spacing. This txXfrm workaround works only with rectangles, because other shapes' text area can be smaller then the shape size. So add some condition to avoid using it for other shapes. Plus fix typos cause regression introduced in: 53c376d35b7223d53e8c9403390afe53d1f69089 Change-Id: I87917b8e0b2bb97ae1bba773e7dda7f81682736f
2014-06-10DOCX drawingML export of textboxes: write <wps:bodyPr> in ooxMiklos Vajna
It's possible to write this tag in oox (so it represents the properties of the shape) or in sw (so it represents the properties of the shape's textbox). Do the previous, as the textbox is really just a container in this use case, nothing more. If we are at it, also fix the default value of <wps:bodyPr>'s l/r/t/bIns attributes. Change-Id: I0571b9d8ea7dc0acd5c61f3e28e18400d305eab3
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-07oox: replace redundant STATIC_ARRAY_SIZE macro with SAL_N_ELEMENTSMiklos Vajna
Change-Id: I8cf274902bb5fda9fa70ab2af9e399db82d85d1d
2014-06-07make sure all objects exist, related fdo#75692Markus Mohrhard
fdo75692-2.xlsx and fdo#75692-3.xlsx crash. Change-Id: I56353e7da1850a49e18d3a570641843600d34b1c
2014-06-06oox: support non-TextFrame shapes in WpsContext::onCreateContextMiklos Vajna
Change-Id: I692fa22132cd3a722b58de22e3dbb759ff888e5d
2014-06-06bnc#880763: PPTX import: wrong z-order becuause of wrong import orderZolnai Tamás
importExtDrawings() must be called as soon as possible, before parser starts to parse the next shape. Call it when graphicFrame tag is closed. This tag include the reference to the SmartArt. Plus fix up import tests. Change-Id: I9e8d54c2b1afeb78a1122390dc4982d580c152ae
2014-06-06DOCX drawingML export: if shape has textbox, export its contents as shape textMiklos Vajna
Change-Id: I54a51189e1c595841b8b02f3b4436da4a29f1dac
2014-06-062nd part of bnc#870233: import font color from color fragment for SmartArtsZolnai Tamás
SmartArt import ignores some fragments during import if drawing fragment exists, which seems to be not complete. In this case font style is blank (white) in data (and drawing) fragment and the real value is defined in the ignored color fragment. So first make color fragment parsing work, then apply font color of "node0" style on nodes of the SmartArt. Actually, it's a workaround, because "node0" style label is hardcoded, for a proper solution layout fragment should be parsed too to get the right style label, but it interferes with the drawing fragment by now. Change-Id: I7db89176a07eee928563d42d3896fbd02190dfa8
2014-06-061th part of bnc#870233: wrong list style in shapesZolnai Tamás
Text list styles were copied, without proper copy constructor and operator. It lad to mix up list styles and so text font. Change-Id: Iee7a6c0c1f74322fd7b80e41a262849f948e463a
2014-06-06fdo#79256 Line Style with Long Dashes and dots is getting corrupt after RTDinesh Patil
Description: In RT file the dash length (d) is going out of range, as after RT the dashing scheme changes to custom dash which was causing the corruption. Changed code at export, which will divide the DashLen, DotLen and Distance by base line width. Reviewed on: https://gerrit.libreoffice.org/9559 Change-Id: I0e644b5a2b692a9e717026a14d1f0058199f53b1
2014-06-04oox: handle textboxes in ShapeContextHandler::endFastElement()Miklos Vajna
DOCX shape import normally works by oox creating the shape, then writerfilter handling the shape text. For drawingML shapes, having shape text, this a bit more complicated, as there are shape properties after the shape text as well. ShapeContextHandler::endFastElement() assumed that shape text is only possible on css.text.TextFrame shapes: also handle shapes having a TextBox as well. sw/qa/extras/ooxmlimport/data/mce-nested.docx is a reproducer for this problem (group shape missing), when TextBoxes are enabled by default in oox. Change-Id: I7a412b31965cf363da0b0c7fcc732741f2037542
2014-06-04Be more sensible about checking buffers of VML points we write.Michael Meeks
Change-Id: Id3811dbe0cf2510ef6a851804b3886c14eca01b6
2014-06-04coverity#737244 Uncaught exceptionCaolán McNamara
Change-Id: I9e34e14d1266310458bb491259e4bf9880e8a19f
2014-06-04coverity#737243 Uncaught exceptionCaolán McNamara
Change-Id: I4bef14453d076f11066a695bc4a948cea5cfd40b
2014-05-30bnc#870237: wrong text position in grouped listZolnai Tamás
In grouped list text area does not cover the whole shape but just a part of it at the top. To get the same visual effect modify text distance attribute. Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060
2014-05-29cppcheck: consecutive return/break/...Julien Nabet
Change-Id: I171df68539fc41046b706157c04ab1e8cc1e60ca
2014-05-28oox: detect <wpg:graphicFrame> inside <wpg:wgp>Miklos Vajna
Change-Id: Ifdbf7d69ecee226e551bc9c65de6c3a53acef53b
2014-05-28update_pchThomas Arnhold
Change-Id: I5316693452427ed76a7738b090de023b110caa40
2014-05-27Remove unnecessary semicolonsPeter Senna Tschudin
A simplified version of the semantic match that finds this problem is follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e Reviewed-on: https://gerrit.libreoffice.org/9493 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-24Resolves: fdo#79137 Crash in oox::vml::InputStream::updateBufferJulien Nabet
bt shows: Program received signal SIGSEGV, Segmentation fault. 0x00002aaadba213fb in oox::vml::InputStream::updateBuffer (this=0x8d7fd80) at /home/julien/compile-libreoffice/libreoffice/oox/source/vml/vmlinputstream.cxx:339 339 while( (mnBufferPos >= maBuffer.getLength()) && !mxTextStrm->isEOF() ) (gdb) bt 0x00002aaadba213fb in oox::vml::InputStream::updateBuffer (this=0x8d7fd80) at /home/julien/compile-libreoffice/libreoffice/oox/source/vml/vmlinputstream.cxx:339 0x00002aaadba21048 in oox::vml::InputStream::available (this=0x8d7fd80) at /home/julien/compile-libreoffice/libreoffice/oox/source/vml/vmlinputstream.cxx:326 0x00002aaacf5a0249 in sax_fastparser::FastSaxParserImpl::parseStream (this=0x89aea30, maStructSource=...) at /home/julien/compile-libreoffice/libreoffice/sax/source/fastparser/fastparser.cxx:810 Indeed, mxTextStrm is invalid, so let's test its validity in InputStream constructor Change-Id: Ifed79603e33b64d11eb07656df17824b7f98058f
2014-05-23Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20Julien Nabet
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23coverity#1213283 Resource leakCaolán McNamara
Change-Id: I5002f3e935edcc9f09603a5b535e2b339ebed402
2014-05-23coverity#1215289 Resource leakCaolán McNamara
Change-Id: Ie4a0334ddb393726d982e9f4e51a45e391a1b1f0
2014-05-23coverity#1215290 Resource leakCaolán McNamara
Change-Id: Ia49f4e99e6663ea95dc85d4dd09e161413a2f419
2014-05-23coverity#1215291 Resource leakCaolán McNamara
Change-Id: Ia62459945cd45f493754a1412b74242d3994f7f0
2014-05-23coverity#1215292 Resource leakCaolán McNamara
Change-Id: Ibabd73d06135a3ee500ce9d52fef42caa3ad7f35
2014-05-23coverity#1215293 Resource leakCaolán McNamara
Change-Id: I4a74eb76e5fcda915e5d12257fedf3ee84b62baa
2014-05-23coverity#1215294 Resource leakCaolán McNamara
Change-Id: I6fc18afd6189060de6943b003dea933713e19773