Commit Graph

412096 Commits

Author SHA1 Message Date
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
Tor Lillqvist
aa7dc5fa1d Get rid of need to use initial :: for ::opencl to avoid clash with sc::opencl
Rename the global opencl namespace to openclwrapper. Its public API is
after all declared in a file called openclwrapper.hxx. The confusion
started when part of the OpenCL code was moved out from sc some years
ago.

Change-Id: I98ebd8498b2244804411e5de9169eb619f86070b
2017-08-25 15:49:34 +03:00
Noel Grandin
407a126af4 loplugin:constparam in sc part6
Change-Id: Ifbb921b820b7210e7f9539e45d4852764a1e9cbd
Reviewed-on: https://gerrit.libreoffice.org/41563
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 14:45:42 +02:00
Eike Rathke
001e0e530f Add check and comment for i18npool locale data using reserved formatIndex
Change-Id: I9401e353241973129bff764d6d7b7f94d7c9b7b0
2017-08-25 14:23:56 +02:00
Justin Luth
9c8c4415f6 tdf#60351 - add unit test for shape brought to foreground
Test for this comment in d59ef5b2dd
// We should bring it to front, even if wp:anchor's behindDoc="1",
// because otherwise paragraph background overlaps the graphic
// TODO: if paragraph's background becomes bottommost,
// then remove this hack

Actually, the proper fix for this would be that the paragraph
background also "wraps" around the picture (just like the text),
not that the paragraph background becomes bottommost.

The main concern in forcing to the foreground would be if
wrap_THROUGH text would become hidden. However, testing suggests
that cannot happen in this code. In that case, the worst
would be that this shape now overlaps another shape - a
rather unlikely situation. So this hack should be safe and
maintained since it visually fixes a compatibility problem.

Change-Id: I96495cd08a580afbca71a7f6d6dfd85652ff021b
Reviewed-on: https://gerrit.libreoffice.org/41487
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-08-25 14:05:01 +02:00
Noel Grandin
4467dc6685 loplugin:useuniqueptr in sc
Change-Id: Ia647ef2dda2dd54a4958a7dc561a0fb86abdfd86
Reviewed-on: https://gerrit.libreoffice.org/41522
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 13:14:20 +02:00
Noel Grandin
4d41b2e42f loplugin:unusedfields
Change-Id: I81bcf4f56599146536ba8d66cc86fa5a08737298
Reviewed-on: https://gerrit.libreoffice.org/41556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 13:10:03 +02:00
Fyodor Yemelyanenko
d181d8acbf tdf#84237 use XErrorHandler in CDocumentBuilder
In documentbuilder.cxx added code to call XErrorHandler::warning and XErrorHandler::error functions (from DOM::warning_func and DOM::error_func)
In domtest.cxx added try {} catch () block to BasicTest::validInputTest, BasicTest::warningInputTest and BasicTest::errorInputTest and to SerializerTest::serializerTest. Also uncommented lines CPPUNIT_TEST(warningInputTest); and CPPUNIT_TEST(errorInputTest);

Unit tests are now working
(FatalError test removed, as lib2xml doesn't distinguish between error and fatal error and counts everything as error).

Change-Id: I27c5036df6a1cc5bef5dbb8171c201d81bae2ccd
Reviewed-on: https://gerrit.libreoffice.org/41376
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-25 12:44:33 +02:00
Michael Stahl
3aab0593dd create-tags: find UNO IDL exceptions too
Change-Id: I3eff2bdd5da3710bc130a5d9965a8c84c74ee55b
2017-08-25 12:35:02 +02:00
Stephan Bergmann
d1f795167d Use osl_atomic_inc/decrement in --with-webdav=serf code, too
Those were the last remaining raw uses of osl_inc/decrementInterlockedCount.

Change-Id: I66d0d37a563106a0cc3edbd163462211893e3dae
2017-08-25 12:00:45 +02:00
Stephan Bergmann
74917e0c46 Various loplugin warnings in --with-webdav=serf code
Change-Id: Ibff41550f292da76c17238a9cd2856b6599e952a
2017-08-25 11:59:24 +02:00
Armin Le Grand
db6b703d39 Allow non-modal Dialogs during FileImport/Load
When opening a file that triggers Dialogs (e.g. cannot
read/repair/FileType) the Frame from which it was
initialized gets blocked. This irritates quite some
people. Changed this to a non-modal Dialog so that
the user can continue to work with all opened docs,
open new ones, close and print/PDF/export these.

Change-Id: I048d3de3369527cec20d26396b87439254764b8a
Reviewed-on: https://gerrit.libreoffice.org/41534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-08-25 11:31:42 +02:00
Paul Trojahn
69cfafef7a tdf#100387 tdf#100389 OOXML animation export fixes
The second cTn tag needs to have a dur="indefinite" attribute, otherwise
the last element is hidden immediately after being shown. Also the value
of all fill attributes with the value freeze needs to be hold, otherwise
only one animation node is shown at a time.

Change-Id: Ie4ecf69f5a3a1c56d8b3b489351dc2882efd6328
Reviewed-on: https://gerrit.libreoffice.org/41463
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-25 11:26:26 +02:00
Tamas Bunth
485fcd4f36 oovbaapi: Use default path for FileDialog
Change-Id: If7af0fc52b8684cca77fd3e85e15ef429801d6dd
Reviewed-on: https://gerrit.libreoffice.org/41542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-08-25 10:36:28 +02:00
Szymon Kłos
51e610e584 tdf#111876 Save correct relative links in Calc
Relative links were saved as:
file:///a/file.odt
instead of:
../a/file.odt

Relative path was based on source document, not target.

Unit test contains spreadsheet with relative link
to the "../xls/bug-fixes.xls" file.

Change-Id: I803b7b8936bde9644ae5760756ee7249677f2641
Reviewed-on: https://gerrit.libreoffice.org/41500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-08-25 09:58:15 +02:00
Stephan Bergmann
f0b0123fa3 Remove spurious indent of first line
Change-Id: I02e2baec74f2b020ac1db2afb1b82928032ae036
2017-08-25 09:46:38 +02:00
Miklos Vajna
329213cb24 writerfilter: fix inconsistent param naming in interface/implementation
Talking about names when those are numbers is confusing.

Change-Id: Icfeed8924daeb1d6f658118515f9d4a76229106e
Reviewed-on: https://gerrit.libreoffice.org/41540
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25 09:23:35 +02:00
Miklos Vajna
8d411f38ba EPUB export: make sure that the mimetype stream is not compressed
Similar to ODF, the spec mandates this, and recent enough epubcheck
validator asserts this.

Also backport 2 libepubgen commits that fix other validator errors
around missing mimetypes / malformed URLs.

Change-Id: I29f0524465a30d26585cea92ec27bd336f6a17d8
Reviewed-on: https://gerrit.libreoffice.org/41526
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-25 09:23:13 +02:00
Zdeněk Crhonek
2ea022ec21 add reference operators tests
from AOO#32341
ODFF: OpCode 'ocUnion' to pass multiple ranges as one parameter

Change-Id: Ie718ccb43e7fac3b168ce56818c8b45cba51b94a
Reviewed-on: https://gerrit.libreoffice.org/41514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-25 09:15:10 +02:00
Noel Grandin
1b694dad64 loplugin:unusedmethods
Change-Id: Iaaf9092ec4d6189492906648b84494d087fed81f
Reviewed-on: https://gerrit.libreoffice.org/41539
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 09:04:26 +02:00