:sw: rename SwDoc::Append to something unique

(cherry picked from commit 3b11057b75434526f67e678ddc1deb9ebd61c752)

Conflicts:
	sw/source/uibase/dbui/dbmgr.cxx

Change-Id: Ibb9db5ecdea6439df20fc1ee609267dcdd864405
MM: dump debug documents based on environment var

Introduce SW_DEBUG_MAILMERGE_DOCS=<n> to dump n mail merge debug
documents (partly merged and working copies).

This will speed up mail merge unit tests and allows dumping of
an arbitrary amount of intermediate mail merge documents.

(cherry picked from commit 0a5cd87e591d7f87bfab92716079af719259f143)

Conflicts:

	sw/source/uibase/dbui/dbmgr.cxx

Change-Id: Idb9fc19f99ccafe5574897bd1e687d439c52ebe5
MM: export the SwDocShell mail merge via UNO

This saves the loading time for large document. Use it if you
want to present the generated document to the user or write a
mail merge unit tests.

This includes:
  * renaming "only" to "shell" at multiple occurences
  * dropping the DBMGR_MERGE_SINGLE_FILE special type for the mail
    merge wizard in favour of an additional SwMergeDescriptor
    boolean
  * cleanup and renaming of the internal merge type enums, so these
    actually  match the diffferent merge targets: printer, email,
    file and shell

(cherry picked from commit 9835bb562cfe3a5d386c24d86176ba7bb5ab26d2)

Conflicts:

	offapi/type_reference/offapi.idl
	sw/inc/dbmgr.hxx
	sw/source/ui/dialog/swdlgfact.cxx
	sw/source/ui/dialog/swdlgfact.hxx
	sw/source/ui/envelp/mailmrge.cxx
	sw/source/uibase/dbui/dbmgr.cxx
	sw/source/uibase/inc/mailmrge.hxx
	sw/source/uibase/uno/unomailmerge.cxx

Change-Id: I33c6773972195193687ba9c3e12b562310d330c1
MM: add non-UI LoadAndRegisterDataSource function

For the mail merge unit test we need a function to register new
database sources without any UI interaction. This refactors and
introduces new versions of LoadAndRegisterDataSource, which gets
all previously interactive values as arguments.

(cherry picked from commit 5187ce45b93e5e841e541eac98da3fa2110fe632)

Conflicts:

	sw/source/uibase/dbui/dbmgr.cxx

Change-Id: I1601b4112ddc800a0935950133d386ce349b9087
MM: first unit test and infrastructure

Extendes SwModelTestBase with mail merge functions and a declaration
of the DECLARE_MAILMERGE_TEST macro and uses it in a first test.
As most tests it's registered as a slow test run by 'make check'.

The broken MM used to drop the leading empty pages, which resulted
in a document with 4 pages and the two page bound draws merged
per single page.

Tests the MM result for page count (eight) and each draw anchor to
be on a different page.

(cherry picked from commit d10f6d49b77dcf955629901937d8d5e3a2976a6c)

Conflicts:

	sw/Module_sw.mk
	sw/qa/extras/inc/swmodeltestbase.hxx
	sw/qa/extras/mailmerge/mailmerge.cxx
	sw/CppunitTest_sw_mailmerge.mk

Change-Id: Iab17f5844e68221d48cb89863323bcfe4c8ae0d2
loplugin:implicitboolconversion

Change-Id: Ia63460949a3ba58f0394f5b94e0d906ca7849710
(cherry picked from commit a5824fa97c7300faca3b09fe0922c9f319b3c49b)
blind fix for windows build

Change-Id: I8c3d8ccccb039bc82b23d74b41ca4254f50d5c84
(cherry picked from commit 99bb7d664ef6c809ff6478fe2335c8a4a00e141b)
Clean up declaration of __cxa_get_globals

At least Clang trunk towards 3.4 now rejects incompatible declarations of the
same extern "C" function in different namespaces, so that trick of getting at
the function that is exported by libstdc++ but only rudimentarily if at all
exposed in cxxabi.h no longer worked.

TODO: This change should be reflected in any other bridges where it is relevant,
too.

Conflicts:
	configure.ac

(cherry picked from commit 5ba3d1740b03efa394b2d2bf34fb8a8d3db2331d)

Change-Id: Ie3ccbdb7d75cc98636d02c0435958532620724f2
...and similarly for __cxa_allocate_exception and __cxa_throw

Conflicts:
	configure.ac

(cherry picked from commit c17f01753ce94e9f57d6e4a2763152240fbcd50a)

Change-Id: I87ae299aac97180f0587c553d85b051decca155c
error: friend declaration specifying a default argument must be a definition

...(Clang trunk towards 3.4); this appears to be specific to C++11, which added at
the end of 8.3.6/4 [dcl.fct.default]:  "If a friend declaration specifies a default
argument expression, that declaration shall be a definition and shall be the only
declaration of the function or function template in the translation unit."

(cherry picked from commit 39f42b0b03489459540404dd218c38709853c021)

Change-Id: I750c60a2206d7af41322ebb31aa6deca2491067f
error: comparison between pointer and integer (Clang trunk towards 3.4)

...the check in itga.cxx was useless anyway, as new[] does not return null.

(cherry picked from commit b63524d269a792e20777a91e4ed7e8ceae7ff55f)

Change-Id: I4de5a46e14a83ab134d0a098a62748e909dc9c00
use -> with pointers

Change-Id: I0df4775931e8e0b289a63afd501efaaf079302fe
long live code duplication

(cherry picked from commit 105ddd124ad4cff3109d2e25c8035402446ac0db)

Conflicts:

	sw/source/uibase/dbui/dbmgr.cxx

Change-Id: I7386c26e5ff05cec23a6cccb86ed3aa6ab715096
SfxItemSet ranges are inclusive

This used to skip the last item in the range.

(cherry picked from commit 540243834390256f0a1dd968ff02860fda07edcf)

Change-Id: Icf27a041f1388c8bd01568356d1009a08e5b7a7a
copy default drawinglayer attributes when doing mailmerge

(cherry picked from commit f4825097a98c681cc187d88cfc1f8fd82362e1e0)

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

Change-Id: I4c6fc31ae72d179975c65aec0b560741474d433e