summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
AgeCommit message (Collapse)AuthorFilesLines
2014-07-02bnc#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. Change-Id: If4bc1f650bb024dcd1b1b36537f457fb38404a78
2014-07-02bnc#812796: Don't create data series when the series has no values.Kohei Yoshida1-0/+4
Change-Id: I92e2d7a3fab0948aea0557cf3cb65d57d48f3f59
2014-06-25Move more oox/drawingml/ internal headers to oox/inc.Matúš Kukan30-69/+69
Change-Id: I0963c92356f8388ce02fb36e172ad3b2af8ba8f8
2014-06-25remove whitespacesMarkus Mohrhard70-581/+0
Change-Id: Ie14ba3dcb97f20479a04538748ef2c1c9e6c5dac
2014-06-23Move oox/drawingml/table/ internal headers to oox/inc.Matúš Kukan17-29/+30
Change-Id: I9de33fdcd8b1ef73d57884033f502ac4a03f63d3
2014-06-22use the correct default value, fdo#78080Markus Mohrhard2-3/+2
Change-Id: I8b01bf22e8e3b98ef013b947f617905d558d3554
2014-06-18oox: import WPS shape with text as shape with textboxMiklos Vajna1-2/+1
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-17These headers are private, also do not export symbols.Matúš Kukan7-7/+117
Change-Id: Ic63372285fecb6f1be22e92c36cdb6f94733f5c1
2014-06-17fdo#54361 - FILEOPEN: Chart background in XLSX is transparent instead of whiteHeena Gupta1-1/+0
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-17improve the inlinesimplememberfunctions clang pluginNoel Grandin3-12/+0
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-13DOCX import: implement linking for shapes having textboxesMiklos Vajna1-0/+16
Change-Id: I90deb68ab6a1029cf5df8170676638bf7e3cb469
2014-06-10Rewrite import and export of custom dashes in ooxml filter (fix)Adam Co2-6/+55
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ás2-28/+34
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-09loplugin: inlinesimplememberfunctionsNoel Grandin2-12/+0
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-07make sure all objects exist, related fdo#75692Markus Mohrhard1-1/+2
fdo75692-2.xlsx and fdo#75692-3.xlsx crash. Change-Id: I56353e7da1850a49e18d3a570641843600d34b1c
2014-06-06bnc#880763: PPTX import: wrong z-order becuause of wrong import orderZolnai Tamás1-2/+12
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-062nd part of bnc#870233: import font color from color fragment for SmartArtsZolnai Tamás2-41/+47
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ás1-0/+28
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-05-30bnc#870237: wrong text position in grouped listZolnai Tamás2-4/+23
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 Nabet1-1/+0
Change-Id: I171df68539fc41046b706157c04ab1e8cc1e60ca
2014-05-23WaE: passing class rtl::OUString by value, rather pass by referenceTor Lillqvist1-1/+1
Change-Id: I05aa9a5ad5d97a1ead3d30298f45e7aeb62d0652
2014-05-23ooxml: Do not repeat wdp files in artistic effectsJacobo Aragunde Pérez2-1/+10
When two pictures apply different effects to the same picture, it is only saved once in the original document. Added a cache to DrawingML to know if the picture has already been exported, and added a test for it. Change-Id: Ia25f3d8f2f46d61f18aefc22fdfdbcdc72f2d916
2014-05-23ooxml: Preserve the original picture in artistic effectsJacobo Aragunde Pérez2-3/+18
When Word applies an artistic effect, it creates two embedded files; one contains the bitmap with the effect and the other one contains the original bitmap to be able to undo the effect. This patch reads the original bitmap, stores it in the shape grab bag and saves it back to the docx file. Added unit tests too. TODO: right now, if two effects point to the same original bitmap it is stored twice, we should improve this. Change-Id: Ia72034a257739abe4ffafa0f42b2a912e4bf9436
2014-05-23ooxml: preserve artistic effects on shapes.Jacobo Aragunde Pérez3-0/+268
Bitmaps can define artistic effects like in the following example: <a:blip r:embed="rId5"> <a:extLst> <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"> <a14:imgProps xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main"> <a14:imgLayer r:embed="rId6"> <a14:imgEffect> <a14:artisticMarker trans="14000" size="80" /> </a14:imgEffect> </a14:imgLayer> </a14:imgProps> </a:ext> </a:extLst> </a:blip> LO core doesn't support them, but I'm preserving them using the shape grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject so the grab bag of the XShape is not discarded. Added several Context and Properties objects on the import side to traverse and save the relevant tags, and added the corresponding code on the export side to extract the grab bag and output the effect back. Also added a unit test for a selection of artistic effects. TODO: Word saves the original bitmap as an embedded wdp file so the effect can be undone. We must preserve it too and add the reference to the a14:imgLayer tag. Change-Id: I61d427f83e4c8f353eb073da0114cd73ba50ba4b
2014-05-23DOCX import: recurse into w:ins in groupshape textMiklos Vajna1-0/+7
Groupshape text is provided by editeng, redlining is available in Writer text only. But still, instead of ignoring both deletions and insertions in group shape text, we could at least show the latest version correctly, i.e. ignore deletions but import insertions. Change-Id: I12df2ca1a8d27f9496a8036e521f8820d7075053
2014-05-23DOCX import: detect inline shape inside shape textMiklos Vajna1-0/+2
Change-Id: Ia1614759558e73686fce137eb52fb623eae4a4e5
2014-05-23DOCX import: detect table in groupshapeMiklos Vajna1-0/+2
Change-Id: Iba7bb88139a97e919739363cd85f3e822062b694
2014-05-20fdo#78658 Corruption: lockedCanvas tag is missing from RT fileDinesh Patil1-0/+6
While export, locked Canvas is missing and drawing is exported inside textbox. However a locked Canvas has to be exported inside a text-box and drawing should fall under locked Canvas for the RT file to work in MS Office 2010. Reviewed on: https://gerrit.libreoffice.org/9377 Change-Id: Iea2c411302b552db18527001cc4c6d0290085afe
2014-05-19oox: remove using namespace from headersThomas Arnhold1-5/+3
Change-Id: Iaf33c536c86a372aed2a719b6f87a8e03a5481ea
2014-05-16Use SVM (metafile) instead of PNG for diagrams (SmartArt)Tor Lillqvist1-16/+10
It seemed a bit pointless to waste CPU cycles on PNG-compressing a bitmap image only to later then uncompress it anyway. vcl's PNG writing code showed up as 13% on the time profile of TiledLibreOffice when displaying a document full of SmartArts. Miklos suggested I try using SVM (which I guess means "StarView Metafile") instead. When using SVM, no rendering of diagrams to bitmaps during loading is done, but the diagram stays stored in a resolution-independent (vector-ish) form. Which means it will be rendered nicely and crisply regardless of the zoom level. At least, that is my understanding, and experimentation (on OS X and Linux) seems to confirm. ce8c0ff07559ddcc729bffd7a68f4c6f281882e3 Change-Id: Ice8c0ff07559ddcc729bffd7a68f4c6f281882e3
2014-05-16ooxml: Preserve shape effects when there's more than oneJacobo Aragunde Pérez3-100/+101
Transformed the preservation process of shape effects to be able to store more than one effect. For that we: * Created the Effect struct and added a vector member to the EffectProperties struct. * Changed the shadow effect to use the new Effect struct, EffectShadowProperties struct is preserved because the direction field still has some use but we should remove it. * Changed the structure of the grab bag to store more than one effect. * Modified an existing unit test to check shapes with several effects. Change-Id: I0dd908fa1d9578827c02ef6272fc9e2b914391be
2014-05-16oox: always save all kinds of 3d effects to the grab bag.Jacobo Aragunde Pérez1-1/+1
This was actually a bug. It didn't matter much because a document with an a:sp3d tag but without a:scene3d section would be invalid, but the code was logically wrong. Change-Id: Ifa838e425849642c2a1bf6fca6b6a8dc8ed3b465
2014-05-13ooxml: Preserve shape 3d effects: extrusion and contour colorsJacobo Aragunde Pérez3-3/+45
Shapes 3D effects can specify colors for extrusion and contours like in the following example: <a:sp3d extrusionH="25400" prstMaterial="metal"> <a:extrusionClr> <a:schemeClr val="accent5"> <a:lumMod val="40000"/> <a:lumOff val="60000"/> </a:schemeClr> </a:extrusionClr> <a:contourClr> <a:srgbClr val="3333FF"/> </a:contourClr> </a:sp3d> Colors can be theme-defined or set in RGB and can contain transformations. This patch preserves all the color information using the shape grab bag and modifies an existing unit test to add this check. Change-Id: Ida168affd4ca2135d0bd8f97135dc1cd1e74165a
2014-05-13ooxml: Preserve shape 3d effects: materialJacobo Aragunde Pérez2-1/+34
Shapes 3D effects can specify a material like in the following example: <a:sp3d prstMaterial="metal" z="488950" /> This patch preserves the prstMaterial attribute in the sp3d tag using the shape grab bag and modifies an existing unit test to add this check. Change-Id: I7be2dbbcc7e599d5f0fb8fa53ec1d180c18d8ebd
2014-05-09ooxml: Preserve shape 3d effects: top and bottom bevelJacobo Aragunde Pérez2-1/+86
Shapes 3D effects can specify top and bottom bevels like in the following example: <a:sp3d z="488950" extrusionH="63500" contourW="50800"> <a:bevelT w="139700" h="88900" prst="cross"/> <a:bevelB h="88900" prst="relaxedInset"/> </a:sp3d> This patch preserves the a:bevel* tags and their attributes using the shape grab bag and modifies an existing unit test to add this check. Change-Id: I4762111e4d2f75ba2fd3721a126aa324a28a853c
2014-05-09ooxml: Preserve shape 3d effects: z, contour and extrusionJacobo Aragunde Pérez4-2/+43
Shapes can contain 3D effects like in the following example: <a:sp3d z="488950" extrusionH="63500" contourW="50800"/> This patch preserves the a:sp3d tag and its attributes using the shape grab bag and modifies an existing unit test to add this check. Change-Id: Ice3cae39c71784be0f6c7f2700b07c21a5e1fb6e
2014-05-09oox: preserve scene3d/lightRig effects on shapes.Jacobo Aragunde Pérez3-4/+102
Shapes can contain 3D effects like in the following example: <a:scene3d> <a:camera prst="isometricLeftDown" zoom="150000"/> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="4800000"/> </a:lightRig> </a:scene3d> This patch preserves the a:lightRig tag, its attributes and the child element a:rot using the shape grab bag. It also adds a unit test for this case. Change-Id: I66b6de3c2b5ef89223b10da54006e28113b8ba5f
2014-05-06oox: unused CustomShapeProviderMiklos Vajna1-11/+0
Change-Id: Ia8b23df9a78385f9129d5cea1195a8ba210113d2
2014-05-06oox: prepare for importing a TextBox property on shapesMiklos Vajna1-0/+12
Writer's SwXShape doesn't have that property yet, though. Change-Id: I997eb188574fab93d35595972fdc2eaebabc015b
2014-05-06oox: preserve camera rotation on shape 3D effects.Jacobo Aragunde Pérez2-3/+41
Camera options in shape 3D effects can have rotation settings like in the following example: <a:camera prst="perspectiveRelaxedModerately" zoom="150000"> <a:rot lat="19490639" lon="0" rev="12900001"/> </a:camera> This patch preserves the a:rot tag and its attributes using the shape grab bag. We created the class Scene3DRotationPropertiesContext to be piled on top of a Scene3DPropertiesContext and process the contents of the child item. It also adds a unit test for this case. Change-Id: Id6bf58ad05fe5b49061619b6750ed0658badc9af
2014-05-06oox: preserve scene3d/camera effects on shapes.Jacobo Aragunde Pérez4-4/+109
Shapes can contain 3D effects like in the following example: <a:scene3d> <a:camera prst="isometricLeftDown" zoom="150000"/> <a:lightRig rig="threePt" dir="t"/> </a:scene3d> This patch preserves the a:camera tag and its attributes using the shape grab bag. It also adds a unit test for this case. Change-Id: Ic6a78031d2e1fb84a2bacd97b5cc9c55d9dbaa95
2014-05-06oox: Integrate Shape3DProperties and Scene3DPropertiesContextJacobo Aragunde Pérez3-116/+10
Code for these two classes was already present but it was commented out or left outside of the build system because it didn't even compile. I've brought it back and made it compile, but it has no use yet. The goal is using it to preserve 3D transformations. At scene3dcontext.cxx I removed the text chunks found in the middle of the source and corrected some mistakes; I also modified the conversion of "fov" attribute. At shape3dproperties.hxx I removed all the struct members because they seemed to have been copied&pasted from another file, and added only those members that made sense. Removed useless function definitions. Change-Id: I2c00ea638e1a4fb1a3820bc4c322488296d3e6d7
2014-05-06oox custom shape preset data: fix typo in parsing awt::SizeMiklos Vajna1-1/+1
Regression from commit f5ccbfdc561c68099872d1abe07ac72fcddedd35 (oox customshapepreset: switch to generated data -> code, 2014-04-17). Change-Id: I2106271e2f43e7936237628e47cd4e01ab34441c
2014-04-30handle brightness+contrast from msoffice (bnc#875713)Luboš Luňák1-3/+24
This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx. Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d
2014-04-30ooxml: Preserve blur effect on shapes.Jacobo Aragunde Pérez1-0/+6
Reused the code for other effects just adding the new attribute "grow". I didn't add a unit test for this effect because I found no way to apply it to an object in Word, but it's technically part of the standard. Change-Id: I391aff17f59d49d6bf339a71481dcdb51c537c9e
2014-04-30ooxml: Preserve reflection effect on shapes.Jacobo Aragunde Pérez1-1/+19
Reused most of the code of other effects, but adding some new attributes specific for this effect. Finally, modified an existing unit test to add a check for reflection. Change-Id: Iffd0c1203e9c66a8d7b7f748d98d9c3ef01c7bbf
2014-04-30ooxml: Preserve glow effect on shapes.Jacobo Aragunde Pérez1-1/+5
Reused most of the code of outerShdw and innerShdw effects. Modified an existing unit test to add a check for innerShdw. Change-Id: I7328fe696721d28c35b26ca1b702c7f64c63ab21
2014-04-30ooxml: Preserve soft edge effect on shapes.Jacobo Aragunde Pérez1-0/+10
Reused most of the code of outerShdw and innerShdw effects, but adding a new attribute "rad" and a flag to check if a color definition must be written inside the effect definition. Finally, modified an existing unit test to add a check for softEdge. Change-Id: I0d32714bde9a5b05c726acd47b85b1dea3c6a581
2014-04-29coverity#1210175 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: Id2c8432aba3268f7ffbe26c13e81025f2e047865
2014-04-29oox: generatePresetsCXX -> generatePresetsDataMiklos Vajna2-1/+1
As it no longer actually generates C++ code, but data. Change-Id: I9b05f139ca4ad2bcfdbbb4b954ed4e0f2a9bcd8b