406095 Commits

Author SHA1 Message Date
Noel Grandin
ff339c89b5 loplugin:constantparam part2
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746
Reviewed-on: https://gerrit.libreoffice.org/36072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:42:40 +00:00
Noel Grandin
3d6c84f2d9 loplugin:constantparam
Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec
Reviewed-on: https://gerrit.libreoffice.org/36070
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:40:10 +00:00
Noel Grandin
cedbc4031f tdf#106868: fix crash when modify external link
The EndDialog callback Hdl was disposing the Dialog, which is a little
troublesome since the stack wants to go back through the Dialog code
when the callback is done.
Rather just the more normal synchronous Execute() style of Dialog
execute, instead of the asynchronous StartExecuteModal.

Change-Id: I14933bd475da228c9648a6fa0564bda4a60d9d12
Reviewed-on: https://gerrit.libreoffice.org/36074
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:39:09 +00:00
Mike Kaganski
156f778593 tdf#106955: Detect XML by MediaType
According to Extensible Markup Language (XML) 1.0 (see
https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd),
all parts of XML prolog (including XML declaration) are optional,
so XML stream without <?xml ... ?> is well-formed (though not
valid).

XMLFilterDetect uses only XML declaration to detect if the file is
to be processed further. However, this creates problems with said
documents.

This commit checks if the document has MediaType set to one of
known XML media types, in case when the check for XML declaration
failed.

Change-Id: I31627c0e3a39bee241f609650280ebac3f1cede8
Reviewed-on: https://gerrit.libreoffice.org/36101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-05 06:07:14 +00:00
Mike Kaganski
fbc04c9723 tdf#106955: Open WebDAV resources on which PROPFIND fails
When PROPFIND fails on a WebDAV resource, its IsDocument property
stays undefined, and so stream creation fails. Proposed solution
is to default to IsDocument=true for all WebDAV documents where
we cannot get the property from server.

Such resources also fail to return their locking options, so
defaulting to server properties. When later locking is attempted
on it, the attempt fails with user notification (a dialog saying
that getting information from server failed). Proposed solution
is to check Content-Disposition header in such resources, and in
case it's attachment, disable lock on this resource. The rationale
for this is that "In a regular HTTP response, the Content-Disposition
response header is a header indicating if the content is expected
to be displayed ... as an attachment, that is downloaded and saved
locally" (see MDN:
https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition

Also, Content::getProperties wasn't ready for PROPFIND returning
empty result.

Change-Id: I91dbffa8bdf0fe900c11d2f8c9c9394d2104bb49
Reviewed-on: https://gerrit.libreoffice.org/36090
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-05 05:39:36 +00:00
Mike Kaganski
d6323a2180 tdf#106525: Implement an XSLT import filter for ADO rowset XML
There are online services and management systems (like SharePoint)
that allow to export datasets in ADO rowset XML format ([MS-PRSTFR],
https://msdn.microsoft.com/en-us/library/cc313112). Usually they are
intended to be open with MS Excel as a spreadsheet (with autofilter).

This allows to open this data in Calc.

Change-Id: I495cd790138bdd6bd24630c0f422a0c8b4e3d0fb
Reviewed-on: https://gerrit.libreoffice.org/35159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-05 05:17:22 +00:00
Caolán McNamara
81894a5f72 ofz#984 better match post-creation aBitmap.HasGreyPalette() logic
i.e. Bitmap::HsGreyPalette checks that the palette has entries before calling
Palette::IsGreyPalette

Change-Id: I287647869ad615327f3119b7798f410e22140302
2017-04-04 21:04:40 +01:00
Caolán McNamara
98151bf95b ofz: check olst sprm for valid ANLD payload len
Change-Id: Ic1b6681a3f48ef0fe3f52eda9db8b7bc003ded55
2017-04-04 20:33:49 +01:00
Caolán McNamara
6c81597663 ofz#770 JOHAB_73 table starts at 0xA not 0x2
the start value is out by one row

Change-Id: I77ed154358516ccd47a090cf7ed45bb609bc81a3
Reviewed-on: https://gerrit.libreoffice.org/34992
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-04 19:26:58 +00:00
Caolán McNamara
6f0f227866 Resolves: tdf#106725 paint default window bg before spin button bg
Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78
2017-04-04 18:56:00 +01:00
Caolán McNamara
fb5cd5d734 forget the TODO
Change-Id: I81c8b97e8cd958933caac475145e3b3bcee46d6a
2017-04-04 18:56:00 +01:00
Stephan Bergmann
9ac98e6e34 Finally switch MSVC to sal_Unicode = char16_t, too
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone).  So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.

Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 16:12:11 +00:00
Jan-Marek Glogowski
6f995da5a6 Workaround VCL complextext failure on Win7 KVM QXL
My Windows 7 KVM QXL VM fails the bounding rect test with:

complextext.cxx:98 VclComplexTextTest::testArabic equality .. failed
- Expected: 71x14@(0,1)
- Actual  : 70x14@(1,1)

This doesn't happen using a SSHd on Cygwin64 based session.

Adding a SAL_DEBUG to WinSalGraphics::GetGlyphBoundRect shows many
different glyph rects, which - probably by pure chance - almost add
up to just a single pixel line missing on the left.

So this simply drops the first pixel column, if the bounding rect
starts with an offset. Works for me.

Change-Id: Ia496a208523a9c358d4128ecad887b5c77283fbc
Reviewed-on: https://gerrit.libreoffice.org/35647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-04-04 16:07:45 +00:00
Aron Budea
2aa43937ec tdf#104686: do not crash if Menu has been somehow disposed
The rare crashes in MenuFloatingWindow::ImplGetStartY() and
MenuFloatingWindow::ImplScroll(bool) likely happen because
of a disposed Menu.

Let's guard against invalid accesses.

Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16
Reviewed-on: https://gerrit.libreoffice.org/36026
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-04 15:58:29 +00:00
Szymon Kłos
c1351a7b13 Make HangingIndent a command
New command .uno:HangingIndent.
Code moved from the sidebar to slots.

Change-Id: Ib389f9fb3368409a90cf90ad8b19f1be322fa120
Reviewed-on: https://gerrit.libreoffice.org/35930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-04 15:51:19 +00:00
Szymon Kłos
387cdc35d7 Notebookbar: Separated paragraph spacing controls
One big paragraph spacing control was splitted
to separated widgets. It will be possible to
reuse that in the sidebar. Also layout is better
because explicit size setting is no longer needed.

Change-Id: Ieb200af4a9a6120ae03b22b27da56256aa816193
Reviewed-on: https://gerrit.libreoffice.org/35801
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-04 15:40:30 +00:00
Samuel Mehrbrodt
d9064ecf03 Fix group for .uno:EditAnnotation
Change-Id: I3a62e37d866235728abf6b4ad3a5338222d02088
Reviewed-on: https://gerrit.libreoffice.org/36081
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-04 15:26:06 +00:00
Bernhard Widl
f5d59796d3 add *.vcxproj* to .gitignore
these files are generated by make vs2015-ide-integration.

Change-Id: Iaae5931289bd2f27415c401b6ac253d43dc39007
Reviewed-on: https://gerrit.libreoffice.org/36073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-04 15:22:24 +00:00
Olivier Hallot
993e8cc1df Updated core
Project: help  ad25b453307e0a88ac208aa3b178805846988045

Fixes in HC after translators review.

Change-Id: Id2384cb6f1917c7e1f11c97ef9b05a3dfff08c9a
Reviewed-on: https://gerrit.libreoffice.org/36050
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-04-04 15:04:30 +00:00
Caolán McNamara
9a0f19c5f6 well, its on the main trunk now
and we're not changing it at this point

Change-Id: Icb0cbe4728f64c2070780ad63b888e5d229c6216
2017-04-04 15:44:15 +01:00
Caolán McNamara
5d8593d81f intendend->intended
Change-Id: I6f066493600cec2af586c3ff4df1f32faa303060
2017-04-04 15:43:06 +01:00
Bjoern Michaelsen
3ecb9b4bd7 tdf#99352: assert on stray VclPtrs past DeInit
- ignore on Windows for now, as it is acting up

Change-Id: I98dbb887ed556b58188870c3eb3de1327bc58109
Reviewed-on: https://gerrit.libreoffice.org/35816
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-04-04 14:35:16 +00:00
Caolán McNamara
0144600bf5 std::unique_ptr<[]> -> std::vector
Change-Id: I7fd4275664fab42c61941a4ea21750a653b437d3
2017-04-04 15:29:42 +01:00
Caolán McNamara
be752d9f4e ofz: avoid oom
Change-Id: Ie700676c8470b6764a38f4e2989dc14819244872
2017-04-04 15:29:42 +01:00
Miklos Vajna
843cb68d00 xmlscript: fix -Werror=maybe-uninitialized
Change-Id: Ifcde2202fcb2cfa1dd226697910c1fbd219a3f83
2017-04-04 16:01:37 +02:00
Stephan Bergmann
3e0d46249b Missing str(...) when an arg is itself a css::uno::Sequence<...>
Change-Id: I54529e7086014a2feba89eb73f3b368d36f758b8
2017-04-04 15:58:25 +02:00
Tomaž Vajngerl
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
Caolán McNamara
1931b5b01c can simplify now
Change-Id: I234e630f3af1acfa39900464abd7e06efc47a671
2017-04-04 14:35:04 +01:00
Caolán McNamara
f1a53e7a0b Resolves: tdf#106935 restore traditional toolbar labels
Change-Id: I00cf16e9ce429f9186cc900a07f4d386e33b8f7b
2017-04-04 14:29:00 +01:00
Caolán McNamara
924624b40a ofz: guard harder against bogus sprm len
Change-Id: Ic82526e1454b24f094d3deee89647e88760bc44b
2017-04-04 14:00:50 +01:00
Jens Carl
6777720cf8 tdf#39468 Translate German comments
First run of translating German comments and terms in sc/

Change-Id: I9802df334259edcea148bead95cc98a8057b91a1
Reviewed-on: https://gerrit.libreoffice.org/35994
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-04-04 12:54:10 +00:00
Stephan Bergmann
a2d1a73304 More commit resurrection
(why do people do such silly reformatting?)

Change-Id: Ie9d45d7dfccb000f53fa5e8dc456f1e7c033af18
2017-04-04 14:45:01 +02:00
Stephan Bergmann
13adffdfeb Move comment back to where it makes sense
It appertains to the preceding code, not the following, so it was indented for a
subtle reason.

Change-Id: I032033f04a1ca3a91024c11de74ef96527562b41
2017-04-04 14:41:14 +02:00
Stephan Bergmann
c6c37aafd2 Keep list sorted
Change-Id: I680be319b6c2d87a8fba0e07a3b24d0a2ed478b7
2017-04-04 14:35:10 +02:00
Miklos Vajna
1fb21083b2 scaddins: silence -Werror=maybe-uninitialized
Change-Id: Idbbd6490c954f50d3baa7a72cd89f081d1316e6b
2017-04-04 14:26:13 +02:00
Stephan Bergmann
acbb7e3243 Work around clang-cl issue with MSVC's safeint.h for now
At least some C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\
safeint_internal.h, in the specialization of LargeIntRegMultiply::RegMultiply
for signed __int64, contains an (unnecessary) C-style cast from l-value unsigned
__int64 tmp

  RegMultiply( ..., ..., (unsigned _int64)tmp ) == SafeIntNoError )

which clang-cl correctly identifies as producing a prvalue (so cannot bind to
the third 'unsigned __int64& ret' parameter of that RegMultiply call), while
MSVC apparently has a non-standard mis-feature of treating such a "self-cast" as
an lvalue.

Until clang-cl learns about that mis-feature too, use the fallback
implementation of o3tl/safeint.hxx when compiling with clang-cl.

Change-Id: I7a454134589d958ad7ba845c37584b3aa7b94926
Reviewed-on: https://gerrit.libreoffice.org/36066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:09:40 +00:00
Stephan Bergmann
f8cff53299 loplugin:redundantcast (clang-cl)
Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef
Reviewed-on: https://gerrit.libreoffice.org/36065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:08:43 +00:00
Stephan Bergmann
3afca32851 loplugin:loopvartoosmall (clang-cl)
Change-Id: Ibdfdc5c66cf1e81d9e43c94df31120c476a78572
Reviewed-on: https://gerrit.libreoffice.org/36064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:07:10 +00:00
Stephan Bergmann
071dcb5f6a loplugin:redundantinline (clang-cl)
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430
Reviewed-on: https://gerrit.libreoffice.org/36063
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:06:18 +00:00
Stephan Bergmann
9a4b0beaa5 cid#1403658: Let ImplGetLocale return empty Optional for bad input
...like non-ASCII or too-long env var content on Linux

Change-Id: Ic2c536fa92b88108e96a0fc1a657180bc1906f01
Reviewed-on: https://gerrit.libreoffice.org/36067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:05:21 +00:00
Caolán McNamara
d30fb62f4f ofz: guard against bogus sprm len
Change-Id: I9b4074e1024753549f468f427afbfdf9cd01b674
2017-04-04 12:52:17 +01:00
Caolán McNamara
0f89d964b2 coverity#1403732 Mixing enum types
and

coverity#1403735 Mixing enum types
coverity#1403737 Mixing enum types

Change-Id: I278b7d5116d4157e6aa4483d8eef42325e4bc03b
2017-04-04 12:52:15 +01:00
Caolán McNamara
c4dba436df just use one try/catch level
Change-Id: I298f84df5431f0f77144db95bf2305f49e7f9302
2017-04-04 12:52:15 +01:00
Caolán McNamara
fd1e4d3b4b Resolves: ofz#727 don't allow negative sizes or indexes
remove extra size in favour of vector size and don't resize
and memcpy data, just use vector::insert

Change-Id: I8efb91a8c11fbd862c0458042554cf7e94b813cd
Reviewed-on: https://gerrit.libreoffice.org/34891
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-04 11:42:56 +00:00
Caolán McNamara
74cc187749 ofz#820 oom terminate
comments claim return is len of data, but negative numbers for compressed data errors
are returned. Make things return the amount of successful data read and turn into
unsigned size_t to match ofz#727

Change-Id: Iadddfae67bb5d4960ddf82e169fc2592ded85950
Reviewed-on: https://gerrit.libreoffice.org/35077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-04 11:39:12 +00:00
Thomas Beck
3873669fef tdf#106938 TSA Dialog: Improve Dialog Layout
Moved Label above the content area

Change-Id: I0a23af5540bedc849c83fd342ac43538827e6b4a
Reviewed-on: https://gerrit.libreoffice.org/36071
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-04 11:36:49 +00:00
Tor Lillqvist
d226cfacfd tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()
Somewhere, in time before calling epoxy-wrapper OpenGL functions. This
seems to be a good place. Educated guess based on debugging, turned
out to work.

Change-Id: Id3f1dfb0c5a9dbfb166c47ea81db902af1a4fc08
2017-04-04 13:53:26 +03:00
Tor Lillqvist
a29f494326 Revert "tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()"
It worked (for the specific case in the bug report), but for a more
generic fix that covers also other similar cases (where VCL code gets
called in threads that epoxy doesn't know about, or something), it's
better to call epoxy_handle_external_wglMakeCurrent() in vcl, instead
of all over the place in thread callbacks.

This reverts commit 78c67c6bbba0eaa418c573637858828b274b3c72.

Change-Id: Iaad7b3d1191847b9d3f1e74c3339de9f16194aed
2017-04-04 13:52:45 +03:00
Miklos Vajna
1bf7f6a1a5 tdf#106690 DOCX import: fix automatic spacing before/after numbered para block
The context is text nodes with automatic before/after spacing and
numbering rules set, like:

A
* B
* C
* D
E

The correct behavior seems to be (though I haven't found this explicitly
written in the OOXML spec) to drop spacing between B and C and C and D,
but not before B and not after D. Originally no spacing was dropped,
then commit c486e875de7c8e845594f5043a37ee8800865782 (tdf#95031 DOCX
import: auto spacing inside numbering means no spacing, 2016-10-18)
removed spacing around all B/C/D.

Fix the problem by checking the numbering rules and automatic after
spacing of the previous paragraph, so spacing before B and after D is
not removed.

Change-Id: Icbdb36e31057ab0e8ac033888cf5cc7c52dad5d0
Reviewed-on: https://gerrit.libreoffice.org/36062
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-04-04 10:05:02 +00:00
Tor Lillqvist
f1e2c030b0 tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()
... in SourceContext::fire_dragDropEnd, it seems, because it runs in a
thread in its own. Educated guess based on debugging, turned out to
work.

Change-Id: I084a1af30b1f7e157aafdb2d95866d767fc0f8d6
2017-04-04 12:55:36 +03:00