Commit Graph

2376 Commits

Author SHA1 Message Date
841e1a6f36 remove some old MSVC workarounds
Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222
Reviewed-on: https://gerrit.libreoffice.org/36660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21 09:14:45 +02:00
1c5cae479b loplugin:unusedmethods
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672
Reviewed-on: https://gerrit.libreoffice.org/36718
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20 10:07:10 +02:00
1f73ac90da mnDateFormat in DateFormatter is unused
ever since it was added in

   commit c8330937878a57c74b4f3e3083c013ed0903f80d
   Author: Vladimir Glazounov <vg@openoffice.org>
   Date:   Wed Apr 11 16:52:58 2007 +0000
   INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED

Change-Id: Iceb44ea4da620e1e7b9c9494486954db9e5d7959
Reviewed-on: https://gerrit.libreoffice.org/36691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20 08:26:48 +02:00
2a53bf858d only one use of GetStandardText
Change-Id: I384e3ccb6bfaf491a4616ee89c714a510f1f670b
2017-04-19 15:01:28 +01:00
2b83e73fd7 remove freshly unused menu support from src files
Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b
Reviewed-on: https://gerrit.libreoffice.org/36646
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-19 13:42:07 +02:00
dd0824c92a tdf#89329 Use std::unique_ptr for ImplData in vcl/syswin
Change-Id: I5cf16991bba0cec80c7fbaf32f4529e4f022201b
Reviewed-on: https://gerrit.libreoffice.org/36590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-17 01:34:57 +02:00
32f34f0d1b remove the remaining unused mouse cursors
which are not used by us directly or aliases of published awt constants

Change-Id: Ic4f009715d71a2f986b8ef8d64b4b2e64986bf3b
2017-04-14 10:27:04 +01:00
185bb1b6bb document that PointerStyle and css::awt::SystemPointer are linked
Change-Id: Ic4a91520fe6c43f1a602e307fbcb0eb89e4f60bb
2017-04-14 10:27:01 +01:00
77d78b3391 revert removal of apparently unused mouse cursors
partial revert of...

commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e
Date:   Wed Feb 8 10:40:28 2017 +0200

    loplugin:unusedenumconstants read-only constants in vcl

because we cast the com::sun::awt::SystemPointer values to PointerStyle
in VCLXPointer::setType and we've at least lost the PEN as used in the
slideshow context menu's pen mode

"toolkit/source/awt/vclxpointer.cxx" 74L, 2181C

Change-Id: I5ef677f70ebc491b50403de0f92179ea4ae3bb14
Reviewed-on: https://gerrit.libreoffice.org/36526
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-14 10:00:42 +02:00
f15a69bd57 vcl PDF import: don't assume larger offset -> newer trailer
Usually when the PDF file contains incremental updates the updates are
appended at the end of the document. But this is not required, the
various trailers can be in any order. Make sure that we look at the last
trailer (logically last, not the one with the largest file offset) when
looking for pages.

Change-Id: Idcd85a7c6bbf08c9436dd73933d79cdb683f482c
Reviewed-on: https://gerrit.libreoffice.org/36527
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-04-14 00:11:06 +02:00
76fbd18a51 Notebookbar: remove dependency between all containers and IPrioritable
Change-Id: I92bff0d68470763c88172744e82d9b5915ffb6f1
Reviewed-on: https://gerrit.libreoffice.org/36387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-04-12 22:25:53 +02:00
3927105e19 convert ruler menu to .ui
Change-Id: I5f9b0033288ccd4b58e055998834185970f987b0
2017-04-11 13:58:57 +01:00
ee73747ab5 tdf#107018 PDF export of PDF images: handle references in nested dictionaries
Also get rid of the GetKeyOffset() and GetKeyValueLength() calls when
copying dictionaries: the reference already knows its offset and length,
so no need to call them. This makes the dictionary and the array
handling more similar.

Change-Id: I65936acfaf857636a8d83da3a4cec69289eb89d8
Reviewed-on: https://gerrit.libreoffice.org/36282
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-04-07 21:07:52 +00:00
b805e5705c Revert "Related tdf#105566 Update Infobar when signature status changes"
This reverts commit d8faf3bf9a82e8f49340b5020ec4ee931cc2f3f4.

This causes an infinite recursion in JunitTest_sfx2_complex
involving the newly added SignatureHelper::updateInfoBarState().
2017-04-07 14:15:23 +02:00
7d98edfa49 tdf#39468 Translate German comments
Translate German comments and terms in dbaccess/, extensions/, formula/,
include/, reportdesign/, rsc/, sd/, svtools/, and vcl/

Change-Id: Ie20dadda0eeb0786eb328c6c652287d5481c5e3b
Reviewed-on: https://gerrit.libreoffice.org/36249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-07 11:15:03 +00:00
d8faf3bf9a Related tdf#105566 Update Infobar when signature status changes
gpg4libre

Change-Id: I8f29cf16905c79d19d46662b087f4fd8778c8147
Reviewed-on: https://gerrit.libreoffice.org/36251
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-07 09:06:39 +00:00
0c82dff153 loplugin:singlevalfields
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1
Reviewed-on: https://gerrit.libreoffice.org/36145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06 09:21:58 +00:00
242a9b6342 tdf#106972 vcl PDF export, PDF images: handle indirect font references
There were a number of problems here:

- the /Resources key of a page object may be an indirect object
- the /Font key of a resource object may be an indirect object
- the /Length key of an object may be an indirect object

So in all these cases handle not only a direct dictionary / number but
also when we have a reference-to-dictionary/number.

Change-Id: Ie74371f0ba43a133a1299843ef20cbfc75fe26d7
2017-04-05 19:07:32 +02:00
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
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
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
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
2f33a8cd23 coverity#1403662 Mixing enum types
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947
Reviewed-on: https://gerrit.libreoffice.org/36020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-02 16:31:48 +00:00
bb37c73bdc tdf#39468 Translate German comments
Translate German comments in filter/

Change-Id: I2b5856f1d4b894ca64a5b8105ca3f6466b17360b
Reviewed-on: https://gerrit.libreoffice.org/35953
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-31 08:58:48 +00:00
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
0cd7ccb87e convert GradientType to scoped enum
Change-Id: Ie71ead122965e967796ed01270cc2824d35905ac
Reviewed-on: https://gerrit.libreoffice.org/35900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30 13:06:54 +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
30608c6637 tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied arrays
Also fix confusion about dictionaries in arrays and arrays in
dictionaries.

Change-Id: I0d71d5796b1eb4f89e3fd9a5b1f807d2a7340a35
Reviewed-on: https://gerrit.libreoffice.org/35806
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-28 15:52:49 +00:00
1a99e32f6f move inlines into the class
Change-Id: If185834c35c9aa7d48e3305cfee3fde47826180f
2017-03-28 15:16:30 +01:00
2ba9d58d59 tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied dicts
When copying font definitions the dictionary has multiple values where
the type is a reference. Improve PDFWriterImpl::copyExternalResource(),
so that multiple references are copied correctly as well.

With this the bugdoc (from comment 5) text appears in the output.

Change-Id: I2343e616d8b36e3cdcbd4e713bd3f7fa7bce6d3b
Reviewed-on: https://gerrit.libreoffice.org/35760
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-27 15:31:13 +00:00
044e8d7952 tdf#106693 vcl PDF export, norefxobj: copy array objects
So far only the dictionary and the stream of the object was copied, see
if it has an array, and take care of that as well.

Also check if the array contains a reference and act accordingly.

Change-Id: I7f3bb12ec0bbc6f6e1db4f43625c7768b862c895
Reviewed-on: https://gerrit.libreoffice.org/35744
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-27 09:48:02 +00:00
3c979a362b uitest: provide a way to select a floating window, e.g. popup menu
Change-Id: Ice418b974c59c7d8c773b81a82f0a06c84547f10
Reviewed-on: https://gerrit.libreoffice.org/35699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-26 02:56:27 +00:00
feeb8ccfe1 Fix typos
Change-Id: Ia8bd59be341b0731198d48df974b60ecb04e289c
Reviewed-on: https://gerrit.libreoffice.org/35635
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 17:20:17 +00:00
f175ded3ae Replace some macros with constexpr functions
...in preparation of teaching loplugin:redundantcast about C-style casts in
macro bodies.

TRGB_COLORDATA contained a curious cast to sal_Int32 (instead of sal_uInt32 aka
ColorData), but for one that affected (by accident?) only the fist term of the
... | ... | ... | ... expression (so the ultimate expression was of type
sal_uInt32), and for another before a83698b980424be214829b3ee7cdbf8d2a778755
"tools: split out color macros into own header" there were two different
definitions of TRGB_COLORDATA, and only one casted to sal_Int32 (the other to
ColorData).

Change-Id: I5bfffe5614d0424202268ef7adaf6a0da61ec30a
Reviewed-on: https://gerrit.libreoffice.org/35679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25 12:51:34 +00:00
f135a8bdeb tdf#106693 vcl PDF export, norefxobj: update XObject refs
Start copying referenced objects recursively, and also take care of
updating references to the object IDs as they appear in our output.

With this, the 4th image referenced from the PDF image has a correctly
updated reference in its dictionary's ColorSpace key.

Change-Id: I8b49701c1f60bd0ef5a097b24ce59164554c44fa
Reviewed-on: https://gerrit.libreoffice.org/35653
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-24 20:32:51 +00:00
1f2bccf2d2 tdf#106693 vcl PDF export, norefxobj: copy XObject references
With this the images inside the PDF image show up correctly.

Change-Id: I430502fb6ae9de8111dda7e67db33642ff263317
Reviewed-on: https://gerrit.libreoffice.org/35621
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-24 12:47:33 +00:00
f059347857 loplugin:unusedfields
improve the plugin to find fields which are only assigned to in the
constructor

Change-Id: I95b5be238ebba83d950ca15093abdd1849740359
Reviewed-on: https://gerrit.libreoffice.org/35613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-24 08:57:01 +00:00
b755c56c50 TODO: move to ScrollBar when binary incompatibility is no longer problematic
since...

commit 72ebade6ba9e88a5a24db57266a53e8f52049214
Author: Ivo Hinkelmann <ihi@openoffice.org>
Date:   Thu Sep 13 15:33:31 2007 +0000

    INTEGRATION: CWS aquavclcarbonfixes (1.20.70); FILE MERGED
    2007/08/29 12:59:47 hdu 1.20.70.1: #i77549# extend native scrollbar NWF by adding PART_TRACK_*_AREA controls

Change-Id: I124c4014556f3a10b986a2886202210ebfc9eb10
Reviewed-on: https://gerrit.libreoffice.org/35586
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-23 13:29:37 +00:00
5f4826d89b tdf#106693 vcl PDF export: initial UseReferenceXObject option
It's still on, but in experimental mode start work towards the ability
to not use that markup.

Change-Id: Idf11c0e0a3c61ad93af331346ec7107304f6dc0f
Reviewed-on: https://gerrit.libreoffice.org/35538
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22 16:52:14 +00:00
7415b71b79 vcl: move in PDF tokenizer from xmlsecurity
The PDF code in xmlsecurity served two purposes:

- a generic PDF tokenizer
- signature verification

The first purpose is useful to have in VCL, so the PDF export code can
use it as well when it comes to PDF image handling.

This commit just moves most of the PDF code to VCL, it does not touch
the PDF export code yet. With this, also the somewhat odd xmlsecurity
dependency of CppunitTest_vcl_pdfexport can be removed as well.

Change-Id: I6fe8294ed5c4aa4d79f4b2ddef80a4d1c9d566cc
Reviewed-on: https://gerrit.libreoffice.org/35513
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22 08:03:40 +00:00
caf208166c uitest: better support for listbox logging
Change-Id: Ibd2625ba40cafdb07a2fcb5b2cfdd0e5f9e72b94
Reviewed-on: https://gerrit.libreoffice.org/35516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-21 21:30:45 +00:00
9f3b59a511 Notebookbar: multiple context containers support
Possibility to add multiple context containers.
Each container should have name "ContextContainer"
or "ContextContainerX" where X >= 1

Change-Id: Ie689ebde624f766b11d96370d6b108018f9130c9
Reviewed-on: https://gerrit.libreoffice.org/35506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-03-21 16:08:35 +00:00
dd5f85910e uitest: start to log key input
We need to disable this part in release builds.

Change-Id: Ica57f8aca1ffb5f7938ab82ef8b888a8d6d6101a
Reviewed-on: https://gerrit.libreoffice.org/35450
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-20 20:36:00 +00:00
26ee34d133 uitest: add logging for UI actions
The long term goal for this logging is that it generates content in a
DSL for the UI testing. The generated file can then be interpreted by
the UI testing and replay the interaction with the UI.

For now the plan is to have a readable output of what happens in the UI
layer that allows to quickly transform it to a UI test.

Change-Id: Ic536db766e41d03d048c920f6d551047af6fbb74
Reviewed-on: https://gerrit.libreoffice.org/35447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-20 01:48:20 +00:00
b5bef1f7d5 Typos
Change-Id: I13020539fe121151e884a90d72d47788fb3ae65c
Reviewed-on: https://gerrit.libreoffice.org/35436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 18:50:33 +00:00
5ec1713ae5 vcl: have SolarThreadExecutor use osl::Condition, not oslCondition
Condition is deprecated already, but there is no need for the
SolarThreadExecutor class to use the low-level C-API, when in fact there
is a C++ fascade that calls on this via the C++ abstraction,
osl::Condition.

This will make it much easier to switch to using std::condition_variable
in the future.

Change-Id: I81e8530d42fe1451c4ca5bce998b13de0576bc4e
Reviewed-on: https://gerrit.libreoffice.org/35386
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-18 08:02:26 +00:00
a6209ba6a8 vcl: OutputDevice::GetGlyphBoundRects()'s nIndex and nBase is always the same
So keeping just nIndex is enough.

Change-Id: I5d3a0e6b4a6ce1305a56cf50e7ff181a098f6412
Reviewed-on: https://gerrit.libreoffice.org/35336
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-17 20:18:46 +00:00
d920613f67 tdf#106458 Color widget should have same number of rows
... across different platforms/themes, so the standard
palette will always fit without a scrollbar. For this,
we must not hardcode some arbitrary fixed size, but
calculate the size based on the number of rows of the
standard palette.

Change-Id: Ica1d615b43b350aece6b2c29a73337439dd05ac6
2017-03-17 14:21:58 +02:00
c68ac77770 cleanup double includes and declarations
Change-Id: I770e09f48b1a3e8299f59a8e475ba3c18d436d7b
Reviewed-on: https://gerrit.libreoffice.org/35312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-03-17 11:01:26 +00:00
3b7d751ad4 tdf#103235 Notebookbar: use persona theme
Change-Id: I043f184ccd21c782c16d4ae1bc1c939b5e31acc2
Reviewed-on: https://gerrit.libreoffice.org/35234
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-16 07:47:00 +00:00