Use Q_* macros.

This way we won't conflict with boosts signals and slots.

Change-Id: Ia92b283a5b47b7bc8c2bec2c6be664c9b7f1bed8
Reviewed-on: https://gerrit.libreoffice.org/6682
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 2e6a17ac88e89d4db8491605ac4dd6ea249b5d01)
Drop processYield return type.

The virtual Yield function has no return type, and the result of
processYield is actually never used => drop it.

Change-Id: I3da7bc99fd8f56301da37ca196b03b34cdc84a40
Reviewed-on: https://gerrit.libreoffice.org/6684
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit bee6b3e6dad729263d10daf1550826871c57fe05)
Redirect file picker UI processing to GUI thread.

If a KDE4FilePicker is opened via an remote UNO call, e.g. via
a RPC Java call, a JVM is started in a new thread to handle the
call.

This was creating the KDE4FilePicker in the non-UI JVM process,
which crashes LibreOffice.

Therefore we redirect the processing of all FilePicker calls to
the main thread.

This fixes fdo#71145.

Reviewed-on: https://gerrit.libreoffice.org/6683
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit fa8b5ae8e24fe26de7b26eff8a4a523ab22408fa)

Conflicts:
	vcl/unx/kde4/KDE4FilePicker.cxx
	vcl/unx/kde4/KDE4FilePicker.hxx

Change-Id: If6ec2d205af5a883df35fddb44a12ac43e3560f0
Rewrite Qt4 based nested yield mutex locking.

The Qt event loop may start a nested event loop, when checking for
clipboard and Drag'n'Drop events.

Previously this was handled by running this nested yield loop
inside the main glib loop using
  qApp->clipboard()->property( "useEventLoopWhenWaiting" );

But this results in nested paint events which crash LO:
  QWidget::repaint: Recursive repaint detected

To prevend yield mutex deadlocks, check for nested event loops
and always release the yield lock before starting the nested Yield
event loop.

This fixes fdo#69002.

Change-Id: I7e827abd3489783053ec7123372742a32555875d
Reviewed-on: https://gerrit.libreoffice.org/6685
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Thorsten Behrens <thb@documentfoundation.org>
Tested-by: Thorsten Behrens <thb@documentfoundation.org>
(cherry picked from commit 13a34f4c6307d1bd2443cbf3fbd83bfdd8cdbafb)
fdo#67011: Run Display::Yield through KDEXLib::Yield.

Drag'n'Drop is handled in a second thread, which tries to "yield
the display" while the main Qt thread probably is already
yielding. Both need the YieldMutex, which freezes the application
until the D'n'D thread times out.

Trying to yield the display throught the application yield
results in a recursive loop.

So this catches and breaks the recursion, but just inside the Qt
thread, so other processes can "yield on the display", instead
of simply disabling the Display::Yield.

Change-Id: Ifba91aa89fe5b0a89cc94820935dc996a065112f
Reviewed-on: https://gerrit.libreoffice.org/6750
Tested-by: Jan-Marek Glogowski <glogow@fbihome.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
(cherry picked from commit 95f60222e75486336b6569afa8f34d60b51c94ad)
fdo#57874: verify GetRedlinePos return value before usage

Make sure return value of GetRedlinePos is checked each time
before usage.
Fix crash in Redline dialog.

Change-Id: I5586d8ddc1a7905c524a522addc89969e704048d
(cherry picked from commit 1fadebef054b811d8d6487d45d76dea1990e1268)
mail merge: properly increment indexing counter (was const)

Change-Id: I1d780a5369c04a93e7fe16b41bff5f37d641e60c
Reviewed-on: https://gerrit.libreoffice.org/4857
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a4688cde5b7295ca5f5f1ff2fc6e615139c467cf)
mail merge: forward PrinterName property to ExecPrint method

Otherwise, there's no way to select the printer to use (from an
extension)

Change-Id: Iee59f9de38547a8edb0419cf4d2df3c1ce2d7999
Reviewed-on: https://gerrit.libreoffice.org/4858
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 788fa63351c00bce83b485fa1725e36a57336ab3)
Add PrintName to PrintOptions.idl

Change-Id: If023204f44a4b1180ea747686356c2a8a7aaf288
Reviewed-on: https://gerrit.libreoffice.org/4859
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4e0656ac0bc5be3306ad016a1a494577ad2ef8b8)
sw: clone InputField dialog on input-field removal

Setup a listener on RES_FIELD_DELETED event, and cancel dialog if
a field is deleted. Add Cancellable capability to Input dialog too.

Fixes a crasher that occurs when fields are removed (e.g: by an
extension) while the InputField dialog is running.

Reviewed-on: https://gerrit.libreoffice.org/6261
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit eb42610c43b1011cde0af8b03d20ec70e4e789b5)

Conflicts:
	sw/inc/swabstdlg.hxx
	sw/source/ui/dialog/swdlgfact.cxx

Change-Id: I9e132a109cba3127b934a3baecbf445a2bde1377
fdo#40788: Allow manual breaks in Calc to be forced

If the scale settings specify that the print ranges must be scaled
across a specific number of pages, the default behaviour is to ignore
breaks to avoid the case where breaks force more pages than specified.
Here, an option under Calc -> Print -> Pages is added so that the user
can specify that manual row and column breaks should be forced.

Reviewed-on: https://gerrit.libreoffice.org/6531
Tested-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 7e4f8eb5eff642c7fc8bfa665289d55a1c5b054b)

Conflicts:
	sc/source/ui/inc/tpprint.hxx
	sc/source/ui/optdlg/tpprint.cxx
        sc/source/ui/src/optdlg.src
	sc/uiconfig/scalc/ui/optdlg.ui

Change-Id: I445cd7ce9e16e4ec2d0c320f059edad62b40f22d
i#74651: Allow undo of image removal.

This fixes the original error to set the modified flag for the
document.

Change-Id: Ife77def6a3064432725b0b1202144994ca574351
fdo#66773: fix for line spacing default

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Reviewed-on: https://gerrit.libreoffice.org/4810
(cherry picked from commit 5bb9b70a66d7818844abfaa297893c095e03d24c)

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I7dafa709fd7dcd3df445277505468386c3f1cef2
DOCX styles: Output real rPrDefault's.

Not complete - to be checked which of the properties are we supposed to
output; so far we support only w:rFont and w:lang.

Change-Id: I142dd075735ba2c5cb1022768bfecf793148078f
(cherry picked from commit 9f8fb9fce00caf1672844444a737a6477e34c9cb)
DOCX export: Export run properties defaults in docDefaults.

The paragraph properties still need some work, so that part is disabled in
order not to break the unit tests.

(cherry picked from commit 62ceeb1d1a0ff32e1be615f78da796aa13aaa06c)

Conflicts:
	sw/source/filter/ww8/docxattributeoutput.cxx

Change-Id: I06e55a5345d4fe08b14b8a260ab774b38770bf7b
fdo#64146: change file merge of numbered lists.

Have a more sane handling of inserting a file, which starts with
a list into an already exiting file at a list position.

Change-Id: I062a876b758a0673a10a5f4b2675430cf1477a79
fdo#56355: Freeze layout / page format normalization.

For single-file mail merge this skips the page format normalization,
which would be run during each document / page append.

Instead the normalization and checks are run for the whole document
at the end of the generation, changing this code from O(n2) to
O(n). This way each mail merge generated document uses the same
time, because the target document isn't completely traversed for
each page change.

With my test document this produces the same output, save some
changed internal document IDs.

Reviewed-on: https://gerrit.libreoffice.org/6733
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
(cherry picked from commit 13a8fac05425f9d66c643f25faa49c1f17c62474)

Conflicts:
	sw/source/core/layout/newfrm.cxx

Change-Id: Ia779705cfb107383341f946542d28434c986591a
Add sub-menu to open templates.

Change-Id: I8039419b3a4a41321f00d24ce80366a42cff171d
fdo#71005 Remove odd "Workaround for automated testing"

...that got added by 62ee5e1a752033344c172ad2380a5f1e2492330a "INTEGRATION: CWS
calcshare2: #i85794# workaround for automated testing" but does not make much
sense, esp. as all our (subsequent-)checks each use a dedicated, throwaway
UserInstallation anyway.

Change-Id: I64ca47a7d7ee3c2eb2ab33eebcec5a79a7e3d0df
(cherry picked from commit 2c2ff538908e4c61987469c9e09325c2b479b185)
Handle fixed page size printer option.

Correctly handle the printer option "fixed page size". If set,
pages are centered and trimmed onto the fixed page, regardless
of the page size option.

Change-Id: I10f6f5a10268c452847f032e204df8f363be99a1