fdo#77806: Use the common block position set for start and end listening.

Else an invalid iterator may result, which would eventually leads to a
crash.

Change-Id: Ie909de61244d661c72a3450cc69b29fbb218a248
(cherry picked from commit 7fbe0f56192f7e106c560646d37fbb93b69b0446)
Reviewed-on: https://gerrit.libreoffice.org/9225
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#78079: Re-work sort by column to get it to do the right thing.

Also fixed reference update problem.

(cherry picked from commit 3c4fb52d8fc89fe43983991ed2339295b2e0ef8c)

Conflicts:
	sc/inc/column.hxx

Change-Id: I06e6115ef969a011fdd5c92d5eb1927fb7ae789b
Reviewed-on: https://gerrit.libreoffice.org/9220
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
coverity#1210177 Uninitialized pointer field

Change-Id: If4e8ddfa0a4dcb9875ce82fc82d196ff3dbd9657
(cherry picked from commit f670aaaabf23f13ae5ebf61ba61824794137c597)
Reviewed-on: https://gerrit.libreoffice.org/9201
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fix crash found when exploring fdo#50697

(cherry picked from commit b25871da62facc20387ebfa2b908422578ca8ce9)

Conflicts:
	sw/source/core/frmedt/fefly1.cxx

Change-Id: Ie781c2534cb41104dd3d91d4370639e98baa8112
Reviewed-on: https://gerrit.libreoffice.org/9202
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
be explicit about text rotations, fdo#70670

Change-Id: I5090a49c2383e6a30165a8eca22b527972c0f507
Reviewed-on: https://gerrit.libreoffice.org/9231
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
escape conditional formatting formulas during xlsx export, fdo#75168

Change-Id: I9ebdb2315b51c2b53d8cfa0486b3ec22a8e0d88d
Reviewed-on: https://gerrit.libreoffice.org/9232
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
set graphic properties for error bars during import, fdo#78041

Change-Id: I43138745b074dcacdafa090d97eeb9aa2ccecf78
Reviewed-on: https://gerrit.libreoffice.org/9233
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
resolved fdo#78294 default null-date for document import is 1899-12-30

Change-Id: I9dfe76d422ad732a081442b95a995d8d395a098e
(cherry picked from commit 571cefca474e6b77d68f9fa31f805dcf692927fd)
Reviewed-on: https://gerrit.libreoffice.org/9253
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
fdo#78054: Initialize drawing layer when the document contains notes.

Don't be fooled even when the document doesn't have a drawing layer
initialized.  Sometimes a note creates caption on demand later, but if
the drawing layer isn't there the caption will not get created, which
ultimately causes this crash.

(cherry picked from commit fe451fb94a33c914c0a7c1265c013d9704af850a)

Conflicts:
	sc/inc/document.hxx

Change-Id: I37f4902fa84de91c9f793dc352127d9345a725e3
Reviewed-on: https://gerrit.libreoffice.org/9254
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#73766 TemplateManager: construct toolbars in focus traversal order.

Focus traversal happens in the order that UI items are initialised. As
the "TemplateBar" (i.e. actions that can be used on a selected template)
is to the left of the "ActionBar" (i.e. search/etc.), the TemplateBar
would be expected to be first in the traversal order.

This patch is only relevant for LibreOffice 4.2 -- in master (to become 4.3)
this dialog has already been converted to .ui, and focus traversal works
as expected.

Change-Id: I3328f2e79a8e5a781aceb29f79d0c54d4b421e74
Reviewed-on: https://gerrit.libreoffice.org/9257
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#76261 Get rid of unneeded and malfunctioning maItemListRect.

maItemListRect serves as a sort of bounding box for what items /could/
be visible on screen, however it is only used for determining the id
of an item we have just clicked on -- given that we already know that
we are clicking inside the visible area this is an unnecessary check.

In fact this check is erronous as we no longer limit ourselves to "whole"
rows as of 806919adf9c9bafbaba92c2d2ab35d2e2f9863f8 -- i.e. the previous
assumption was that a view large enough for n rows will show precisely
n (whole) rows, whereas we might be showing (n-1) complete rows, and a
fraction of a row at the top and bottom of the screen, i.e. a total of
n+1 rows, where maItemRect only encloses the top n rows, meaning we
were erronously ignoring clicks on the (partly visible) lowest n+1 row.

Change-Id: Ia52ed2e0d217a9f077cef86ee9c1847252844995
(cherry picked from commit fb0ca7eff0e16fa8dd1a4c8d75fef23830903a3f)
Reviewed-on: https://gerrit.libreoffice.org/9255
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#77944: Put updated formula cells into undo document.

Change-Id: Ib9d6a73d485878bfe6c2a1875936025eb4d0a30a
(cherry picked from commit 67563fd55b230eb68fef705ff645af7dab73af73)
Reviewed-on: https://gerrit.libreoffice.org/9260
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#77647: Fix the column insertion use case.

Change-Id: I7c78f54c9386eced16113e69e625d23ed4acedd7
(cherry picked from commit 7aa32a759fb7b440f870739f7bb680f405f338ce)
Reviewed-on: https://gerrit.libreoffice.org/9261
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
fdo#77990: Intern strings for hybrid strings during import.

Change-Id: I269497cac645e486ac08bb2b011df1b5b23dc021
(cherry picked from commit 1899bd0c3b8a16ede2de0125e762b23ba013d81f)
Reviewed-on: https://gerrit.libreoffice.org/9264
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Application::PostUserEvent returns a pointer dressed as sal_uLong

cherry picked from commit ce53796bfaf6df5c4415fda8f641cad8a3e144a6, plus more
cases from 93f5d5a9190e0e03bf4822663652a4b068c44f75: "The opaque PostUserEvent
IDs are actually pointers so declare them as such.  This avoids the recurring
mistake of storing such IDs as sal_uInt32, truncating in 64 bit environments,
causing RemoveUserEvent to potentially not remove the event, it thus firing 'too
late' and probably causing a crash."

Change-Id: Ia5ca45e35766a7cebf0b53bcac1bd9dff29ad6ea
Reviewed-on: https://gerrit.libreoffice.org/9259
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#39944: improve mapping between ATK and UNO roles

* UNO role GROUP_BOX was not mapped to any ATK role, now it's mapped
  to ATK_ROLE_GROUPING.

* UNO role COMMENT was mapped to ATK_ROLE_SCROLL_PANE, we replaced it
  with ATK_ROLE_COMMENT.

We use registerRole method to map these instead of doing a direct
association to prevent a failure in case the installed version of ATK
doesn't contain these roles.

(cherry-picked from e031c8ae1ac046fcf165213d80e83311d80a71f5 to
address fdo#77682)

Change-Id: I7e266a7e92d59b282c51934df05b53414588cc7e
Reviewed-on: https://gerrit.libreoffice.org/9267
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Resolves: fdo#77899 fax etc wizards don't start

Wizards should look for templates in Template_internal, not Template_user

...as only the former reliably denotes the share/template tree where the
wizard templates are stored.  (Presumably the latter defaulted to the former as
long as it wasn't explicitly set in the past, but is now always explicitly set
since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg
~/Templates for default Template location.")

Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf
(cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c)

actively search for wizards dir in all internal templates

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

Conflicts:
	wizards/com/sun/star/wizards/ui/WizardDialog.py

Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
fdo#77944: No need to store updated formulas in undo document when moving.

This causes crash with dbgutil build, and I'm sure would cause issues with the
release build as well.

We now use broadcasting to handle reference update during undo of block move,
so this old way of handling undo for block move is redundant and obviously
causes issues.

(cherry picked from commit 6cc92a2fead337eef3d9cc3e5818cfcc505e4651)

Conflicts:
	sc/source/ui/docshell/docfunc.cxx

Change-Id: I9dcbb9d9e3808da3f8510eab16ad21b626f881d9
Reviewed-on: https://gerrit.libreoffice.org/9265
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Resolves: fdo#68600 limit comment width

(cherry picked from commit 087fcc43b13985b03d935dfd1e25a0d36d58cb1e)

Conflicts:
	sfx2/source/dialog/dinfdlg.cxx

Change-Id: I7060ae18a98e0793a936834b398f1e232d336672
Reviewed-on: https://gerrit.libreoffice.org/9269
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
fdo#62176: Revert "n757419: Hidden/Non-wrapping text."

This reverts commit 0f8f92a5b6fcba1fef456539bb929819a9162a85.

Negative fo:text-indent values are explicitly allowed by ODF, so
whatever problem was worked around here needs to be fixed differently.

Conflicts:
	svx/source/unodraw/unoshape.cxx

Change-Id: I7e2ae38c4c950e37f0c96a32164a5b6ec10fd47d
(cherry picked from commit 3b566ca82ebbe754902c1837e11da5fba1e6c93d)
Reviewed-on: https://gerrit.libreoffice.org/9275
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>