Commit Graph

376 Commits

Author SHA1 Message Date
0451019f75 OFFICE-2102: ODF export: write <text:s> after non-mark elements too
... and fix the wrong export for <text:meta-field>, which erroneously
did not use the same bIsPrevCharSpace flag as everything else (which was
obviously a bug, as there should be one flag per paragraph).

Interop testing demonstrates that at least Word and Calligra Words
differ in their interpretation of spaces following <draw:frame> and
other shape elements, and <text:note>: if there is a U+0020 space
before the element, LO will not collapse a U+0020 space behind the
element but Word and Calligra Words do collapse it.

The distinction between "mark elements" and "non-mark elements" in the
whitespace collapsing implementation in OOo since the beginning was
never explicitly spelled out in ODF, although listing the
<text:bookmark> etc. elements in ODF 1.1, 5.1.1 was a strong hint.

Fortunately all 3 applications agree that a <text:s> following a
<draw:frame> is consumed as a space, and it is valid to write a <text:s>
in this situation, so just do that to improve interoperability.

Change-Id: I42260c0528db9fe7e87e8dbae5105aeadb83780d
2017-04-11 16:56:38 +02:00
87713a4743 xmloff: rename one overloaded XMLTextParagraphExport::exportText
... to exportCharacterData. The others all export XTexts.

Change-Id: Ic4b1d6364c15d99d839e2736d4c2966d7aa302d4
2017-04-11 16:56:38 +02:00
25e92d7f7c loplugin:inlinefields in XMLTextParagraphExport
Change-Id: If0e80fbe21b6d8bed55357d7fc09027fc4a37e06
Reviewed-on: https://gerrit.libreoffice.org/36373
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-11 10:32:55 +02:00
ade95165ef loplugin:inlinefields in SvXMLExport
Change-Id: I9e9dddcbdd450f40b34318c90b8c2d8d3980dbd6
Reviewed-on: https://gerrit.libreoffice.org/36374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-11 08:09:51 +02:00
9009663deb tdf#83257 [API-CHANGE] Pivot chart implementation
This is a squashed commit of the pivot chart implementation.

Some of the changes:
- Add pivot chart specific (pivot table) data provider which
  provides the data from a pivot table to the associated chart.
- When inserting a chart and the cursor is in a pivot table,
  in that case insert a pivot chart
- Modify the pivot chart when the pivot table changes
- Collect and set the number format for the values
- isDataFromSpreadsheet check for the creation wizard
- In ChartView (and VLegend) check if the data provider is a
  pivot chart data provider and get the pivot table field names
  to create the buttons on the UI.
- Adds the functionallity to show a filter pop-up (from calc)
  when clicking on row / column / page field buttons.
- Remove (X)PopupRequest as we won't need it.
- Add ODF import/export for pivot charts:
  + Added loext:data-pilot-source attribute on chart:chart
    which is the internal name of the pivot table with which the
    pivot chart is associated with. If the element is present, then
    the it means the chart is a pivot chart, else it is a normal
    chart
  + Added service to create pivot chart data provider through UNO
  + Add new methods to XPivotChartDataProvider to create value and
    label data sequences separately from the data source, which is
    needed for pivot chart import
  + When importing defer setting the data provider until a later
    time when we know if we are creating a chart od a pivot chart
- Pivot chart ODF round-trip test
- Add table pivot chart supplier API:
  This adds the XTablePivotChartSupplier and related interfaces so
  we can access, create, delete pivot charts from UNO in a sheet
  document. With this we now distinguish between normal charts
  and pivot charts. This was mainly needed because we can't extend
  the "published" interfaces of TableChartSupplier.
- Added an extensive test, which uses the API to create a new
  pivot chart when there was none, and checks that the pivot chart
  updates when the pivot table updates.

Change-Id: Ia9ed96fd6b1d342e61c2f7f9fa33a5e03dda21af
Reviewed-on: https://gerrit.libreoffice.org/36023
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-04 13:39:29 +00:00
e63116602b loplugin:unusedmethods
Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b
Reviewed-on: https://gerrit.libreoffice.org/36047
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04 06:38:38 +00:00
9a165a8679 use actual UNO enums in xmloff
Change-Id: I585825ad3faf972acde548817187183029856971
Reviewed-on: https://gerrit.libreoffice.org/35914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31 06:59:51 +00:00
9bfd742d8c loplugin:unusedmethods
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0
Reviewed-on: https://gerrit.libreoffice.org/35834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29 11:43:40 +00:00
0a0f205775 tdf#105686 - fixed wrongly imported named expressions:
It is necessary to extract and set ODF version for fast
events also.
While debugging I found a couple of tokens which were
not in the list, and added them (not needed for bug fix).

Change-Id: I7aaab99688a067ee2fd2c9814deec1a359a758ab
Reviewed-on: https://gerrit.libreoffice.org/35410
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-03-21 11:36:06 +00:00
9f9e861c6d Old-to-new mapping of attributes is moved into a Module:
This should make it easy to reuse the mapping code wherever
necessary and restores the loading of writerperfect documents.

Change-Id: I505bffa47fe37270b0430d9ae5afec5072762b4c
Reviewed-on: https://gerrit.libreoffice.org/35263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-03-21 09:24:32 +00:00
427678b9cf remove noise UUUU tags in comments
Change-Id: Id8a2940ae7348bf75ca967f31adf8489dc678d00
Reviewed-on: https://gerrit.libreoffice.org/35161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14 08:23:53 +00:00
7e9857c293 templatize SvXMLEnumMapEntry
in preparation for "scoped UNO enums".

This is a little hacky: In order to limit the scope of this change,
the templated SvXMLEnumMapEntry struct actually has a fixed size field,
and we cast it to SvXMLEnumMapEntry<sal_uInt16>* in various
places, to avoid carrying the type param around.

Change-Id: Idfbc5561303c557598dd5564b7a7259ae5261d83
Reviewed-on: https://gerrit.libreoffice.org/34987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13 09:02:22 +00:00
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
bcb402298f Fix typos
Change-Id: I5e3c9683741ddc66283008c20794be5c2b2bc53f
Reviewed-on: https://gerrit.libreoffice.org/34804
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 06:56:42 +00:00
0649622956 loplugin:unusedmethods
Change-Id: I52a9f16f3ed543a3c83ca111df70e3f7ae1ef33c
Reviewed-on: https://gerrit.libreoffice.org/34508
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-21 10:07:37 +00:00
1b3aa39339 AutoLayout value 33 is "AUTOLAYOUT_4CLIPART" according to comments
Change-Id: I082dd08c1caf6f1585e3e16b441ba3b5a0d137f1
2017-02-21 00:14:14 +02:00
5afef8d531 s/AUTOLAYOUT_6CLIPART/AUTOLAYOUT_TITLE_6CONTENT/, and sort
Need to sort in this commit so that the AUTOLAYOUT_END keeps being one
more than the highest-valued enumerator.

Change-Id: I0db7c8ba069808e92589d5c4688632440007163b
2017-02-21 00:14:13 +02:00
1324b7f1ce s/AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART/AUTOLAYOUT_TITLE_2VTEXT
Change-Id: Ie20c4539b8b66b1e9b40015e6bc611d5bc12ddb4
2017-02-20 23:07:49 +02:00
56917ba7ca s/AUTOLAYOUT_TITLE_VERTICAL_OUTLINE/AUTOLAYOUT_TITLE_VCONTENT
Change-Id: I6186a2583dff2b142ceee1c4f2c7f0c972ec6c57
2017-02-20 22:49:48 +02:00
656af688ec s/AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE/AUTOLAYOUT_VTITLE_VCONTENT
Change-Id: Ic423c5a84c887222e38ab411ed218987075f7ced
2017-02-20 22:44:58 +02:00
9d90993a28 s/(AUTOLAYOUT)_VERTICAL_TITLE_TEXT_CHART/\1_VTITLE_VCONTENT_OVER_VCONTENT
Change-Id: I996d4a0b01ce9cb78119cba3165b2716f09fd048
2017-02-20 22:39:00 +02:00
e819494edb s/AUTOLAYOUT_4OBJ/AUTOLAYOUT_TITLE_4CONTENT
Change-Id: I8acd349ec7d9424f817981719320f51ac58b9861
2017-02-20 22:34:09 +02:00
056bb6f4f0 s/AUTOLAYOUT_OBJOVERTEXT/AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT
Change-Id: Idf9771d3d58520a1a31cea45a6acca89347237f6
2017-02-20 22:00:30 +02:00
6c897c63f7 s/AUTOLAYOUT_2OBJOVERTEXT/AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT
Change-Id: I9f421104773c8c84828cb0908f0f5e182538eead
2017-02-20 22:00:30 +02:00
97ee1af455 s/AUTOLAYOUT_2OBJTEXT/AUTOLAYOUT_TITLE_2CONTENT_CONTENT
Change-Id: I8ed1361b2103b35e277107bfda4c174f07d9de08
2017-02-20 22:00:30 +02:00
7b2c59a97d s/AUTOLAYOUT_TEXT2OBJ/AUTOLAYOUT_TITLE_CONTENT_2CONTENT
Change-Id: I514cf647863e51848ff51c26938e682ffeca7685
2017-02-20 22:00:30 +02:00
0cab28af32 Use AUTOLAYOUT_TITLE_ONLY instead of "deprecated" AUTOLAYOUT_ONLY_TITLE
Change-Id: Ib3c2b5f0feb70fea195f022f322c682ecd4f1918
2017-02-20 22:00:29 +02:00
c87cc41660 Use AUTOLAYOUT_TITLE_2CONTENT instead of "deprecated" AUTOLAYOUT_2TEXT
Change-Id: I8897e31065f69b7fb62f0770e62025f35ecb5eec
2017-02-20 22:00:29 +02:00
7ecbffb3e4 Move AutoLayout enum definition to its own file, and start de-duplicating it
The mysteriously named AUTOLAYOUT_ENUM had the same value as
AUTOLAYOUT_TITLE_CONTENT, and was marked as "deprecated", so just use
the latter instead. Use it also in xmloff instead of the magic number
1 in places where comments indicated that AUTOLAYOYT_ENUM was what the
1 meant.

Will continue with the other "deprecated" and duplicated enumerators
later. (Or you feel free.)

Change-Id: Id5d70e07d30b3bf0d62e5d8719edb784bd23f99d
2017-02-16 16:59:39 +02:00
32c0ab80aa Further modifications to FastAttributeIter:
attempt to further reduce unnecessary allocation and
freeing of OUString.

Change-Id: I85169cfcd2311a5e6a96dc0292ce0686d1b0e43d
Reviewed-on: https://gerrit.libreoffice.org/34092
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-10 11:34:03 +00:00
6b19839909 xmloff: remove onDemandRescueUsefulDataFromTemporary
This workaround, which is both complex and quite incomplete,
should no longer be necessary because the fixes for tdf#103567
should also fix i#124143, see unit test in previous commit.

Change-Id: I038f238d5e3cf5cadfc666196380b7b351543982
2017-02-09 13:17:42 +01:00
f5245bf483 loplugin:unusedenumconstants read-only constants in xmloff
Change-Id: I88afb3b4b3aa7d823c46062ead894561a66ac275
Reviewed-on: https://gerrit.libreoffice.org/33995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 08:17:46 +00:00
78f392f30a loplugin:unusedenumconstants in xmloff
Change-Id: Ie9e6d4aa9dba97d45bf7b8afa2347d34e1651a60
Reviewed-on: https://gerrit.libreoffice.org/33871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 12:55:29 +00:00
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
9734a6e1c3 GetWasUsed can return by value, no need to be a special snowflake
Change-Id: I4ef22fa49ee883ff0bddb49d1711e8521905502f
Reviewed-on: https://gerrit.libreoffice.org/33658
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-30 06:06:36 +00:00
4142e0a0c0 loplugin: unnecessary destructor writerfilter..xmloff
Change-Id: I511822dc874101ed3b9850b015b746a86d26c3b5
Reviewed-on: https://gerrit.libreoffice.org/33578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:51:11 +00:00
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
8154953add ScXMLTableRowCellContext implements fast interfaces:
Implementation of fast interfaces for contexts in path from
ScXMLImport::CreateFastContext to ScXMLTableRowCellContext.
FastParser is enabled and duplicates are avoided at all
possible places.
OOoXML filters still need those legacy paths we removed,
so I had to temporarily map them to fast elements, which
would increase their load time, but hopefully it should
help us in the long run.

Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670
Reviewed-on: https://gerrit.libreoffice.org/28648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-25 11:20:48 +00:00
b0730ff656 fix ubuntu trusty build
Change-Id: I9a7fa68ab69aa9e730bf1e0fb3bc0c49db5f3ef0
2017-01-23 13:18:31 +02:00
936fd770fa just for non exported things
Change-Id: I448d0009d7c8ffec64fdab76897e8684afe7fcd7
2017-01-23 10:22:21 +00:00
aac6bb5bb3 ditch some empty dtors which match the default dtor
Change-Id: Id2450b03e6c8c5461e92d995ea8c33d5dfd55a45
2017-01-23 10:11:59 +00:00
7fca732554 New loplugin:dynexcspec: Add @throws documentation, xmloff
Change-Id: Idf9db7108514e91fb4fe3abeca55fbab844c770a
2017-01-19 18:03:08 +01:00
968f6a7f02 new loplugin: useuniqueptr: unotools..xmlscript
Change-Id: I6966d44cff644112dd837adfe7d9c4f459457271
Reviewed-on: https://gerrit.libreoffice.org/33298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19 11:28:41 +00:00
034cb09f56 use rtl::Reference in SvXMLExport
instead of storing both a raw pointer and an uno::Reference

Change-Id: I83774937d3556b9fed550a7f3e757dc975b4098a
2017-01-17 11:00:06 +02:00
d911663f0f Typo: Acess->Access
Found thanks to Buovjaga

Change-Id: I73e36f50a1fd393859ba775ab084a488047864a3
Reviewed-on: https://gerrit.libreoffice.org/32810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-07 10:08:48 +00:00
bd3402ba43 tdf#88206 replace cppu::WeakImplHelper* in sax and xml*
Change-Id: I75f4000a17155fbdff96fe0733dc0225b20cd4d2
Reviewed-on: https://gerrit.libreoffice.org/31678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 18:22:00 +00:00
29a9e97db6 loplugin field-can-be-private in include/vcl..xmlscript
Change-Id: Ia03f7cccb256d825daa4dc6f4c0598448e46e6cf
Reviewed-on: https://gerrit.libreoffice.org/31069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23 07:17:50 +00:00
f4e24dd79c loplugin:datamembershadow in xmloff
Change-Id: Ibea23b1757be1ec007f48261130aad74ce750cfc
Reviewed-on: https://gerrit.libreoffice.org/30925
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17 08:59:58 +00:00
7cca2c7fb3 new loplugin finalprotected
look for final classes, and make sure they don't have protected members

Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 09:10:16 +00:00
4ead110a8c remove prop. name variable
It is not used consistently anyway.

Change-Id: Ia842668dfb36dc2a8fbf3b938758b81c78d5c868
2016-11-15 19:58:54 +01:00