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
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
fdo#72928: fix deadlocks in librdf_Repository

Refactor to do all calls on parameters before locking the mutex.
This requires splitting up some librdf_TypeConverter methods into an
extract function and a make function, with an intermediate
representation between.
Also rename some internal functions to make it clear which are called
with Lock and which with NoLock.

(cherry picked from commit 7db6b2f7968d8063b12312737136f09cb7549805)

Conflicts:
	unoxml/source/rdf/librdf_repository.cxx

Change-Id: Iddc42461d95351785578ef6a80fbf5d056356c16
librdf_Repository: fix missing mutex lock in various destructors

Change-Id: I5756ab6ff6de0b2532bef9866063f361e330a009
(cherry picked from commit 62fd1aa382c75feaa72f8aa09af4d3fc0b387dcc)
librdf_Repository: make older compilers happy

Change-Id: Ide4df8f621f810b20be811db06d46edd5a9dc5f8
(cherry picked from commit d3aad81268298c05163136e2e953e1dfe0728d9e)
Let the list of bookmarks in the 'Edit bookmarks' dialog be resizable

Change-Id: I09279f4d35238e6ab2d7b3e27e711dfe7fd74211
Reviewed-on: https://gerrit.libreoffice.org/7399
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 2f2d9e3799d041381565ac1ef6e7a8c8a065871b)
Cleanup SwXMailMerge constructor.

Move all fixed initializers into constructor definition.

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

Conflicts:

	sw/source/ui/uno/unomailmerge.cxx

Change-Id: I7317deae43abf6a9e865c66969cb39a4b69de826
Drop unused nMergeType from SwNewDBMgr

All code uses the nMergeType from the SwMergeDescriptor. Actually
there is just code setting the nMergeType in the SwNewDBMgr but
none reading or comparing it.

I don't know if the removed assignments actually should work on a
SwMergeDescriptor object, so some parts of mail merge may already
have been broken.

Reviewed-on: https://gerrit.libreoffice.org/7432
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit e3e6ad0e5c36531d8002c24c5e41a99ff597c095)

Conflicts:

	sw/inc/dbmgr.hxx

Change-Id: Ic8c52e6171f122d3837d9f2de81053e30ac8f5b7