fdo#77382, lp#1342175: fix poor performance with find & replace with empty value

this cherry-picks three master commits:
 1cf19ea84794ca065749667b480dfed2d27d47b7
    don't call ScMarkData::GetMarkedRanges in ScColumn, related fdo#79422
 1e721077b43de84edab2a3ed2f316ddcbec6e3ec
    fdo#83141: optimize slow performance after when using replaceall or searchall
    Reviewed-on: https://gerrit.libreoffice.org/11829
 91502a72c12c559442e8bf77c27a516b49c2a68d
    fdo#83141: also optimize ScTable::HasAttribSelection
    Reviewed-on: https://gerrit.libreoffice.org/11877

Change-Id: I2df0eeefbe27b6a267e960f9ffedab0d4774c8a8
Reviewed-on: https://gerrit.libreoffice.org/13041
Reviewed-by: Seyeong Kim <seyeong.kim@canonical.com>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
rhbz#1167250: Avoid X11Clipboard already being destroyed in constructor

...via SelectionManager::run's aKeep acquring and releasing getReference()

Change-Id: I18696d30c41ca9ae101261668cbf54cb0a6c45fc
(cherry picked from commit 94d2de0ba1f010be7acf0d00ce5b2ed4ed2b895b)
Reviewed-on: https://gerrit.libreoffice.org/13102
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#85889 handle pc, pca and mac rtf keywords in writerfilter

(cherry picked from commit 7839633fb356285652ed96f4bf3f85bcd5b561a4)

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

Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342
Reviewed-on: https://gerrit.libreoffice.org/13106
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
make sure to check for formula first, fdo#80301

Change-Id: Ie822d1a154b7b25437ce7e5d09eb399460823acf
Reviewed-on: https://gerrit.libreoffice.org/13082
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#78980 i#98931 Accept args for .uno:InsertAnnotation

(adapted from commit 917c52f3219149741199015fce1740c5b13d814e)

Change-Id: I27b1b966135767d204a11a9d9f38ad6cc943ee61
Reviewed-on: https://gerrit.libreoffice.org/13067
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#80280 Don't add items with no bitmaps

(cherry picked from commit cf26921658c0905a4d2dda13f91e3db99c76ade6)

Conflicts:
	cui/source/customize/cfg.cxx

Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530
Reviewed-on: https://gerrit.libreoffice.org/13068
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
added LTL Lithuanian Litas to Euro Converter

Reviewed-on: https://gerrit.libreoffice.org/11090
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
(cherry picked from commit 0b3e1d9b222bf045b03746f1c162bf8077a24a1b)
adapt SBCOUNTRYCOUNT
(cherry picked from commit 375228c2c811412b516fe29bf263a520f4e9be1a)
ditch unused sCurrUNKNOWN and sCurrSYSUNKNOWN strings
(cherry picked from commit 99e1b398f28ee8eb2fc2d6bf5db8362170f32e69)
increment SBCOUNTRYCOUNT again, we have 19 currencies 0..18
(cherry picked from commit dfb48f77ba011661e03b6eb942234adb4e6630d7)

Change-Id: Id4eeb42bbbaec979f60b57ddab2794b38f1e3157
Reviewed-on: https://gerrit.libreoffice.org/12952
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
svx: punish evil-doers who put duplicate properties into custom shapes

LO 4.3.2.2 is evidently able to export an ODF document that violates
XML Well-formedness constraint: Unique Att Spec.

<draw:enhanced-geometry
 draw:mirror-horizontal="false"
 draw:mirror-vertical="false"
 svg:viewBox="0 0 21679 2134682997"
 draw:text-areas="0 0 ?f3 ?f2"
 draw:mirror-vertical="true"
 draw:type="ooxml-rect"
 draw:enhanced-path="M 0 0 L ?f3 0 ?f3 ?f2 0 ?f2 Z N">

Not sure how to reproduce this, but the attributes there are apparently a
serialization of SdrCustomShapeGeometryItem's aPropSeq,
retrieved from a "CustomShapeGeometry" property, so add some input
validation and assertions there.

(cherry picked from commit 7fcbb29db802acd8c0f32e8ff578ef4b2f82c46b)

Backport adapted to remove C++11 lambdas.

Change-Id: I91151365b507779a4bdc9cce2057d34f2376f005
Reviewed-on: https://gerrit.libreoffice.org/13111
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#86708 paint after Undo of Sort

Regression of 10fc138307afb4b39baddb0d56eb8e986e5d29ea that exchanged
the PostPaint with SetDirty, but the paint is also needed.

Change-Id: Ic3e81fa106f405568effaed71ab33b575b4c5c5c
(cherry picked from commit 5cec4ea827570a5bb0a368025f3733b841107d07)
Reviewed-on: https://gerrit.libreoffice.org/13122
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Revert "Resolves: #i63015# always default to WinAnsiEncoding..."

Because under Linux use text
"'"
and font "Nimbus Sans L"
and export as pdf and the output is garbled

If we do want to stick WinAnsiEncoding here then we'll presumably have have to
test that pEncoding actually matches WinAnsiEncoding and/or generate an
additional Encoding/Differences from WinAnsiEncoding for that font.

This reverts commit eea16cb3e65a4308caddb7618d31a76ca259dbb1.

(cherry picked from commit 297b22bd49ea11a90063ab8503fb83090f351668)

Change-Id: I9dd8de2a68ad276cce769545186d169160880e09
Reviewed-on: https://gerrit.libreoffice.org/13121
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
check that the fdo#79441 case works in both update references modes

Change-Id: I4aa997847661021af27f27e8763a89a61f185f1f
(cherry picked from commit fb2c3fec1b98b54f929d0cec64789b79306e03b1)
Reviewed-on: https://gerrit.libreoffice.org/13115
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
fdo#83765 do not update references in SortReorderByColumn() if disabled

Similar to SortReorderByRow()

(cherry picked from commit 115a4b7ca36f65d93070d2e81048320d202e87a3)

Conflicts:
	sc/inc/column.hxx

Change-Id: I39f8d62b79994196b9c5933355dbbc66a5f60a5d
Reviewed-on: https://gerrit.libreoffice.org/13113
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
fix fdo#79441 again and keep references to other sheets during sort

... also if other references are not updated. References to other sheets
are never to be treated as relative during sort, they are always
absolute, even if they have relative row/column part references.

Broken again during the big sort mess. Even if there was a unit test,
which didn't help as it got disabled / adapted to the change..

(cherry picked from commit f0e7364603c9566bc158303c515c3274ccba62ca)

Backported.

Change-Id: Ic0e61c5e1cb0728e20725c29e450ab0eb55c3305
Reviewed-on: https://gerrit.libreoffice.org/13114
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Resolves fdo#86689: Strikethrough: "With /" and "With X"

"static" keyword explains why first time the option is well taken into account and not the other times.
So let's remove this and the option will be taken into account all the times.

Cherry-picked from: f46a5d6dfddf86be0d77e00cf44f26af54a97c75

Change-Id: I9db84373e425dfe21c307b965b1796c781cd7863
Reviewed-on: https://gerrit.libreoffice.org/13126
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#82681: return IsUserDefined w/o negation

when the predicate is called StyleSheetIsUserDefinedPredicate

Returning negation thereof somewhere, somehow, corrupts one of
SfxItem pools. Thus, invalid read happens and crashes Impress
and Draw.

Now the loop in SdStyleSheetPool::UpdateStdNames does nothing
(it iterates through user-defined styles, but its body does
something for non-user-defined styles), so more investigation
here is needed.

This is partial revert of commit 3440766f0ad43454287a874b5fd34b6f2af6bdf1

Change-Id: I06f0da320c49674dac2adf43b7c374babbdadb57
(cherry picked from commit a784c33fd48eeb3394dc63610e384cf866233093)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Resolves: fdo#84043 don't create duplicate Mirrored[X|Y] properties

regression from 13ef16423e78d3ea825172594f08c47d2f9bfd09

commit 13ef16423e78d3ea825172594f08c47d2f9bfd09
Author: Armin Le Grand <alg@apache.org>
Date:   Wed Nov 21 13:23:01 2012 +0000

    For backward compatibility take mirrorings in setTransformation into account

    Also found an error in SdrObjCustomShape::TRGetBaseGeometry when MirrorY was used

    (cherry picked from commit 4116c33b12d3787c406f0348f89efcb1cf409507)

Change-Id: I7bfb5dea32b8ab8498e3d92975c49b830c81e6fb
(cherry picked from commit 751e5b32c5c361995bf0ba3295f773341fd92c23)
Reviewed-on: https://gerrit.libreoffice.org/13149
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit d3b7bf16a58c02af2d1fdf5db2fa149c6815095c)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
fdo#86169 fix completion of function name crash

function names with dot or underscore were not completed
correctly, leading to incorrect results or even crashes

Change-Id: Iacb6af29c609ab39746185c71d4443537bf46b5e
Reviewed-on: https://gerrit.libreoffice.org/12380
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 5456abc4d734583664a55c01a0e750e3051b03c9)
Signed-off-by: Eike Rathke <erack@redhat.com>
Resolves: fdo#75408 go back to the old way of doing things

Revert "Resolves: rhbz#1012353 fdo#48846 allow starmath objects to be resized"

This reverts commit 1b717e5686f34c3ce798310a6216f7ea98fb2cd9.

Change-Id: Iaf8410fc1e5611cda04356d32e37ee25a7f59898
(cherry picked from commit 51221bbf0c7cca0a329393dac2059818006ab338)
(cherry picked from commit 2babe1baf46dcad936703d12cbd847393f5e467b)
Reviewed-on: https://gerrit.libreoffice.org/13136
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
fdo#86472 added white backgrounds to images so they appear fine in dark themes

Change-Id: Iaae21bc2205b62520b3dbe6564099e24d87beaf6
Reviewed-on: https://gerrit.libreoffice.org/13142
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Tested-by: Yousuf Philips <philipz85@hotmail.com>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ...

... SvxExtParagraphTabPage"

This reverts commit 5ce19ddcb6595c71980aecfa1e8c0827343159a4.

It is now simply wrong to claim that a SID_ATTR_PARA_PAGENUM item with
value 0 is set, when that is a valid offset value.

SwTxtShell::Execute() will call SfxToSwPageDescAttr() which pulls the
SID_ATTR_PARA_PAGENUM out of the item set and sets it.

Change-Id: If5a155c2874486b3ef7d01883fe73f8e5fca46fe
Signed-off-by: Andras Timar <andras.timar@collabora.com>