Commit Graph

270 Commits

Author SHA1 Message Date
f06a3503b6 tdf#100834 Extend ODF for integer/fraction delimiter
Any string can be used as delimiter between integer and fraction.
It is now saved/loaded to/from ODF, as it was from XLS.

Change-Id: Ie6364d1cdefc020ea615c18099118135c619f96b
Reviewed-on: https://gerrit.libreoffice.org/27262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27 13:12:34 +00:00
aab21302fa tdf#100755 Extend ODF to allow 0 in fraction
As '0' is now allowed in numerator/denominator
this commit extend ODF to save/load this format

Change-Id: I3bc897dcce5393453acd7a434a21ae305feeb919
Reviewed-on: https://gerrit.libreoffice.org/27263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27 11:04:04 +00:00
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
8c81f307ee loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: Ide1102f4dcc5f31de0f896b570fe453b8074454d
2016-07-07 18:59:55 +02:00
40fba0f441 GSoC Writer Table Styles Import
This patch is implementing import of table styles (table-template).

Modified shared code: Added "background" to the cell styles export.

To make cell export properties map accessible by both export and import code,
moved from xmloff/source/table/XMLTableExport.cxx to xmloff/txtprmap.hxx.

To avoid export of default valued properties implemented XPropertyState for
SwXTextCellStyle

Change-Id: I8b4f12e4b51f478f8ce8fde1203cd4611d7ae852
Reviewed-on: https://gerrit.libreoffice.org/26721
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-07 09:02:15 +00:00
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00:00
a07a69850a Introduce FillAutoStyle() method to reduce copy'n'paste.
Change-Id: Ibdb6ae15790cc117d3d8c41c57924f9b22e85cba
2016-06-23 10:58:32 +02:00
309bc35559 GSoC Table Styles, Export Cell Styles
Exporting cell-styles
Exporting table-template
To be able to map SwTableAutoFormat to table-template 1:1
extended table-template by the following elements:
	loext:first-row-even-column
	loext:last-row-even-column
	loext:first-row-end-column
	loext:first-row-start-column
	loext:last-row-end-column
	loext:last-row-start-column

Added attributes describing box format to SwXTextCellStyle

Change-Id: I2967ba461dfc6f030c1e5cdbba62e2673d3b232b
Reviewed-on: https://gerrit.libreoffice.org/26185
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-20 12:08:01 +00:00
e8c8d82460 tdf#88206 Change use of cppu::WeakImplHelper*
Change-Id: I8562a69bf624902a54da004b0786cae2a98102e5
Reviewed-on: https://gerrit.libreoffice.org/26168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-14 11:09:14 +00:00
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
52af06b471 tdf#89329: use unique_ptr for pImpl in xmlnumfe
Change-Id: I1c07b20f187d4b7045d68e0b7f95725de039bf77
Reviewed-on: https://gerrit.libreoffice.org/25743
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:18:26 +00:00
7d1b01070c remove some manual ref counting in svx and xmloff
Change-Id: Ica0b6ff8ff7fa9e65cd758160d6e3ea7110ebb46
Reviewed-on: https://gerrit.libreoffice.org/25824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:51 +00:00
1544a26ac9 tdf#99661 Add max-denominator-value attribute to number:fraction
Add max-denominator-value attibute to <number:fraction> to comply with ODF 1.3
See https://issues.oasis-open.org/browse/OFFICE-3695
Specify loext or number according to ODF version
This value is only used to stored the number of digits in numerator.
No other values than 9, 99, 999,... are expected.

Add loext:max-numerator-digits attributes to <number:fraction>
 to distinguish
??/?? and ##/## or any combination
Not saved for ODF strict
min-...-digits indicates the number of '?'
max-...-digits indicates the total number of '?' and '#'
This needs to be saved with both min-...-digits at least one
because previous versions cannot have min-...-digits of 0. See tdf#38097

Change-Id: Ibd785579aa75edc315e3bd94935a146d82bbeeef
Reviewed-on: https://gerrit.libreoffice.org/24903
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30 12:02:26 +00:00
20ad9893d5 tdf#100134 xmloff: only update the progressbar twice for every percent
This restores the state before commit
e1b78d36008d1fd188ca8dc154ad069d3476520c (#95181#; call the setValue
method of the XStatusIndicator as often as possible to enable
reschedule, 2001-11-26), which doesn't seem to be necessary anymore,
perhaps due to the current scheduler that has priorities.

Rather than a plain revert, still allow the progressbar to jump back, as
that seems to be used relatively frequently. So just filter out the
calls that would increment the value, but only with a small difference,
compared to the shown value.

Change-Id: I7136b20f1c64e267b0b4a35bbe2564e5163d9468
Reviewed-on: https://gerrit.libreoffice.org/25654
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-30 09:54:40 +00:00
74713b34a3 loplugin:unusedmethods
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda
Reviewed-on: https://gerrit.libreoffice.org/25431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:50:33 +00:00
8821dc7f3a Convert XMLTextParagraphExport::FrameType to scoped enum
Change-Id: I9e36f6566310e960a2b49f5a57f4b4491d32bb9a
Reviewed-on: https://gerrit.libreoffice.org/25366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 08:11:05 +00:00
2a16ad7e4a Convert XMLTextType to scoped enum
Change-Id: Iac147e57784e11d29f2b34e60dc3c624d6090c8b
Reviewed-on: https://gerrit.libreoffice.org/25367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:31 +00:00
8a2149c105 clang-tidy misc-assign-operator-signature
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f
Reviewed-on: https://gerrit.libreoffice.org/25154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-20 07:55:30 +00:00
868444c803 loplugin:passstuffbyref in xmloff
Change-Id: I5995510c5c0686e5e69e8853d81dcba83ae96211
2016-04-14 09:21:39 +02:00
20ff812d1c Avoid reserved identifier
Change-Id: Id2c34c5515ca72bba98ff618171b94a6d2da3620
2016-04-12 20:03:48 +02:00
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
dc0d98590f clang-tidy performance-unnecessary-value-param in xmloff
Change-Id: I8e6d8e66cdab2e50ee10882e139be29c14ce50f6
2016-04-12 08:33:32 +02:00
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
9b1307f790 Avoid reserved identifiers
Change-Id: I759939aa74570be63f5d41814c22aad1851d65c4
Reviewed-on: https://gerrit.libreoffice.org/23587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-29 07:11:31 +00:00
78f0d15893 loplugin:constantparam in xmloff/
Change-Id: I376f1d4ac65de584f9caa6ba8e25e43216374112
Reviewed-on: https://gerrit.libreoffice.org/23295
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16 11:35:38 +00:00
7f40ed57eb loplugin:constantparam in xmloff
Change-Id: I531dcf0861ab5a545eec16bf4aa92ac92eb9626e
Reviewed-on: https://gerrit.libreoffice.org/23022
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-08 10:37:11 +00:00
f5e131b2bc loplugin:unuseddefaultparams in vcl and xmloff
and teach the plugin about code that takes the address of a function

Change-Id: Ia9d5afef44520aca236659e8176f1e27135ef4fc
Reviewed-on: https://gerrit.libreoffice.org/22861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-04 06:13:25 +00:00
535aa95014 loplugin:unuseddefaultparams in xmloff/
Change-Id: Ia504a4e96a4ebc8404fe6881e0f77fba29cd00ae
2016-02-25 14:18:54 +02:00
f17f977d0a loplugin:write only fields
Change-Id: I45895e9845a9037da207f001fece427452ed499f
2016-02-22 08:18:08 +02:00
f7714ad623 add "use-wildcards" XML_USE_WILDCARDS, tdf#72196
to support ODF table:use-wildcards

Change-Id: I448bc53dd81d79a29efad9fbd240ae9c059dfd15
2016-02-19 01:56:28 +01:00
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
8dadefc35f xmloff: tdf#96147: ODF export: fix duplicate fo:background-color
... attributes that happen if both CharHighlight and CharBackColor
properties are used, because the CharBackTransparent property wasn't
taken into account, and combining the CharBackColor and
CharBackTransparent properties happens *after*
XMLTextExportPropertySetMapper::ContextFilter() runs.

Also, it looks like a transparent highlight wouldn't export properly but
apparently DomainMapper::getColorFromId() won't create such.

(regression from f880962f5bf26bfaef06bd3f9e67e2d901a2e74c)

Change-Id: Ib628ef8bb377482f74fadb97c81afb95fbbf7184
2016-02-02 14:58:34 +01:00
ed373ea7ef loplugin:unusedmethods unused return value in include/xmloff
Change-Id: I6615a467152a50e9c65f04fd0d6c8cc128517bdb
2016-01-15 09:36:42 +02:00
6640bfc66d xmloff: SvXMLExport::mbExtended is dead now
Change-Id: Ie679259deccce87949d7bf8767af707827b4134c
2016-01-12 23:25:24 +01:00
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
774fb6d2e7 tdf#96480: ODF import: eliminate duplicate cross reference heading bookmarks
7c3c3006deaaaf1bb3f2f4eeeaf11da3bcebe53c is apparently worse than it
appeared at first glance since there are numerous assumptions about
bookmarks, such as that if they were inserted successfully they may be
copied successfully, which isn't the case for duplicate cross reference
bookmarks.

So fix this differently, by eliminating the duplicates and mapping all
reference fields to refer to the surviving bookmark.

It was not possible to do this in SwXBookmark by checking the makeMark()
return as that would raise interesting problems such as it's currently
guaranteed to have 1:1 SwXBoomarks to core Marks so we can't just
connect 2 SwXBookmarks to the same core Mark, and we also can't leave
the SwXBookmark unconnected after attach.

Another alternative would be to temporarily allow inserting the
duplicate bookmarks and then eliminate them after the import, but what
is implemented now is to check from xmloff for duplicates, which is
reasonably simple.

Change-Id: I7ee4854d1c9d8bf74201089cbb7287b1bd8ee3b9
2016-01-08 20:31:47 +01:00
307421ba93 tdf#96181 SVG: Add support for <use> element
Change-Id: Ia95c7e35158f8a4c6a597662524c74e1909983bb
Reviewed-on: https://gerrit.libreoffice.org/20483
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2015-12-22 13:13:04 +00:00
44f2edbf7a loplugin:unusedfields in include/vcl
Change-Id: I61fc04e00970ea0d398ff80f6b1f81ec2f62dd5e
Reviewed-on: https://gerrit.libreoffice.org/20868
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-22 09:44:37 +00:00
2d86a4c468 xmloff: missing include
Change-Id: I425782f9e6b95264f08e91ddabbc377de2e3fffa
2015-12-19 22:34:48 +01:00
8f85595371 coverity#1343637 Double free
and

coverity#1343638 Double free
coverity#1343639 Double free
coverity#1343640 Double free
coverity#1343641 Double free

Change-Id: I8ce42f03d40fe514f73b3a7eabdb4f323b2239e6
2015-12-19 18:10:11 +00:00
d138573103 Avoid memory leaks
...when exceptions get thrown while a context owns an rewind map

Change-Id: I90d26caa57ef2ff508e6eae05ddbc62cdb3f01ea
2015-12-17 16:51:17 +01:00
dc3eb865bd tdf#32248 SVG: first attempt to support tspan elements
it's not perfect but at least we can already display the text,
which is better than displaying nothing

Change-Id: I89627010ac8071c106b41c1de6b183a619f8158b
Reviewed-on: https://gerrit.libreoffice.org/20642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2015-12-17 12:23:38 +00:00
4033537b3a typo
Change-Id: Iebd5637328e905502d02a97b5294c67892688ecb
2015-11-27 09:34:32 +01:00
efa5c54373 -Werror,-Wunused-private-field
Change-Id: I3f328023d99d3505ab2ce2a80eef82d84d81446e
2015-11-26 12:59:32 +01:00
3e6ba91e2d loplugin:unusedfields in include/xmloff
Change-Id: I979743671e9a2e868d815f917427588b7b0320ba
2015-11-25 13:57:29 +02:00
4d9a757a38 store custom icon set info into ODF
Change-Id: I1581b28237d2b9f9c22d3f3b0436dc281508aafa
Reviewed-on: https://gerrit.libreoffice.org/20118
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-11-25 08:50:42 +00:00
ee655627ad xmloff: add meta:generator constants LO_43x and LO_44x
Change-Id: I1d962ad637f19b02855616edebcedbad719689c5
2015-11-18 14:30:38 +01:00
2af0870fae xmloff: document potential pitfall with SvI18NMap usage
Change-Id: I37050203f9d7b4f04b6d0b0dc5c4e04855d017f7
2015-11-18 14:30:37 +01:00
53f16c39f5 remove unused typedefs and inline use-once typedefs
and improve the script a little

Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84
Reviewed-on: https://gerrit.libreoffice.org/20033
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18 10:38:08 +00:00