fix UREPACKAGEVERSION

Change-Id: I18464a7fd65fd2ab6f5996218cf6edc97a5f615e
fdo#77600 RTF export: always close URL's before the end of run

In case the URL text has multiple portions, then MSWordExportBase
generates multiple URL's anyway, and this helps to avoid loosing some
direct formatting of the remaining portions of the paragraph.

(cherry picked from commit 55c832d86e6cb06e9d6423ce5e6245189bc80da1)

Conflicts:
	sw/source/filter/ww8/rtfattributeoutput.cxx
	sw/source/filter/ww8/rtfattributeoutput.hxx

Change-Id: Ifd72741de610ce69b9ae0978aa8f9a532a3aeed2
Reviewed-on: https://gerrit.libreoffice.org/9124
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
table not resizing when rows/columns added to it

I happened across a presentation whose table didn't resize when extra rows and
columns were added to it. It worked on a higher resolution machine, but not on
a 1024x768 one

Change-Id: I98a7a04bee0b0175174e6376e9ebc046b9eff2dc
(cherry picked from commit 88c3b4bbf005299203370efecbc09dd9d9d26a72)
Reviewed-on: https://gerrit.libreoffice.org/9122
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Resolves: rhbz#1089377 crash on loading a specific rtf

(cherry picked from commit 5aeaba2e6592dab0404301dcef644144f82ffcbf)

Change-Id: I26864f3a2247f5d7184f395cfed91eaf92e36295
Reviewed-on: https://gerrit.libreoffice.org/9131
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
crash in selecting text in comments midway in para

(cherry picked from commit 7dca5341d799d59a81e6dac84586fa2daa02a550)

Conflicts:
	sw/source/core/uibase/shells/langhelper.cxx

Change-Id: Iaab71e201fae6a03936ccc6aac040027a183209c
Reviewed-on: https://gerrit.libreoffice.org/9148
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Resolves: fdo#60040 crash after undoing master page application

 regression since 839cb94a2bd9dfadb6a7e11a97f0540a78f79b6b

Change-Id: Ie7068ecd1655ecae169948dc1e08330dc4200bf9
(cherry picked from commit f756fb84a1629d455ccbd7af1f3975ac307fb957)
Reviewed-on: https://gerrit.libreoffice.org/9150
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
fdo#72741, fdo#76607: Backport of Calc sort rework.

This change requires mdds 0.10.3 as the baseline.

Conflicts:
	configure.ac
	sc/inc/fstalgorithm.hxx
	sc/source/core/data/column.cxx
	sc/source/core/data/table3.cxx
	sc/source/ui/docshell/dbdocfun.cxx

Change-Id: Ia6d2bf1ee17e96c30b6d5310f5c49e5a4404e094
Reviewed-on: https://gerrit.libreoffice.org/9144
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
fdo#76663: Let's not skip the first element of a matrix in PRODUCT.

Change-Id: I00683ce64fea58a80cd7137384e8f30464c44e9f
(cherry picked from commit 4158d8843d50d50e9830c8dc24af8722de77f4af)
Reviewed-on: https://gerrit.libreoffice.org/9153
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
fdo#73891 Fix "UI color panel does not show the actual color in Writer"

1.The Font/Background/Highlight Color panels identify the actual color
 by a small frame.
 (Regression from the commit 35aa48d80b4b800d408d26bd72fbdfd711abbb6f
  See also fdo#32376 - Set default color to the current one in toolbar
  popups)

2.Fix this in the Floating Font/Background/Highlight Color Toolbar,too.

Reviewed-on: https://gerrit.libreoffice.org/9103
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
(cherry picked from commit 5c31515d2e54a42ceac1b21409cb730cdbb825ed)

Change-Id: I5c2db8ab8923ab146cbf921dcb90894765f8420c
Signed-off-by: Kohei Yoshida <kohei.yoshida@collabora.com>
fdo#77039: Fill the match string even if the raw string is empty.

And in case of an empty string, call svl::SharedString::getEmptyString()
to get an empty shared string instance.

(cherry picked from commit 50708577850544920c746ebc382d47275452a761)

Conflicts:
	sc/source/core/tool/queryparam.cxx

Change-Id: I0923e59f03468790270de8ef22323c0cedad002f
Reviewed-on: https://gerrit.libreoffice.org/9155
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
fdo#76611: Wrap reference addresses at max boundaries.

When importing shared formula tokens.

Change-Id: I7e1a05a78c3a93330476516e0459cffb668e3f66
(cherry picked from commit c6c286f14468d341f5fd88edc39a37175a1b6caa)
Reviewed-on: https://gerrit.libreoffice.org/9167
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
n#862510: Fix text rotation.

Fix breaks document in n#783433 - the one there is
damaged - resaving it using mso 2010 should fix the problem there.

Change-Id: Ib2ee7ab20489d716dc189ac6810d705763a16476
(cherry picked from commit e3e12b1d1e36e1a0d4fc4c6423b584d677693897)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
n#870234: Import gradfill for text colors.

Uses the first color from the gradfill list.
(Which is better than plain black!)

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

Conflicts:
	oox/source/drawingml/textcharacterproperties.cxx
	oox/source/drawingml/textcharacterpropertiescontext.cxx

Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb
fdo#75489 Pass toolbar context menu commands to toolbar for handling.

The toolbar context menu is handled by the toolbar manager, however
the items are provided and managed by the toolbar itself -- previously
any events on the list of toolbar items in the context menu were silently
discarded, whereas now we pass them on to the owning toolbar.

Change-Id: Ia17718c3ff8acfba1b6d655022dd9469932f3493
(cherry picked from commit 944c78ecb91608f4c3e9bab32fdbc90c67326525)
Reviewed-on: https://gerrit.libreoffice.org/9170
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#70853 writerfilter: refactor to avoid redundant Papx class in doctok

(cherry picked from commit f453cf1d328f96dd5ad8e94b102bff3124e06154, but
only the rtftok part, the rest is not needed to fix the bug)

Conflicts:
	writerfilter/source/dmapper/DomainMapper.cxx
	writerfilter/source/dmapper/StyleSheetTable.cxx
	writerfilter/source/doctok/resources.xmi
	writerfilter/source/rtftok/rtfdocumentimpl.cxx

Change-Id: Ic65e750bab99fb6b4c862418ccc53aa4b1f1298e
Reviewed-on: https://gerrit.libreoffice.org/9173
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Related: rhbz#1032774 slide restarter should disable auto-exit

The scenario is a pps that exits the app when the presentation
is complete. But using "switch screens" in the presenter
console will stop and restart the presentation. So protect
that "stop" against existing by disabling the autoexit
and restoring it afterwards

(cherry picked from commit b7197cfe5d207b171412760c6d72353f31947e93)

Conflicts:
	sd/source/ui/slideshow/slideshow.cxx

Change-Id: Id986ad7e3cfafb8068540fb90d05443f329b554c
Reviewed-on: https://gerrit.libreoffice.org/9166
Tested-by: Andrzej Hunt <andrzej.hunt@collabora.com>
Reviewed-by: Andrzej Hunt <andrzej.hunt@collabora.com>
fdo#75397: Return an empty string for empty element.

This is the behavior as of 3.6.  It had changed in 4.0 and onward by
accident, and caused the bug as reported in fdo#75397.

Change-Id: Id96fea354604b3c13cbbf2d9a73223b7725c7d66
(cherry picked from commit 5fab47ddbe332a150fb2005e941a2c19bd38ce7f)
Reviewed-on: https://gerrit.libreoffice.org/9187
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#77969: Return 0 in case of matrix consisting of all empty elements.

Change-Id: I225d50445d7f84a17c0b9492c17247e4c1c9ef44
(cherry picked from commit 453ea919e70fa9832f11e3ef042bb80cd86892cc)
Reviewed-on: https://gerrit.libreoffice.org/9189
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
the safety check was a bit too strict, fdo#77984

Change-Id: Idfc3b3dd1d9f4de428e43c515b13a8d7e40e347c
(cherry picked from commit f1d5c27892b0b6a5dc81c94dbf61f9285a52aa5a)

Signed-off-by: Kohei Yoshida <kohei.yoshida@collabora.com>
Mismatch alloc/dealloc

Cppcheck can't detect these cases for the moment
See http://sourceforge.net/apps/trac/cppcheck/ticket/5740

Change-Id: Iac3b5bdea8078b02d78afb53bb8afcb2673b4316
Reviewed-on: https://gerrit.libreoffice.org/9193
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>