Resolves: fdo#82747 Crash on opening wikipedia ODT Book

Test if there's indeed a subnode before testing its type

Cherry-picked from 3d34eb4612fa59fae7594399d3d6f798ddb35582

Change-Id: I1bb32652ceb82b0818a8d2cd8d71b46dd96ef2aa
Reviewed-on: https://gerrit.libreoffice.org/11050
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-on: https://gerrit.libreoffice.org/11084
Reviewed-by: David Tardon <dtardon@redhat.com>
bnc#770711: Make changing table text color in impress always work

We set text color for individual characters (in ContentNode::aCharAttribList)
and for whole paragraph (in ContentNode::aContentAttribs) too.
Problem: when table was loaded in an impress document with font color set,
you could not change it by selecting a cell because only
ContentNode::aContentAttribs was set, which has lower priority.
So, in that case, remove font color character attributes.

Change-Id: Ieb0c078481568dcb1739fe35d448c9591f687f2c
(cherry picked from commit a217f3cb2dce71a4322f78ceb45edb6f171b2b65)
Reviewed-on: https://gerrit.libreoffice.org/11123
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
bnc#719994: Fix the duotone filter to actually produce duotone

Not sure what it tried to do earlier, but it was obviously wrong.

Change-Id: I0b377c4baa88205a9a7ad7c134ec5bc2223e6205
(cherry picked from commit c03f7f2b427f7fe2b94dfb55ea64670426d1a957)
Reviewed-on: https://gerrit.libreoffice.org/11127
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
bnc#719994: We need the proper alpha mask

Change-Id: Ic16dceaca431929238fcef6be31ee95e068b91e4
(cherry picked from commit e06014e0db64ec36ec41dee542d2453c945fddd3)
Reviewed-on: https://gerrit.libreoffice.org/11128
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
out-of-bounds string access, this comparison never matched

aName == aLinkTabName.copy(nIndex, nLinkTabNameLength)
is not a replacement for
String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength)
instead use
aName.match( aLinkTabName, nIndex)
because here nLinkTabNameLength actually is aLinkTabName.getLength()

Change-Id: I884f56541f819db5672e9d096a26a3673e82d83b
(cherry picked from commit aebcabd54cc5587f3856c48db0a4c4fc0f3f8ce8)
Reviewed-on: https://gerrit.libreoffice.org/11134
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Resolves fdo#81084 fdo#81696 fdo#80874 fdo#81010 : sort causes crash

Change-Id: I8fb9ec26bc549c264bfbf30177d720b20677b319
Reviewed-on: https://gerrit.libreoffice.org/11102
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit c25ac84688b596b9990d382d550f0514161b78c2)
Reviewed-on: https://gerrit.libreoffice.org/11138
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
bnc#648251: Avoid opening embedded OLE object as "text"

On non-Windows, when double-clicking an embedded OLE object, our glorious
content type detection logic detects it as "Text", and opens it as a separate
Writer document, which is somewhat pointless. (But at least we don't crash, as
we did in the master branch.)

Avoid this by checking for a detected filter of type "Text" explicitly, and
avoiding the fun code paths in that case.

This leads to double-clicks being just ignored. Maybe it would be more useful
to produce a "General OLE Error" message box?

(cherry picked from commit 46ad54725bf28ea75278eb63dbf95c4a29618c1c)

Change-Id: Iae0726b5e9c511a92bdff7229d2978cbf76cb07b
Reviewed-on: https://gerrit.libreoffice.org/11140
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Resolves: fdo#83137 NULL pAction

Change-Id: I74c4e32aae1e3aa74d197f132c900627062b6d01
(cherry picked from commit 72f4f0e9e7db6798ff002632d5bc19b72a671306)
Reviewed-on: https://gerrit.libreoffice.org/11145
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
keep nScanlineStride number sane

bff + valgrind

Change-Id: I255a052251a6a0f1e4005b9cfb3b6ce00c6653ee
(cherry picked from commit 35412949a2fb2a4472177a0289de4f0c062b674d)
Reviewed-on: https://gerrit.libreoffice.org/11163
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Resolves: fdo#83062 infinite recursion

regression from

commit 7c03fc2fe77f9b1f910f4ab395923e52648c32b5
Date:   Mon Sep 2 14:30:09 2013 +0000
Related: #i123048# Corrected connector layout after reload

verified that #i123048# continues to work

(cherry picked from commit 8d8e8942b2ee2a2e85c65d71628057316c9f5897)

Conflicts:
	svx/source/svdraw/svdoedge.cxx

Change-Id: If5fce4b7a88d4d0972f52705334e4b9b48425cca
Reviewed-on: https://gerrit.libreoffice.org/11150
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Resolves: fdo#77516 sub-grid shouldn't be allowed as 0

regression from

commit 3cb6587abbf6888ac9fb3b0cccc9a5aa0dc29b55
Author: Csikós Tamás <csks.tomi@gmail.com>
Date:   Sun Jul 7 13:40:53 2013 +0200
    modern .ui widgetlayout for optgrid

Change-Id: I9e998ce203c16c2303e00347ce6a2992c92cc8dc
(cherry picked from commit 4bd317f845c2f3470c7fc354e478be08c2949e0c)
Reviewed-on: https://gerrit.libreoffice.org/11165
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
PPTX import: fix missing document metadata

Without this, the creation / modification date is lost on import.

(cherry picked from commit ef2668bad976f1fbb70759887cafd35ea7833655)
Signed-off-by: Andras Timar <andras.timar@collabora.com>

Conflicts:
	sd/qa/unit/import-tests.cxx

Change-Id: I0b74ac91aee7b8b3e0bc763247086a3a39816bc1
gbuild: serialize linking on "make check" too

Change-Id: Icdcca50627d2a7aed19287807f8f1bc17cb18efb
(cherry picked from commit e2bc4c005a13a4e3925c01b1e0d899899494f053)
Reviewed-on: https://gerrit.libreoffice.org/11176
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Access2Base - PATCH-01 Field.setValue

Gives erroneously an error message when argument is Null and field is nullable
https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=61447&sid=48e231a12084933d9da1b47e50b186ea#p323714

Change-Id: Icdfd660dfa52ea7434959f0d87ac2d989c1910ab
Reviewed-on: https://gerrit.libreoffice.org/11216
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
bnc#822347: if number type is not set, skip numbering

If numbering is detected then (level is > 0) and the number type
is not set, the defult bullet symbol is written. This is not
correct as the default should be SVX_NUM_NUMBER_NONE which should
skip numbering or set it to none. With this change the numbering
is skipped (as in MSO).

(cherry picked from commit 14fa2698f2f651343675761e75be01b84c4c5ff1)

Conflicts:
	oox/source/export/drawingml.cxx

Change-Id: I8d08a6325509c7bd6f96f64c8d29e5f3045458ca
Reviewed-on: https://gerrit.libreoffice.org/11180
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
check for empty slots' valid NULL pointer, fdo#79441

Change-Id: Ie81b8b00c1ab8776086bddeb7464bb7809914bf8
(cherry picked from commit 2be9ae72189e8b86d7e609727bab223645975ddb)
Reviewed-on: https://gerrit.libreoffice.org/11259
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#82183 do not reset globals while loading a document

Destroying the function list while an instance of the Formula Wizard is
still open is a bad idea. Workaround not doing this when loading a
document due to a DDE function or external reference being entered in
the wizard.

(cherry picked from commit c0aba5007b6e468336b41138f099914c32f4b0cf)

Conflicts:
	sc/source/ui/app/scmod.cxx
	sc/source/ui/docshell/docsh6.cxx
	sc/source/ui/inc/docsh.hxx

init formula options once, fdo#82183

(cherry picked from commit 10b6bda51c9da5429ca562c70ce75ee03e5f4e56)

Change-Id: I6fa00fb4f442bf7c9410679e446ff460289e4b16
Reviewed-on: https://gerrit.libreoffice.org/11064
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
(cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81)

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/11255
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
(cherry picked from commit bee7674a602123229b62cad23536f103496a5298)
Reviewed-on: https://gerrit.libreoffice.org/11310
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
clip PolyPolygon::Insert on .svm load

valgrind + bff

(cherry picked from commit fd64d444b730f6cb7216dac8f6e3f94b97d7ab60)

Conflicts:
	tools/source/generic/poly2.cxx

Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032
Reviewed-on: https://gerrit.libreoffice.org/11382
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
fdo#82994: added missing media extensions

(cherry-picked from commit f43d50d1e470dbfbadb4e90135069f0ca89d65c7)

Change-Id: Ibbce02b43192fd3afb4984f5f38251a518d7be06
Reviewed-on: https://gerrit.libreoffice.org/11172
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/11398
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>