Commit Graph

411965 Commits

Author SHA1 Message Date
Matteo Casalin
fecee11583 OUString: reduce temporaries and constify
Change-Id: I8d806f1efb090a2e8dd42db228e7f07600816b2b
2017-08-27 14:05:29 +02:00
Matteo Casalin
c2f3f75664 Share common code
Change-Id: I98089cf93ba229f723628f8a70ef67ec7739c686
2017-08-27 14:05:28 +02:00
Matteo Casalin
cae89c4d95 OUString: constify and avoid temporaries
Change-Id: I1cb48585580f545623b2015318cb16d331519217
2017-08-27 14:05:28 +02:00
Matteo Casalin
b03aa410fa Use 'else' for consecutive checks on rHint.GetId()
Change-Id: Ied5e23344aa58ade4ebc4a0deaf757f5af2e0899
2017-08-27 14:05:27 +02:00
Matteo Casalin
59d821df1e Calculate values only when they are really needed
Change-Id: I21d1df718b3d453220200defb16f07bbb5b2baa3
2017-08-27 14:05:27 +02:00
Andrea Gelmini
b382193a20 Complete commit 61d49afadb
Change-Id: I299d112f7189335e17bc0062447ecc051ec24fa9
Reviewed-on: https://gerrit.libreoffice.org/41284
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-27 13:27:18 +02:00
Dennis Francis
0cf19169b6 tdf#97548: Do not set anchor flag on starting formula mode in a cell
Change-Id: I4d9699fa3106f7a575ad1afa3a36371344719d09
Reviewed-on: https://gerrit.libreoffice.org/41564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk>
2017-08-27 11:57:03 +02:00
Jens Carl
829b73b1e9 tdf#45904 Move _DataPilotItem Java tests to C++
Change-Id: Ia20630f4cc187bd6f1a47bb6d747fda3c8b39e86
Reviewed-on: https://gerrit.libreoffice.org/41551
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-27 09:52:14 +02:00
Jens Carl
c298f79083 tdf#45904: Move _DatabaseRange Java tests to C++
Change-Id: Iefe319c379ac8fffbb167b4bd4bcb235defabfa9
Reviewed-on: https://gerrit.libreoffice.org/41541
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-27 09:50:02 +02:00
Jens Carl
90b5555e3a tdf#45904 Move _CellAreaLink Java tests to C++
Change-Id: I82dac69dfed136eaf96771bf1ef2b8dfbf4e05aa
Reviewed-on: https://gerrit.libreoffice.org/41488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-27 09:49:44 +02:00
Jochen Nitschke
b2d7a11835 replace magic numbers for ppt view types
Change-Id: I0cd234cd039a2117fe49e6de3461becdbfa07e30
Reviewed-on: https://gerrit.libreoffice.org/40475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-27 09:32:13 +02:00
Chris Sherlock
8f60fe1af6 osl: document socket enums
Change-Id: I6f4904d415a44ba20ec0a9bfea9876c50eedb968
2017-08-27 16:05:10 +10:00
Chris Sherlock
1fab08fbea osl: cleanup socket.h
Change-Id: I0f7889db570717e9606425b51a418c499bd3a40a
2017-08-27 13:17:56 +10:00
serdarot5
2b7561799e fixed image and textbox rotation on xlsx files tdf#83672
Change-Id: If91e64e46601e1f8b5834d278f14182f8c949a2b
Reviewed-on: https://gerrit.libreoffice.org/40790
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-27 00:59:23 +02:00
Ashod Nakashian
714282573c sw: new RDF helpers
These are to help with adding paragraph
signature metadata.

Change-Id: Icac32c9e7937696f755ff3c99d619e97d56fc2e8
Reviewed-on: https://gerrit.libreoffice.org/41590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-26 23:45:19 +02:00
Paul Trojahn
60c5955cb9 PPTX export tests for flipped shapes
Change-Id: Ib159cdde381ebe906b54070245dedcb6decbe44e
Reviewed-on: https://gerrit.libreoffice.org/41587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-26 18:59:24 +02:00
Tamás Zolnai
e463c96092 tdf#111980: DOCX: Handle ActiveX radio button group
Change-Id: I3372b3b69623bda5c6e8587215e8fb7056fdf0a7
Reviewed-on: https://gerrit.libreoffice.org/41586
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-26 18:31:45 +02:00
Chris Sherlock
1ab6d39146 osl: clarify osl_scheduleThread() documentation
Change-Id: If9990acd06f5395c07d44fc462292ccae795abe1
2017-08-27 01:36:41 +10:00
Chris Sherlock
4aee9d3283 osl: thread doxygen update
Change-Id: I345fdc1facd3eb38e2304f313c1eb67dc32b3608
2017-08-27 01:31:47 +10:00
Andrea Gelmini
72d5cc9ebf Fix typo
Change-Id: I2d79b299256feefa66ad0b120387d5cab6737345
Reviewed-on: https://gerrit.libreoffice.org/41585
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-26 15:43:44 +02:00
Mike Kaganski
d828577bcd tdf#89139: list all items in pivot table definition, incl. hidden
Change-Id: I14ce935185a6e0e3739fcf01fdefa031d814e821
Reviewed-on: https://gerrit.libreoffice.org/41509
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-26 13:33:24 +02:00
Matthias Seidel
3c49b28ffa Fixed typos (whitespace)
(cherry picked from commit cda9ee31f7f1913660c6dce17192076ddf52c4a9)

Change-Id: Ib948200084ae341c2f3f6d201aeeb9f84703623c
Reviewed-on: https://gerrit.libreoffice.org/41579
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-26 11:41:14 +02:00
Noel Grandin
8ced5266f2 loplugin:constparam in sc part7
Change-Id: Ica5421ddc343ce18a08f993778f42183b571ed0e
Reviewed-on: https://gerrit.libreoffice.org/41578
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-26 09:13:27 +02:00
Justin Luth
fde332fc9d tdf#32991 DOCexport: MSO-compatible table justification
Although LO could round-trip the files, MSO didn't open
them properly, indicating both import and export differences.

There are two table justification codes: sprmTJc and sprmTJc90.
LO appears to treat sprmTJc90 as the WW8 version, but actually
both are valid.  TJc is the LOGICAL justification - meaning that
it is affected by RTL/LTR settings.  TJc90 is the PHYSICAL
justification, regardless of BiDi.
https://msdn.microsoft.com/en-us/library/dd951612(v=office.12).aspx

Based on testing results, it appears that MSO REQUIRES TJc codes.
If it isn't defined, MSO uses the default value of TJc:LEFT, and
ignores TJc90 code. It appears that MSO always writes out
both codes if they aren't the default values.

This patch only deals with the export difference.

Change-Id: Id722261acab7ae6c0b7d808be75fc3452c2255d8
Reviewed-on: https://gerrit.libreoffice.org/41584
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-08-26 03:14:54 +02:00
Justin Luth
c420f36d9a remove dead comment.
The code that this comment documented was /* ... */ commented out
in 2004 commit ed9a3e51ef

That dead block of code was removed in 2010 commit
6eb5f64fd8
but they didn't take the comment out with it.

Change-Id: Id0ef75c09bd060e2621400492fb404eebbee6385
Reviewed-on: https://gerrit.libreoffice.org/41581
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-08-26 00:58:53 +02:00
Michael Stahl
9cabd72ef1 tdf#109267 sw: fix confusing return value of AppendRedline()
AppendRedline() has a boolen return value which is rather
unclear and confusing: most callers don't even check it, but
SaveMergeRedline::InsertRedline() expects "true" to mean that
its redline hasn't been deleted, whereas makeRedline()
expects "true" to mean that the redline was somehow "valid",
even if it has been deleted and merged with an existing one.

The "bMerged" variable in AppendRedline(), which is the source
of the confusion, was introduced with commit
81286906d0 "docx import fixes
for: redlines".

Split these differing expectations into different return
values of a new enum type.

Change-Id: If81631bde49ee52a249f5ba1dd64ab8e92fffaf7
2017-08-25 23:01:09 +02:00
Rosemary Sebastian
355715d333 tdf#109267: Fix crash during undo of delete inside redline insert
Change-Id: I070ce600c10f469b914cc1d6c036a55f33dc9529
(cherry picked from commit bd37233020266a5892d6ec7022688e3dfb9cef75)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2017-08-25 23:01:09 +02:00
Stephan Bergmann
e9d64ca080 Replace use of oslInterlockedCount with std::atomic
The assumption in using std::size_t is that every acquisition can be associated
with a unique memory location in the local address space, so the counter cannot
overflow.

Change-Id: I0d004a81d9bf52cf07d13481d9024fcc10b6db6d
Reviewed-on: https://gerrit.libreoffice.org/41580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-25 22:46:11 +02:00
Miklos Vajna
1584d5215c EPUB export: allow custom split method
Default is split on heading, but this allows e.g. split on page break
instead.

Change-Id: Ie392fc76f91d60029c7e5f2a0adc55cb18f6157d
Reviewed-on: https://gerrit.libreoffice.org/41577
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-25 21:36:03 +02:00
Michael Stahl
64ced968cc basegfx: remove global ImplB2DPolyPolygon
Change-Id: I6035aaf8aabf71062bb63a4d416c253378fb4756
2017-08-25 21:25:39 +02:00
Michael Stahl
7e911e9cd4 basegfx: remove global ImplB2DPolygon
Change-Id: Ibd97ba1d7cc4e04203142057c47a74034cc4f70f
2017-08-25 21:25:38 +02:00
Michael Stahl
0157f98861 basegfx: remove global 3D IdentityMatrix thread safety hazard
On a tinderbox, CppunitTest_chart2_export crashed in
basegfx::B3DHomMatrix::isEqual(), with other threads in other basegfx
code.

The UnsafeRefCountingPolicy on the global IdentityMatrix is likely the
problem.

Change-Id: Ib142c6f286453d61bd948fb0c184cd68fd313b0f
2017-08-25 21:25:38 +02:00
Stephan Bergmann
c5616014bb loplugin:redundantcast: suppress warnings in reworked glibc assert macro
Change-Id: I20be230b3ff5d11395f33a9896d0a575c3051fb7
2017-08-25 20:21:25 +02:00
Caolán McNamara
682f05f0b0 ofz#2899 increment pos before check, like all the other cases
Change-Id: Id49f747e36f767a3e82fc3610959eb94015a93d7
Reviewed-on: https://gerrit.libreoffice.org/40984
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:38:24 +02:00
Caolán McNamara
35bac83ed2 ofz#2877: crash in SVTB16Short
sal_uInt16 wraparound

Change-Id: Ifd791bdd5f1b96576fdd4ca6665bb972fb8b1e4c
Reviewed-on: https://gerrit.libreoffice.org/40848
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:37:40 +02:00
Caolán McNamara
969838675c ofz#2852 korean table entries start at 0xF not 0x7
Change-Id: Iaf3ed48d0eb0e5a57770af057c565a7310bb96d4
Reviewed-on: https://gerrit.libreoffice.org/40761
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:36:57 +02:00
Caolán McNamara
c2e7df1ce8 ofz#2766 ensure palette is large enough for all colors
Change-Id: I4669b473f5975ac74a37025f7c936f13bcfea420
Reviewed-on: https://gerrit.libreoffice.org/40511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:35:39 +02:00
Caolán McNamara
5e975f671b coverity#1416668 Uncaught exception
Change-Id: Ibc2be8fe44295a8ea08105549448609e00262740
Reviewed-on: https://gerrit.libreoffice.org/41560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:34:55 +02:00
Caolán McNamara
304d7f557a coverity#1416667 Unchecked dynamic_cast
Change-Id: I1df3f13c47a021bad7c5b5ab7d5804dc70f091c8
Reviewed-on: https://gerrit.libreoffice.org/41558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:34:19 +02:00
Caolán McNamara
90beace1e0 coverity#1416669 Uninitialized scalar field
Change-Id: Ibc202057c50391bb82779c82616f628060041fb9
Reviewed-on: https://gerrit.libreoffice.org/41559
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:33:37 +02:00
Damjan Jovanovic
afa71c58f1 Remove some incorrect API documentation for the
com.sun.star.sdbc.SQLException ErrorCode field.

Patch by: me

(cherry picked from commit ecd7e16c6d6277530879ed11e752d000248c56c7)

Change-Id: I45fb25f1447fd6d37a38e80879de663ab3dbba99
Reviewed-on: https://gerrit.libreoffice.org/41568
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25 19:31:02 +02:00
Damjan Jovanovic
3f84390f58 i#32546# - Java UnoRuntime.getUniqueKey/generateOid do not work reliably
In the Java UNO bridge, UnoRuntime.generateOid() generated the
object-specific part of the OID using java.lang.Object.hashCode(),
which is only 32 bits long, and is commonly overriden and could thus
return values from an even smaller range, so OID collisions were quite
likely.

This changes UnoRuntime.generateOid() to use 128 bit UUIDs for the
object-specific part of the OID, and store these in an object => oid
java.util.WeakHashMap, making OID collisions almost impossible.

Patch by: me
Suggested by: Stephan Bergmann (stephan dot bergmann dot secondary at
googlemail dot com)

(cherry picked from commit 6dd83d1c6c5c580d14ca3d0458be4020603ba118)

Change-Id: I8e851a7a69ac2defefa15e9a00118d8f9fc0da95
Reviewed-on: https://gerrit.libreoffice.org/41576
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25 19:24:50 +02:00
Michael Stahl
ae3ba018bf unoxml: CDocumentBuilder: just catch all Exception
Turns out that XErrorHandler can throw SAXException too, which isn't
derived from RuntimeException.

Change-Id: Ib853805259b5b32a979e4f9a20297975431dee08
2017-08-25 17:58:56 +02:00
Miklos Vajna
bb4e52096d EPUB export: add support for page breaks
EPUB_SPLIT_METHOD is still hardcoded to HEADING, so while we send the
page break info to librevenge now, it's ignored on that end.

This requies basic infrastructure for automatic styles.

Change-Id: Ibafead0dedd9dbfa6223a9c701a62611ba2671fd
Reviewed-on: https://gerrit.libreoffice.org/41573
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25 17:46:01 +02:00
Matthias Seidel
8e246b5ccc Deleted whitespace
(cherry picked from commit 6b62e035d388ce14630da65d63db5a216e1848e7)

Change-Id: I7e0c7edf12a30daec35d9461f0be12b6d07fddc3
Reviewed-on: https://gerrit.libreoffice.org/41575
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-08-25 17:11:53 +02:00
Henry Castro
2356d9e499 tdf#107806: Semantic and syntax for .uno:RowHeight have been changed
Change-Id: If9ce7ff36ef3ba8e55103765f3260e74ab2eebd4
Reviewed-on: https://gerrit.libreoffice.org/41567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-08-25 16:28:16 +02:00
Miklos Vajna
3a1d6a2bcc EPUB export: allow setting a custom version
By parsing the FilterData key of the media descriptor, similar to how
the PDF export does it.

The default is still EPUB3, but this now exposes the ability of
libepubgen to emit EPUB2 if wanted.

Change-Id: I23834fa28db9b01ef4cce4a142331b1cc9ecb3c2
Reviewed-on: https://gerrit.libreoffice.org/41566
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25 16:07:30 +02:00
Tor Lillqvist
bafe8a5ef0 Follow-up fix for aa7dc5fa1d
Change-Id: If42c9d1594a43d7882df657e32806fab965be910
2017-08-25 16:31:11 +03:00
Noel Grandin
c47eb8afd1 dynamic column container: more efficient loops over all cols
Create an ScColumnsRange class that returns a pair of (start,end)
iterators to go through the list of currently allocated columns.
This is a fairly thing wrapper around the underlying std::vector,
so it should be fairly efficient (two pointers, and pointer increment
for iteration).

If this style of iteration is acceptable, I'll go through the rest
of the code that does:

    for (SCCOL nCol=0; nCol<MAXCOLCOUNT; nCol++)

type stuff, and change it to use ScColumnsRange.

Change-Id: I81501c69b7f5566c6204dde0d87a6fe0deb9743c
Reviewed-on: https://gerrit.libreoffice.org/41413
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 15:27:58 +02:00
Tor Lillqvist
27bde9a6ab Drop gratuitous initial :: from comphelper::ProfileZone
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25 16:09:53 +03:00