Commit Graph

226 Commits

Author SHA1 Message Date
368374a67b correct include guard comment
Change-Id: Ie94573f7c43c834cd636493bed32f07aa792da49
2014-09-01 23:03:30 +02:00
fba7b58a9d fix typo Sufface->Surface
Change-Id: I90847d0edbc2c13e405562647b150012bc5df7e2
Reviewed-on: https://gerrit.libreoffice.org/11249
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-09-01 15:39:42 -05:00
f5aeaa3845 bnc#822173: Initial work on exporting pivot cache and pivot table to xlsx.
Still not perfect, but it somewhat does work.

Change-Id: Ic248e20f7ab18a37f56b2034f57551dded956bab
2014-08-28 21:37:08 -04:00
1558b50e4f remove whitespace
Change-Id: I5634bf40e8ccc4ce076409907c13f9c6f52d11a3
2014-08-20 08:17:40 +02:00
57dcc9f3e9 I forgot to check this in.
Change-Id: Icc32c336495a1d0a29b24b976dd5f359d03a0bba
2014-08-07 20:44:03 -04:00
cc6ae36728 bnc#821916: Better algorithm to find placeholder shape.
Placeholder type seems to be more relevant than index.

Change-Id: I9d6c6cad8e0a51b2385801f65d7d1c697ad7998e
2014-08-07 21:05:07 +02:00
63cb2c8653 writerfilter: switch to the oox FastTokenHandler
Possibly they did something different in the past, but currently they do
the same. This commit just switches the handler, the newly unused code
will be removed in a later commit.

Change-Id: Ic5bade876c264e025543728916d9bcd871e32b9b
2014-08-06 18:53:37 +02:00
bb13f1a063 Avoid exporting label placement property when the chart is 3D.
MS Office has trouble loading the file if you do.  There is an exception,
however.  A pie chart allows label placement option even when 3D.  There
may be other chart types that allow variable label placement when 3D.

Change-Id: I6a9247041ca6ee3ae1b9c245f5919fcb35951f24
2014-08-05 13:26:29 -04:00
4a8f243171 bnc#886540: Default chart background for pptx docs should be transparent.
Charts in docx and xlsx OTOH use solid white as the default fill style.

Change-Id: Ic4351fe65cabc12d60214b67c7026a317841f2c7
2014-08-04 12:25:56 -04:00
48f31a9242 bnc#885825: OOXML import and export of data label borders. 2014-07-26 16:26:08 -04:00
77d6ac27e1 WaE: passing class rtl::OUString by value, rather pass by reference
Change-Id: Ib332d04fa27501ec35267b5e389c2979c9c55be2
2014-07-21 19:20:27 +03:00
acd2c90978 fdo#80897: Preservation of text warp properties.
- Generic fix for all warp properties

Change-Id: I77c37759aa49706fc3cd1a80770a85face53f0a2
2014-07-21 16:29:06 +02:00
24b6add377 coverity#1202900 Uncaught exception
Change-Id: I9e49abc490935710b471c79d19385bda37f038b0
2014-07-18 15:36:16 +01:00
1bdd6d2129 fdo#80894 : Rotation value for textframe was missing after RT.
- 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-17 07:54:35 +00:00
e3bd5018dc coverity#1224995 Uncaught exception
and

coverity#1224994 Uncaught exception

Change-Id: I7f25e3829dbd1e5d68561ca9853ab8fc10c79484
2014-07-10 17:12:17 +01:00
3beb45c9a1 coverity#1224997 Uncaught exception
and

coverity#1224996 Uncaught exception

Change-Id: I36ea602a93471d826859bef739c4165117cc4cd9
2014-07-10 15:37:40 +01:00
08818d8a45 bnc#882383: Do not ignore themeOverride for charts in .pptx
Otherwise wrong colors are displayed.

Change-Id: I5d7444100355fdbc5fcd2aaa1c01202ace54312d
2014-07-07 17:49:09 +02:00
aacfd5038d fix crash loading ooo100546-1.xls
regressions around inserted extra enum values
into ShapePropertyId

Change-Id: I06696c8cfe4acc3836723c31d5e714bd7d8439b3
2014-07-07 11:44:29 +01:00
6c4e21a234 bnc#812796: Correctly handle static value array for OOXML charts.
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-02 20:56:31 -04:00
8802f837dd Typos
Change-Id: I7c3f115520d8c6a1fba997aeedddf96c01780e7e
2014-07-01 21:41:56 +02:00
69ea62a069 coverity#703975 Unchecked return value
Change-Id: Icef20c193a64b7de410e21124edaa4d0699d8a66
2014-07-01 12:44:05 +02:00
2e04936721 Move more oox/drawingml/ internal headers to oox/inc.
Change-Id: I0963c92356f8388ce02fb36e172ad3b2af8ba8f8
2014-06-25 09:45:26 +02:00
e787a84c69 Move oox/drawingml/table/ internal headers to oox/inc.
Change-Id: I9de33fdcd8b1ef73d57884033f502ac4a03f63d3
2014-06-23 10:47:35 +02:00
503facc9c4 These headers are private, also do not export symbols.
Change-Id: Ic63372285fecb6f1be22e92c36cdb6f94733f5c1
2014-06-17 17:05:30 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
6b5c0a5cb2 VML export: handle textbox text
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-17 01:16:20 +02:00
2211a67cc5 Rewrite import and export of custom dashes in ooxml filter (fix)
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-10 17:22:40 +00:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
f0fdee8abf oox: replace redundant STATIC_ARRAY_SIZE macro with SAL_N_ELEMENTS
Change-Id: I8cf274902bb5fda9fa70ab2af9e399db82d85d1d
2014-06-07 18:06:03 +02:00
c2034f3993 fixincludeguards: fix include guards
Change-Id: Ie6e8d4272b0b1d0d2ce93bcbc2e818a9eac1a56b
Reviewed-on: https://gerrit.libreoffice.org/9629
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-06 19:16:40 +00:00
46d682eec9 bnc#880763: PPTX import: wrong z-order becuause of wrong import order
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-06 16:50:04 +02:00
8c677716c4 DOCX drawingML export: if shape has textbox, export its contents as shape text
Change-Id: I54a51189e1c595841b8b02f3b4436da4a29f1dac
2014-06-06 14:24:26 +02:00
639571d52b 2nd part of bnc#870233: import font color from color fragment for SmartArts
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-06 10:28:18 +02:00
31650d5b42 1th part of bnc#870233: wrong list style in shapes
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-06 10:28:18 +02:00
6b44b03c13 coverity#737244 Uncaught exception
Change-Id: I9e34e14d1266310458bb491259e4bf9880e8a19f
2014-06-04 09:38:12 +01:00
ae6b606f57 coverity#737243 Uncaught exception
Change-Id: I4bef14453d076f11066a695bc4a948cea5cfd40b
2014-06-04 09:38:12 +01:00
53c376d35b bnc#870237: wrong text position in grouped list
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-30 13:45:36 +02:00
38d7b82c27 OleObjectInfo is used from the scfilt library so must be public
Change-Id: Ib80278e52640b0c132bcc5b303d277a4e7ae2024
2014-05-23 12:17:50 +03:00
cf287f4e3f WaE: passing class rtl::OUString by value, rather pass by reference
Change-Id: I05aa9a5ad5d97a1ead3d30298f45e7aeb62d0652
2014-05-23 11:47:51 +03:00
b5f6a5cfc5 ooxml: Do not repeat wdp files in artistic effects
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-23 10:04:00 +02:00
2e68a1468c ooxml: Preserve the original picture in artistic effects
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-23 10:04:00 +02:00
642a252cf1 ooxml: preserve artistic effects on shapes.
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-23 10:03:59 +02:00
be415a0f9a ooxml: Preserve shape effects when there's more than one
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-16 14:11:22 +02:00
248145f99e Find places where uno::Sequence is passed by value.
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-14 08:10:22 +00:00
fe88fac28a oox: Use references to prevent unnecessary object copies
Change-Id: I5113bc581a8ac98b97c6598a5355e050c7ad7860
2014-05-13 10:28:55 +02:00
4b4f7e17ad ooxml: Preserve shape 3d effects: extrusion and contour colors
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-13 10:28:55 +02:00
e8679367c9 ooxml: Preserve shape 3d effects: material
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-13 10:28:54 +02:00
92da838efc coverity#1079343 Uninitialized pointer field
Change-Id: I05ec88144273c15181e9afa8f616b0ab11695f04
2014-05-10 21:13:02 +01:00
f6422b3dfc ooxml: Preserve shape 3d effects: top and bottom bevel
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-09 14:11:38 +02:00
6566c218af ooxml: Preserve shape 3d effects: z, contour and extrusion
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-09 14:10:46 +02:00