Resolves fdo#54155: Crash when playing with a Group inside a Group

Cherry-picked from 7bd94d73ec56622685d0e23f8b5133ba110524be

Change-Id: I89c80fca1cdc8bc88172eaf8057141d5e42a06dc
Reviewed-on: https://gerrit.libreoffice.org/9910
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fixes for up-casting to Reference<XInterface>

Fix regressions introduced with
6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking
Reference constructor to reduce code noise"

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 533c6cb6bad6ef0432e8eebbfd4daf90ef71f3b4)

Conflicts:
	framework/source/uifactory/menubarfactory.cxx

Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687
Reviewed-on: https://gerrit.libreoffice.org/9921
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Related: fdo#33455 retain color on scaling of 1 bit depth pngs

load test doc and zoom in and out and at certain zoom levels
its correctly black and at others its red

(cherry picked from commit be9d65bb5f5a83c19eec02a037b8f808de70ecb8)

Change-Id: I445ce672742ddb6d6592ef419bf5e14c5f09a5b5
Reviewed-on: https://gerrit.libreoffice.org/9923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Resolves: fdo#80160 PNG with 1-bit colormap only show black and white

Change-Id: If0c9950c18e6091fafea47954a4654db436a3a44
(cherry picked from commit 986c0451d05e7bb6ff7edd9f27d0e45532bcd22c)
(cherry picked from commit c1df0c41b602ac144fdde4efcf546549443afa86)
Reviewed-on: https://gerrit.libreoffice.org/9929
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#80009: xmloff: ignore excessive fo:clip values

These cause problems in drawinglayer, and nobody needs a 5km clip.

Change-Id: Ic485250413194adbcd0ccf855f12e89e532d7120
(cherry picked from commit 924a28a7b1dc2f89e6940630057557f5f03494df)
Reviewed-on: https://gerrit.libreoffice.org/9947
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>