Commit Graph

425388 Commits

Author SHA1 Message Date
Tor Lillqvist
d66df262ee tdf#118647: Improve handling of system spell dictionaries on macOS
The system has generic spell dictionaries for languages spoken in many
countries, but LibreOffice wants them to correspond to specific
language-country combinations. So do it like that then.

Change-Id: I9ec4bb4302b2f1eec3ce7b1c1ef8f2be867bad52
Reviewed-on: https://gerrit.libreoffice.org/57220
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-07-10 11:11:06 +02:00
Michael Stahl
572b298e63 tdf#118578 sw: allow inserting only TextDocument
There are 3 sw document services: TextDocument, WebDocument and
GlobalDocument.

The current logic in SwView::InsertDoc() and
SwView_Impl::StartDocumentInserter() is to request a filter with the
same document service as the existing target document, so you can insert
only a GlobalDocument into a GlobalDocument, which doesn't make much
sense.

As it happens there are 2 different HTML import filters: "HTML" and
"HTML (StarWriter)", the latter using the TextDocument service.

So just hard-code to allow TextDocument regardless of the target
document.

(regression from 805fd1ca34)

Change-Id: I7dc0dd4789fba8b61625ca8eae74a864aea383b0
Reviewed-on: https://gerrit.libreoffice.org/57193
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-10 10:25:16 +02:00
Miklos Vajna
87b621a126 sw RTF import: add tests for shape prop posh left/right cases
Center was already tested, lcov says.

Change-Id: I10707a7a6318f3a8268db365f703485418ce7d51
Reviewed-on: https://gerrit.libreoffice.org/57204
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-10 09:20:20 +02:00
andreas kainz
ab3e7a234f tdf#118314 menubar: remove ShowImeStatusWindow in menubars
Function isn't available any more. codebase has to be cleanded up

Change-Id: I42597cde5b5d2472f670552f49776775d5bf391e
Reviewed-on: https://gerrit.libreoffice.org/57183
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-10 08:35:35 +02:00
Noel Grandin
02329510d4 loplugin:useuniqueptr in ScCellFormatsEnumeration
Change-Id: I5551b65d4c7fea7e38d7c5b40af7c1803218b960
Reviewed-on: https://gerrit.libreoffice.org/57203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:31:41 +02:00
Noel Grandin
5c8f9d0d83 loplugin:useuniqueptr in DrawViewKeeper
Change-Id: I75c58682539c7f2dd69c8d46f795411aa9fdb52c
Reviewed-on: https://gerrit.libreoffice.org/57202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:31:34 +02:00
Noel Grandin
e66e004cc0 loplugin:useuniqueptr in ScPreviewShell
Change-Id: I95c248755200ab1651faa82f00d49f1ca8e04191
Reviewed-on: https://gerrit.libreoffice.org/57201
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:31:21 +02:00
Noel Grandin
6b8a1a6fa7 loplugin:useuniqueptr in SwDropPortion
Change-Id: I42381af772d545206fc7facb0b893f7a1c8625bf
Reviewed-on: https://gerrit.libreoffice.org/57200
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:31:10 +02:00
Noel Grandin
208f91edea loplugin:useuniqueptr in SwTOXInternational
Change-Id: I6d0687f2dbfc1b3d168440c7192ddaf7869ef58d
Reviewed-on: https://gerrit.libreoffice.org/57199
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:30:54 +02:00
Noel Grandin
62cf9b4792 loplugin:useuniqueptr in SwFootnoteSave
Change-Id: If70990222a6a59cede90bb52413f22540dd06a75
Reviewed-on: https://gerrit.libreoffice.org/57198
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:30:32 +02:00
Noel Grandin
65e41592a6 pass SvStream around by std::unique_ptr
and give utl::OStreamWrapper a new constructor so that it knows it is
taking ownership of  the SvStream, which appears to fix several leaks

Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b
Reviewed-on: https://gerrit.libreoffice.org/57187
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:30:21 +02:00
Noel Grandin
acb7c06ab1 use std::uniqueptr in HandledTextToken
fixing a memory leak

Change-Id: Ic7754bb88a11855a308d39c6c4c66b89652422a0
Reviewed-on: https://gerrit.libreoffice.org/57186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:30:05 +02:00
Noel Grandin
bff02d5496 uitests - error if UITEST_TEST_NAME not set to anything useful
so the next poor sod who doesn't understand the instructions doesn't
waste time with the wrong way of specifying the tests

Change-Id: I9759c7f792ec80d660f70f79dc6e2589d44e360f
Reviewed-on: https://gerrit.libreoffice.org/57177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10 08:29:55 +02:00
Justin Luth
139750d7c2 tdf#118361 sw ooxmlimport: set footnote separator alignment
If RTL is defined in the default (Normal) paragraph style,
then the footnote separator should be right-aligned.
In MSWORD, the alignment is not a property that is stored
with the footnote separator definition, and it is not a
page property like it is in LO.
The reverse needs to happen for LTR default paragraph style.

Based on my MSWORD observations, the only place where you can
indirectly set RightToLeft is in the "Normal" paragraph style.
That option is disabled in all of the other styles.

In LibreOffice, this is typically handled by the locale properties.
The default PAGE style's Footnotes - Position is RIGHT for
RTL locales, but LEFT for LTR locales.

It is kinda interesting that no one from a RTL locale complained
about wrongly-right-aligned footnote separator
from imported LTR .docx's.

None of this belongs in export code, since MSO doesn't support
specifying the location - it is just a consequence of the
RTL/LTR settings.

Change-Id: I07d26640116cb12cb9157cd1d902b4c774dbba26
Reviewed-on: https://gerrit.libreoffice.org/56532
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-07-10 07:52:58 +02:00
andreas kainz
700407594c Colibre icons: fix icon-set-bars-x colors
Change-Id: Ic78e28080e9f2d77582fa3114646d860847b8960
Reviewed-on: https://gerrit.libreoffice.org/57207
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-07-10 06:10:08 +02:00
andreas kainz
937daa7585 tdf#118645 NB grouped calc: styles drop down menu will work now
Change-Id: Ie5838d4b36dc95ff234724ec924b78740a15b664
Reviewed-on: https://gerrit.libreoffice.org/57205
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-07-10 06:09:41 +02:00
Justin Luth
ab16d43dd6 ~NFC related tdf#102619 writerfilter: use ConvertStyleName()
This cleanup should help simplify and clarify immensely.

An empty followStyle is treated the same as not
defining it at all, and if a style specifies a follow, why
not accept any style with that ID, regardless of whether
a UI name was attached?
HOWEVER, both this unit test and
tdf104713_undefinedStyles.docx ignore the w:next
IN MSO. I tested with 2013, 2010, and 2003 and they all
revert back to w:next being the same style
in these broken documents.

Perhaps the existing test of whether sStyleName.isEmpty()
is not the best test, but that is what it was, so keeping
it until some proof document comes along.

Change-Id: I28b1a5d67e6feea6b4d1ffdb77ec27bf6c824251
Reviewed-on: https://gerrit.libreoffice.org/57075
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-07-10 06:09:28 +02:00
Mike Kaganski
1947730e98 Use range-based for
Change-Id: I2e598aa01d42ab4f67becdba3ee30f8dbe983aa2
Reviewed-on: https://gerrit.libreoffice.org/57210
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-07-10 06:04:01 +02:00
Mike Kaganski
d27e4007c6 Remove redundant variable
Change-Id: Iee6a7ade18d69655d99ab0d0eaed84cbb72e9128
Reviewed-on: https://gerrit.libreoffice.org/57209
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-07-10 01:25:31 +02:00
Eike Rathke
bf34c041ed Resolves: tdf#118638 preset include format patterns for anonymous subtotals
Change-Id: I48bc9d5e2bbdee58687dd87e38cad8e9af9de408
Reviewed-on: https://gerrit.libreoffice.org/57194
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2018-07-09 22:38:51 +02:00
Jan-Marek Glogowski
b444422244 WIN GetFontMetric doesn't matter for GetEmbedFontData
so there should always be a valid mpWinFontEntry[nFallbackLevel].

Change-Id: I27f7a5a72c50d10a88538d02f1510f583ae6df35
Reviewed-on: https://gerrit.libreoffice.org/57192
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2018-07-09 22:12:22 +02:00
Jan-Marek Glogowski
fad862e290 tdf#118555 fix HFONT fallback handing / lifecycle
Instead of storing the never changing DC in the WinFontInstance
store the HFONT, which is Windows logical font instance.

Then set the correct HFONT instance from the layout when rendering
its text.

This also changes the HFONT ownership and lifecycle. The HFONT
is moved from the mhFonts to the WinFontInstance, if available,
so it has a proper referenced lifecycle. The mhFonts is still
needed, as embedded font just supply an HFONT and no
WinFontInstance.

Change-Id: Iba62281c710290276f004f0c0177e6d37c849d2c
Reviewed-on: https://gerrit.libreoffice.org/57101
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2018-07-09 22:11:35 +02:00
Miklos Vajna
9d754a5915 sw: give the 'Default Style' char style a programmatic name
So that referring to that style is possible from UNO API client code in
a way that is portable across multiple locales.

This also improves consistency between the default para and default char
styles, as the default para style already had this behavior.

Also add a new CppunitTest_sw_unowriter for such tests which assert the
UNO API from cppunit, instead of hacking this into
CppunitTest_sw_uiwriter.

Change-Id: I0a2b02378dce53c6b79c57780d1b7f14e89242e8
Reviewed-on: https://gerrit.libreoffice.org/57191
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
2018-07-09 20:04:26 +02:00
Jens Carl
5f3914ad67 Remove obsolete (cargo-cult copied) dependencies
Change-Id: Id598f6a6ca30a3fd328d47c61c7998497222d03b
Reviewed-on: https://gerrit.libreoffice.org/57164
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-09 18:15:16 +02:00
Marco Cecchetti
daaf101ffe lok: sc: formulas were not updated correctly
this patch fixes several issues:

- any cell containing a formula above row 1024 causing a tile
invalidation whenever any cell content was changed, even if unrelated
to the formula;

- any formula below row 1024 wasn't updated even if it was inside the
visible area.

Change-Id: Ib92153d5755c4e231aa68dee807fe997f9e80a46
Reviewed-on: https://gerrit.libreoffice.org/53935
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-07-09 17:50:19 +02:00
Marco Cecchetti
08db80ebb4 lok: chart when edited is visible on other user's document parts
- Open a spreadsheet with chart in multiple views.
- With one view double-click in the chart.
- With the other switch to a different sheet.

=> The chart is visible for the second view on the other sheet.

The same is true in impress for slides.

Change-Id: Ia3fe98b0a9fc94c7f3a8f59f28e3a8937eb51a2a
Reviewed-on: https://gerrit.libreoffice.org/52960
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-07-09 17:43:11 +02:00
Xisco Fauli
1407aeea58 tdf#114131 Remove insert rows/columns in read-only mode
Change-Id: Ief3565bc41639af1a2f48fd2b4be9156a10596c2
Reviewed-on: https://gerrit.libreoffice.org/57098
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-09 17:42:07 +02:00
Marco Cecchetti
2f45ddefb9 lok: sc: user input is lost when another user moves the related cell
- Start/open a spreadsheet with two users.
- Type a number in a cell, eg. 10 in F10.
- With user A, change that number, but don't finish editing, eg.
change F10 to 5.
- With user B, add rows or columns before F10. The cells will slide
right/down accordingly, including F10.
- With user A, finalize editing in its new place (still showing the
updated value (5)), eg. press Enter.

=> The value reverts back to its former entry (10).

Change-Id: I938763bf3b8bc5b4b78c7c753ecfad929ec80e79
Reviewed-on: https://gerrit.libreoffice.org/52998
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-07-09 17:40:43 +02:00
Aron Budea
9a7a419baf tdf#112690: make page size of exported PDF closer to what is set
regression from 3a2ccb419c5face6fbf56b1a4877e675d4cd5fe8

Change-Id: Ia0fddeb112fa0867ec367c085e3682eac078d5f8
Reviewed-on: https://gerrit.libreoffice.org/57166
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-09 16:21:01 +02:00
Katarina Behrens
fa62b9c4b8 Implement reading screen count and screen geometry
this improves restoring window location should it be within
the secondary screen

Change-Id: Iaac6bcead6bfcb7ae9eda579e5a4ad6b2482cc39
2018-07-09 15:33:18 +02:00
Katarina Behrens
1bb7761b0a Basic Qt5 system display data
copied from dummy headless implementation

Change-Id: I1b184745627acd065b4c0cc54f044c47ec980c93
2018-07-09 15:33:18 +02:00
Katarina Behrens
5f33fa5ded Don't draw focus around checkboxes and radiobuttons
it is drawn separately around cb/rb's text

Change-Id: I22737944048c4d501ba4dc5416fa79d4d081e91c
2018-07-09 15:33:18 +02:00
Katarina Behrens
b7ae14ba2f Try to move adjusting focus rect down to gtk3 code
as it makes the focus rect look oddly shifted for kde5 widgets

Change-Id: Ia42ccf30207a8c804d23ba45870d839f94c3f858
2018-07-09 15:33:17 +02:00
andreas kainz
338c5387b5 Colibre icons: 32px icons
Change-Id: I217e4e9fe16cfb6958cab5c3394f8a48ce5466d9
Reviewed-on: https://gerrit.libreoffice.org/57180
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-07-09 15:28:18 +02:00
Kshitij Pathania
508f14b136 Conserved the alphabetical order in contexts.
ThreeDObject is remained on top as its entry begin with 3.
All others are sorted now except the generalised ones in last.

Change-Id: Id56550da450f0d2a0dd770a78360d20ada90f048
Reviewed-on: https://gerrit.libreoffice.org/56984
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-07-09 14:56:02 +02:00
Christian Lohmaier
59b73e257d Update git submodules
* Update translations from branch 'master'
  - update translations for master
    
    Change-Id: I2445c79d846d0d30f34e5ba51bb8fe3a462530dc
2018-07-09 13:12:32 +02:00
Jan-Marek Glogowski
6899a16130 Don't unload VclBuilder modules on shutdown
Prevents crashing the CppunitTest_smoketest on Ubuntu Trusty.

Probably this should be a subclass in osl:: with a proper virtual
destructor. The release() function is actually called for a lot
of osl::Module handling all over the code.

The alternative would have been a custom allocator for the map.

Change-Id: I10b86587556056b7080d0d04a27f07dbb8ca4d48
Reviewed-on: https://gerrit.libreoffice.org/57067
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
2018-07-09 12:23:39 +02:00
Miklos Vajna
67f3063b7c sw: prefix members of SwCompareConfig
Change-Id: If475eb38df6851eccde4570c69d36df4bc522a4e
Reviewed-on: https://gerrit.libreoffice.org/57176
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
2018-07-09 11:57:15 +02:00
Noel Grandin
1501da0109 loplugin:oncevar
Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a
Reviewed-on: https://gerrit.libreoffice.org/57108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09 11:06:19 +02:00
Gabor Kelemen
7af90cc93b Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade
to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from a* to configmgr

Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a
Reviewed-on: https://gerrit.libreoffice.org/57170
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-09 10:49:06 +02:00
Michael Meeks
432a935d4e tilebench: add --preinit mode.
Also cleanup DISPLAY to avoid various weird problems.

Change-Id: Ib480c94fc50baab6185ecadaabda9a8063cedfee
Reviewed-on: https://gerrit.libreoffice.org/57146
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09 10:15:00 +02:00
Michael Meeks
2872653997 lok: export preinit helper, and share code variously.
Change-Id: I09f2992c4ba45ce91190a9f61dd0fedd0eb8a581
Reviewed-on: https://gerrit.libreoffice.org/57145
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09 10:14:49 +02:00
Michael Meeks
a8ebc12eab tilebench: add dialog profiling mode.
Change-Id: I4661664d1206aacdaf22a4a8f05d7962547faf45
Reviewed-on: https://gerrit.libreoffice.org/56765
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09 10:14:37 +02:00
Michael Meeks
8a2414e469 Re-factor to allow dialog profiling.
Change-Id: I2268cc7b1db23c520ce3699d4e478d7c5bf6820f
Reviewed-on: https://gerrit.libreoffice.org/56764
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09 10:14:26 +02:00
Chris Sherlock
bfedfedafe test: create unit tests for Config
Change-Id: Iaf92f93e169cf7367e3b9fc521f237413a268493
Reviewed-on: https://gerrit.libreoffice.org/53893
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09 09:51:18 +02:00
Kevin Dubrulle
dc47a950ea tdf117058 - Simplify calls to Menu::CheckItem
Change pGearMenu->CheckItem( pGearMenu->GetItemId("gear_iconOnly") ) style to
pGearMenu->CheckItem( "gear_iconOnly" ) style, where it is possible.

Change-Id: I6ec77eac51be14a8e5d278bd3604cb65b3d1f006
Reviewed-on: https://gerrit.libreoffice.org/57172
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09 09:43:03 +02:00
Tor Lillqvist
498805290a Fix typo
Change-Id: I73b808f7dc34f1bdd4b84086b79cf56541e5072c
2018-07-09 09:49:22 +03:00
Ulkem Kasapoglu
79c0328f48 tdf#100726: Improve readability of OUString/OString concatenations
Change-Id: Ie78ca074a2472a57fb32c43f8dee9cc4cf5614c7
Reviewed-on: https://gerrit.libreoffice.org/56945
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-09 08:12:05 +02:00
Justin Luth
39a4f21fc4 tdf#102619 writerfilter: first create style, then set FollowStyle
Styles were having FollowStyle set to themselves (Heading 1),
not to a defined follow (Text body).

The style was being created with a FollowStyle property that
identified a style which had not yet been created.
So svl code was warning
  "svl.items", "StyleSheet-Follow not found"

This section of code should really be cleaned up, but that will
happen in a separate commit.

Change-Id: Iae79fac917f64cdaa14ca6568e7d903ec6dc60fa
Reviewed-on: https://gerrit.libreoffice.org/57074
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-07-09 06:03:07 +02:00
Markus Mohrhard
a7699fc272 uitest: test for ui elements children first
Change-Id: I837721533bc40cea55cbccaa14e1f14686aa3e3a
Reviewed-on: https://gerrit.libreoffice.org/57165
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-09 01:57:08 +02:00