summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2014-05-20fdo#78290 : The File gets corrupted when saved in LOBisal Singh Nayal
Problem Description: Docx file containing a chart (line chart / scatter chart)which has used a builtin marker'x' gets corrupted when we save it in LO.The reason was that while exporting LO was writing the marker information 'x' as 'X' which MS Word doesn't recognize.‒<c:marker><c:symbol val="X" />. Also the size of the marker was coming 1 less than the actual value. Ex: if size is 7 then it was being written as 6. Solution: During export I have made changes so that now LO writes 'x' in the tag information ‒<c:marker> <c:symbol val="x" />. Now the size of the marker is also being correctly exported. Change-Id: I26b747f9576625bf3acb941322ae418a0bbc6b64 Reviewed-on: https://gerrit.libreoffice.org/9273 Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-05-20fdo#78658 Corruption: lockedCanvas tag is missing from RT fileDinesh Patil
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 Arnhold
Change-Id: Iaf33c536c86a372aed2a719b6f87a8e03a5481ea
2014-05-19fdo78474:Corruption a:graphicData has no info for the image.Sourav
The original file contains two text boxes one contains image and the other contains chart. Image in text box is not getting imported in LO which leads to no contents inside the a:graphicData tag which is causing the corruption. Root cause is found in ShapeContextHandler::getShape. mxChartShapeContext.is() returns true even when mnStartToken is not set as NMSP_dmlChart which is causing the issue. I have added one more condition to handle this. Change-Id: I6c567d7618b34c1a24f6809801e4460af6894c67 Reviewed-on: https://gerrit.libreoffice.org/9363 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-16Use SVM (metafile) instead of PNG for diagrams (SmartArt)Tor Lillqvist
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 effects on picturesJacobo Aragunde Pérez
If a picture contains some 2D (glow, shadow...) or 3D effect (rotation, extrusion...), we prevent the importer from transforming it into a XTextContent so the XShape grab bag is not removed and the effects are preserved using the existing mechanisms. Added a unit test for this issue, and modified some existing unit tests to match the new behaviour. Change-Id: I3b87069ea208604383a592d34d0a4ceb6b0f9fc7
2014-05-16ooxml: Preserve shape effects when there's more than oneJacobo Aragunde Pérez
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érez
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-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5 Reviewed-on: https://gerrit.libreoffice.org/9360 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-14WaE: warning C4701: potentially uninitialized local variableThomas Arnhold
Change-Id: I00a4ebdcfc278274a567403bc1ccb5332ada836f
2014-05-14Find places where uno::Sequence is passed by value.Noel Grandin
Implement a clang plugin to find them, and clean up existing code to pass them by reference. Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8 Reviewed-on: https://gerrit.libreoffice.org/9351 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-13Work around another seeminly random mis-optimization by Apple's Clang with -OzTor Lillqvist
If it wasn't for the desperate need to minimize code size for LO-based iOS apps, I definitely wouldn't use -Oz in gb_COMPILERDEFAULTOPTFLAGS (in solenv/gbuild/platform/IOS_ARM_GCC.mk). Change-Id: Icb231b5f30b32afe1c0f3b43e5744bf0e41e96df
2014-05-13oox: Use references to prevent unnecessary object copiesJacobo Aragunde Pérez
Change-Id: I5113bc581a8ac98b97c6598a5355e050c7ad7860
2014-05-13ooxml: Preserve shape 3d effects: extrusion and contour colorsJacobo Aragunde Pérez
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érez
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-10coverity#1079343 Uninitialized pointer fieldCaolán McNamara
Change-Id: I05ec88144273c15181e9afa8f616b0ab11695f04
2014-05-10Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8Julien Nabet
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
2014-05-09ooxml: Preserve shape 3d effects: top and bottom bevelJacobo Aragunde Pérez
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érez
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érez
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 Vajna
Change-Id: Ia8b23df9a78385f9129d5cea1195a8ba210113d2
2014-05-06oox: prepare for importing a TextBox property on shapesMiklos Vajna
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érez
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érez
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érez
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 Vajna
Regression from commit f5ccbfdc561c68099872d1abe07ac72fcddedd35 (oox customshapepreset: switch to generated data -> code, 2014-04-17). Change-Id: I2106271e2f43e7936237628e47cd4e01ab34441c
2014-05-05oox: don't try to set Writer-specific properties on non-TextFrames...Miklos Vajna
... during DOCX import of shapes with text, so that we don't crash when the currently always active setServiceName("com.sun.star.text.TextFrame") call is not present. Change-Id: I5b005583ddcee81b9683e3b34e8f0a2e5faa4f95
2014-05-01auto is not a valid value for c:symbol's val attributeMarkus Mohrhard
Change-Id: Idbdab90e100cbd2de83a2255e2554b5024a2f927
2014-05-01early bail outMarkus Mohrhard
Change-Id: I342c49f968a921167c4da8b98e7e17e79b945491
2014-04-30handle brightness+contrast from msoffice (bnc#875713)Luboš Luňák
This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx. Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d
2014-04-30oox: Code protection against empty effectsJacobo Aragunde Pérez
This is an extra check against clumsy programmers like me to prevent generating incorrect documents. Change-Id: I22261e3b6123a9a44461683519e33224f08adb5a
2014-04-30ooxml: Preserve blur effect on shapes.Jacobo Aragunde Pérez
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érez
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érez
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érez
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-30oox: syntax fix: wrong indexJacobo Aragunde Pérez
Change-Id: I8b76da14c75050f60b0af10cdadda821484db4f1
2014-04-29coverity#1210175 Uninitialized scalar fieldCaolán McNamara
Change-Id: Id2c8432aba3268f7ffbe26c13e81025f2e047865
2014-04-29oox: generatePresetsCXX -> generatePresetsDataMiklos Vajna
As it no longer actually generates C++ code, but data. Change-Id: I9b05f139ca4ad2bcfdbbb4b954ed4e0f2a9bcd8b
2014-04-29oox: clean up customshapes README and data generatorMiklos Vajna
Change-Id: Ie7ef8cd247dedb2a6ea0a6de249cb05e9056f726
2014-04-29oox: remove now unused helper methods (generated code used them in the past)Miklos Vajna
Change-Id: I532dc4ec24c635b9889d77c37113a8ece2c9b88b
2014-04-28sal_Bool to bool in previous commitMarkus Mohrhard
Change-Id: I6de50ccd8b99d6d7dbd049fc184c3f6117217318
2014-04-28fdo77216-Charts-Scattered chart: Chart gets distorted on RTSourav
In case there is some text entered in place of X coordinates for scatter chart then x coordinates should be taken as 1,2,3.... MS Word does the same thing Change-Id: I1db0fd64c6ac0f4d5e77a9676812f5e26577ecf6 Reviewed-on: https://gerrit.libreoffice.org/9011 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-04-27Resolves: #i124703# adapt coordinate range from ms relative...Armin Le Grand
control points to our relative control points (cherry picked from commit 8625253da753153838554fef459ae603ca8d3ecc) Conflicts: oox/source/drawingml/customshapeproperties.cxx Change-Id: I356a44fdbdcc22630811467e706bcb60c41dbc2c
2014-04-24fdo#77089 pass shape dimensions to graphicfilter for WMFTomaž Vajngerl
Change-Id: I673a76ef85038b1f304ea85faeed5b4a462cb144
2014-04-23Monkey see, monkey do?Stephan Bergmann
At least, it makes CppunitTest_sw_ooxmlsdrexport succeed again. Change-Id: I05b9de5366b0e3d2007311d00991758b6d6f8dba
2014-04-23Fix start/endElement callsStephan Bergmann
Change-Id: I82525020d148de276ece44406180cc59e759d93f
2014-04-23ooxml: Preserve inner shadow effect on shapes.Jacobo Aragunde Pérez
Reused most of the code of outerShdw effect. Modified an existing unit test to add a check for innerShdw. Change-Id: Ifdd77850bfd3b5fa250594469455b1b66c338611
2014-04-23ooxml: Preserve outer shadow effect on shapes.Jacobo Aragunde Pérez
The goal is preserving the shadow effect with all its attributes using the shape grab bag. This is the relevant piece of XML in the document: <a:effectLst> <a:outerShdw blurRad="50800" dist="38100" dir="2700000" algn="tl" rotWithShape="0"> <a:schemeClr val="accent1"> <a:alpha val="40000" /> </a:schemeClr> </a:outerShdw> </a:effectLst> In first place, we added members to the structure EffectProperties to store the effect name and attributes. Later, when we create the shape, we add them to the shape grab bag together with the shadow color (if it is a theme color we store its name and transformations like in other cases). Finally, we read back all these data from the shape grab bag and write them back to the document. I added a unit test for this shape property. Change-Id: Idda2d5e2970cb8563e2ed13a84b2fa2d4b99aa70
2014-04-23sal_Bool -> boolJacobo Aragunde Pérez
Change-Id: I08f37f3bfe7d14e10fb4383eae3d3469df7e707e