fdo#81617: Split formula groups at sort range boundaries.

Otherwise, partially sorting a range may crash, or at best incorrectly
update formula references.

Change-Id: Iefcb86d205d83ccc5b684048bfd9aadabf6e13eb
(cherry picked from commit a3fc7f20089062afa4f778e70ba8be84032a30a7)
Reviewed-on: https://gerrit.libreoffice.org/10583
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
fdo#79578: Properly update formulas upon change in db collection.

Update it to handle formula groups correctly.

(cherry picked from commit 300845922eec7a28bc1da337acd21f138685d759)

Conflicts:
	sc/source/ui/docshell/dbdocfun.cxx
	sc/source/ui/docshell/docfunc.cxx
	sc/source/ui/docshell/docsh5.cxx
	sc/source/ui/undo/undocell.cxx
	sc/source/ui/undo/undodat.cxx
	sc/source/ui/unoobj/nameuno.cxx
	sc/source/ui/view/viewfunc.cxx
	sc/source/ui/view/dbfunc.cxx

Change-Id: I009a7fcf3d3fb17ef6951c50534ca6bc1fffc259
Reviewed-on: https://gerrit.libreoffice.org/10605
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Related: fdo#81641 create new styles with an initial name

instead of creating with a blank name and changing it later

this way undo of a style creation is initialized with its name and so create a
style followed by deleting a style and undoing all those steps doesn't crash

(cherry picked from commit e904562af54545684b32d2042ded6bdb9459edca)

Conflicts:
	include/sfx2/styledlg.hxx
	sw/source/uibase/app/docst.cxx

Change-Id: Ida7a34410d5d7b05edcb86950aabb3c672b82c8f

style category listbox depends on being unsorted

regression from

commit 6ecfbf153a7c11c63d208630ac6a27064058099d
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Wed Mar 13 15:10:25 2013 +0000

    drop unused resources and toggle label to activate replacement widget

Change-Id: I65ca8ec58ed984120f3c2e7ba68507cbf8acf089
(cherry picked from commit 11fab6b705638359b2ca0e3e85590aa7cc70a03a)

Related: fdo#81641 exclude 'all styles' category from organizer page

it doesn't make sense to be able to assign a style to
'all styles'

Change-Id: I632c62f293b553e436ceb8da0baf2bb39941fd39
(cherry picked from commit 2223ff6cb99df097a357674801835c7a260b551d)

Resolves: fdo#81641 the new style shouldn't be a conditional style

regression from

commit 715d79bcc59d68c77dc84a1038998dd873df92e9
Author: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Date:   Fri Nov 30 11:51:46 2012 +0100

    Styles & Formatting: added SFXSTYLEBIT_ALL_VISIBLE and show hidden styles

commit 2fd9c2bf9af0c50dae3af3dbe5e22965ccdb4ae7
Author: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Date:   Sun Nov 25 15:24:42 2012 +0100

    Allow to hide styles in the "Styles & Formating" dialog

    In its current state, the feature only hides the styles. Things to sort
    out are:
     + Add some automatic filter to show hidden styles
     + Make the visibility persist in the file format

(cherry picked from commit 1af0e46102350114dd5e854b7692c640dae2727f)

Conflicts:
	sw/source/uibase/app/docst.cxx

Change-Id: I7244d424765db0d5ed3aeaf380a8e1af56aa7eaf
Reviewed-on: https://gerrit.libreoffice.org/10503
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
rhbz#1121254 reload font list from shell on change

Change-Id: Ief88373c210b3b6f65c1df5b31870aca561095bb
(cherry picked from commit 0497864bd4f603605997938d504ef9598623e713)
Reviewed-on: https://gerrit.libreoffice.org/10546
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
coverity#1194911 Unchecked dynamic_cast

Change-Id: I1e7f4bcd8f54219d86ad7a003469d5a486090f47
(cherry picked from commit 8736c5222a8e83a1310713a92492e63198749467)
Reviewed-on: https://gerrit.libreoffice.org/10630
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
bnc#467459 - fix editeng text search with expanded fields.

(cherry picked from commit 274b628a2b523eb45e297352a85f0177c6e747f0)

Signed-off-by: Matúš Kukan <matus.kukan@collabora.com>

Conflicts:
	editeng/source/editeng/editdoc.cxx
	editeng/source/editeng/editdoc.hxx

Change-Id: If59d0e2f886e94148b81cb6cfcad067733fcb918
bnc#885548: Reset the default user to the document owner at the end.

Otherwise the user name is set to the name of the user in the last revision
record, which will be used when recording new revisions.

Change-Id: I9b5e39c3b3a85614af67f86db9ed2bb3509a9e2b
(cherry picked from commit 227d3e72b0b29b73440157b64d6fb56fa151e05e)
Reviewed-on: https://gerrit.libreoffice.org/10610
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
fdo#81330: When moving to a different sheet, set 3D flag on.

Change-Id: I16c6e687259635c4d0ac0e5dab0140941b409bc8
(cherry picked from commit 5e55d5ffb70437e917e4092f4030d5a454fd20d6)
Reviewed-on: https://gerrit.libreoffice.org/10637
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#80846: Get the parameter order right.

It's column, row, tab in this order, not tab, column row.

Change-Id: I32e69a403feaf18532c7ac241fa2a98fc65a4ba7
(cherry picked from commit 1fcc30503549b47046c84333af542ed739f685ba)
Reviewed-on: https://gerrit.libreoffice.org/10633
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#78502: writerfilter: RTF import: handle \u keyword inside levelnumbers

The ";" terminates an entry and shall not be inserted as text,
even if some over-engineered producer encodes it as {\uc1 \u59 ?}.

Also, remove the special-casing of the \leveltext destination, since the
bugdoc does contain \uc inside it and it's not obvious why that should
be ignored.

(cherry picked from commit e93f0852477b44df986807860c821319a921b199)

fdo#78502: actually empty parameter to getParagraph() is not tested
(cherry picked from commit b9dca968c6fd0ab5ca140c65b0e54d153cd34986)

Change-Id: I1e19c9df39597cb1b22bbda97853c829d7812e29
Reviewed-on: https://gerrit.libreoffice.org/10398
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#81384: writerfilter: turn the horrible btLr cell text dir hack

... by 5 degrees to starboard, which lets the row in the bugdoc appear,
altough the height is a bit insufficient still.  Why that works, is a
nautic mystery to me, i'd say this whole btLr emulation nonsense needs
to be keel-hauled, but after this patch i'll need some rum, arrrr...

(regression from commit 0208ead70a9412ccd554fcef3e9308f8ca17037b
 and commit 970160f78ef6cc7abacfa252daa8451e1f0117bb)

Change-Id: Ie0c6ec88b6d6635379b9127f6460647f14776aad
(cherry picked from commit 5893a7536a0bbce57c4a2f89680dcb4cff3d06d7)
Reviewed-on: https://gerrit.libreoffice.org/10631
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#78904 : LO hangs while saving the document.

- In case of framePr attributes being omitted in original xml, LO defaults
  such attributes to incorrect values.
- Correcting these values in this fix.
- This fix stops LO from getting hang while saving the document, the actual
  fix needs to be somewhere in the table layout. We need to restrict the
  frame from being considered as part of the table as MSO does not allow
  frame to be part of a table.

Reviewed-on: https://gerrit.libreoffice.org/9774
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 75fc9e669f209472ec6a282848166d96d02d84d9)

This also fixes fdo#79391, but not compeletely on this branch.

Change-Id: I4c35f7eff6ca1122901f5667fc26b849df527f60
Signed-off-by: Michael Stahl <mstahl@redhat.com>
fdo#75380: Let's not always set the line style to NONE here.

This one line guarantees that no matter what the real line style is,
it will be ignored.

Change-Id: I3bceaf49ce13ddb42ceb56750d8a4ccfef54033b
(cherry picked from commit 6053491532a5d9954caaa4abf09af30850f0cb94)
Reviewed-on: https://gerrit.libreoffice.org/10672
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#80986: disable highlight DOCX import

Highlight support is not implemented fully, so
it seems better to disable DOCX import of it until
it is finished.
Highlight can't be modified on the UI and is not
saved to ODT/DOC (regression).

Regression from:
8b949134441056a1455d67ddfdd7e0bc5f2ee682

(cherry picked from commit b5e60724ac73bb0e62b249145a8931fd6166bb69)

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

Change-Id: I94891769766ae90017e8afa70e65d080d5270202
Reviewed-on: https://gerrit.libreoffice.org/10721
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
avoid buffer overflow by using wrong buffer

Found by Asan.

(regression from CWS mba34issues01)

Change-Id: Ia7159c9bed9d7f823448acd02e18568a5f3f2093
Reviewed-on: https://gerrit.libreoffice.org/10717
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 955c5539a1ea5e971f111989d6c5bec11d936416)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
fdo#81993: Revert "Resolves: #i119464# Update default alignment ...

... value for docx [Sub]Title"

This reverts commit acc671ec74c874ffd22803bb2ee54a1f2c027155.

The commit is clearly unnecessary:

1) commit 3f9e7e72c53ecbe8ee1ab060f811cb41eadfc7e1
   appears to be a better fix for alignment

2) commit b95d203bc17c83ec0fe5139f519d53ed1d842d3a
   should have disabled the Center default in Writer already

Change-Id: Ib0cc60af037f12be0a1ab94ab32c743f7fca2b1d
(cherry picked from commit d4b96b45727314585d02394bb5a084393b647729)
Reviewed-on: https://gerrit.libreoffice.org/10734
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#81516 Support fonts like Source Han Sans with > 16 FDArray elements

Change-Id: I3f82574f434060d62dc3faeb730341c5b169ce9f
(cherry picked from commit 3b38a2342e48a2aec3c2e4f5aebf883db4b84101)
Reviewed-on: https://gerrit.libreoffice.org/10746
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
bnc#886540: Default chart background for pptx docs should be transparent.

Charts in docx and xlsx OTOH use solid white as the default fill style.

(cherry picked from commit 4a8f2431718f99de6fd9ee3461d703d007261c03)

Conflicts:
	oox/source/drawingml/chart/chartspaceconverter.cxx
	oox/source/ppt/pptimport.cxx

Change-Id: Ic4351fe65cabc12d60214b67c7026a317841f2c7
Reviewed-on: https://gerrit.libreoffice.org/10737
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
bnc#886540: Let's not push the available area down when no titles are there.

This improves visual layout compability with MS Office chart & looks better.

Change-Id: I348ea81152eca4e3bba9e0d9460448d9314738ad
(cherry picked from commit b398ed8e3f95b75705bb2e53d49589ef7fdbb1c7)
Reviewed-on: https://gerrit.libreoffice.org/10771
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
bnc#862514: Handle corner case in slide sorter correctly.

We should never return -1 when bIncludeBordersAndGaps is true; but that could
have happened in a corner case:

* export SAL_USE_VCLPLUGIN=gen
* start LibreOffice
* open a presentation with many slides
* resize the window so that it shows the slides _exactly_, no slide is cut
  off in the slide sorter
* point the mouse pointer into the left "Slides" sidebar (slide sorter) so
  that it does not cause any mouse-over effect (somehow between the left
  border, and the slides - there is space that can do this)
* turn the mouse wheel all the way down so that the last slide is at the
  bottom
* turn the mouse wheel up _once_
* turn the mouse wheel down _once_ - it will look like the view does not
  change (the last but one is still at the bottom), but you can see the
  scrollbar jump to the top
* and now you can again start turning the wheel all the way down to repeat
  the procedure :-)

Reviewed-on: https://gerrit.libreoffice.org/10683
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit 48272a9a720039e79c6a684f1f037811ea42ed0c)

Change-Id: I0253c89513222a1f2eb3263068997d10eea0f130
Signed-off-by: Matúš Kukan <matus.kukan@collabora.com>