bnc#821208 DOC import: don't overwrite WW8Num* character styles

In general we're overwriting styles on import in case we're not pasting.
But these WW8Num* character styles are in general not from the document,
they are created because Writer needs a character style for each
numbering level to handle what's in the DOC file.

So, in case there is a character style with the same name as our
"character style for numbering" styles, prefer the later ones, as that's
intended most likely.

(cherry picked from commit e88ee8aa307ecec1cc22cda56b97dcfd8b838ce8)

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

Reviewed-on: https://gerrit.libreoffice.org/8449
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>

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

Change-Id: I675f867722360aca765bb96b0b43ea47deab9847
fdo#59329 fix docked panels borders

Change-Id: Ia918d644fb57d6fbaeef90c8c1a6806a8d7e589c
Reviewed-on: https://gerrit.libreoffice.org/8412
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#59329 Fix docked window border lines

This patch completes the missing border lines. This is intended
for versions 4.1 and 4.2 only.

Change-Id: Ib15cb3b01dca4631f643a0036475cf684793d256
Reviewed-on: https://gerrit.libreoffice.org/8413
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
resolved fdo#61520 do not add multiple empty strings to the validation list

(cherry picked from commit 7122ef19847b26529ed1d5bad40df869e91a8495)

Backported.

Change-Id: I4f6180b2f8c914a965965ca362e1670e8b434d37
Reviewed-on: https://gerrit.libreoffice.org/8470
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
rhbz#988516: DOCX import: fix context stack when importing header/footer

When a header/footer substream is parsed, a ParagraphGroup is started,
but not ended; so the properties of the last paragraph in the
header/footer are applied to a paragraph in the body.

The obvious fix to add a call to endParagraphGroup() at the end of w:p
element breaks table cells.  So add a call to endParagraphGroup() at
the end of the "hdr"/"ftr" element.

(The problem in the bugdoc became much more visible with commit
ca555c596043c88894b964ac5e21f5a7271d5f3b, but was there before)

(cherry picked from commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2)

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

Change-Id: Ib054f1882793049b39424c1076ba5d4b319cd027
Reviewed-on: https://gerrit.libreoffice.org/8476
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#52547 SOT: Prefer embedding image data to embedding linked image.

When copying an image from e.g. Firefox or Chromium the clipboard
will contain both the image itself, and the url of the image --
presumably it makes more sense to store the image data itself if
it is available -- the order of the items in the *_FREE_AREA_Copy
defines the order of preference for which data in the clipboard
should be used.

Change-Id: Id8b862a9f2fce3a34adbb16509e9b7372500a239
Reviewed-on: https://gerrit.libreoffice.org/7928
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit c47db038f98aaf7aec3cbe57c4e5683591afa23e)
Reviewed-on: https://gerrit.libreoffice.org/8384
(cherry picked from commit 91a55de7be6a23685a875517495c1af67f3a8b60)
Reviewed-on: https://gerrit.libreoffice.org/8499