3587 Commits

Author SHA1 Message Date
Mike Kaganski
ce17ebb695 tdf#104310: Accept x12ac lists and fallbacks in dataValidations
Change-Id: I42cf20fcfe3ec03ebd09923be509a9d11e0b40da
Reviewed-on: https://gerrit.libreoffice.org/31516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-12-02 02:54:46 +00:00
Muthu Subramanian
3770a6a3f3 tdf#103477 buClrTx => use text color instead
Change-Id: I82d9231d2d0ea95cadc803f9a8dab9c23b88a677
Reviewed-on: https://gerrit.libreoffice.org/30403
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-12-01 07:40:11 +00:00
Markus Mohrhard
ff22a22286 better varyColors export for charts, related tdf#103943
Change-Id: I4280e708c854c687b6281c56d5bccdb514afd81e
Reviewed-on: https://gerrit.libreoffice.org/31252
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-30 22:33:51 +00:00
Stephan Bergmann
40e1595de7 Rewrite some (trivial) assignments inside if/while conditions: oox
Change-Id: I75de45677603800baec18d03114418181c4393c2
2016-11-29 17:19:53 +01:00
Miklos Vajna
a5cc8993dc tdf#104115 DOCX export: ClosedBezierShape should always result in <a:custGeom>
Regression from commit 6b084f0001fc15112bf3c40d20a0c7096c83b7fe (asan:
global-buffer-overflow on fdo55736-1.docx, 2015-01-08), the problem as
seen by the user was that our VML->DML conversion in a DOCX file
resulted in output that wasn't accepted by Word anymore.

Now that commit itself is fine, but as a side effect, the somewhat
unusual (bezier with no actual polypolygons) child shape of the group
shape is now written, but not in a way that conforms to the drawingML
schema.

Fix that pre-existing, but now visible problem by always writing
<a:custGeom> in the DOCX case.

Change-Id: Idbcb903dda07b5c2408d2b0ebbf4b5e4a08b20ed
Reviewed-on: https://gerrit.libreoffice.org/31347
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-11-29 10:52:30 +00:00
Tamás Zolnai
7c5aaa254f tdf#104201: PPTX: Group solid fill is not imported
Change-Id: Iec273714108598d7017e73a9e7d384f8410d6ee1
Reviewed-on: https://gerrit.libreoffice.org/31263
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-27 15:24:35 +00:00
Stephan Bergmann
1800862c70 loplugin:stringconstant: look into 'char const * const var = "..."'
Change-Id: I52a97b8ec273509131c2200e47527221cb62d7ee
2016-11-25 16:42:23 +01:00
Mark Hung
b6f52c5c6b tdf#96052 - export the forbidden shape as path instead of preset shape.
OOXML noSmoking shape has different definition so that convert LO's
forbidden shape to OOXML noSmoking do not produce good result.
I put it on whitelist and now the geometry looks correct although handle
is lost.

This partially revert unit test for the shape in
2b4f9d0b2b0006fc7bebb9e696a32eabd1aeb993, where forbidden is exported as
a preset shape.

Change-Id: I2e134940fa4a36e6b7b814b008d859691fbcdd6a
Reviewed-on: https://gerrit.libreoffice.org/31110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-25 00:30:04 +00:00
Stephan Bergmann
5645c15d3d loplugin:unnecessaryoverride (dtors) in oox
Change-Id: I55b82f4669d89e8492b456ff8b0b430f444674a3
2016-11-23 23:11:01 +01:00
Mark Hung
9e3c0bbe0c oox: update README for recent change.
Change-Id: I0c50ec67b7d71c9a59f5a522f19ec40a4b21090b
Reviewed-on: https://gerrit.libreoffice.org/31008
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-23 09:25:14 +00:00
Mark Hung
e0a0b6e829 tdf59046 oox: fix incorrectly combined shapes
1. Store the path of all polygons of a PolyPolygon in
   the same path element so it subtract overlapped area.
2. Set the size of the path as the bounding box of
   PolyPolygon so the points of the polygon scale and
   offset properly.

Change-Id: If6e21d1ac0544b45ef68073cf14bcc08c1d7dbef
Reviewed-on: https://gerrit.libreoffice.org/30982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-20 12:13:59 +00:00
Mark Hung
afc37372c1 tdf#92076 oox - export PolyPolygonShape and PolyLineShape.
1. Export PolyPolygonShape and PolyLineShape.
2. Rename WriteBezierShape to WritePolyPolygonShape because
ClosedBezierShape, OpenBezierShape, PolyPolygonShape,and
PolyLineShape share the function and all use
EscherPropertyContainer::GetPolyPolygon to get PolyPolygon
structure and use WritePolyPolygon to write xml tags.

Change-Id: I9ffdc26cf1f6fe8ea3b91b7b218d67f9e5585617
Reviewed-on: https://gerrit.libreoffice.org/30972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-19 17:27:18 +00:00
Tamás Zolnai
8d613870b2 tdf#104015: PPTX import: Title shape does not inherit fill properties
...from slide master.
The problem caused by that PPTX files contains not a
one-level master slide set, but has two levels: one
called slide master, other called slide layout.
Slide layout inherit properties from slide master and
normal slide inherit propetries from slide layout.
Bug appeared because, slide layout inherited properties
were not forwarded to the normal slide.

Change-Id: I587582498cf4315087f9a576c1b7fc41ee23e2fd
Reviewed-on: https://gerrit.libreoffice.org/30969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-18 22:42:12 +00:00
Tamás Zolnai
5c7f3e4a71 tdf#103876: PPTX import: Title shape's character properties are wrong
Text properties are applied on a shape during text insertion,
but if a placeholder shape has no text, then it has a placehodler
text which should have the right text properties.

Change-Id: I54175d52dd25915ee4d7153298e01ec07c6be1f6
Reviewed-on: https://gerrit.libreoffice.org/30881
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-17 18:01:13 +00:00
Jean-Tiare Le Bigot
9a86bf76fe chartx: (regression) fix crash on label import
The sparse chart import moved from assuming that the number of elements
in the list parsed from ooxml is the same as the real number of
elements. For this, the patch relies on a new member that was not always
initialized. This patch fixes a missing initialization. According to
'grep' this should be the last one.

Change-Id: I31d8a653f227100436360deef4a53c9418de9d93
Reviewed-on: https://gerrit.libreoffice.org/30838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-14 16:28:51 +00:00
Miklos Vajna
90a77e9c13 oox, xmlsecurity: fix recently introduced style problems
These files had a consistent style previously, keep them that way.

Change-Id: I6347efd4a301ddd758f4661778c0dfb68585940d
2016-11-14 09:25:28 +01:00
David Tardon
3838475c2f drop extra semicolons
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-13 19:13:36 +01:00
Mark Hung
a241009fea tdf#100733 oox: update preset shape definition for polar handles.
RefR and RefAngle of polar handles of custom shapes can be handled
now. Their values in oox-drawingml-cs-presets and the loader of
preset shapes are updated accordingly.

Change-Id: Icacb19fbd1f4c202950b0a19afce01ad1cafc82a
Reviewed-on: https://gerrit.libreoffice.org/30602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-12 03:18:47 +00:00
Mark Hung
4c742c4726 tdf#100733 oox: imports RefR and RefAngle of polar handles.
RefR and RefAngle was ignored when importing polar
handles for customshapes.

Change-Id: I2d2aa1b0e54cf4946417c6dc81ecdbe58f6b50e9
Reviewed-on: https://gerrit.libreoffice.org/30601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-12 03:18:12 +00:00
Tamás Zolnai
dc024cdd91 tdf#103792: No placeholder text imported for empty title shape
Change-Id: I95b4358f0d4311e8f427c8de18863049fb718d9b
Reviewed-on: https://gerrit.libreoffice.org/30731
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-10 17:50:04 +00:00
Caolán McNamara
e21ef810e1 crashtesting: unexpected exception on novell403458-1.pptx
since

commit 4bcf1872bbe9db1388769485a7e4c0cbcce3d53c
Date:   Thu Oct 13 23:43:41 2016 +0200

    chartx: fix sparse chart import

because

- Matrix< Any > aMatrix( rDataSeq.maData.size(), 1 );
+ Matrix< Any > aMatrix( rDataSeq.mnPointCount, 1 );

where rDataSeq.mnPointCount is -1

Change-Id: I4bb4805dd81a342d4c0ce24e3240154daf53b452
2016-11-09 09:36:19 +00:00
Noel Grandin
dca61b588a loplugin:expandablemethods in lotuswordpro..package
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102
Reviewed-on: https://gerrit.libreoffice.org/30682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 09:21:06 +00:00
Noel Grandin
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
Caolán McNamara
e6157763e9 google docs can generate a pptx with an empty cmLst
Change-Id: I2a3dcae5361929c6880b2da1b3107cb2c8141f32
2016-11-07 17:07:49 +00:00
Mark Hung
f2bccf3685 oox: exporting the block arc as its corresponding drawingml preset shape.
block arcs were exported as paths, stretching it to the whole
viewport. Exporting it as a preset shape to prevents distortion.

Change-Id: I68bac6ee273d89c0a4333d4d6a4816c6a7f802a0
Reviewed-on: https://gerrit.libreoffice.org/29679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-11-07 12:19:47 +00:00
Jean-Tiare Le Bigot
4bcf1872bb chartx: fix sparse chart import
Change-Id: I1bcd2257da900c6a88bc78040fabe5696e2bab7d
Reviewed-on: https://gerrit.libreoffice.org/29801
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-06 06:02:27 +00:00
Noel Grandin
a7369d9899 loplugin:oncevar in helpcompiler..reportdesign
Change-Id: I2dc57931fb230953c285aeb18f57c0a41fedafcb
Reviewed-on: https://gerrit.libreoffice.org/30463
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 07:12:46 +00:00
Stephan Bergmann
9799fe3dbb Nonsensical OUString null check
...ever since acd2c90978052723475a41144dd5d92090fbf6b4 "fdo#80897: Preservation
of text warp properties."  (That happened to redundantly check for non-empty
presetWarp, too.)

Change-Id: I6162f7cb5c82b7950eb3742c61bc3297e9c6fa1b
2016-10-31 13:22:05 +01:00
Justin Luth
b41e7b817e tdf#63846 assign macros after VBA project fully loaded.
fixes regression caused by d4743045a0b320449d07a957463a76bb8b13f939.

see the documentation for VbaMacroAttacherBase, which indicates that
the macros are to be attached after all objects are finished loading.

Made attachMacros() public so it could be called separately since so
many things are inter-dependent in the logic flow.

Change-Id: I11f7f4a1a75d6f77a97e12e3359d6ea8a995f518
Reviewed-on: https://gerrit.libreoffice.org/30337
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-28 16:12:27 +00:00
Noel Grandin
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
Tamás Zolnai
f7c61b08d5 tdf#103389: Resaving a DOCX document with two canvases leads to a broken file.
Make custom shape export more robust. In case of the test
document, WriteCustomGeometry is called, but this call
does not export anything, and so we get a shape without
any geometry in the DOCX file, which causes problem to MS Word.

Change-Id: Ie7a4e2b8a18bfddaeeb81425ae5f1de04140d43f
Reviewed-on: https://gerrit.libreoffice.org/30241
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-10-25 00:37:25 +00:00
Noel Grandin
f3fab399da loplugin:expandablemethodds in include/oox
Change-Id: I06b82e8b927d24204e5a952474a2dfd780b3cae6
2016-10-21 13:23:02 +02:00
Caolán McNamara
fc514cbf30 move some useful header information to mscodec for reuse
Change-Id: Ic7adf3ed3c8279cc93a06975d6fb337210d1af87
2016-10-21 11:16:11 +01:00
Caolán McNamara
fcc846e8f2 hash len isn't going to change depending on who implements it
Change-Id: Iee585cba4acad74c11d083085153e2af96c8894f
2016-10-21 11:16:11 +01:00
Caolán McNamara
8db1b13e72 clarify hash lengths a bit more
Change-Id: I66cea4b9efb82d29e6c052ac11a6f2eaca823ce0
2016-10-20 14:00:01 +01:00
Caolán McNamara
491884350c hash len is 20 for xls cryptoapi configuration
Change-Id: I6e06b8578959b8147043179db57e875b1d98d57d
2016-10-20 13:41:03 +01:00
Jochen Nitschke
d9e335ea6f fix wrong usages of setProperty vs setAnyProperty...
and remove some useless casts.

setAnyProperty takes an Any for property value.
setProperty takes any value and creates an Any.

Change-Id: Ida0a80bd679775c08925309bfbc695630af2225f
Reviewed-on: https://gerrit.libreoffice.org/29917
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-17 15:38:28 +00:00
Bartosz Kosiorek
7d5d5e6e9b tdf#103143 Fix importing number of characters from docx files
Change-Id: I45429626f7299f84fda2969dd6000c8aa8d23982
Reviewed-on: https://gerrit.libreoffice.org/29721
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-10-13 19:03:33 +00:00
Noel Grandin
62223f9a8a loplugin:unnecessaryoverride
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae
Reviewed-on: https://gerrit.libreoffice.org/29656
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 06:47:44 +00:00
lbenes
ade43e6a86 tdf#102997 Fix Error in OOXML Transparency Conversion Math
This fixes the import logic for tdf#100830 to handle transparencies other than 50%.

Change-Id: If4e2e369a9674488878bb0a4378d48292ea4e0cb
Reviewed-on: https://gerrit.libreoffice.org/29581
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-10-07 07:07:19 +00:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Miklos Vajna
ecfcee8b05 tdf#100830 drawingML import: handle <a:alphaModFix>
Fill transparency on the UI. Regression from commit
57450afb768c085df0ba2344aa94b5f843060178 (DOCX import: declare wps as a
supported feature, 2013-12-03), as the VML import handled this.

Change-Id: I654b51d51448d25d400979a4a62189b86126ac01
Reviewed-on: https://gerrit.libreoffice.org/29517
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-04 09:45:04 +00:00
Markus Mohrhard
74b2cc6074 tdf#96161, always write the varyColors element
The default value changed between MSO 2007 and 2010 so we need to always write the value.

Change-Id: I563eafa84baa3df656c83d657ebbb4c381c09957
Reviewed-on: https://gerrit.libreoffice.org/29420
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-01 02:18:18 +00:00
Noel Grandin
4d87443bf5 loplugin:constantparam
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c
Reviewed-on: https://gerrit.libreoffice.org/29321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30 06:57:26 +00:00
Miklos Vajna
0b136fccf8 oox: use '= default' to define a trivial destructor
Change-Id: I67f368c84dee85102c63bb4e3f811454a03c9560
Reviewed-on: https://gerrit.libreoffice.org/29348
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-09-28 10:18:44 +00:00
Markus Mohrhard
d09bfe6bf1 tdf#96662, only use the crossBetween="midCat" for line and scatter chart
Change-Id: Id2be263daf2c5a9f2d69ed50b79ac029143f02ca
Reviewed-on: https://gerrit.libreoffice.org/29080
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-09-20 13:30:04 +00:00
Noel Grandin
e592877844 loplugin:unusedenumvalues
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b
Reviewed-on: https://gerrit.libreoffice.org/28942
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-18 11:02:45 +00:00
Jochen Nitschke
3287bc2f91 fix missing default ctor for ObjectTypeFormatEntry with MSVC
MSVC can't create the default ctor (likely because members are pointers).
deleting default ctor will trigger gcc (4.8) fault where aggregate
initialization fails.
create ctor which does same as aggregate initialization, this also
prevents implicit creation of default ctor.

Change-Id: Ica79c7404de240f38ad18100e6dbc25f1b427960
Reviewed-on: https://gerrit.libreoffice.org/28981
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Luke Deller <luke@deller.id.au>
Tested-by: Luke Deller <luke@deller.id.au>
2016-09-18 05:12:22 +00:00
Jochen Nitschke
4d6a17c60b convert ShapePropertyId to scoped enum and use it for enumarray
new type ShapePropertyIds replaces vector and plain arrays
replace END enum member with LAST
remove PROP_END_LIST from plain arrays and properties script
store ShapepropertyInfo as reference in ObjectTypeFormatEntry
store ShapePropertyIds as reference ShapePropertyInfo

Change-Id: If273cc9e6c7bbd625dba5dc79f1c4ae0b21bdb3c
Reviewed-on: https://gerrit.libreoffice.org/28960
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-17 16:33:53 +00:00
Jochen Nitschke
ae65dbbafe fix copy&paste in DownBarFills
Change-Id: Id1e61caa2252c2d27560b8565abd3255faaf684b
Reviewed-on: https://gerrit.libreoffice.org/28939
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-16 09:14:10 +00:00